[Asterisk-Users] Request for best practices
Ernest W. Lessenger
ernest at oacys.com
Wed Sep 10 10:59:41 MST 2003
We are trying to implement "area-code dialing" in our asterisk PBX.
Basically: we will have a number of customers, who may be in different area
codes, that want to direct-dial each other's extensions. We want this to
work like a "real" centrex, in that seven-digit numbers should try (1)
"local" VoIP extensions, and then (2) "local" PSTN numbers. Ten-digit
numbers should dial (1) "long-distance" VoIP extensions, and then (2)
"long-distance" PSTN numbers.
Here's my plan so far, does anyone have a better way? Will Goto() work the
way I expect it to (i.e. will the extension I specify be pattern matched)?
==Extensions.conf==
[area555]
exten => _NXXNXXX, 1, Goto(extensions,555${EXTEN})
include => extensions
[area666]
exten => _NXXNXXX,1, Goto(extensions,666${EXTEN})
include => extensions
[extensions]
exten => 5551234567, 1, Macro(stdexten, 1234, SIP/user1)
exten => 6661234567, 1, Macro(stdexten, 1235, SIP/user2)
include => longdistance
[longdistance]
exten => _NXXNXXXXXX, 1, Dial(${Nufone},${ARG1})
exten => _NXXNXXXXXX, 2, Congestion()
[macro-stdexten]
... as in demo ...
==Sip.conf===
[user1]
...
context = area555
[user2]
...
context = area666
Thanks,
--Ernest
More information about the asterisk-users
mailing list