Hi,<br><br>I am having an UAC behind NAT.<br>When I send call to openser, openser does NAT traversal & detects external IP & port.<br>As per trace I found that UAC sends request from some internal port and router sends to openser with some other external port.<br>
external port is : 50034<br>internal port is : 5065<br>So openser sends 183 progress .. to 5065 instead of external port 50034.<br><br>Here is the sip trace:<br><br>U XXX.XXX.XXX.XXX:50034 -> YYY.YYY.YYY.YYY:5060<br>INVITE sip:TO_NUM@domain SIP/2.0.<br>
Via: SIP/2.0/UDP [INTERNAL_IP]:5065;branch=<div id=":nf" class="ArwC7c ckChnd">z9hG4bK-a0646ab7.<br>From: "FROM_NUM" <sip:FROM_NUM@domain>;tag=45a59ea2bc86747fo0.<br>To: <sip:TO_NUM@domain>.<br>...<br>
<br>U YYY.YYY.YYY.YYY:5060 -> XXX.XXX.XXX.XXX:50034<br>
SIP/2.0 407 Proxy Authentication Required.<br>Via: SIP/2.0/UDP [INTERNAL_IP]:5065;branch=z9hG4bK-a0646ab7;rport=50034;received=XXX.XXX.XXX.XXX.<br>From: "FROM_NUM" <sip:FROM_NUM@domain>;tag=45a59ea2bc86747fo0.<br>
To: <sip:TO_NUM@domain>;tag=b802e73ab92fec121a4f880263d541a3.b5ab.<br>...<br><br>U XXX.XXX.XXX.XXX:50034 -> YYY.YYY.YYY.YYY:5060<br>ACK sip:TO_NUM@domain SIP/2.0.<br>Via: SIP/2.0/UDP [INTERNAL_IP]:5065;branch=z9hG4bK-a0646ab7.<br>
From: "FROM_NUM" <sip:FROM_NUM@domain>;tag=45a59ea2bc86747fo0.<br>To: <sip:TO_NUM@domain>;tag=b802e73ab92fec121a4f880263d541a3.b5ab.<br>...<br><br>U XXX.XXX.XXX.XXX:50034 -> YYY.YYY.YYY.YYY:5060<br>
INVITE sip:TO_NUM@domain SIP/2.0.<br>Via: SIP/2.0/UDP [INTERNAL_IP]:5065;branch=z9hG4bK-a85eb9f3.<br>From: "FROM_NUM" <sip:FROM_NUM@domain>;tag=45a59ea2bc86747fo0.<br>To: <sip:TO_NUM@domain>.<br>...<br>
<br>U YYY.YYY.YYY.YYY:5060 -> ZZZ.ZZZ.ZZZ.ZZZ:5060<br>INVITE sip:TO_NUM@ZZZ.ZZZ.ZZZ.ZZZ:5060;transport=udp SIP/2.0.<br>Record-Route: <sip:TO_NUM@domain:5060;nat=yes;ftag=45a59ea2bc86747fo0;lr=on>.<br>Via: SIP/2.0/UDP YYY.YYY.YYY.YYY;branch=z9hG4bKf644.351975f.0.<br>
Via: SIP/2.0/UDP [INTERNAL_IP]:5065;rport=50034;received=XXX.XXX.XXX.XXX;branch=z9hG4bK-a85eb9f3.<br>From: "FROM_NUM" <sip:FROM_NUM@domain>;tag=45a59ea2bc86747fo0.<br>To: <sip:TO_NUM@domain>.<br>...<br>
<br>U ZZZ.ZZZ.ZZZ.ZZZ:5060 -> YYY.YYY.YYY.YYY:5060<br>SIP/2.0 100 Trying.<br>Call-ID: df9cc79e-ffa2ffb3@[INTERNAL_IP].<br>CSeq: 102 INVITE.<br>From: "FROM_NUM" <sip:FROM_NUM@domain>;tag=45a59ea2bc86747fo0.<br>
To: <sip:TO_NUM@domain>;tag=3eddfbdb7400749.<br>...<br>U ZZZ.ZZZ.ZZZ.ZZZ:5060 -> YYY.YYY.YYY.YYY:5060<br>SIP/2.0 183 Session Progress.<br>Call-ID: df9cc79e-ffa2ffb3@[INTERNAL_IP].<br>CSeq: 102 INVITE.<br>From: "FROM_NUM" <sip:FROM_NUM@domain>;tag=45a59ea2bc86747fo0.<br>
To: <sip:TO_NUM@domain>;tag=3eddfbdb7400749.<br>...<br><br>U YYY.YYY.YYY.YYY:5060 -> XXX.XXX.XXX.XXX:5065<br>SIP/2.0 183 Session Progress.<br>Call-ID: df9cc79e-ffa2ffb3@[INTERNAL_IP].<br>CSeq: 102 INVITE.<br>From: "FROM_NUM" <sip:FROM_NUM@domain>;tag=45a59ea2bc86747fo0.<br>
To: <sip:TO_NUM@domain>;tag=3eddfbdb7400749.<br>...<br><br>here is snippet from cfg:<br><br>route[3]<br>{<br> # invite route<br> if(nat_uac_test("19") )<br> {<br> setbflag(6); #Changed from 7 to 6 on 28-May-2008<br>
force_rport();<br> fix_nated_contact();<br> }<br> # .......skipped other <br>}<br><br>onreply_route[1] {<br> if (isbflagset(6) || isbflagset(7)) {<br> if (status =~ "(180)|(183)|2[0-9][0-9]") {<br>
#xlog("----------- USE MEDIA PROXY ---------- \n ");<br> use_media_proxy();<br> force_rport();<br> }<br> }<br><br> if (nat_uac_test("19")) {<br>
fix_nated_contact();<br> }<br>}<br><br>Please let me know what I am doing wrong?<br><br>Thanks in Advance!!<br><br>--<br><font color="#888888">Krunal Patel</font></div>