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

Rich Adamson radamson at routers.com
Tue Mar 21 10:11:42 MST 2006


> On Tuesday 21 March 2006 11:28, C F wrote:
>> I disagree that it is very easy to miss, in fact even just mentioning
>> it, makes it very easy to not miss, becuase it's a very understandable
>> feature.
> 
> Well when you know what to look for everything is easy to find.  :-)
> 
>> How will groups without context help him? it's actualy both that he
>> needs, however he will be able to get by without groups, but not
>> without contexts.
> 
> *nothing* works without contexts, which is why I said the answer doesn't help.  
> Contexts are for incoming calls, not outgoing ones.  How do contexts help 
> him?

Okay, enough... ;)

For the OP, here's what needs to be done.

In sip.conf

[1111]  ; user in Group A
   <whatever ip definitions are appropriate>
context=FromGroupA

[2222]  ; user in Group A
   <whatever ip definitions are appropriate>
context=FromGroupA

[4444]  ; user in Group B (the Boss)
   <whatever ip definitions are appropriate>
context=FromGroupB

In extensions.conf

[FromGroupA]
   <whatever outgoing dialplan is appropriate>
exten => _1888NXXXXXX,1,Dial(Zap/g1/${EXTEN})

[FromGroupB]
exten => _1888NXXXXXX,1,Dial(Zap/g4/${EXTEN})

[IncomingZap1]
   <whatever incoming dialplan is appropriate>

[IncomingZap4]
   <whatever incoming dialplan is appropriate for the Boss>
exten => s,1,Dial(SIP/4444,15,r)  ; ring the Boss's phone

In zapta.conf

; first zap channel
   <whatever zap statements are appropriate>
context=IncomingZap1
group=1
channel => 1
context=IncomingZap1
group=1
channel => 2
context=IncomingZap4
group=4
channel => 4

I did not try to actually implement the above statements, so syntax 
might not be correct. However, the above example should be sufficient to 
understand that incoming calls on line 4 are routed only to the Boss, 
and outgoing calls by the Boss use the FromGroupB dialplan statements
(not the FromGroupA dialplan entries).

That should be more then enough to address the OP's original six 
postings relative to both incoming and outgoing calls designated for 
certain zap lines.





More information about the asterisk-users mailing list