<p dir="ltr">Tell us your provider, so we can avoid it :)</p>
<div class="gmail_quote">Le 29 avr. 2016 9:04 AM, &quot;Alex Balashov&quot; &lt;<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</a>&gt; a écrit :<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The standards are quite clear that To is a cosmetic header and is not to be used for any routing.<br>
<br>
Only the Request URI provides &quot;DNIS&quot;. If your SIP provider isn&#39;t differentiating it based on the number dialed, ask them to enable that.<br>
‎<br>
--<br>
Alex Balashov | Principal | Evariste Systems LLC<br>
1447 Peachtree Street NE, Suite 700<br>
Atlanta, GA 30309<br>
United States<br>
<br>
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)<br>
Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br>
<br>
Sent from my BlackBerry.<br>
  Original Message  <br>
From: thomas peterseil<br>
Sent: Friday, April 29, 2016 08:48<br>
To: FreeSWITCH Users Help<br>
Reply To: FreeSWITCH Users Help<br>
Subject: [Freeswitch-users] &quot;To field&quot; in sip header<br>
<br>
hello,<br>
i have a sip provider with multiple DID´s and they send me all calls with the same invite, only the To field in the SIP header is different. how can i read the To field in the SIP header to be able to make a call routing based on the To field? i tried the following rule but it doesnt work:<br>
<br>
---------------------<br>
<br>
&lt;include&gt;                                                                                                <br>
&lt;extension name=&quot;public_test1&quot;&gt;                                                     <br>
        &lt;condition regex=&quot;all&quot;&gt;                                                                     <br>
        &lt;regex  field=&quot;destination_number&quot; expression=&quot;^provider1$&quot;/&gt;                              <br>
        &lt;regex  field=&quot;${sip_h_To}&quot; expression=&quot;43717072377&quot;/&gt;                                           <br>
                                                                                                         <br>
                &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=7021&quot;/&gt;                       <br>
                &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=thomas&quot;/&gt;             <br>
                &lt;action application=&quot;answer&quot;/&gt;                                          <br>
                &lt;action application=&quot;transfer&quot; data=&quot;6011 XML inbound1 &quot;/&gt;                             <br>
        &lt;/condition&gt;                                                                                     <br>
&lt;/extension&gt;<br>
<br>
----------------<br>
<br>
the To field in the SIP header looks like this:<br>
<br>
To: &lt;<a href="mailto:sip%3A43717072377@193.43.148.37">sip:43717072377@193.43.148.37</a>&gt;<br>
<br>
thanks a lot for help!<br>
<br>
best regards,<br>
thomas<br>
<br>
<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" 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>