[asterisk-users] ${CALLERIDNUM}
Conrad Wood
asterisk-users at conradwood.net
Wed Nov 1 06:22:15 MST 2006
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
More information about the asterisk-users
mailing list