<div>well, on analog lines you generally you won't have incoming DID informations; so you'll have all calls routed to extension 's' in the context defined for that channels. By the way, you can check in the dialplan which zap channel number the call is coming in from.
</div>
<div>To do this, you have to extract the channel number with some string manipulation:</div>
<div>Zap incoming channel names come in this form</div>
<div>&nbsp;</div>
<div>Zap/&lt;channum&gt;-&lt;additionaluniqueid&gt;</div>
<div>&nbsp;</div>
<div>So you have to CUT the channel name two times to obtain the zap channel number.</div>
<div>Example:</div>
<div>&nbsp;</div>
<div>...suppose call is coming in from channel 4</div>
<div>&nbsp;</div>
<div>[from-pstn]</div>
<div>;CHANNEL is &quot;Zap/4-some&quot;<br>exten =&gt; s,1,Set(channum=${CUT(CHANNEL|-|1)}) ; channum is now &quot;Zap/4&quot;</div>
<div>exten =&gt; s,2,Set(channum=${CUT(channum|/|2)}) ; channum is now &quot;4&quot;</div>
<div>exten =&gt; s,3,Gotoif(&quot;${channum}&quot;=&quot;3&quot;?233|1) ; go to 233 if channel is 3</div>
<div>
<div>exten =&gt; s,4,Gotoif(&quot;${channum}&quot;=&quot;4&quot;?234|1) ; go to 234 if channel is 4</div>
<div>... you can add as many as you want...</div>
<div>exten =&gt; s,n,Goto(233) ; go to your default extension if channel is different from&nbsp;</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;&nbsp;the ones specified above</div>
<div>&nbsp;</div></div>
<div>...</div>
<div>exten =&gt; 233,1,Dial(SIP/233)</div>
<div>exten =&gt; 234,1,Dial(SIP/234)</div>
<div>....</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Hope this helps...<br>&nbsp;</div>
<div>&nbsp;</div>
<div><span class="gmail_quote">2006/4/26, Andy Green &lt;<a href="mailto:andy@gbeye.com">andy@gbeye.com</a>&gt;:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="DIRECTION: ltr">
<div>
<p><font face="Arial" size="2">Hello, </font></p>
<p><font face="Arial" size="2"></font></p>
<p><font face="Arial" size="2">I have 2 analogue ports on a<span>n Alcatel</span>&nbsp;PBX patched to 2 FXO ports on my </font><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:*@home" target="_blank"><font face="Arial" size="2">
*<span>@home</span></font></a> 2.8 running on top of CentOS.&nbsp;<span> </span>Both FXO Ports are on ONE&nbsp;<span>D</span>igium card.</p>
<p><font face="Arial" size="2">What I would like is:</font> </p>
<p><font face="Arial" size="2"></font></p>
<p><font face="Arial"><font size="2">If someone calls extn 281 on my&nbsp;<span>Alcatel</span> PBX it is routed through to Extn 233 on my *<span> thruogh FXO port/module 4</span>&nbsp;<br>If someone calls extn 282 on my&nbsp;<span>Alcatel
</span> PBX it is routed through to Extn 234 on my *<span> thruogh FXO Port/module 3</span></font></font></p>
<p><font face="Arial" size="2">I have SIP extn 233 set up<span>.</span><br><font face="Arial" size="2">I have SIP extn 234 set up.</font></font></p>
<p><font face="Arial" size="2">I have<span> </span>one inbound route set up as any DID / any CID with a destination<span> </span>set to 233 (calling 281 from my&nbsp;<span>A</span>lcatel<span> does</span>&nbsp;ring on 233)<span>.</span>
<br></font><font size="+0"><br></font><font face="Arial" size="2">I have<span> </span>one zap channel set up in trunks as ZAP/g0.</font></p>
<p><font face="Arial"><font size="2"><span>C</span>urrent&nbsp;<span>zapata-auto.</span>config: </font></font></p>
<p><font face="Arial" size="2"></font></p>
<p><font face="Arial" size="2">; Autogenerated by /usr/local/sbin/genzaptelconf -- do not hand<span> </span>edit <br></font><font face="Arial" size="2">; Zaptel Channels Configurations (zapata.conf) <br></font><font face="Arial" size="2">
; <br>; This is not intended to be a complete zapata.conf. Rather, it<span> </span>is intended <br>; to be #include-d by /etc/zapata.conf that will include the<span> </span>global settings <br>; </font><font face="Arial" size="2">
callerid=asreceived <br></font><font face="Arial" size="2">; Span 1: WCTDM/0 &quot;Wildcard TDM400P REV I Board 1&quot; <br></font><font face="Arial" size="2">; channel 1, WCTDM, inactive. <br></font><font face="Arial" size="2">
; channel 2, WCTDM, inactive.<br></font><font face="Arial" size="2">signalling=fxs_ks <br>; Note: this is a trunk. Create a ZAP trunk in AMP for Channel<span> </span>3 <br></font><font face="Arial" size="2">context=from-pstn 
<br></font><font face="Arial" size="2">group=0 <br></font><font face="Arial" size="2">channel =&gt; 3 <br></font><font face="Arial"><font size="2">signalling=fxs_ks <br>; Note: this is a trunk. Create a ZAP trunk in AMP for Channel
<span> </span></font></font><font face="Arial" size="2">4<br></font><font face="Arial" size="2">context=from-pstn <br></font><font face="Arial" size="2">group=0 <br></font><font face="Arial" size="2">channel =&gt; 4 <br>; Span 2: ZTDUMMY/1 &quot;ZTDUMMY/1 1&quot;
</font></p>
<p><font face="Arial" size="2">My problem is getting 234 to answer when I dial 282 from the<span> A</span>lcatel as I have nothing set up for it and don't seem to be<span> </span>able to work out how to direct different FXO ports to different
<span> </span>* extns</font><font face="Arial" size="2">.</font></p>
<p><font face="Arial" size="2">I am told that my Alcatel is not passing any info<span> </span>(DID<span> </span>number etc) down the line</font></p>
<p><font face="Arial"><font size="2">Any help would be greatfully appreciated<span>.</span></font></font></p>
<p><font face="Arial" size="2"></font></p>
<p>
<p><font face="Arial" size="2"></font></p>
<p><font face="Arial" size="2">Regards</font></p>
<p></p></p></div>
<p align="left"><font face="Arial" size="2">Andy Green<br></font><font face="Arial" size="2">IT Manager<br></font><font face="Arial" size="2"><br>GB&nbsp;eye</font><font face="Arial" size="2">&nbsp;Ltd<br></font><font face="Arial" size="2">
1 Russell St<br></font><font face="Arial" size="2">Kelham Island<br></font><font face="Arial" size="2">Sheffield<br></font><font face="Arial" size="2">S3 8RW</font></p>
<p align="left"><font face="Arial" size="2">Tel: 0114 252 1611<br></font><font face="Arial" size="2">Fax: 0114 272 9599</font></p><u><font color="#0000ff">
<p align="left"></p></font></u><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:andy@gbeye.com" target="_blank"><u><font color="#0000ff"><font face="Arial" size="2">mailto:andy@gbeye.com</font></font>
</u></a><font face="Arial" size="2"><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.businessgbeye.com/" target="_blank">http://www.businessgbeye.com</a></font> 
<div>&nbsp;</div><br><br>Please read: CHANGE OF COMPANY NAME. <br><br>As of 1st January 2006 GB Posters Ltd will be known as GB eye Ltd, please update all records and email addresses: <br><br>Please replace everything after the @ in email addresses with 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://gbeye.com/" target="_blank">gbeye.com</a> (e.g. <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:enquiries@gbposters.com" target="_blank">
enquiries@gbposters.com</a> is now <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:enquiries@gbeye.com" target="_blank">enquiries@gbeye.com</a>) <br><br>The GB eye Ltd business website can be found at 
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.businessgbeye.com/" target="_blank">http://www.businessgbeye.com</a>, please update your bookmarks and favourites. <br><br>This e-mail is intended for the addressee(s) named above and any other use is prohibited. It may contain confidential information. 
<br>If you received this e-mail in error please contact the sender by return e-mail. GB eye Ltd does not accept legal responsibility for <br>the contents of this message if it has reached you via the Internet. Any opinions expressed are those of the author and are not 
<br>necessarily endorsed by GB eye Ltd. Recipients are advised to apply their own virus checks to this message and all incoming <br>email on delivery. <br><br>&nbsp;</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>