Call distrubtion dial Plan

hi,

i have to forward the reveived calls on my aasterisk to my internal IVR Servers in round robin fashion. I have only two IVR server as of now. I just trying to create a dial plan using variable with a logic below.

[main]

exten => _9xx,1,Set(var=1)
exten => _9xx,2,gotoif($["${var}"=“1”] label1:label2
exten => _9XX,3,Hangup()

[marco-label1]

exten => _9xx,1,Set(var=2)
exten =>_9xx,2,Dial(SIP/${EXTEN}@hvp02)
exten => _9XX,3,Hangup()

[macro-label2]

exten => _9xx,1,Set(var=1)
exten =>_9xx,2,Dial(SIP/${EXTEN}@hvp02)
exten => _9XX,3,Hangup()

it seems like, throeing the error like

Executing [912@main:1] Set(“SIP/1006-b7513170”, “var=1”) in new stack
– Executing [912@main:2] GotoIf(“SIP/1006-b7513170”, “1? label1:label2”) in new stack
[Apr 1 22:21:48] NOTICE[27253]: pbx.c:1892 pbx_extension_helper: No such label ’ label1’ in extension ‘912’ in context ‘main’
[Apr 1 22:21:48] WARNING[27253]: pbx.c:6401 ast_parseable_goto: Priority ’ label1’ must be a number > 0, or valid label
== Spawn extension (main, 912, 2) exited non-zero on ‘SIP/1006-b7513170’

appreciate , if you can help me to fix this.

Rizwan

There are multiple errors, even before the confusion from not copying the actual configuration file. Why not just use round robin queues?

IVR system will not be able to login to queue as an agent.

Queue members don’t have to be agents.

Please correct me if i am wrong.

i think , to enter into the queue, we need to login as an agent into queue.

If not , how member will be identified

In the first set of sample members, in queues.conf, for 1.6.0.6, only two of the 6 are agents:

;member => DAHDI/1
;member => DAHDI/2,10
;member => DAHDI/3,10,Bob Johnson
;member => Agent/1001
;member => Agent/1002
;member => Local/1000@default,0,John Smith,SIP/1000

There may be other problems, e.g. with having multiple calls on the channel, but being restricted to agents is not one of them. Multiple calls may be a big problem, unless you have lots of local channels to hide that from the queuing system, which is getting messy.

For the record, you are going to priorities when you are trying to go to contexts. The contexts you are trying to go to have a bogus “macro-” prefix (or in one case, but I think a copying error, “marco”. Also, probably a copying error, a “?” is missing.