[asterisk-users] Re: ${CALLERIDNUM}

Benny Amorsen
Thu, 02 Nov 2006 04:58:59 -0000

>>>>> "SP" == Scott Pinhorne
<scott@scottpinhorne.co.uk> writes:

SP> I am setting up my phones so that if the callerID is 3 digits the
SP> phones ring one way if it is more than 3 digits it rings another
SP> i.e. internal calls and external calls.

SP> exten => 2222,1,GotoIf($["${CALLERIDNUM}" =
"1111"]?5)

SP> This will tell it to jump to 5 if callerID if 1111 but how do i
SP> tell it do jump based on length of callerID?

There has been lots of answers to this one, but how about simply:

exten => 2222/XXX,1,Goto(threedigits)
exten => 2222/XX,1,Goto(twodigits)
exten => 2222/.,1, ...


/Benny