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

Matt Riddell (IT) matt.riddell at sineapps.com
Sat Aug 26 08:15:46 MST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Millican wrote:
> 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

Maybe string comparison because of the speech marks?

- --
Cheers,

Matt Riddell
_______________________________________________

http://www.sineapps.com/news.php (Daily Asterisk News - html)
http://freevoip.gedameurope.com (Free Asterisk Voip Community)
http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE8GWiS6d5vy0jeVcRAsFuAJ4wTDyndhLkJ1DvaXmEmV+F6DQumACffrXI
RRoE2Dc4FsL2wycfFy3pm8Y=
=bhT0
-----END PGP SIGNATURE-----



More information about the asterisk-users mailing list