[Asterisk-Users] How to make groups of extensions ???

Chuck Bunn chuck.bunn at networkdoc.com
Tue Mar 21 13:08:46 MST 2006


Hi,

Without separate incoming and outgoing context you could not secure your 
system from an outside caller using your system to dial a long distance 
number.

Here is an example outgoing context that restricts who can call long 
distance. If a SIP phone does not belong to the 'longdistance' context 
they can only make 'local' calls through the ZAP trunk, likewise if a 
outgoing ZAP channel is in the 'local' context it can only make local calls:

**Outgoing.incl****
[local]
ignorepat => 9
exten => _9NXXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN:1})
exten => _9NXXXXXX,2,Congestion(5)
exten => _9NXXXXXX,102,congestion(5)
exten => 911,1,Dial(${OUTBOUNDTRUNK}/911)
exten => 9911,1,Dial(${OUTBOUNDTRUNK}/911)
include => default

[longdistance]
ignorpat => 9
exten => _91NXXNXXXXXX,1,Dial(${OUTBOUNDTRUNK}/${EXTEN:1})
exten => _91NXXNXXXXXX,2,Congestion(5)
exten => _91NXXNXXXXXX,102,congestion(5)
include => local
*********

** SIP.conf**********

...
[general]
srvlookup=yes
Callgroup=1
pickupgroup=1

;SJphone
[410]
context=longdistance
;canreinvite=no
type=friend
username=410
secret=passwd410
callerid=<410>
qualify=yes
nat=no
host=dynamic
mailbox=410 at default
disallow=all
allow=gsm
allow=ilbc
allow=ulaw
allow=alaw
dtmfmode=rfc2833
Callgroup=1
pickupgroup=1

;Zyxel - P2000WV2
[411]
context=longdistance
canreinvite=no
type=friend
username=411
secret=passwd411
callerid=<411>
nat=no
host=dynamic
mailbox=411 at default
disallow=all
allow=ulaw
allow=alaw
dtmfmode=rfc2833
Callgroup=1
pickupgroup=1
....

*****
and finally

***zapata.conf*******

[trunkgroups]

[channels]
musiconhold=default
echocancel=yes
echocancelwhenbridged=yes
echotraining=yes
usecallerid=yes
hidecallerid=no
callwaiting=no
threewaycalling=yes
callwaitingcallerid=yes
transfer=yes
immediate=no
faxdetect=both

context=default
signalling=fxs_ks
group=1
channel => 1,5,6

context=default
signalling=fxs_ks
group=4
channel => 2

context=local
signalling=fxo_ks
group=2
channel => 3

context=longdistance
signalling=fxo_ks
group=3
channel => 4
********

As you can see above the outgoing context limits which phones have 
access to longdistance lines. The incomming context cannot match the 
outgoing or you will have on hell of a security problem...

I hope this example helps explain what I am talking about.

Thanks


Andrew Kohlsmith wrote:
> On Tuesday 21 March 2006 12:25, Aaron Daniel wrote:
>   
>> Yeah, I agree with Chuck.  User's on our system are put into various
>> contexts depending on who they can call... local, long distance, or
>> internal only.
>>     
>
> And *all* of those people are placing calls *in* to asterisk to get into those 
> contexts.  :-)
>
> When you pick up a telephone wired into an FXS port; asterisk sees an incoming 
> request for dialtone.
>
> When you pick up your SIP phone and dial; it must match a friend or user entry 
> or you'll never get in.
>
> When your IAX softphone client makes a call, again, it must match a friend or 
> user entry.
>
> These are *all* incoming calls as far as Asterisk is concerned.  You get 
> dumped into a specific part of the dialplan (the context specified) and you 
> tell Asterisk what they can dial.  Internal extensions, external peers, Zap 
> channels or even applications... the second half of all of this is the 
> outgoing part, when Asterisk Dial()s.
>
> -A.
>
> -A.
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
>
>
>   





More information about the asterisk-users mailing list