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

Dovid B asteriskusers at dovid.net
Thu Aug 30 17:34:21 CDT 2007


----- Original Message ----- 
From: "Adrian Marsh" <Adrian.Marsh at ubiquisys.com>
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
<asterisk-users at lists.digium.com>
Sent: Thursday, August 30, 2007 2:34 PM
Subject: [asterisk-users] How to handle "+" prefix


> 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


Why not just use Exten => _+.,1,Goto(011${EXTEN:1})
Exten => _011.,1,Dial(...... 




More information about the asterisk-users mailing list