Hi, How can I setup Asterisk to place calls if the same dial pattern can be routed through several PRI gateways. I have one way that I tried: exten => _9737XXXX,1,Dial(SIP/${EXTEN:1}@172.17.99.5) exten => _9737XXXX,2,Dial(SIP/${EXTEN:1}@172.17.99.6) exten => _9737XXXX,3,Dial(SIP/${EXTEN:1}@172.17.99.7) exten => _9737XXXX,4,Congestion exten => _9737XXXX,102,Busy exten => _9737XXXX,103,Busy exten => _9737XXXX,104,Busy So what happens is that if all channels on 172.17.99.5 are in use calls are routed to 172.17.99.6 and if all channels are in use to 172.17.99.7. One of the problems I am experiencing is that if the gateway goes away, crashes or otherwise becomes unreachable, Asterisk tries to establish a session for almost 60 seconds before continuing with the next gateway. If I add a timeout to the dial command is also applies to busy signal, which is not suitable either. Any suggestions? Thanks, Adi
What do you mean "it also applies to busy signal"? Can you elaborate? My dial-plan is something similar, I have like BroadVoice/VoipJet/NuFone/LookieLoo and if I set them in order of my preference, I've never had the primary fail so I've never witnessed this 60 second delay. But am interested in what solution you discover. -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Adi Linden Sent: Monday, January 10, 2005 3:09 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] Multiple gateways for same dial pattern Hi, How can I setup Asterisk to place calls if the same dial pattern can be routed through several PRI gateways. I have one way that I tried: exten => _9737XXXX,1,Dial(SIP/${EXTEN:1}@172.17.99.5) exten => _9737XXXX,2,Dial(SIP/${EXTEN:1}@172.17.99.6) exten => _9737XXXX,3,Dial(SIP/${EXTEN:1}@172.17.99.7) exten => _9737XXXX,4,Congestion exten => _9737XXXX,102,Busy exten => _9737XXXX,103,Busy exten => _9737XXXX,104,Busy So what happens is that if all channels on 172.17.99.5 are in use calls are routed to 172.17.99.6 and if all channels are in use to 172.17.99.7. One of the problems I am experiencing is that if the gateway goes away, crashes or otherwise becomes unreachable, Asterisk tries to establish a session for almost 60 seconds before continuing with the next gateway. If I add a timeout to the dial command is also applies to busy signal, which is not suitable either. Any suggestions? Thanks, Adi _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Nabeel Jafferali
2005-Jan-10 17:11 UTC
[Asterisk-Users] Multiple gateways for same dial pattern
> But this also means that after 20 seconds of ringing it goes > on the next dialpeer. I would like to be able to set the > timeout Asterisk wait to establish a connection, any > connection, with the gateway to something much shorter than it is now.I have a similar problem. I asked the same question in a message to the list a few days ago titles "IAX outgoing redundancy". It would seem app_dial would need to have some code added to it to have two different kind of timeouts, one an answer timeout (which is the current timeout in the Dial() command) and the other a "ringing" timeout (which would be a timeout to confirm the call has been passed on to the PSTN successfully). I have submitted a feature request: http://bugs.digium.com/bug_view_page.php?bug_id=0003282 -- Nabeel Jafferali tel: 416.628.9342 (toronto) 646.225.7426 (new york) fwd: 46990 email/msn : nabeel<at>jafferali.net
Andrew Kohlsmith
2005-Jan-12 20:05 UTC
[Asterisk-Users] Multiple gateways for same dial pattern
On January 10, 2005 03:09 pm, Adi Linden wrote:> How can I setup Asterisk to place calls if the same dial pattern can be > routed through several PRI gateways. I have one way that I tried: > > So what happens is that if all channels on 172.17.99.5 are in use calls > are routed to 172.17.99.6 and if all channels are in use to 172.17.99.7.I use this in my dialplan, as a snippet from my dialing macro: exten => s,n,Dial(${PROVIDER1}/${ARG1},,g) exten => s,n,Goto(dial-${DIALSTATUS},1) exten => dial-CANCEL,1,Hangup exten => dial-ANSWER,1,Hangup exten => dial-NOANSWER,1,Hangup exten => dial-BUSY,1,Busy exten => dial-CONGESTION,1,Congestion exten => dial-CHANUNAVAIL,1,Macro(dial-provider2,${ARG1}) dial-provider2's dialplan looks similar but will fall through to the next provider, and so on. Works and is next to instantaneous on PRI and IAX2 if qualify is set. With some more magic and maybe some database interaction you can have it fully dynamic and fall through to any number of levels you want. -A.