[asterisk-users] how to use qualify times to route calls

sean darcy seandarcy2 at gmail.com
Wed Mar 2 18:16:46 CST 2011


On 03/02/2011 05:34 PM, Danny Nicholas wrote:
> -----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.
>
>

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

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

sean





More information about the asterisk-users mailing list