Brian J. Murrell
2007-Nov-17 00:38 UTC
[asterisk-users] modifying a dialed exension before dialplan processing
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?
b.
Baji Panchumarti
2007-Nov-17 04:03 UTC
[asterisk-users] modifying a dialed exension before dialplan processing
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?
>
> b.
--
Brian J. Murrell
2007-Nov-18 01:30 UTC
[asterisk-users] modifying a dialed exension before dialplan processing
On Sat, 2007-11-17 at 20:14 -0500, Baji Panchumarti wrote:> > just out of curiosity are you dialing out of * on an analog > line or are you terminating thru a sip provider,Both for now. I am in transition from analog to a VSP (via IAX in fact). I know where you are going with this, yes, it seems my VSP will take a 1NXXNXXXXXX even for numbers which are local, and we are in 10 digit dialling land here now, so much of this "should I dial 1 or not" goes away when the POTS line goes away. Cheers, b.
Baji Panchumarti
2007-Nov-18 02:14 UTC
[asterisk-users] modifying a dialed exension before dialplan processing
On Nov 17, 2007 8:30 PM, Brian J. Murrell wrote:> Both for now. I am in transition from analog to a VSP (via IAX in > fact). > > I know where you are going with this, yes, it seems my VSP will > take a 1NXXNXXXXXX even for numbers which are local, and > we are in 10 digit dialling land here now, so much of this > "should I dial 1 or not" goes away when the POTS line goes away. > > Cheers, > b.my sip provider takes 10 digits no matter where I want to dial in US & Can. A few years ago, I used to have to deal with 7-digit local, 10-digit local & 11 digits LD dialing on analog lines, not fun :-) -baji. --