<br clear="all"><span style="color: rgb(51, 51, 255);"><font size="2"><span style="font-style: italic;"><span style="font-family: verdana;"><span style="font-weight: bold;">Hi Users, <br>
<br>
I install the openser 1.0.1&nbsp; and rtp proxy 0.3 in same&nbsp; Linux System<br>
<span style="font-style: italic;"><span style="font-weight: bold;">openser server is located with public id xx.xxx.xxx.xx of&nbsp;&nbsp; <a href="http://192.168.2.2">192.168.2.2</a> ,<br>
And&nbsp; UAC are outside the NAT,&nbsp; <br>
When&nbsp; one UAC call to other UAC( are both in&nbsp; outside the NAT
where openser server), after the INVITE method get request by
server,&nbsp; after 32 second its hung up automatically, Voice is ok ,
and callee is hung upping, not caller,<br>
UAC ( inside the nAT , openser server ) in not hung uping and voice is not ok....<br>
<span style="font-style: italic;"><span style="font-weight: bold;">Where is the problem, in NAt with rtp or networking,<br>
<br>
route{<br>
&nbsp;&nbsp;&nbsp; if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit;<br>
&nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; if (msg:len &gt;=&nbsp; 2048 ) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit;<br>
&nbsp;&nbsp;&nbsp; };<br>
<br>
&nbsp;&nbsp;&nbsp; # NAT detection<br>
&nbsp;&nbsp;&nbsp; route(2);<br>
<br>
&nbsp;&nbsp;&nbsp; if (!method==&quot;REGISTER&quot;)<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; record_route();<br>
<br>
&nbsp;&nbsp;&nbsp; if (loose_route()) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; append_hf(&quot;P-hint: rr-enforced\r\n&quot;); <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp; };<br>
<br>
&nbsp;&nbsp;&nbsp; if (!uri==myself) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; append_hf(&quot;P-hint: outbound\r\n&quot;); <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(1);<br>
&nbsp;&nbsp;&nbsp; };<br>
<br>
&nbsp;&nbsp;&nbsp; if (uri==myself) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (method==&quot;REGISTER&quot;) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!www_authorize(&quot;xx.xxx.xxx.xxx&quot;, &quot;subscriber&quot;)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; www_challenge(&quot;xx.xxx.xxx.xxx&quot;, &quot;0&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (isflagset(5)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; setflag(6);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # if you want OPTIONS natpings uncomment next<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # setflag(7);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; save(&quot;location&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (!lookup(&quot;location&quot;)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_send_reply(&quot;404&quot;, &quot;Not Found&quot;);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; exit;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; append_hf(&quot;P-hint: usrloc applied\r\n&quot;); <br>
&nbsp;&nbsp;&nbsp; };<br>
<br>
&nbsp;&nbsp;&nbsp; route(1);<br>
}<br>
<br>
<br>
route[1] {<br>
&nbsp;&nbsp;&nbsp; if (subst_uri('/(sip:.*);nat=yes/\1/')){<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; setflag(6);<br>
&nbsp;&nbsp;&nbsp; };<br>
<br>
&nbsp;&nbsp;&nbsp; if (isflagset(5)||isflagset(6)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; route(3);<br>
&nbsp;&nbsp;&nbsp; }<br>
<br>
&nbsp;&nbsp;&nbsp; if (!t_relay()) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sl_reply_error();<br>
&nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; exit;<br>
}<br>
<br>
route[2]{<br>
&nbsp;&nbsp;&nbsp; force_rport();<br>
&nbsp;&nbsp;&nbsp; if (nat_uac_test(&quot;19&quot;)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (method==&quot;REGISTER&quot;) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fix_nated_register();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; } else {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fix_nated_contact();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; setflag(5);<br>
&nbsp;&nbsp;&nbsp; };<br>
}<br>
<br>
route[3] {<br>
&nbsp;&nbsp;&nbsp; if (is_method(&quot;BYE|CANCEL&quot;)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; unforce_rtp_proxy();<br>
&nbsp;&nbsp;&nbsp; } else if (is_method(&quot;INVITE&quot;)){<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; force_rtp_proxy();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; t_on_failure(&quot;1&quot;);<br>
&nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; if (isflagset(5))<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; search_append('Contact:.*sip:[^&gt;[:cntrl:]]*', ';nat=yes');<br>
&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);<br>
}<br>
<br>
failure_route[1] {<br>
&nbsp;&nbsp;&nbsp; if (isflagset(6) || isflagset(5)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; unforce_rtp_proxy();<br>
&nbsp;&nbsp;&nbsp; }<br>
}<br>
<br>
onreply_route[1] {<br>
&nbsp;&nbsp;&nbsp; if ((isflagset(5) || isflagset(6)) &amp;&amp; status=~&quot;(183)|(2[0-9][0-9])&quot;) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; force_rtp_proxy();<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; search_append('Contact:.*sip:[^&gt;[:cntrl:]]*', ';nat=yes');<br>
<br>
&nbsp;&nbsp;&nbsp; if (isflagset(6)) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; fix_nated_contact();<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; exit;<br>
}<br>
<br>
<br>
</span></span></span></span><br>
</span></span></span></font></span>-- <br>Thanks and Regards with cheers<br>Sunkara Ravi Prakash (Voip Developer)<br>Hyperion Technology<br>Kondapur, Hi-tech city,<br>Hyderabad.<br><a href="http://www.hyperion-tech.com">
www.hyperion-tech.com</a><br>+91-9985077535