It seems that the GotoIf(${SET(DB(avoics/route)=$[!0${DB(avoics/route)}])}?route1:route2) is always returning false as if the SET command is not returning a value nor is it changing the value in the DB.<br>Will this not work because I am running Asterisk 1.4.25.1??<br>
<br><div class="gmail_quote">On Thu, Oct 28, 2010 at 3:15 PM, Tim King <span dir="ltr"><<a href="mailto:tim@compnetwork.net">tim@compnetwork.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I updated it as follows and I am still only getting the SayNumber(2)<br><br>[tim]<div class="im"><br>exten => _X.,1,GotoIf(${SET(DB(avoics/route)=$[!0${DB(avoics/route)}])}?route1:route2)<br></div>exten => _X.,n(route1),SayNumber(1)<br>
exten => _X.,n,Hangup()<br>
exten => _X.,n(route2),SayNumber(2)<br>exten => _X.,n,Hangup()<div><div></div><div class="h5"><br><br><br><br><div class="gmail_quote">On Thu, Oct 28, 2010 at 3:05 PM, Tilghman Lesher <span dir="ltr"><<a href="mailto:tlesher@digium.com" target="_blank">tlesher@digium.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>On Thursday 28 October 2010 13:32:51 Tim King wrote:<br>
> Thanks For The replies. I have tried piecing the samples together. Just<br>
> for testing purposes i have created the following.<br>
><br>
> [test]<br>
> exten =><br>
> _X.,1,GotoIf(${SET(DB(avoics/route)=$[!0${DB(avoics/route)}])}?route1:ro<br>
</div>> ute2) exten => _X.,n(route1),Set(DB(avoics/route)=1)<br>
<div>> exten => _X.,n,SayNumber(1)<br>
> exten => _X.,n,Hangup()<br>
> exten => _X.,n(route2),Set(DB(avoics/route)=0)<br>
> exten => _X.,n,SayNumber(2)<br>
> exten => _X.,n,Hangup()<br>
><br>
> The idea is if I continue dialing any number into this context I should<br>
> hear 1 2 1 2 1 2<br>
><br>
> Currently it is skipping to 2 as it should be since my database shows:<br>
> /avoics/route : 1<br>
><br>
> It appears there is something wrong with my set command?<br>
<br>
</div>You can drop your separate Set application. The SET() dialplan function<br>
does the alternation for you.<br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div>Tilghman Lesher<br>
Digium, Inc. | Senior Software Developer<br>
twitter: Corydon76 | IRC: Corydon76-dig (Freenode)<br>
Check us out at: <a href="http://www.digium.com" target="_blank">www.digium.com</a> & <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a><br>
<br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
<a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>