<p>If the other PBX is FreeSWITCH you <a href="http://need.to">need.to</a> rewrite the Request URI before sending to the receiving FS box. Sending the username before the @ in the request URI is done by default but if you need to differentiate DIDs then you have to rewrite the request URI to that DID so it does show up in DESTINATION_NUMBER. Search RURI on the wiki. If it&#39;s coming from another PBX that&#39;s not FS we can&#39;t help and if that&#39;s coming from your provider its time for another provider.</p>

<p>Brian Foster<br>
Endigo Computer LLC</p>
<p>Sent from a mobile device.</p>
<div class="gmail_quote">On Sep 7, 2012 3:48 PM, &quot;Paul Cupis&quot; &lt;<a href="mailto:paul@cupis.co.uk">paul@cupis.co.uk</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 06/09/12 20:09, Matt Putnam wrote:<br>
&gt; Sorry for the confusion I can really only equate it to asterisk as<br>
&gt; that’s what our current platform is. Essentially the problem is that if<br>
&gt; I have a PBX that has a trunk that is registered to freeswitch and a<br>
&gt; call is received for a DID that is on that trunk I am currently unable<br>
&gt; to send that DID to the PBX. When the call is received on the PBX side<br>
&gt; it looks as if the call is for the trunk instead of the DID is should be<br>
&gt; for. So in the SIP invite instead of using lightspar1@domain it would<br>
&gt; use 5551212@domain. In asterisk this was simply accomplished by a dial<br>
&gt; statement of (SIP/5551212@lightspar1) what I am looking for is that<br>
&gt; equivalent in freeswitch.<br>
<br>
Do you have a copy of the FreeSWITCH Cookbook? This requirement sounds<br>
similar to one of the recipes in the book.<br>
<br>
&lt;extension name=&quot;<a href="tel:9725551212" value="+19725551212">9725551212</a>&quot;&gt;<br>
   &lt;condition field=&quot;destination_number&quot; expression=&quot;^9725551212$&quot;/&gt;<br>
<br>
   &lt;condition field=&quot;${sofia_contact(lightspar1@${domain})}&quot;<br>
                expression=&quot;^[^\@]+(.*)&quot;&gt;<br>
     &lt;action application=&quot;bridge&quot; data=&quot;sofia/external/9725551212$1&quot;/&gt;<br>
   &lt;/condition&gt;<br>
&lt;/extension&gt;<br>
<br>
The sofia_contact bit should work out the dialstring and then strip<br>
everything before the &#39;@&#39; (in your example this would be &#39;lightspar1&#39;)<br>
and then the bridge prepends the destination number.<br>
<br>
Regards,<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">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">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>
</blockquote></div>