I’ve been asked to set up dialing on a US-based asterisk server such that calls to numbers within the 440 area code can be dialed as seven digits, while calls to numbers outside the 440 area code can be dialed as ten digits.
For example a call to (440)222-3333 would be dialed as 2223333 while a call to (216)222-3333 would be dialed as 2162223333
I’m using a SIP provider that always requires outgoing calls be placed as 11 digits. So I set up the following context:
exten => _NXXXXXX,1,Dial(SIP/1440${EXTEN}@provider)
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@provider)
I’m concerned that things may not always works as intended since not having the 1 as the first digit of a non-local number may allow an unintended match on the 7-digit pattern. Can anyone comment?