[asterisk-users] Changing CALLERIDNUM on the fly

Doug Crompton doug at crompton.com
Mon Dec 18 23:11:12 MST 2006


Is what I am trying to do in this context possible. That is changing the
incoming CALLERIDNUM. In this case if the incoming CALLERIDNUM is not
preceeded by a "1" I want to add a "1". Often calls come in without the
preceeding "1" and this plays havoc with my redial if the 3 digit area
code matches a local 3 digit extension. All my outside calls are 10 digits
or 1+10 digits.

Doug


[from-pstn]
exten => s,1,set(TEST=${CALLERIDNUM::1})    >>>> test for first digit1
exten => s,2,GotoIf($[ ${TEST} = 1 ]?4:3)
exten => s,3,set(__CALLERIDNUM=1${CALLERIDNUM})  >>>> if not add 1
exten => s,4,noop(${CALLERIDNUM})  >>>>> and this still displays without


I tried no, one and two underscores with the CALLERIDNUM variable.



More information about the asterisk-users mailing list