Round-Robin

Hello,

I’m having a bit of trouble I have no clue on how to fix it so I’m hoping you guys have come across it before.

What I want to do is when i call a number for example 555 it then dials sip phone one and if there is no answer or it is busy or unavailable then it dials sip phone 2 and so on.

Also I would like this pattern to be random or it increments by 1 every time

Thanks for you help

use queue … you can pick your ring strategy from a number of choices including round robin or random

if you wanted to stay away from queues then you can try this. I use this for a bank of fax fxs lines.

exten => 191,1,Macro(dialfax,${EXTEN})
exten => 300,1,Macro(dialfax,${EXTEN})
exten => 210,1,Macro(dialfax,${EXTEN})
exten => 631,1,Macro(dialfax,${EXTEN})

[macro-dialfax]
exten => s,1,NoOp(Macro Round Robin Ring Group ${ARG1})
exten => s,n,Goto(rrg-${ARG1})
exten => s,n(loop),NoOp
exten => s,n(rrg-191),Dial(SIP/191,10)
exten => s,n(rrg-300),Dial(SIP/300,10)
exten => s,n(rrg-210),Dial(SIP/210,10)
exten => s,n(rrg-631),Dial(SIP/631,10)
exten => s,n,Goto(loop)

hank you for your help mazzic and mudslide567

i tryed the code bust couldent get it to work dont know why :frowning:

i then went with placeing the call in a queue and using the rrmemory and it seems to do what i need