You can also handle this slightly better by setting the context parameter for the FXO port in freetdm.conf.xml, then you can have a context that just handles incoming fxo calls from mod_freetdm, so you no longer have to check the source.<div>

<br></div><div><a href="http://wiki.freeswitch.org/wiki/FreeTDM#FreeSWITCH_FreeTDM_configuration">http://wiki.freeswitch.org/wiki/FreeTDM#FreeSWITCH_FreeTDM_configuration</a></div><div><br></div><div>It looks like the following variables are set:</div>

<div><ul><li><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px; ">freetdm_span_name</span></li><li><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px; ">freetdm_span_number</span></li>

<li><span class="Apple-style-span" style="font-family: sans-serif; font-size: 13px; line-height: 19px; ">freetdm_chan_number</span></li></ul><div><font class="Apple-style-span" face="sans-serif"><span class="Apple-style-span" style="line-height: 19px;">Do any of those indicate the FXO/FXS?</span></font></div>

</div><div><br></div><div>-Steve</div><div><br><br><div class="gmail_quote">On 2 February 2011 10:58, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com">steveayre@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><div>Try this:</div><div class="im"><div><br></div><div>&lt;extension name=&quot;analog test2&quot; continue=&quot;true&quot;&gt;</div>
<div>    &lt;condition field=&quot;source&quot; expression=&quot;mod_freetdm&quot;&gt;<span style="white-space:pre-wrap">                                </span></div></div><div>       <span style="white-space:pre-wrap">        </span>&lt;action application=&quot;info&quot;/&gt;</div>


<div>    &lt;/condition&gt;</div><div> &lt;/extension&gt;</div><div><br></div><div>That&#39;ll dump all the fields and variables set. Are there any that indicate the FXO port? If not, perhaps you need to configure something - check the card&#39;s documentation.</div>


<div><br></div><div>If you find there is a variable containing the port, you can check more than one condition. For example:</div><div><span style="border-collapse:separate;font-family:arial;font-size:small"><div class="im">

<div>
&lt;extension name=&quot;analog test2&quot; continue=&quot;true&quot;&gt;</div></div><div><div>    &lt;condition field=&quot;source&quot; expression=&quot;mod_freetdm&quot;/&gt;</div><div>    &lt;condition field=&quot;${sangoma_fxo_port_variable_name}&quot; expression=&quot;^1$&quot;&gt;<span style="white-space:pre-wrap">                                </span></div>

<div class="im">
    <span style="white-space:pre-wrap">        </span>&lt;action application=&quot;set&quot; data=&quot;domain_name=$${domain}&quot;/&gt;</div></div><div class="im"><div>      <span style="white-space:pre-wrap">        </span>&lt;action application=&quot;set&quot; data=&quot;transfer_ringback=$${us-ring}&quot;/&gt;</div>


<div>      <span style="white-space:pre-wrap">        </span>&lt;action application=&quot;answer&quot;/&gt;</div><div>      <span style="white-space:pre-wrap">        </span>&lt;action application=&quot;transfer&quot; data=&quot;1000 XML default&quot;/&gt;</div>


<div>    &lt;/condition&gt;</div><div> &lt;/extension&gt; </div></div></span></div></span></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><span style="font-family:arial, sans-serif;font-size:13px;border-collapse:collapse"><div>

<span style="border-collapse:separate;font-family:arial;font-size:small"><div class="im"><div><br></div></div><div>-Steve</div><div><br></div></span></div></span><br><div class="gmail_quote"><div><div></div><div class="h5">

On 1 February 2011 16:17, Eric Michel <span dir="ltr">&lt;<a href="mailto:eric@bmcrministries.org" target="_blank">eric@bmcrministries.org</a>&gt;</span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">I&#39;ve got a Sangoma A200 with six FXO ports and two FXS.  I can call out just fine, but I&#39;m having trouble figuring out how to route incoming calls.  We&#39;ve got five POTS lines and all I&#39;ve been able to do is route all incoming calls to a specific extension.  How do I go about routing individual POTS lines to different groups/extensions? <div>



<br></div><div><div>&lt;extension name=&quot;analog test2&quot; continue=&quot;true&quot;&gt;</div><div>    &lt;condition field=&quot;source&quot; expression=&quot;mod_freetdm&quot;&gt;<span style="white-space:pre-wrap">                                </span></div>



<div>    <span style="white-space:pre-wrap">        </span>&lt;action application=&quot;set&quot; data=&quot;domain_name=$${domain}&quot;/&gt;</div><div>      <span style="white-space:pre-wrap">        </span>&lt;action application=&quot;set&quot; data=&quot;transfer_ringback=$${us-ring}&quot;/&gt;</div>



<div>      <span style="white-space:pre-wrap">        </span>&lt;action application=&quot;answer&quot;/&gt;</div><div>      <span style="white-space:pre-wrap">        </span>&lt;action application=&quot;transfer&quot; data=&quot;1000 XML default&quot;/&gt;</div>



<div>    &lt;/condition&gt;</div><div> &lt;/extension&gt;</div></div><div><br></div><div>That is my current conf/public/inbound dial plan.  Shouldn&#39;t I be able to add a second condition that tests what FXO port is receiving the call and allow me to route it accordingly?  If yes, could I get an example?  The answer may be really simple, I&#39;ve just been unable to find it.</div>



<div><br></div><div>Thanks,</div><div>Eric</div>
<br></div></div><div class="im">_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></div></blockquote></div><br>
</blockquote></div><br></div>