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. Will this not work because I am running Asterisk 1.4.25.1??
On Thu, Oct 28, 2010 at 3:15 PM, Tim King <t...@compnetwork.net> wrote: > 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 <tles...@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 >> > >
-- _____________________________________________________________________ -- 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