I'm using 1.8.3, and have 2 sip providers. Both are set with qualify=yes. Each of them sometimes have qualify times 10+ times the other. For instance, one will be at 10-15ms, the other at 200ms. Is there a way I can route an outgoing call to the provider with the lower qualify time? sean
Matt Riddell
2011-Mar-02 22:33 UTC
[asterisk-users] how to use qualify times to route calls
On 3/03/11 11:29 AM, sean darcy wrote:> I'm using 1.8.3, and have 2 sip providers. Both are set with > qualify=yes. Each of them sometimes have qualify times 10+ times the > other. For instance, one will be at 10-15ms, the other at 200ms. > > Is there a way I can route an outgoing call to the provider with the > lower qualify time?Traditionally you'd use a value you consider to be good enough for calls and set qualify to that. I.E. if you think 30ms is ok then set qualify=30 and then just route via the first then the second depending on status. -- Cheers, Matt Riddell _______________________________________________ http://www.venturevoip.com/news.php (Daily Asterisk News) http://www.venturevoip.com/exchange.php (Full ITSP Solution) http://www.venturevoip.com/cc.php (Call Centre Solutions)
Danny Nicholas
2011-Mar-02 22:34 UTC
[asterisk-users] how to use qualify times to route calls
-----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of sean darcy Sent: Wednesday, March 02, 2011 4:29 PM To: asterisk-users at lists.digium.com Subject: [asterisk-users] how to use qualify times to route calls I'm using 1.8.3, and have 2 sip providers. Both are set with qualify=yes. Each of them sometimes have qualify times 10+ times the other. For instance, one will be at 10-15ms, the other at 200ms. Is there a way I can route an outgoing call to the provider with the lower qualify time? sean You could do a context using an AGI to do a "sip show peers" and select the provider from that. Something like this [pick_prov] exten => s,1,AGI(getprov.agi) exten => s,n,Dial(SIP/${EXTEN}@${BESTPROV},30,m) getprov.agi does "sip show peers" and gets the qualify time from status. The low value is returned in the variable BESTPROV. Should be about 50 lines of PERL or PHP.