[asterisk-users] can not get ${LEN(VAR)} and greater than ">" to work for me

John Millican jmillican at sentinelcommunications.com
Sat Aug 26 07:24:09 MST 2006


Hello all,
I am trying to test if the length of a dialed number is greater than 7.  When 
i use:
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

indicating that the number was not greater than 7.
if i use:
exten => 1,n,GoToIf($["${LEN(${numdial})}"="11"]?dialout:nodial);
and dial the same 1 800 xxx xxxx
i get:

Executing GotoIf("SIP/xxx-xxx-xxx-xxx-006ca720", "1?dialout:nodial") in new 
stack
indicating that the length of number dialed was equal to 11 digits.
so equal to works and greater than does not?
Can any one see what I am doing wrong?
*  version 1.2.9.1

TIA
John M




More information about the asterisk-users mailing list