voiplist
2007-Aug-19 02:37 UTC
[asterisk-users] GotoIf not working with ${EXTEN} for me in 1.4.8
I am using GotoIf all over the place in 1.4.8 but for some reason, the following in my dial plan: ############################################################# exten => _1NXXNXXXXXX,1,GotoIf([${EXTEN} = "15554441212"]?100) exten => _1NXXNXXXXXX,n,Dial(SIP/provider1/${EXTEN},60) exten => _1NXXNXXXXXX,n,Dial(SIP/provider2/${EXTEN},60) exten => _1NXXNXXXXXX,n,Hangup exten => _1NXXNXXXXXX,100,NoOp(Calling my cell w/special CID) exten => _1NXXNXXXXXX,n,Set(CALLERID(all)="Dude" <5551112233>) exten => _1NXXNXXXXXX,n,Dial(SIP/provider1/${EXTEN},60) exten => _1NXXNXXXXXX,n,Dial(SIP/provider2/${EXTEN},60) exten => _1NXXNXXXXXX,n,Hangup ############################################################# Results in this in my CLI: ############################################################## dalint1*CLI> == Parsing '/etc/asterisk/sip_notify.conf': Found -- Executing [12223334545 at out-personal:1] GotoIf("SIP/5556685598-b7dc7f90", "[18005558888 = "15554441212"]?100") in new stack -- Goto (out-personal,18005558888,100) -- Executing [18005558888 at out-personal:100] NoOp("SIP/5556685598-b7dc7f90", "Calling my cell w/special CID") in new stack -- Executing [18005558888 at out-personal:101] Set("SIP/5556685598-b7dc7f90", "CALLERID(all)="Dude" <5551112233>") in new stack -- Executing [18005558888 at out-personal:102] Dial("SIP/5556685598-b7dc7f90", "SIP/provider1/18005558888|60") in new stack -- Called provider1/18005558888 ################################################################ Clearly 18005558888 does NOT equal "15554441212" so why is it jumping to priority 100? I always hate to scream BUG but I can't see my mistake here to save my life.. Anyone? Maybe I am just tired.. Of course I have changed the numbers involved to protect the innocent :-) Regards, Todd R. -- Prestige Messaging Live Answering Services SIP or Toll-Free Connectivity Light Accounts From $14.95/mo http://www.PrestigeMessaging.com
C F
2007-Aug-19 02:56 UTC
[asterisk-users] GotoIf not working with ${EXTEN} for me in 1.4.8
You are missing a dollar sign $ On 8/18/07, voiplist <gotvoip at gmail.com> wrote:> I am using GotoIf all over the place in 1.4.8 but for some reason, the > following in my dial plan: > > ############################################################# > exten => _1NXXNXXXXXX,1,GotoIf([${EXTEN} = "15554441212"]?100) > exten => _1NXXNXXXXXX,n,Dial(SIP/provider1/${EXTEN},60) > exten => _1NXXNXXXXXX,n,Dial(SIP/provider2/${EXTEN},60) > exten => _1NXXNXXXXXX,n,Hangup > exten => _1NXXNXXXXXX,100,NoOp(Calling my cell w/special CID) > exten => _1NXXNXXXXXX,n,Set(CALLERID(all)="Dude" <5551112233>) > exten => _1NXXNXXXXXX,n,Dial(SIP/provider1/${EXTEN},60) > exten => _1NXXNXXXXXX,n,Dial(SIP/provider2/${EXTEN},60) > exten => _1NXXNXXXXXX,n,Hangup > ############################################################# > > > > Results in this in my CLI: > > ############################################################## > dalint1*CLI> > == Parsing '/etc/asterisk/sip_notify.conf': Found > -- Executing [12223334545 at out-personal:1] > GotoIf("SIP/5556685598-b7dc7f90", "[18005558888 = "15554441212"]?100") > in new stack > -- Goto (out-personal,18005558888,100) > -- Executing [18005558888 at out-personal:100] > NoOp("SIP/5556685598-b7dc7f90", "Calling my cell w/special CID") in > new stack > -- Executing [18005558888 at out-personal:101] > Set("SIP/5556685598-b7dc7f90", "CALLERID(all)="Dude" <5551112233>") in > new stack > -- Executing [18005558888 at out-personal:102] > Dial("SIP/5556685598-b7dc7f90", "SIP/provider1/18005558888|60") in new > stack > -- Called provider1/18005558888 > ################################################################ > > > Clearly 18005558888 does NOT equal "15554441212" so why is it jumping > to priority 100? > > I always hate to scream BUG but I can't see my mistake here to save my > life.. > > Anyone? Maybe I am just tired.. > > Of course I have changed the numbers involved to protect the innocent :-) > > > Regards, > Todd R. > > -- > Prestige Messaging > Live Answering Services > SIP or Toll-Free Connectivity > Light Accounts From $14.95/mo > http://www.PrestigeMessaging.com > > _______________________________________________ > --Bandwidth and Colocation Provided by http://www.api-digital.com-- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Gordon Henderson
2007-Aug-19 06:07 UTC
[asterisk-users] GotoIf not working with ${EXTEN} for me in 1.4.8
On Sat, 18 Aug 2007, voiplist wrote:> I am using GotoIf all over the place in 1.4.8 but for some reason, the > following in my dial plan: > > ############################################################# > exten => _1NXXNXXXXXX,1,GotoIf([${EXTEN} = "15554441212"]?100)Missing $ before the [ Gordon
voiplist
2007-Aug-19 13:12 UTC
[asterisk-users] GotoIf not working with ${EXTEN} for me in 1.4.8
On 8/19/07, Gordon Henderson <gordon+asterisk at drogon.net> wrote:> On Sat, 18 Aug 2007, voiplist wrote: > > > I am using GotoIf all over the place in 1.4.8 but for some reason, the > > following in my dial plan: > > > > ############################################################# > > exten => _1NXXNXXXXXX,1,GotoIf([${EXTEN} = "15554441212"]?100) > > Missing $ before the [ > > Gordon > > _______________________________________________ > --Bandwidth and Colocation Provided by http://www.api-digital.com-- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >Doh! Thanks, I guess I missed it when comparing my working examples to this non working one. Thanks all, I will give this a shot. Regards, Todd R. -- Prestige Messaging Live Answering Services SIP or Toll-Free Connectivity Light Accounts From $14.95/mo http://www.PrestigeMessaging.com
Philipp Kempgen
2007-Aug-19 13:55 UTC
[asterisk-users] GotoIf not working with ${EXTEN} for me in 1.4.8
voiplist wrote:> I am using GotoIf all over the place in 1.4.8 but for some reason, the > following in my dial plan:> exten => _1NXXNXXXXXX,1,GotoIf([${EXTEN} = "15554441212"]?100)I would use something like GotoIf($["${EXTEN}" = "15554441212"]?100) because in Asterisk the quotes are part of the string. But your subject implies that this expression works for you with variables other than ${EXTEN} or Asterisk before 1.4.8? Regards, Philipp Kempgen -- amooma GmbH - Bachstr. 126 - 56566 Neuwied - http://www.amooma.de Let's use IT to solve problems and not to create new ones. Asterisk? -> http://www.das-asterisk-buch.de My pick of the month: rfc 2822 3.6.5 Gesch?ftsf?hrer: Stefan Wintermeyer Handelsregister: Neuwied B 14998