<font color='black' size='2' face='arial'><pre><font face="Arial, Helvetica, sans-serif" size="2">The call is coming in from an entity located before Opensips.</font></pre><pre><font face="Arial, Helvetica, sans-serif" size="2">What I would like to do is grab the toll-free number from the initial INVITE</font></pre><pre><pre style="font-family: arial;"><font size="2"> INVITE sip:<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">+18552223333 at 111.222.333.444</a>:5060 SIP/2.0</font></pre><pre style="font-family: arial;"><font size="2">then update the To: address to be the toll-free number not the local number 8585554444.</font></pre><pre style="font-family: arial;"><font size="2"><br>
</font></pre><pre><font face="arial" size="2">I have found that I can see the initial INVITE info if dump the buffer $mb. How can I search using a regex expression and return the match so I can update $tU. Is that possible?</font></pre></pre><pre style="color: black; font-family: arial;"><font size="2"><br>
</font></pre><pre style="color: black; font-family: arial;"><font size="2">Thanks,</font></pre><pre style="color: black; font-family: arial;"><font size="2">James</font></pre><pre style="color: black; font-size: 10pt; font-family: arial;"><br>
</pre><pre style="color: black; font-size: 10pt; font-family: arial;"><br>
</pre><pre style="color: black; font-size: 10pt; font-family: arial;">Hello,
Who is doing the actual forward ? Is it a SIP proxy / entity located
before OpenSIPS ?
Just by looking at the INVITE message you've posted, the originally
dialled number ( 8585554444 ) is located in the TO username ( readable
via the $tU variable in the script ).
Best Regards,
Vlad Paiu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com/">http://www.opensips-solutions.com</a>
On 12.12.2014 03:57, <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">discodog62 at aol.com</a> wrote:
><i> Good day to all.
</i>><i> Here is what I am trying to do and I am hoping someone can set me in
</i>><i> the right direction. I am using Opensips 1.11.2
</i>><i>
</i>><i> I have an inbound SIP call. This call is actually a forward. When I
</i>><i> dial the number 8585554444 it is forwarded to 8585554444.
</i>><i>
</i>><i> Dialed number: 8585554444 forwards to 18552223333
</i>><i>
</i>><i> When the call comes in Opensips this is my initial invite...
</i>><i>
</i>><i>
</i>><i> INVITE sip:<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">+18552223333 at 111.222.333.444</a>:5060 SIP/2.0
</i>><i> Via: SIP/2.0/UDP 11.11.11.11:5060;branch=z9hG4bK08B4ca619b00ce6405c
</i>><i> From: <sip:<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">+18586669999 at 11.11.11.11</a>:5060;isup-oli=0>;tag=gK084a85fd
</i>><i> To: <sip:<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">8585554444 at 111.222.333.444</a>:5060>
</i>><i> Call-ID: <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">537432242_53736858 at 11.11.11.11</a>
</i>><i> CSeq: 17719 INVITE
</i>><i> Max-Forwards: 93
</i>><i> Allow: INVITE,ACK,CANCEL,BYE,PRACK,UPDATE
</i>><i> Accept: application/sdp, application/isup, application/dtmf,
</i>><i> application/dtmf-relay, multipart/mixed
</i>><i> Contact: <sip:<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">+18586669999 at 11.11.11.11</a>:5060>
</i>><i> P-Asserted-Identity: <sip:<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">+18586669999 at 11.11.11.11</a>:5060>
</i>><i> Diversion: <sip:<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">+18585554444 at 11.11.11.11</a>:5060>;privacy=off;screen=no;
</i>><i> reason=no-answer; counter=1
</i>><i> Supported: 100rel
</i>><i> Content-Length: 200
</i>><i> Content-Disposition: session; handling=required
</i>><i> Content-Type: application/sdp
</i>><i>
</i>><i> I see that the initial INVITE shows the toll free number that the call
</i>><i> was forwarded to but the TO: shows the original dialed number.
</i>><i> My question is can I grab the phone number from the initial INVITE? I
</i>><i> have goggled around and tried using the search but it just returns a 1
</i>><i> or 0 for a match. I know once I am able to grab the number from the
</i>><i> INVITE can then update the TO:field. I have dumped out almost all of
</i>><i> the vars from Opensips and none of them show me the phone number from
</i>><i> the initial INVITE.
</i>><i>
</i>><i> Any help is appreciated.
</i>><i>
</i>><i> Thanks,
</i>><i>
</i>><i>
</i>><i> James
</i>><i>
</i>><i>
</i>><i>
</i>><i> _______________________________________________
</i>><i> Users mailing list
</i>><i> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">Users at lists.opensips.org</a>
</i>><i> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</i>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <<a href="http://lists.opensips.org/pipermail/users/attachments/20141212/4edf7d23/attachment.htm">http://lists.opensips.org/pipermail/users/attachments/20141212/4edf7d23/attachment.htm</a>></pre></font>