Klaus,<br><br>    So I took you and Inaki&#39;s input and essentially constructed a setup like so after the lookup(&quot;location&quot;) call:<br><br>if(isbflagset(1)){<br>    $du = null;<br>    $rd = &quot;P1&quot;;<br>} else if(isbflagset(2)){<br>
    $du = null;<br>    $rd = &quot;P2&quot;;<br>} else if(isbflagset(3)){<br>    $du = null;<br>    $rd = &quot;P3&quot;;<br>} else if(isbflagset(4)){<br>    $du = null;<br>    $rd = &quot;P4&quot;;<br>}<br><br>On each Proxy, I changed the code appropriately excluding the Proxy from itself (so it does not forward to itself).  I&#39;m noticing weird behavior however as it seems as if what is happening is it created other issues such as:<br>
<br>[INCOMING SERVER] -&gt; P1 -&gt; P2 -&gt; P1 -&gt; (loop?)<br><br>Also I setup this test amongst two development servers (in which case it worked without issues).  Once I included in more development instances into the ring it seemed as if the flags were being set when they should not be?<br>
<br>I.e. I placed a call FROM UA1 (with bflag 5 SET) From the above example configuration ^ code.  If you notice (flag 5) is missing.  To UA2 (Flag 3), again this looked to be doing some strange things such as acting as if another flag was set when it should not have been, thus forwarding to the wrong proxy or the wrong proxy order.  Do you guys have any further thoughts or input on this?  Thanks!<br>
<br><div class="gmail_quote">On Thu, Apr 23, 2009 at 12:31 AM, Klaus Darilion <span dir="ltr">&lt;<a href="mailto:klaus.mailinglists@pernau.at">klaus.mailinglists@pernau.at</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Brandon!<br>
<br>
Back to the original email ....<br>
<br>
Brandon Armstead schrieb:<div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello guys,<br>
<br>
    Is there a method upon using lookup(&quot;location&quot;) to also pull out the &quot;socket&quot; information for the original location the UAC registered to, for scenarios of this example:<br>
<br>
P1 &amp; P2 share same usrloc database.<br>
<br>
UA1 registers to P1<br>
UA2 registers to P2<br>
<br>
UA1 calls UA2<br>
<br>
UA1 invites -&gt; P1 -&gt; INVITES -&gt; UA2 (bypassing P2 -- where the actual nat binding is).<br>
<br>
Now upon P1 looking up usrloc for UA2, I would like to recognize that P1 is not the Proxy to deliver the call, and forward the request to P2 to send to UA2.<br>
<br>
So currently I have:<br>
<br>
UA1 INVITE -&gt; P1 INVITE -&gt; UA2<br>
<br>
I wish to have:<br>
<br>
UA1 INVITE -&gt; P1 INVITE -&gt; P2 INVITE -&gt; UA2<br>
<br>
Is there an easy method to do this?  I have been looking at the new nat traversal module it looks like it is doable with this (any further input as far as that?).  Also is it possible with the classic Nat Helper module?  Any input is appreciated, thanks!<br>

</blockquote>
<br></div></div>
I think the nat_traversal module can not help you in this case, nor nathelper.<br>
<br>
One possibility would be to spoof at P1 the IP address of P2 - nevertheless this would cause the reply sent back to P2, but the transaction is created in P1. (and you need to hack Kamailio for IP spoofing).<br>
<br>
Another easy solution would be: In P1 set a certain branch-flag when the client registers, e.g. bflag 1. In P2 set a certain branch-flag when the client registers, e.g. bflag 2.<br>
<br>
Now, if a user is called, just make a lookup() and t_relay. Further in the branch_route check if:<br>
 in P1: isbflagset(2) --&gt; forward to P2<br>
 in P2: isbflagset(1) --&gt; forward to P1<br><font color="#888888">
<br>
klaus<br>
<br>
<br>
<br>
<br>
</font><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
<br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Kamailio (OpenSER) - Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
</div><div class="im"><a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a><br>
</div></blockquote>
</blockquote></div><br>