<p class="MsoNormal"><span style="" lang="EN-US">You'll want to learn all about Channels and groups.&nbsp; You can try here: <a href="http://www.voip-info.org/wiki/view/Channels+and+Groups">http://www.voip-info.org/wiki/view/Channels+and+Groups
</a>.&nbsp; <br>
</span></p>
<p class="MsoNormal"><span style="" lang="EN-US">I've assumed that you have 4 FXO modules (to support 4 external phone lines) and 4 FXS modules (to support 4 local extensions).<br>
</span></p>
<p class="MsoNormal"><span style="" lang="EN-US">Essentially you'll need
to define &quot;group&quot;s in your ZAPATA.CONF file.&nbsp; 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)<br>
</span></p>
<p class="MsoNormal"><span style="" lang="EN-US">You'll also need contexts in </span><span style="" lang="EN-US">EXTENSIONS.CONF</span><span style="" lang="EN-US">
to control how your users dial.&nbsp; The entries in ZAPATA.CONF for
the (FXS) extensions will invoke the appropriate context in
EXTENSIONS.CONF so that the appropriate trunks are used.&nbsp; Check
out the &quot;Dialling a Group&quot; section of <a href="http://www.voip-info.org/wiki/index.php?page=Asterisk+Zap+channels">http://www.voip-info.org/wiki/index.php?page=Asterisk+Zap+channels</a> for information on the various ways you can have Asterisk select a trunk from a group.&nbsp; I've used r below - 
</span> a round-robin search, starting at the next highest channel than last time (aka. ascending rotary hunt group).</p>
<p class="MsoNormal"><span style="" lang="EN-US">Yours,<br>
Hugh<br>
</span></p>
<p class="MsoNormal"><span style="" lang="EN-US"><br>
</span><u><span style="" lang="EN-US"></span></u><b style=""><u><span style="" lang="EN-US">Extensions.conf:</span></u></b></p>


<p class="MsoNormal"><span style="" lang="EN-US">[globals]</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">BOSS_TRUNK=ZAP/r1</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">GROUPA_TRUNK=ZAP/r2</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">GROUPB_TRUNK=ZAP/r3</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">GROUPC_TRUNK=ZAP/r4</span></p>




<p class="MsoNormal"><span style="" lang="EN-US">&nbsp;<br>
[boss-context]</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;North
American Long Distance</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">exten =&gt;
_1XXXXXXXXXX,1,Dial(BOSS_TRUNK/${EXTEN})</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">&nbsp;</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">[groupA-context]</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;North
American Long Distance</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">exten =&gt;
_1XXXXXXXXXX,1,Dial(GROUPA_TRUNK/${EXTEN})</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">&nbsp;</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">[groupB-context]</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;North
American Long Distance</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">exten =&gt;
_1XXXXXXXXXX,1,Dial(GROUPB_TRUNK/${EXTEN})</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">&nbsp;</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">[groupC-context]</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;North
American Long Distance</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">exten =&gt;
_1XXXXXXXXXX,1,Dial(GROUPC_TRUNK/${EXTEN})</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">&nbsp;</span></p>


<p class="MsoNormal"><b style=""><u><span style="" lang="EN-US">Zapata.conf:</span></u></b></p>


<p class="MsoNormal"><span style="" lang="EN-US">;FXS Line 1
– The Boss's local extension</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">language=en</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">context= boss-context</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">signalling=fxo_ks</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">threewaycalling=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">transfer=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">callgroup=1</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">pickupgroup=1,2,3,4</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">channel=&gt;1</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;FXS Line 2
– Group A's local extension</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">language=en</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">context= groupA-context</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">signalling=fxo_ks</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">threewaycalling=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">transfer=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">callgroup=2</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">pickupgroup=1,2,3,4</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">channel=&gt;1</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;FXS Line 3
– Group B's local extension</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">language=en</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">context= groupB-context</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">signalling=fxo_ks</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">threewaycalling=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">transfer=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">callgroup=3</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">pickupgroup=1,2,3,4</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">channel=&gt;1</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;FXS Line 4
– Group C's local extension</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">language=en</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">context= groupC-context</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">signalling=fxo_ks</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">threewaycalling=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">transfer=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">callgroup=4</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">pickupgroup=1,2,3,4</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">channel=&gt;1</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;FXO
(incoming) Line 1</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">language=en</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">context=Boss-FXO</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">signalling=fxs_ks</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">usecallerid=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">echocancel=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">echocancelwhenbridged=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">transfer=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">rxgain=5%</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">group=1</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">channel
=&gt; 1</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;FXO
(incoming) Line 2</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">language=en</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">context=general-FXO</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">signalling=fxs_ks</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">usecallerid=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">echocancel=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">echocancelwhenbridged=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">transfer=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">rxgain=5%</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">group=2</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">channel
=&gt; 1</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;FXO
(incoming) Line 3</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">language=en</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">context=general-FXO</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">signalling=fxs_ks</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">usecallerid=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">echocancel=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">echocancelwhenbridged=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">transfer=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">rxgain=5%</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">group=2,3</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">channel
=&gt; 1</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">;FXO
(incoming) Line 4</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">language=en</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">context=general-FXO</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">signalling=fxs_ks</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">usecallerid=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">echocancel=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">echocancelwhenbridged=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">transfer=yes</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">rxgain=5%</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">group=2,3,4</span></p>


<p class="MsoNormal"><span style="" lang="EN-US">channel
=&gt; 1</span></p>

<br><br><div><span class="gmail_quote">On 3/20/06, <b class="gmail_sendername">Faisal Inam</b> &lt;<a href="mailto:mfaisalinam@yahoo.com">mfaisalinam@yahoo.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="direction: ltr;"><div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;">Hello All !!!</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;">
<span style="font-size: 10pt; color: black; font-family: Arial;"></span>&nbsp;</div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;">I have 4 PSTN&nbsp;lines in the PBX server 1,2,3,4. 
</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;">&nbsp;</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;">
First&nbsp;line will be used&nbsp;by only one extension (i.e. for the boss) for incom
 ing and
 outgoing. This line is dedicated for him only.(</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;"></span>&nbsp;</div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;">
<span style="font-size: 10pt; color: black; font-family: Arial;"></span><span style="font-size: 10pt; color: black; font-family: Arial;">The remaining lines will be shared by&nbsp;the employees </span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;">
<span style="font-size: 10pt; color: black; font-family: Arial;">&nbsp;</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;">1) Group A&nbsp;have access to lines 2 , 3 &amp; 4.
</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;">2)&nbsp;Group B&nbsp;have access to&nbsp;lines&nbsp; 3 &amp; 4&nbsp;</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;">
<span style="font-size: 10pt; color: black; font-family: Arial;">3)&nbsp;Group C have access to line 4</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;">
</span>&nbsp;</div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;">I want to know that how i will make that groups.</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;">
<span style="font-size: 10pt; color: black; font-family: Arial;">&nbsp;</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;"></span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;">
<span style="font-size: 10pt; color: black; font-family: Arial;">I will be grateful for </span><span style="font-size: 10pt; color: black; font-family: Arial;">ur</span><span style="font-size: 10pt; color: black; font-family: Arial;">
 help.</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;">&nbsp;</span></div>  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;">
Thanks a lot.</span></div></div><div style="direction: ltr;"><span class="sg">  <div style="margin: 0in 0in 0pt; line-height: 14.4pt;"><span style="font-size: 10pt; color: black; font-family: Arial;">Faisal&nbsp;</span></div></span>
</div><div style="direction: ltr;"><span class="ad">  <div style="margin: 0in 0in 0pt;"><font face="Times New Roman" size="3">&nbsp;</font></div><p>
                </p><hr size="1">Relax. Yahoo! Mail 
<a href="http://us.rd.yahoo.com/mail_us/taglines/virusall/*http://communications.yahoo.com/features.php?page=221" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">virus scanning</a> helps detect nasty viruses!
<p></p></span></div><br>_______________________________________________<br>--Bandwidth and Colocation provided by <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://Easynews.com" target="_blank">Easynews.com
</a> --<br><br>Asterisk-Users mailing list<br>To UNSUBSCRIBE or update options visit:<br> &nbsp; <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">
http://lists.digium.com/mailman/listinfo/asterisk-users</a><br><br><br></blockquote></div><br>