[asterisk-users] SIP Load Balancing

Tilghman Lesher tlesher at digium.com
Thu Oct 28 14:05:49 CDT 2010


On Thursday 28 October 2010 13:32:51 Tim King wrote:
> Thanks For The replies. I have tried piecing the samples together. Just
> for testing purposes i have created the following.
> 
> [test]
> exten =>
> _X.,1,GotoIf(${SET(DB(avoics/route)=$[!0${DB(avoics/route)}])}?route1:ro
> ute2) exten => _X.,n(route1),Set(DB(avoics/route)=1)
> exten => _X.,n,SayNumber(1)
> exten => _X.,n,Hangup()
> exten => _X.,n(route2),Set(DB(avoics/route)=0)
> exten => _X.,n,SayNumber(2)
> exten => _X.,n,Hangup()
> 
> The idea is if I continue dialing any number into this context I should
> hear 1 2 1 2 1 2
> 
> Currently it is skipping to 2 as it should be since my database shows:
> /avoics/route  : 1
> 
> It appears there is something wrong with my set command?

You can drop your separate Set application.  The SET() dialplan function
does the alternation for you.

-- 
Tilghman Lesher
Digium, Inc. | Senior Software Developer
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list