No worries - it is indeed a total paradigm shift and things may seem unusual. If you have a PBX registered with FreeSWITCH then from the FS perspective it&#39;s a &quot;user&quot;. Don&#39;t let the name &quot;user&quot; fool you - it&#39;s just a label, and it&#39;s easier to write than &quot;SIP registered endpoint.&quot;<br>

<br>So, if your trunk is registered then that means you&#39;ve got an entry in conf/directory/default/ that defines the &quot;user&quot;. An example in there already is 1000.xml, where the id=&quot;1000&quot;. So to route a call to that &quot;user&quot; just do this:<br>

<br>&lt;action application=&quot;bridge&quot; data=&quot;user/1000&quot;/&gt;<br><br>That&#39;s it! FS does a lot of magic behind the scenes. So in the case of your DID, you need to add a dialplan entry. I recommend making a copy of conf/dialplan/default/00_inbound_did.xml and editing it to suit your needs. Let&#39;s say that your DID is <a href="tel:8005551212" value="+18005551212" target="_blank">8005551212</a> and that your PBX is registered as user 1234. This dialplan entry would route an inbound DID call to your PBX:<br>

<br>&lt;extension name=&quot;DID&quot;&gt;<br>  &lt;condition field=&quot;destination_number&quot; expression=&quot;^\+?1?<a href="tel:8005551212" value="+18005551212" target="_blank">8005551212</a>&quot;&gt;<br>    &lt;action application=&quot;bridge&quot; data=&quot;user/1234&quot;/&gt;<br>

  &lt;/condition&gt;<br>&lt;/extension&gt;<br><br>Note I added some regex magic to strip out optional leading + or 1. <br><br>Let us know how that works. Be sure to join IRC if you want to discuss it in real time.<br>-MC<br>

<br><div class="gmail_quote">On Thu, Sep 6, 2012 at 12:09 PM, Matt Putnam <span dir="ltr">&lt;<a href="mailto:matt.putnam@lightspar.com" target="_blank">matt.putnam@lightspar.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Sorry for the confusion I can really only equate it to asterisk as that’s what our current platform is. Essentially the problem is that if I have a PBX that has a trunk that is registered to freeswitch and a call is received for a DID  that is on that trunk I am currently unable to send that DID to the PBX. When the call is received on the PBX side it looks as if the call is for the trunk instead of the DID is should be for. So in the SIP invite instead of using lightspar1@domain it would use 5551212@domain. In asterisk this was simply accomplished by a dial statement of (SIP/5551212@lightspar1) what I am looking for is that equivalent in freeswitch.<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thanks,<u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Matt Putnam<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><a href="mailto:matt.putnam@lightspar.com" target="_blank">matt.putnam@lightspar.com</a><u></u><u></u></span></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Brian Foster<br>

<b>Sent:</b> Thursday, September 06, 2012 10:48 AM</span></p><div><div><br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch<u></u><u></u></div></div>
<p></p><div><div><p class="MsoNormal"><u></u> <u></u></p><p>I&#39;m confused. I&#39;ve read your message about three times, still don&#39;t completely understand.<u></u><u></u></p><p>Brian Foster<br>Endigo Computer LLC<u></u><u></u></p>

<p>Sent from a mobile device.<u></u><u></u></p><div><p class="MsoNormal">On Sep 6, 2012 10:44 AM, &quot;Matt Putnam&quot; &lt;<a href="mailto:matt.putnam@lightspar.com" target="_blank">matt.putnam@lightspar.com</a>&gt; wrote:<u></u><u></u></p>

<div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thanks for the Response Mike I am able to get the trunk registered the real issue I guess is passing calls to that trunk. As an example I have freeswitch1 for customers which has a trunk lightspar1 registered to my gateway freeswitch box. When a call is placed to a DID that is associated to freeswitch1 I can see the call in the logs but the destination number is lightspar1 not the original DID that was called. Is there a way to set the from field to use the DID called instead of the trunk name so instead of lightspar1@blah it would send the invite with NPANXXXXXX@blah?</span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thanks,</span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Matt Putnam</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><a href="mailto:matt.putnam@lightspar.com" target="_blank">matt.putnam@lightspar.com</a></span><u></u><u></u></p>

<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Michael Collins<br>

<b>Sent:</b> Wednesday, September 05, 2012 6:49 PM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] Registering SIP Trunks to Freeswitch</span><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p>

<p class="MsoNormal" style="margin-bottom:12.0pt">Hi Matt,<br><br>Welcome to FreeSWITCH!<br><br>If you want something to register with FreeSWITCH then simply add an entry in the user directory. Whether it&#39;s a &quot;user&quot; or a &quot;trunk&quot; really doesn&#39;t matter - it&#39;s just a SIP registration. Look in conf/directory/default/1000.xml (if using the example &quot;vanilla&quot; configuration) for a taste of what you need. Let us know if you have any other questions or join us in #freeswitch on <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a>.<br>

<br>-MC (IRC:mercutioviz)<u></u><u></u></p><div><p class="MsoNormal">On Wed, Sep 5, 2012 at 3:21 PM, Matt Putnam &lt;<a href="mailto:matt.putnam@lightspar.com" target="_blank">matt.putnam@lightspar.com</a>&gt; wrote:<u></u><u></u></p>

<div><div><p class="MsoNormal">This may have been asked before but my research hasn’t turned up any results. I am currently testing freeswitch as a replacement to our current asterisk gateways. I think I have the basics of ip based trunks down but I am running into an issue with trunks registering to the freeswitch box. In asterisk it was a fairly simple process of giving the trunk a username and password and setting it to dynamic to get it to register. What would be the equivalent in freeswitch that would allow me to have customer trunks register to the system? <u></u><u></u></p>

<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p><p class="MsoNormal">Matt Putnam<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p></div>

</div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>

<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>

<br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>

<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><u></u><u></u></p>

</div><p class="MsoNormal" style="margin-bottom:12.0pt"><br><br clear="all"><br>-- <br>Michael S Collins<br>Twitter: @mercutioviz<br><a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br><a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>

<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><u></u><u></u></p><div class="MsoNormal" style="text-align:center" align="center"><hr style="color:gray" align="center" noshade size="1" width="100%">

</div><p class="MsoNormal">No virus found in this message.<br>Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a><br>Version: 2012.0.2197 / Virus Database: 2437/5251 - Release Date: 09/05/12<u></u><u></u></p>

</div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>

<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>

<br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>

<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><u></u><u></u></p>

</div><div class="MsoNormal" style="text-align:center" align="center"><hr style="color:gray" align="center" noshade size="1" width="100%"></div></div></div><p class="MsoNormal"></p><div><div>No virus found in this message.<br>

Checked by AVG - <a href="http://www.avg.com" target="_blank">www.avg.com</a><br></div></div><div>Version: 2012.0.2197 / Virus Database: 2437/5252 - Release Date: 09/06/12<u></u><u></u></div><p></p></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<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></blockquote></div><br><br clear="all"><br>-- <br>Michael S Collins<br>Twitter: @mercutioviz<br><a href="http://www.FreeSWITCH.org" target="_blank">http://www.FreeSWITCH.org</a><br><a href="http://www.ClueCon.com" target="_blank">http://www.ClueCon.com</a><br>

<a href="http://www.OSTAG.org" target="_blank">http://www.OSTAG.org</a><br><br><br>