[asterisk-users] ${CALLERIDNUM}

Conrad Wood
Wed, 01 Nov 2006 06:22:11 -0000

On Wed, 2006-11-01 at 11:53 +0000, Scott Pinhorne wrote:
> Hi
>
>
>
> Does anyone know how I can check if a callerID is more than 2 digits.
>
> I am setting up my phones so that if the callerID is 3 digits the
> phones ring one way if it is more than 3 digits it rings another i.e.
> internal calls and external calls.
>
>
>
> exten => 2222,1,GotoIf($["${CALLERIDNUM}" =
"1111"]?5)


I'm sure on the wiki (http://voip-info.org) is a list of functions,
including one to
determine length of strings, but you could also do something like:

exten => 2222,1,Goto(${CALLERIDNUM},1)
exten => _XXX,1,dostuffwith3digits
exten => _XXXX.,1,dostuffwithmorethan3digits


Conrad