<!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.26.0">
</HEAD>
<BODY>
<TT><FONT COLOR="#1a1a1a">Hello,</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">I'm trying to test rtpproxy with nathelper module to forward RTP traffic between two networks, my architecture is as follow:</FONT></TT><BR>
<BR>
<BLOCKQUOTE>
    <BR>
</BLOCKQUOTE>
<TT>-------------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --------------------------------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --------------------</TT><BR>
<TT>UAC (172.23.1.22) |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | UAC (172.1.1.21) |</TT><BR>
<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |=======&gt;| 172.23.1.20 (OpenSIPS) 172.1.1.166 |=======&gt;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</TT><BR>
<TT>Internal Network&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | External Network |</TT><BR>
<TT>-------------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --------------------------------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --------------------</TT><BR>
<BLOCKQUOTE>
    <BLOCKQUOTE>
        <BR>
    </BLOCKQUOTE>
</BLOCKQUOTE>
<BR>
<BR>
<TT><FONT COLOR="#1a1a1a">I run rtpproxy:</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">rtpproxy -fF -l 172.1.1.166/172.23.1.20</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">Then I tried to establish a call from internal net (172.23.1.22) to external net(172.1.1.21) and the connection established succussfully with perfect RTP relay through (172.1.1.166) interface.</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">But when I tried to call from external network towards internal, the RTP traffic relay didn't work?.</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">Following is the part related to nathelper and routing logic in my configuration file:</FONT></TT><BR>
<BR>
<BR>
<BR>
<TT><FONT COLOR="#1a1a1a">loadmodule &quot;nathelper.so&quot;</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">modparam(&quot;nathelper&quot;, &quot;natping_interval&quot;, 30)</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">modparam(&quot;nathelper&quot;, &quot;ping_nated_only&quot;, 1)</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">modparam(&quot;nathelper&quot;, &quot;rtpproxy_sock&quot;, &quot;unix:/var/run/rtpproxy.sock&quot;)</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">modparam(&quot;nathelper&quot;, &quot;received_avp&quot;, &quot;$avp(i:42)&quot;)</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">modparam(&quot;registrar&quot;, &quot;received_avp&quot;, &quot;$avp(i:42)&quot;)</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">modparam(&quot;usrloc&quot;, &quot;nat_bflag&quot;, 6)</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">modparam(&quot;registrar&quot;, &quot;method_filtering&quot;, 1)</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">mhomed=1</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">route {</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # Sanity Check Section</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (!mf_process_maxfwd_header(&quot;10&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;483&quot;, &quot;Too Many Hops&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (msg:len &gt; max_len) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;513&quot;, &quot;Message Overflow&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # Record Route Section</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (method!=&quot;REGISTER&quot;) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; record_route();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (method==&quot;BYE&quot; || method==&quot;CANCEL&quot;) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; unforce_rtp_proxy();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; }</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # Loose Route Section</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (loose_route()) {</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; if ((method==&quot;INVITE&quot; || method==&quot;REFER&quot;) &amp;&amp; !has_totag()) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;403&quot;, &quot;Forbidden&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; if (method==&quot;INVITE&quot;) {</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #if (!proxy_authorize(&quot;&quot;,&quot;subscriber&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; proxy_challenge(&quot;&quot;,&quot;0&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #} else if (!check_from()) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; sl_send_reply(&quot;403&quot;, &quot;Use From=ID&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #&nbsp; break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #};</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #consume_credentials();</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (nat_uac_test(&quot;19&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setflag(6);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rport();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rtp_proxy(&quot;l&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; route(1);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # Call Type Processing Section</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (uri!=myself) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; route(4);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; route(1);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (method==&quot;ACK&quot;) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; route(1);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; } if (method==&quot;CANCEL&quot;) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; route(1);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; } else if (method==&quot;INVITE&quot;) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; route(3);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; } else&nbsp; if (method==&quot;REGISTER&quot;) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; route(2);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; lookup(&quot;aliases&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (uri!=myself) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; route(4);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; route(1);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (!lookup(&quot;location&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;404&quot;, &quot;User Not Found&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; route(1);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">}</FONT></TT><BR>
<BR>
<BR>
<TT><FONT COLOR="#1a1a1a">route[1] {</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # Default Message Handler</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; t_on_reply(&quot;1&quot;);</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (!t_relay()) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; if (method==&quot;INVITE&quot; &amp;&amp; isflagset(6)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unforce_rtp_proxy();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; };</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; sl_reply_error();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">}</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">route[2] {</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # REGISTER Message Handler</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # ----------------------------------------------------------------</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (!search(&quot;^Contact:[ ]*\*&quot;) &amp;&amp; nat_uac_test(&quot;19&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; setflag(6);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; fix_nated_register();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; force_rport();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; sl_send_reply(&quot;100&quot;, &quot;Trying&quot;);</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #if (!www_authorize(&quot;&quot;,&quot;subscriber&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #&nbsp; www_challenge(&quot;&quot;,&quot;0&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #&nbsp; break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #};</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #if (!check_to()) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #&nbsp; sl_send_reply(&quot;401&quot;, &quot;Unauthorized&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #&nbsp; break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #};</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #&nbsp;&nbsp; consume_credentials();</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (!save(&quot;location&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; sl_reply_error();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">}</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">route[3] {</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # INVITE Message Handler</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #if (!proxy_authorize(&quot;&quot;,&quot;subscriber&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #&nbsp; proxy_challenge(&quot;&quot;,&quot;0&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #&nbsp; break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #} else if (!check_from()) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #&nbsp; sl_send_reply(&quot;403&quot;, &quot;Use From=ID&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #&nbsp; break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #};</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; #&nbsp;&nbsp; consume_credentials();</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (nat_uac_test(&quot;19&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; setflag(6);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; lookup(&quot;aliases&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (uri!=myself) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; route(4);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; route(1);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (!lookup(&quot;location&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;404&quot;, &quot;User Not Found&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; #break;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; return();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; route(4);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; route(1);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">}</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">route[4] {</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # NAT Traversal Section</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; # -----------------------------------------------------------------</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (isflagset(6)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; force_rport();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; fix_nated_contact();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; force_rtp_proxy();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; }</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">}</FONT></TT><BR>
<BR>
<BR>
<TT><FONT COLOR="#1a1a1a">onreply_route[1] {</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (isflagset(6) &amp;&amp; status=~&quot;(180)|(183)|2[0-9][0-9]&quot;) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!search(&quot;^Content-Length:[ ]*0&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rtp_proxy();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; };</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; if (nat_uac_test(&quot;1&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp; fix_nated_contact();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp; };</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">}#end of route.</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">branch_route[2] {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;new branch at $ru\n&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">}</FONT></TT><BR>
<BR>
<BR>
<TT><FONT COLOR="#1a1a1a">onreply_route[2] {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xlog(&quot;incoming reply\n&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">}</FONT></TT><BR>
<BR>
<BR>
<TT><FONT COLOR="#1a1a1a">failure_route[1] {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (t_was_cancelled()) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></TT><BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # uncomment the following lines if you want to block client</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # redirect based on 3xx replies.</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ##if (t_check_status(&quot;3[0-9][0-9]&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ##t_reply(&quot;404&quot;,&quot;Not found&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ##&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; exit;</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ##}</FONT></TT><BR>
<BR>
<BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # uncomment the following lines if you want to redirect the failed</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # calls to a different new destination</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ##if (t_check_status(&quot;486|408&quot;)) {</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ##&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sethostport(&quot;192.168.2.100:5060&quot;);</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ##&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # do not set the missed call flag again</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ##&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay();</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ##}</FONT></TT><BR>
<TT><FONT COLOR="#1a1a1a">}</FONT></TT><BR>
<BR>
<BR>
<BR>
</BODY>
</HTML>