check length of caller ID string using LEN

Comment on Asterisk func len
baji
Joined: Tue 17 of Apr, 2007

check length of caller ID string using LEN

Posted:Fri 27 of Jul, 2007 (13:31 UTC)
;
;
exten => s,n,Set(v_CallerID=${CDR(src)})
;
exten => s,n,GotoIf($[ "${LEN(${v_CallerID})}" = "10" ]?ok:)
;
exten => s,n,Set(v_CallerID=3305551212) ; If incorrect length, use default
;
exten => s,n(ok),NoOp(${v_CallerID})
;