On Wed, 16 Sep 2009, Steve Edwards wrote:

> On Wed, 16 Sep 2009, Danny Nicholas wrote:
>
>> I'd try this:
>> - exten => 4000,1,Dial(SIP/4000,20,ikKtT)
>> - exten => s-NOANSWER,1,Dial(SIP/4001,20,ikKtT)
>> - exten => s-NOANSWER,2,Voicemail(4000)
>> - exten => s-BUSY,1,Dial(SIP/4001,20,iKkTt)
>> - exten => s-BUSY,2,Voicemail(4000)
>> - exten => h,1,hangup
>
> Don't you need a "goto(s-${DIALSTATUS},1)" in there somewhere?
>
> BTW, everybody seems to do "s-${DIALSTATUS}." Why not just
> "${DIALSTATUS}?"
>
> "s-" doesn't seem to add any value to me.

I suspect everyone is copying one example that was presented some years 
ago ;-)

>From the "more than one way to skin a cat" department, I do it this way:

exten =>  s,n,GotoIf($[("${DIALSTATUS}" = "CHANUNAVAIL") | ("${DIALSTATUS}" = 
"CONGESTION")]?:${DIALSTATUS})

...

exten =>  s,n(BUSY),Noop(We got BUSY)
exten =>  s,n,Busy()
exten =>  s,n(NOANSWER),Noop(We got NOANSWER)
exten =>  s,n,Congestion()

etc.

So Goto'ing a priority rather than an extension.

For the original poster, the simplest/crudest way is simply:

   exten => s,n,Dial(SIP/4000,,10)
   exten => s,n,Dial(SIP/4001,,10)
   exten => s,n,Dial(SIP/4002,,10)
   exten => s,n,Dial(SIP/4003,,10)
   exten => s,n,Voicemail...

knowing that if one of the Dial's succeedes then the rest of them will not 
action and if it fails to bridge for any reason execution will just carry 
on to the next step...

Gordon

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to