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"><<a href="mailto:steveayre@gmail.com">steveayre@gmail.com</a>></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><extension name="analog test2" continue="true"></div>
<div> <condition field="source" expression="mod_freetdm"><span style="white-space:pre-wrap">                                </span></div></div><div> <span style="white-space:pre-wrap">        </span><action application="info"/></div>
<div> </condition></div><div> </extension></div><div><br></div><div>That'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'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>
<extension name="analog test2" continue="true"></div></div><div><div> <condition field="source" expression="mod_freetdm"/></div><div> <condition field="${sangoma_fxo_port_variable_name}" expression="^1$"><span style="white-space:pre-wrap">                                </span></div>
<div class="im">
<span style="white-space:pre-wrap">        </span><action application="set" data="domain_name=$${domain}"/></div></div><div class="im"><div> <span style="white-space:pre-wrap">        </span><action application="set" data="transfer_ringback=$${us-ring}"/></div>
<div> <span style="white-space:pre-wrap">        </span><action application="answer"/></div><div> <span style="white-space:pre-wrap">        </span><action application="transfer" data="1000 XML default"/></div>
<div> </condition></div><div> </extension> </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"><<a href="mailto:eric@bmcrministries.org" target="_blank">eric@bmcrministries.org</a>></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've got a Sangoma A200 with six FXO ports and two FXS. I can call out just fine, but I'm having trouble figuring out how to route incoming calls. We've got five POTS lines and all I'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><extension name="analog test2" continue="true"></div><div> <condition field="source" expression="mod_freetdm"><span style="white-space:pre-wrap">                                </span></div>
<div> <span style="white-space:pre-wrap">        </span><action application="set" data="domain_name=$${domain}"/></div><div> <span style="white-space:pre-wrap">        </span><action application="set" data="transfer_ringback=$${us-ring}"/></div>
<div> <span style="white-space:pre-wrap">        </span><action application="answer"/></div><div> <span style="white-space:pre-wrap">        </span><action application="transfer" data="1000 XML default"/></div>
<div> </condition></div><div> </extension></div></div><div><br></div><div>That is my current conf/public/inbound dial plan. Shouldn'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'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>