<p dir="ltr">You receive a channel variable for every SIP header, and it shouldn&#39;t be a problem to build a regular expression to extract the dialed number from Diversion string.</p>
<p dir="ltr">You can also call &quot;info&quot; application at the beginning of the dialplan and see all the variables that are available.<br><br><br><br></p>
<div class="gmail_quote">On May 1, 2016 20:30, &quot;Joseph Waite&quot; &lt;<a href="mailto:joelists@tm.net.uk">joelists@tm.net.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">Hi Guys<br>
<br>
We have a Freeswitch based FusionPBX setup which registers to our main SIP Switch with Registering trunks.<br>
<br>
Outbound Calls work fine, however I’m having issues with using multiple inbound numbers.<br>
<br>
If I setup a destination with the username of the trunk then all calls received on the trunk goto that destination.<br>
<br>
If I setup each DID on its own then calls fails.<br>
<br>
In the invite I see To: &lt;sip:trunkuser@providerip:5080&gt;<br>
<br>
I see the DID dialled in the following in the SIP message<br>
<br>
Diversion: numberdialed &lt;tel:numberdialed&gt;;reason=unknown;counter=1;privacy=off<br>
<br>
Is there a setting I can add somewhere to the trunk config to tell it to use the value in Diversion?<br>
<br>
<br>
Any help greatly appreciated.<br>
<br>
Regards<br>
<br>
Joseph Waite<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a></blockquote></div>