I answer to myself (it may help others) as I could test successfully the configuration below. Also there is a typo (isbflagset instead of isflagset):<br><br>so when I detect a UA is behind NAT, I do:<br><br>        if (nat_uac_test(&quot;19&quot;)) {<br>

                if (method==&quot;REGISTER&quot;) {<br>                        setbflag(7);<br>
                        fix_nated_register();<br>        ...<br><br><br>Then when my B2BUA sends invite to this UA I do (after lookup(&quot;location&quot;) ):<br><br>        lookup(&quot;location&quot;);<br>        ...<br>

        if (is_method(&quot;INVITE&quot;)) {<br>                if (isbflagset(7)) {<br>
                        setflag(5);<br><br><br>Regards,<br>Pascal<br><br><div class="gmail_quote">On Mon, Jul 13, 2009 at 2:43 PM, Pascal Maugeri <span dir="ltr">&lt;<a href="mailto:pascal.maugeri@gmail.com">pascal.maugeri@gmail.com</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;">I&#39;m not that familiar with flag management.<br><br>so when I detect a UA is behind NAT, I do:<br>

<br>        if (nat_uac_test(&quot;19&quot;)) {<br>                if (method==&quot;REGISTER&quot;) {<br>                        setbflag(7);<br>
                        fix_nated_register();<br>        ...<br><br>Then when my B2BUA sends invite to this UA I do (after lookup(&quot;location&quot;) ):<br><br>        if (is_method(&quot;INVITE&quot;)) {<br>                if (isflagset(7)) {<br>


                        setflag(5);<br><br>Is that correct ?<br><br>BTW, regarding the flag number, is there a table of reserved numbers ? Can I use &quot;7&quot; in this case ?<br><font color="#888888"><br>-pascal</font><div>

<div></div><div class="h5"><br><br><br><br><div class="gmail_quote">
On Mon, Jul 13, 2009 at 12:00 PM, Daniel-Constantin Mierla <span dir="ltr">&lt;<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</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;">


Hello,<div><br>
<br>
On 07/13/2009 11:54 AM, Pascal Maugeri 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<br>
<br>
A quick question, when I apply a fix_nated_register() to a remote user when he/she registers, how can I know later on if this user is behind NAT ?<br>
</blockquote></div>
set a branch flag for REGISTER before save location. After lookup location that flag is recovered and you can test it in the config file.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
<br>
All my calls go through a B2BUA:<br>
<br>
Caller ------&gt; kamailio/rtpproxy ------&gt; B2BUA ------&gt; kamailio/rtpproxy ------&gt; Callee<br>
<br>
When my B2BUA calls a user, I want to know if this user is behind NAT or not. For now all the calls go through rtpproxy but I would like to apply this path only when user is behind NAT.<br>
<br>
Regards,<br>
Pascal<br>
<br></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Kamailio (OpenSER) - Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org" target="_blank">Users@lists.kamailio.org</a><br>
<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>
</blockquote>
<br>
-- <br>
Daniel-Constantin Mierla<br>
<a href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a><br>
<br>
</blockquote></div><br>
</div></div></blockquote></div><br>