[asterisk-users] Re: ${CALLERIDNUM}

Benny Amorsen benny+usenet at amorsen.dk
Thu Nov 2 04:58:36 MST 2006


>>>>> "SP" == Scott Pinhorne <scott at 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




More information about the asterisk-users mailing list