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

hugolivude hugolivude at gmail.com
Tue Mar 21 15:44:20 MST 2006


I posted this response to Asterisk-Users yesterday.  Not sure why you didn't
get it the first time.

Note that the channels in my example below are all channel => 1.  You'll
need to change that so it jibes with your ZAPTEL.CONF file...

Hugh

---------- Forwarded message ----------
From: hugolivude <hugolivude at gmail.com>
Date: Mar 20, 2006 11:02 AM
Subject: Re: [Asterisk-Users] How to make caller groups ???
To: Asterisk Users Mailing List - Non-Commercial Discussion <
asterisk-users at lists.digium.com>

 You'll want to learn all about Channels and groups.  You can try
here: http://www.voip-info.org/wiki/view/Channels+and+Groups
.

I've assumed that you have 4 FXO modules (to support 4 external phone lines)
and 4 FXS modules (to support 4 local extensions).

Essentially you'll need to define "group"s in your ZAPATA.CONF file.  I've
provided an example below (it also includes call groups and pick up groups -
I've set it so that any group can pick up a call ringing for someone else)

You'll also need contexts in EXTENSIONS.CONF to control how your users
dial.  The entries in ZAPATA.CONF for the (FXS) extensions will invoke the
appropriate context in EXTENSIONS.CONF so that the appropriate trunks are
used.  Check out the "Dialling a Group" section of
http://www.voip-info.org/wiki/index.php?page=Asterisk+Zap+channels for
information on the various ways you can have Asterisk select a trunk from a
group.  I've used r below - a round-robin search, starting at the next
highest channel than last time (aka. ascending rotary hunt group).

Yours,
Hugh


***Extensions.conf:*

[globals]

BOSS_TRUNK=ZAP/r1

GROUPA_TRUNK=ZAP/r2

GROUPB_TRUNK=ZAP/r3

GROUPC_TRUNK=ZAP/r4


[boss-context]

;North American Long Distance

exten => _1XXXXXXXXXX,1,Dial(BOSS_TRUNK/${EXTEN})



[groupA-context]

;North American Long Distance

exten => _1XXXXXXXXXX,1,Dial(GROUPA_TRUNK/${EXTEN})



[groupB-context]

;North American Long Distance

exten => _1XXXXXXXXXX,1,Dial(GROUPB_TRUNK/${EXTEN})



[groupC-context]

;North American Long Distance

exten => _1XXXXXXXXXX,1,Dial(GROUPC_TRUNK/${EXTEN})



*Zapata.conf:*

;FXS Line 1 – The Boss's local extension

language=en

context= boss-context

signalling=fxo_ks

threewaycalling=yes

transfer=yes

callgroup=1

pickupgroup=1,2,3,4

channel=>1

;

;FXS Line 2 – Group A's local extension

language=en

context= groupA-context

signalling=fxo_ks

threewaycalling=yes

transfer=yes

callgroup=2

pickupgroup=1,2,3,4

channel=>1

;

;FXS Line 3 – Group B's local extension

language=en

context= groupB-context

signalling=fxo_ks

threewaycalling=yes

transfer=yes

callgroup=3

pickupgroup=1,2,3,4

channel=>1

;

;FXS Line 4 – Group C's local extension

language=en

context= groupC-context

signalling=fxo_ks

threewaycalling=yes

transfer=yes

callgroup=4

pickupgroup=1,2,3,4

channel=>1

;

;FXO (incoming) Line 1

language=en

context=Boss-FXO

signalling=fxs_ks

usecallerid=yes

echocancel=yes

echocancelwhenbridged=yes

transfer=yes

rxgain=5%

group=1

channel => 1

;

;FXO (incoming) Line 2

language=en

context=general-FXO

signalling=fxs_ks

usecallerid=yes

echocancel=yes

echocancelwhenbridged=yes

transfer=yes

rxgain=5%

group=2

channel => 1

;

;FXO (incoming) Line 3

language=en

context=general-FXO

signalling=fxs_ks

usecallerid=yes

echocancel=yes

echocancelwhenbridged=yes

transfer=yes

rxgain=5%

group=2,3

channel => 1

;

;FXO (incoming) Line 4

language=en

context=general-FXO

signalling=fxs_ks

usecallerid=yes

echocancel=yes

echocancelwhenbridged=yes

transfer=yes

rxgain=5%

group=2,3,4

channel => 1


On 3/20/06, Faisal Inam <mfaisalinam at yahoo.com> wrote:
Hello All !!!

I have 4 PSTN lines in the PBX server 1,2,3,4.

 First line will be used by only one extension (i.e. for the boss) for incom
ing and outgoing. This line is dedicated for him only.(

 The remaining lines will be shared by the employees

1) Group A have access to lines 2 , 3 & 4.
2) Group B have access to lines  3 & 4
 3) Group C have access to line 4

I want to know that how i will make that groups.

 I will be grateful for ur help.

 Thanks a lot.
Faisal


------------------------------
Relax. Yahoo! Mail virus
scanning<http://us.rd.yahoo.com/mail_us/taglines/virusall/*http://communications.yahoo.com/features.php?page=221>helps
detect nasty viruses!

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com <http://easynews.com/>--

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users





On 3/21/06, Chuck Bunn <chuck.bunn at networkdoc.com> wrote:
>
> 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
> >
> >
> >
> >
> >
>
>
> _______________________________________________
> --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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060321/e13f6e1a/attachment.htm


More information about the asterisk-users mailing list