On 03/02/2011 05:34 PM, Danny Nicholas wrote:
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of sean darcy
Sent: Wednesday, March 02, 2011 4:29 PM
To: [email protected]
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.



That would be a great idea, but would stretch my limits.

I'll try qualify=30 and qualifyfreq=20 to start.

sean



--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

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

Reply via email to