<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<div class="PlainText">Thank you Bogdan for the reply.<br>
<br>
I am wondering if I can use the get_dialog__info somehow to find out the original Invite (A) is sent back.<br>
<br>
I am still investigating if my SIP flow will always keep the contract (with the VIA header solution).<br>
<br>
Is there any other modules or functions that I could possibly use?<br>
<br>
Thank you,<br>
Frank<br>
<br>
--- Original Message ---<br>
<br>
From: &quot;Bogdan-Andrei Iancu&quot; &lt;bogdan@opensips.org&gt;<br>
Sent: May 22, 2014 1:06 PM<br>
To: &quot;frank fox&quot; &lt;franklyfox@outlook.com&gt;, users@lists.opensips.org<br>
Subject: Re: hairpin and outside of dialog detection<br>
<br>
</div>
<div style="background-color:#FFFFFF">
<div class="x_moz-cite-prefix"><tt>Hello Frank,<br>
<br>
Well, the match dialog does not work for this as the second INVITE is not a sequential request, but an initial one (the dialog wise matching is done only on the sequential requests).<br>
<br>
You can do the check by looking at the IPs in the VIA header, hoping proxy2 is doing no topo hiding. So, when the call is back to proxy1, the via[2] ip should belong to itself.<br>
<br>
Regards,<br>
</tt>
<pre class="x_moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="x_moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
On 20.05.2014 21:48, frank fox wrote:<br>
</div>
<blockquote type="cite"><style>
<!--
.x_hmmessage 
        {margin:0px;
        padding:0px}
body.x_hmmessage
        {font-size:12pt;
        font-family:Calibri}
-->
</style>
<div dir="ltr"><br>
Greetings:<br>
<br>
I have a scenario as below:<br>
<pre>Proxy-1 ---(A)---&gt; Proxy-2 
      &lt;----(B)------------</pre>
<br>
(A) := Initial Invite from proxy-1 to proxy-2<br>
(B) := proxy-2 modifies the $rd and sends the initial Invite back to proxy-1<br>
<br>
Question:<br>
How can the proxy-1 knows that the coming Invite was originally sent by itself?<br>
<br>
It seems the match_dialog() doesn't work for this situation:<br>
<br>
dialog::&nbsp; hash=3514:62628069&quot;7&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; state:: 2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user_flags:: 65536<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timestart:: 0<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout:: 0<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callid:: <a class="x_moz-txt-link-abbreviated" href="mailto:a7ab8ff06766fabe1b4846712fba1051@10.242.65.162">
a7ab8ff06766fabe1b4846712fba1051@10.242.65.162</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from_uri:: <a class="x_moz-txt-link-abbreviated" href="mailto:sip:19905635611@10.242.65.162">
sip:19905635611@10.242.65.162</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_uri:: <a class="x_moz-txt-link-abbreviated" href="mailto:sip:19905591214@external-sip.vocalocity.com">
sip:19905591214@external-sip.vocalocity.com</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caller_tag:: 14174341581400528279229<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caller_contact:: <a class="x_moz-txt-link-abbreviated" href="mailto:sip:19905635611@10.242.65.162:5060">
sip:19905635611@10.242.65.162:5060</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callee_cseq:: 0<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caller_route_set::<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caller_bind_addr:: udp:10.116.239.217:5060<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callee_tag:: 16423468221400528279248<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callee_contact::<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; caller_cseq:: 102<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callee_route_set::<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callee_bind_addr:: udp:10.116.239.217:5060<br>
<br>
<br>
dialog::&nbsp; hash=3514:62628069&quot;8&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; state:: 2<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; user_flags:: 65536<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timestart:: 0<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout:: 0<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callid:: <a class="x_moz-txt-link-abbreviated" href="mailto:a7ab8ff06766fabe1b4846712fba1051@10.242.65.162">
a7ab8ff06766fabe1b4846712fba1051@10.242.65.162</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from_uri:: <a class="x_moz-txt-link-abbreviated" href="mailto:sip:19905635611@10.242.65.162">
sip:19905635611@10.242.65.162</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_uri:: <a class="x_moz-txt-link-abbreviated" href="mailto:sip:19905591214@external-sip.vocalocity.com">
sip:19905591214@external-sip.vocalocity.com</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caller_tag:: 14174341581400528279229<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caller_contact::<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callee_cseq:: 0<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caller_route_set::<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caller_bind_addr:: udp:10.116.239.217:5060<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callee_tag:: 16423468221400528279248<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callee_contact::<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; caller_cseq:: 102<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callee_route_set::<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; callee_bind_addr:: udp:10.116.239.217:5060<br>
<br>
<br>
Regards,<br>
Frank<br>
</div>
</blockquote>
<br>
</div>
</body>
</html>