[Asterisk-Users] Context restrictions

Steve Dolloff sdolloff at noc.dls.net
Fri Oct 24 09:12:51 MST 2003


Can someone please explain what I am doing wrong here?  I only want the
extensions listed in long-users to be able to access the longdistance
context.

If I do this, I get a congestion tone no matter what I dial.  If I add a
[default] context and include => longdistance, then the local callers
can call the long distance number fine, which is not what I want, but I
still want long-users to be able to call locally and I need long and
local users to be able to call each other, and inbound calls need to be
able to go to local and long users as well.

I tried reading the handbook, but even though they say that you can
restrict based on context, it never shows an example of how.

[local-users]
exten => 8478414198,1,Dial(SIP/8478414198)
exten => 8478414198,2,Hangup

[long-users]
exten => 8478414199,1,Dial(SIP/8478414199)
exten => 8478414199,2,Hangup

[local]
exten => _XXXXXX,1,Dial(SIP/${EXTEN}@VGW)
exten => _XXXXXX,2,Congestion

include => local-users

[long-distance]

exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@VGW)
exten => _1NXXNXXXXXX,2,Congestion

include => local
include => long-users




More information about the asterisk-users mailing list