[asterisk-users] SIP Load Balancing

Tim King tim at compnetwork.net
Thu Oct 28 14:15:27 CDT 2010


I updated it as follows and I am still only getting the SayNumber(2)

[tim]
exten =>
_X.,1,GotoIf(${SET(DB(avoics/route)=$[!0${DB(avoics/route)}])}?route1:route2)
exten => _X.,n(route1),SayNumber(1)
exten => _X.,n,Hangup()
exten => _X.,n(route2),SayNumber(2)
exten => _X.,n,Hangup()



On Thu, Oct 28, 2010 at 3:05 PM, Tilghman Lesher <tlesher at digium.com> wrote:

> 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
>
> --
> _____________________________________________________________________
> -- 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20101028/89e82f44/attachment.htm 


More information about the asterisk-users mailing list