Chris Shaw
2004-Jul-28 15:13 UTC
[Asterisk-Users] Workaround for BroadVoice and possibly others...
I have an idea, tell me if this wouldn't work... I know it's really ugly, but it might help some people until we can get round robin DNS checks for peers... Since * does not do GetHostByName() again until you reload your config, and BroadVoice and I'm sure other sip providers are using round robin DNS, why not create 2 [<your server here>-out] contexts in sip.conf, and then in your dialplan do something like this sip.conf - -snip- [broadvoice-out] host=147.135.0.128 -snip- [broadvoice-out2] host=147.135.8.128 extensions.conf - -snip- [sipphones] exten => _9NXXNXXNXXX,1,Dial(SIP/${EXTEN:1}@broadvoice-out,60) exten => _9NXXNXXNXXX,102,Dial(SIP/${EXTEN:1}@broadvoice-out2,60) exten => _9NXXNXXNXXX,203,Congestion() Any thoughts? I know, I know... UGLY... but it would work I think...
Greg Hill
2004-Jul-28 18:29 UTC
[Asterisk-Users] Workaround for BroadVoice and possibly others...
On Wed, 28 Jul 2004, Chris Shaw wrote:> exten => _9NXXNXXNXXX,1,Dial(SIP/${EXTEN:1}@broadvoice-out,60) > exten => _9NXXNXXNXXX,102,Dial(SIP/${EXTEN:1}@broadvoice-out2,60) > exten => _9NXXNXXNXXX,203,Congestion() > > Any thoughts? I know, I know... UGLY... but it would work I think...so if I'm reading this correctly.. step 1 will allow a call to ring unanswered for 60 seconds, and then roll over to t extension. Or, if the Dial() returns an error because it couldn't reach the host in broadvoice-out context, then we enter step 102, which tries another context, and thus another host (this sounds similar to the situation where somebody prefers to dial out via SIP, but falls back to zap channel if the SIP channel failed). Finally, play congestion if step 102 failed. That sounds to me like it has a fair chance of working. but wait.. doesn't * add 100 to the step (is it called priority?) upon failure? So shouldn't the numbers be 1, 101, 201, ...? Greg
Robert Jackson
2004-Jul-28 18:33 UTC
[Asterisk-Users] Workaround for BroadVoice and possibly others...
If I am not mistaken that is similar to what VoicePulse Connect just changed to. In there e-mail on how to configure it they have nearly the same senario.> -----Original Message----- > From: Chris Shaw [mailto:chriss@watertech.com] > Sent: Wednesday, July 28, 2004 6:14 PM > To: asterisk-users@lists.digium.com > Subject: [Asterisk-Users] Workaround for BroadVoice and > possibly others... > > > I have an idea, tell me if this wouldn't work... I know it's > really ugly, but it might help some people until we can get > round robin DNS checks for peers... > > Since * does not do GetHostByName() again until you reload > your config, and BroadVoice and I'm sure other sip providers > are using round robin DNS, why not create 2 [<your server > here>-out] contexts in sip.conf, and then in your dialplan do > something like this > > sip.conf - > > -snip- > [broadvoice-out] > host=147.135.0.128 > > -snip- > [broadvoice-out2] > host=147.135.8.128 > > extensions.conf - > > -snip- > [sipphones] > > exten => _9NXXNXXNXXX,1,Dial(SIP/${EXTEN:1}@broadvoice-out,60) > exten => _9NXXNXXNXXX,102,Dial(SIP/${EXTEN:1}@broadvoice-out2,60) > exten => _9NXXNXXNXXX,203,Congestion() > > Any thoughts? I know, I know... UGLY... but it would work I think... > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/as> terisk-users > To > UNSUBSCRIBE or update options visit: >http://lists.digium.com/mailman/listinfo/asterisk-users
Chris
2004-Jul-28 19:12 UTC
[Asterisk-Users] Workaround for BroadVoice and possibly others...
Sorry, I didn't mean to add 100, 100 is only on busy, it would never advance... Should be: exten => _9NXXNXXNXXX,1,Dial(SIP/${EXTEN:1}@broadvoice-out,60) exten => _9NXXNXXNXXX,2,Dial(SIP/${EXTEN:1}@broadvoice-out2,60) exten => _9NXXNXXNXXX,3,Congestion() No, it will not wait 60 seconds, if it fails, it will fail instantly saying "We're All Busy/Congested" and move on to the next priority. It will wait 60 seconds of ringing... (About 11 rings)...