[asterisk-users] Gotoif($[${LEN(${CALLERID(number)})} != 4]?true) doesn't work...

Steve Edwards asterisk.org at sedwards.com
Wed Jul 2 12:36:58 CDT 2014


Please don't top post.

> On Wed, Jul 2, 2014 at 11:07 AM, Doug Lytle <support at drdos.info> wrote:
> 
> Differences between yours and mine:
> 
> Yours:
> Gotoif($[${LEN(${CALLERID(number)})} != 4]?true)
> 
> Mine:
> Gotoif($["${LEN(${get-admin-password})}" < "1"]?2:4)

On Wed, 2 Jul 2014, Positively Optimistic wrote:

> Thanks Doug!!  I appreciate  your response..  it sent me looking in the 
> right direction.  The following yielded the results I was looking for.

> Gotoif($["${LEN(${CALLERID(number)})}" != "4"]?true)

Here's a snippet from one of my (1.2) dialplans:

 	gotoif($[${LEN(${EXTEN})} < 10] ?add-npa,${EXTEN},1)

So are the quotes now a requirement? (Quotes makes it look like you are 
comparing strings instead of numbers to my old eyes.)

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000


More information about the asterisk-users mailing list