<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's coming from another PBX that's not FS we can't help and if that'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, "Paul Cupis" <<a href="mailto:paul@cupis.co.uk">paul@cupis.co.uk</a>> 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>
> Sorry for the confusion I can really only equate it to asterisk as<br>
> that’s what our current platform is. Essentially the problem is that if<br>
> I have a PBX that has a trunk that is registered to freeswitch and a<br>
> call is received for a DID that is on that trunk I am currently unable<br>
> to send that DID to the PBX. When the call is received on the PBX side<br>
> it looks as if the call is for the trunk instead of the DID is should be<br>
> for. So in the SIP invite instead of using lightspar1@domain it would<br>
> use 5551212@domain. In asterisk this was simply accomplished by a dial<br>
> statement of (SIP/5551212@lightspar1) what I am looking for is that<br>
> 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>
<extension name="<a href="tel:9725551212" value="+19725551212">9725551212</a>"><br>
<condition field="destination_number" expression="^9725551212$"/><br>
<br>
<condition field="${sofia_contact(lightspar1@${domain})}"<br>
expression="^[^\@]+(.*)"><br>
<action application="bridge" data="sofia/external/9725551212$1"/><br>
</condition><br>
</extension><br>
<br>
The sofia_contact bit should work out the dialstring and then strip<br>
everything before the '@' (in your example this would be 'lightspar1')<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>