[asterisk-users] How to handle "+" prefix

Adrian Marsh Adrian.Marsh at ubiquisys.com
Thu Aug 30 06:34:42 CDT 2007


Hi,

How can I have A*k convert a call from +441793xxxxxx to Dial
00441793xxxxxx instead?
With the "_+." Below I can "catch" the call, but EXTEN doesn't get set
as expected.. and then I need to figure out how to pass the call onto
the outgoing-pstn context. Not sure if a Goto would work here...


[outgoing-pstn-international]
exten => _+.,1,Set(EXTEN=00${EXTEN:+1})
exten => _+.,2,NoOp(test line: ${EXTEN})

[outgoing-pstn]
exten =>
_0.,1,ExecIF($["${RECORDOUTBOUND}"="TRUE"],Monitor,wav|${TIMESTAMP}-${CA
LLERID(num)}-${EXTEN}-${UNIQUEID}.WAV)
;exten => _0.,2,Set(CALLERID(number)=${PSTN_GLOBAL}${CALLERID(num):-2})
exten =>
_0.,2,ExecIF($[${LEN(${CALLERID(num)})}=4],Set,CALLERID(number)=${PSTN_G
LOBAL}${CALLERID(num):-2})
exten => _0.,3,Dial(${TRUNK}/${EXTEN},,W)
exten => _0.,4,Congestion
exten => _0.,5,Goto(outgoing-zen-out-0,${EXTEN},1)
exten => _0.,103,Busy
exten => _0.,104,Goto(outgoing-zen-out-0,${EXTEN},1)

Adrian Marsh




More information about the asterisk-users mailing list