<font color='black' size='2' face='arial'>
<div><font face="arial">Good day to all. </font></div>
<div><font face="arial">Here is what I am trying to do and I am hoping someone can set me in the right direction. I am using Opensips 1.11.2</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">I have an inbound SIP call. This call is actually a forward. When I dial the number 8585554444 it is forwarded to 8585554444. </font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">Dialed number: 8585554444 forwards to 18552223333</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">When the call comes in Opensips this is my initial invite...</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">INVITE sip:+18552223333@111.222.333.444:5060 SIP/2.0</font></div>
<div><font face="arial">Via: SIP/2.0/UDP 11.11.11.11:5060;branch=z9hG4bK08B4ca619b00ce6405c</font></div>
<div><font face="arial">From: <sip:+18586669999@11.11.11.11:5060;isup-oli=0>;tag=gK084a85fd</font></div>
<div><font face="arial">To: <sip:8585554444@111.222.333.444:5060></font></div>
<div><font face="arial">Call-ID: 537432242_53736858@11.11.11.11</font></div>
<div><font face="arial">CSeq: 17719 INVITE</font></div>
<div><font face="arial">Max-Forwards: 93</font></div>
<div><font face="arial">Allow: INVITE,ACK,CANCEL,BYE,PRACK,UPDATE</font></div>
<div><font face="arial">Accept: application/sdp, application/isup, application/dtmf, application/dtmf-relay, multipart/mixed</font></div>
<div><font face="arial">Contact: <sip:+18586669999@11.11.11.11:5060></font></div>
<div><font face="arial">P-Asserted-Identity: <sip:+18586669999@11.11.11.11:5060></font></div>
<div><font face="arial">Diversion: <sip:+18585554444@11.11.11.11:5060>;privacy=off;screen=no; reason=no-answer; counter=1</font></div>
<div><font face="arial">Supported: 100rel</font></div>
<div><font face="arial">Content-Length: 200</font></div>
<div><font face="arial">Content-Disposition: session; handling=required</font></div>
<div><font face="arial">Content-Type: application/sdp</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">I see that the initial INVITE shows the toll free number that the call was forwarded to but the TO: shows the original dialed number. </font></div>
<div><font face="arial">My question is can I grab the phone number from the initial INVITE? I have goggled around and tried using the search but it just returns a 1 or 0 for a match. I know once I am able to grab the number from the INVITE can then update the TO:field. I have dumped out almost all of the vars from Opensips and none of them show me the phone number from the initial INVITE.</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">Any help is appreciated.</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">Thanks,</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial"><br>
</font></div>
<div><font face="arial">James</font></div>
<div style="color: black; font-family: arial; font-size: 10pt;"><br>
</div>
</font>