[asterisk-users] modifying a dialed exension before dialplan processing

Eric "ManxPower" Wieling eric at fnords.org
Fri Nov 16 22:58:42 CST 2007


exten => _0111NXXNXXXXXX,1,Goto(${EXTEN:4},1)

exten => _NXXNXXXXXX,1,Dial(....


Baji Panchumarti wrote:
> I have no idea if this would work :
> 
> exten => _0111NXXNXXXXXX,1,Set(x=${EXTEN:4})
> exten => _0111NXXNXXXXXX,n,Goto(${x},1)
> exten => _0111NXXNXXXXXX,n,NoOp( Sorry it didn't work ! )
> exten => _0111NXXNXXXXXX,n,Hangup()
> ;
> exten => _NXXNXXXXXX,1,NoOp( OMG, It worked ! )
> exten => _NXXNXXXXXX,n,NoOp( continue like other calls )
> 
> --
> 
>   On Nov 16, 2007 7:38 PM, Brian J. Murrell wrote:
> 
>> I have a phone (a panasonic globalrange phone) which always sends a
>> fully qualified phone number.  That is, for a local Canadian number,
>> even if I key in 6135551212 it actually sends to asterisk
>> 01116135551212.  This means of course, along with "normal" phones I end
>> up having twice as many extensions for outdialed numbers.
>>
>> Is there any way I could canonicalize this down to the more normal
>> NXXNXXXXXX format before I process through all of my dialplan rules?
>> Effectively it means being able to alter ${EXTEN}.
>>
>> Is this doable in any way?



More information about the asterisk-users mailing list