<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.32.2">
</HEAD>
<BODY>
Hello,<BR>
<BR>
I have done some more detailed testing today and am still seeing the problem.&nbsp; I am using Kamailio 3.1.3.<BR>
<BR>
I added the following to the beginning of my route{ } section:<BR>
<BR>
<BLOCKQUOTE>
    if (nat_uac_test(flags))<BR>
    &nbsp;&nbsp;&nbsp; xlog(&quot;NAT'd\n&quot;);<BR>
    <BR>
</BLOCKQUOTE>
I then tested the following scenarios using X-Lite 4:
<UL>
    <LI>Flags = 1, TCP: NAT detected, UDP: NAT not detected
    <LI>Flags = 2, TCP: NAT detected, UDP: NAT not detected
    <LI>Flags = 4, TCP: NAT detected, UDP: NAT not detected
    <LI>Flags = 8, TCP: NAT not detected, UDP: NAT not detected
    <LI>Flags = 16, TCP: NAT detected, UDP: NAT not detected
    <LI>Flags = 32, TCP: NAT not detected, UDP: NAT not detected
</UL>
<BR>
The REGISTERs (for TCP and UDP) sent by X-Lite were (with domain and user name obscured here):<BR>
<BR>
<BLOCKQUOTE>
    REGISTER <A HREF="sip:example.com">sip:example.com</A> SIP/2.0<BR>
    Via: SIP/2.0/TCP 192.168.0.187:15854;branch=z9hG4bK-d8754z-1c8ee3e957b12a9b-1---d8754z-;rport<BR>
    Max-Forwards: 70<BR>
    Contact: &lt;<A HREF="sip:user@192.168.0.187:15854">sip:user@192.168.0.187:15854</A>;rinstance=80c5894ae6e2ce6f;transport=TCP&gt;<BR>
    To: &quot;User&quot;&lt;<A HREF="sip:user@example.com">sip:user@example.com</A>&gt;<BR>
    From: &quot;User&quot;&lt;<A HREF="sip:user@example.com">sip:user@example.com</A>&gt;;tag=da2c294e<BR>
    Call-ID: NjA3YjNiNDdjZTgwNWVkYzZlOGRkZTU0NTkxNDlkZWQ.<BR>
    CSeq: 1 REGISTER<BR>
    Expires: 25<BR>
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO<BR>
    User-Agent: X-Lite 4 release 4.0 stamp 58832<BR>
    Content-Length: 0<BR>
    <BR>
    REGISTER <A HREF="sip:example.com">sip:example.com</A> SIP/2.0<BR>
    Via: SIP/2.0/UDP 192.168.0.187:53264;branch=z9hG4bK-d8754z-a959b8f7e5f1e349-1---d8754z-;rport<BR>
    Max-Forwards: 70<BR>
    Contact: &lt;<A HREF="sip:user@192.168.0.187:53264">sip:user@192.168.0.187:53264</A>;rinstance=d601b2ea0398567c;transport=udp&gt;<BR>
    To: &quot;Peter Dunkley&quot;&lt;<A HREF="sip:user@example.com">sip:user@example.com</A>&gt;<BR>
    From: &quot;Peter Dunkley&quot;&lt;<A HREF="sip:user@example.com">sip:user@example.com</A>&gt;;tag=753afc8a<BR>
    Call-ID: NjBmZmFhNjEzNTFkZGZlMWQwNzdlZjlkYTE1OTc4ZGU.<BR>
    CSeq: 1 REGISTER<BR>
    Expires: 25<BR>
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO<BR>
    User-Agent: X-Lite 4 release 4.0 stamp 58832<BR>
    Content-Length: 0<BR>
</BLOCKQUOTE>
<BR>
Regards,<BR>
<BR>
Peter<BR>
<BR>
On Mon, 2011-04-11 at 10:32 +0100, Peter Dunkley wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
    I tried 63 (all), 55 (all but SDP), and 19 (from the sample configuration file).<BR>
    <BR>
    I will try it again today.<BR>
    <BR>
    Peter<BR>
    <BR>
    On Sat, 2011-04-09 at 08:10 +0300, Juha Heinanen wrote: 
    <BLOCKQUOTE TYPE=CITE>
<PRE>
Peter Dunkley writes:

&gt; nat_uac_test() doesn't seem to work for requests that arrive over UDP.

i don't know which param you tried, but nat_uac_test(&quot;2&quot;) and
nat_uac_test(&quot;1&quot;) works for me.

-- juha

</PRE>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<PRE>
-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>