[Asterisk-Users] Context restrictions

Johnson, Randy rjohnson at Spang.com
Fri Oct 24 09:37:25 MST 2003


> -----Original Message-----
> From: Steve Dolloff [mailto:sdolloff at noc.dls.net] 
> Sent: Friday, October 24, 2003 12:13 PM
> To: asterisk-users at lists.digium.com
> Subject: [Asterisk-Users] Context restrictions
> 
> 
> 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
> 

I believe you need to go the other way--include the pattern match for the
local trunk into [local-users] and the match for long distance into
[long-users].  I'm assuming the extensions "start out" in the [local-users]
or [long-distance] context based on zapata.conf, sip.conf, etc.

Hope this helps...

Randy Johnson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20031024/e48e07d9/attachment.htm


More information about the asterisk-users mailing list