[asterisk-users] can not get ${LEN(VAR)} and greater than
">" to work for me
Ira
ira at extrasensory.com
Sat Aug 26 10:11:55 MST 2006
At 07:24 AM 8/26/2006, you wrote:
>exten => 1,n,GoToIf($["${LEN(${numdial})}">"7"]?dialout:nodial);
>and I dial an 11 digit number i.e. 1 800 xxx xxxx
>i get this in the console:
>Executing GotoIf("SIP/xxx-xxx-xxx-xxx-006ca720", "0?dialout:nodial")
>in new stack
I'm guessing that you need to remove the quotes like this:
>exten => 1,n,GoToIf($[${LEN(${numdial})}>7]?dialout:nodial);
You know neither side of the expressions will never be empty so you
don't need them. You might also try something like:
>exten => 1,n,GoToIf(${len({numdial:7})}?dialout:nodial)
or even:
>exten => 1,n,GoToIf($["${numdial:7}"=""]?nodial:dialout);
Ira
More information about the asterisk-users
mailing list