Hi!
What's wrong with this?
exten => s,1,Set(myvar="nothing")
exten => s,2,Set(myvar = $["${CALLERID(num)}" :
"([a-z]+)"])
exten => s,3,NoOp(${myvar})
The regular expression in priority 2 matches, but the result is not
assigned to variable "myvar", on the console, I see this:
-- Executing Set("SIP/nnnnn-5d23",
"myvar="nothing"") in new stack
-- Executing Set("SIP/nnnnn-5d23", "myvar =
"abc"") in new stack
-- Executing NoOp("SIP/nnnnn-5d23", ""nothing"")
in new stack
Eric "ManxPower" Wieling
2006-Jul-24 05:03 UTC
[asterisk-users] Regular expression problem
You are using quotes when you should not be. Notice the double quoting
of -- Executing NoOp("SIP/nnnnn-5d23",
""nothing"") in new stack
Benjamin Stocker wrote:> Hi!
>
> What's wrong with this?
>
> exten => s,1,Set(myvar="nothing")
> exten => s,2,Set(myvar = $["${CALLERID(num)}" :
"([a-z]+)"])
> exten => s,3,NoOp(${myvar})
>
> The regular expression in priority 2 matches, but the result is not
> assigned to variable "myvar", on the console, I see this:
>
> -- Executing Set("SIP/nnnnn-5d23",
"myvar="nothing"") in new stack
> -- Executing Set("SIP/nnnnn-5d23", "myvar =
"abc"") in new stack
> -- Executing NoOp("SIP/nnnnn-5d23",
""nothing"") in new stack
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
Now accepting new clients in Birmingham, Atlanta, Huntsville,
Chattanooga, and Montgomery.
On 7/24/06, Benjamin Stocker <bstocker@gmail.com> wrote:> Hi! > > What's wrong with this? > > exten => s,1,Set(myvar="nothing") > exten => s,2,Set(myvar = $["${CALLERID(num)}" : "([a-z]+)"]) > exten => s,3,NoOp(${myvar})Try removing the spaces on either side of the "=" symbol. Regards, Gonzalo