<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6603.0">
<TITLE>[Serusers] find_export: &lt;append_hf&gt; not found - SOLVED IT</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi Lucas,</FONT>

<BR><FONT SIZE=2 FACE="Arial">Would mind sending your ser.cfg file, i am facing the same problems with NAT traversal</FONT>

<BR><FONT SIZE=2 FACE="Arial">I have already&nbsp; read</FONT> <FONT FACE="Times New Roman">&gt;<I><U> </U></I></FONT><I><U><FONT COLOR="#0000FF" FACE="Times New Roman">&lt;<A HREF="http://www.informatik.uni-bremen.de/~prelle/terena/cookbook/Co">http://www.informatik.uni-bremen.de/~prelle/terena/cookbook/Co</A>&gt;</FONT></U><FONT FACE="Times New Roman"></FONT></I> <FONT FACE="Times New Roman">okbook_D2/ </FONT>

<BR><FONT FACE="Times New Roman">but&nbsp; it still does not working</FONT>
</P>

<P><FONT FACE="Times New Roman">This is my ser.cfg file:</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#</FONT>

<BR><FONT SIZE=2 FACE="Courier New"># $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#</FONT>

<BR><FONT SIZE=2 FACE="Courier New"># simple quick-start config script</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># ----------- global configuration parameters ------------------------</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">#debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # debug level (cmd line: -dddddddddd)</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#fork=yes</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#log_stderror=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd line: -E)</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">/* Uncomment these lines to enter debugging mode </FONT>

<BR><FONT SIZE=2 FACE="Courier New">debug=7</FONT>

<BR><FONT SIZE=2 FACE="Courier New">fork=no</FONT>

<BR><FONT SIZE=2 FACE="Courier New">log_stderror=yes</FONT>

<BR><FONT SIZE=2 FACE="Courier New">*/</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">check_via=no&nbsp;&nbsp;&nbsp; # (cmd. line: -v)</FONT>

<BR><FONT SIZE=2 FACE="Courier New">dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: -r)</FONT>

<BR><FONT SIZE=2 FACE="Courier New">rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: -R)</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#port=5060</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#children=4</FONT>

<BR><FONT SIZE=2 FACE="Courier New">fifo=&quot;/tmp/ser_fifo&quot;</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># ------------------ module loading ----------------------------------</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">loadmodule &quot;/usr/local/lib/ser/modules/nathelper.so&quot;</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Courier New"># Uncomment this if you want to use SQL database</FONT>

<BR><FONT SIZE=2 FACE="Courier New">loadmodule &quot;/usr/lib/ser/modules/mysql.so&quot;</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">loadmodule &quot;/usr/lib/ser/modules/sl.so&quot;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">loadmodule &quot;/usr/lib/ser/modules/tm.so&quot;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">loadmodule &quot;/usr/lib/ser/modules/rr.so&quot;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">loadmodule &quot;/usr/lib/ser/modules/maxfwd.so&quot;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">loadmodule &quot;/usr/lib/ser/modules/usrloc.so&quot;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">loadmodule &quot;/usr/lib/ser/modules/registrar.so&quot;</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Courier New">loadmodule &quot;/usr/lib/ser/modules/textops.so&quot; </FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2 FACE="Courier New"># Uncomment this if you want digest authentication</FONT>

<BR><FONT SIZE=2 FACE="Courier New"># mysql.so must be loaded !</FONT>

<BR><FONT SIZE=2 FACE="Courier New">loadmodule &quot;/usr/lib/ser/modules/auth.so&quot;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">loadmodule &quot;/usr/lib/ser/modules/auth_db.so&quot;</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># ----------------- setting module-specific parameters ---------------</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># -- usrloc params --</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">#modparam(&quot;usrloc&quot;, &quot;db_mode&quot;,&nbsp;&nbsp; 0)</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># Uncomment this if you want to use SQL database </FONT>

<BR><FONT SIZE=2 FACE="Courier New"># for persistent storage and comment the previous line</FONT>

<BR><FONT SIZE=2 FACE="Courier New">modparam(&quot;usrloc&quot;, &quot;db_mode&quot;, 2)</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># -- auth params --</FONT>

<BR><FONT SIZE=2 FACE="Courier New"># Uncomment if you are using auth module</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, yes)</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#</FONT>

<BR><FONT SIZE=2 FACE="Courier New"># If you set &quot;calculate_ha1&quot; parameter to yes (which true in this config), </FONT>

<BR><FONT SIZE=2 FACE="Courier New"># uncomment also the following parameter)</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># -- rr params --</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># add value to ;lr param to make some broken UAs happy</FONT>

<BR><FONT SIZE=2 FACE="Courier New">modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)</FONT>
</P>
<BR>
<BR>
<BR>

<P><FONT SIZE=2 FACE="Courier New"># We will you flag 6 to mark NATed contacts</FONT>

<BR><FONT SIZE=2 FACE="Courier New">modparam(&quot;registrar&quot;, &quot;nat_flag&quot;, 6)</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># Enable NAT pinging</FONT>

<BR><FONT SIZE=2 FACE="Courier New">modparam(&quot;nathelper&quot;, &quot;natping_interval&quot;, 60)</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># Ping only contacts that are known to be</FONT>

<BR><FONT SIZE=2 FACE="Courier New"># behind NAT</FONT>

<BR><FONT SIZE=2 FACE="Courier New">modparam(&quot;nathelper&quot;, &quot;ping_nated_only&quot;, 1)</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<BR>

<P><FONT SIZE=2 FACE="Courier New"># -------------------------&nbsp; request routing logic -------------------</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># main routing logic</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">route{</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># initial sanity checks -- messages with</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># max_forwards==0, or excessively long requests</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">if (!mf_process_maxfwd_header(&quot;10&quot;)) {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">break;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">};</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">if ( msg:len &gt; max_len ) {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">break;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">};</FONT>
</P>
<BR>
<BR>
<BR>
<BR>

<P><FONT SIZE=2 FACE="Courier New"># special handling for NATed clients; first, nat test is</FONT>

<BR><FONT SIZE=2 FACE="Courier New"># executed: it looks for via!=received and RFC1918 addresses</FONT>

<BR><FONT SIZE=2 FACE="Courier New"># in Contact (may fail if line-folding used); also,</FONT>

<BR><FONT SIZE=2 FACE="Courier New"># the received test should, if complete, should check all</FONT>

<BR><FONT SIZE=2 FACE="Courier New"># vias for presence of received</FONT>

<BR><FONT SIZE=2 FACE="Courier New">if (nat_uac_test(&quot;3&quot;)) {</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; # allow RR-ed requests, as these may indicate that</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; # a NAT-enabled proxy takes care of it; unless it is</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; # a REGISTER</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; if (method == &quot;REGISTER&quot; || ! search(&quot;^Record-Route:&quot;)) {</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log(&quot;LOG: Someone trying to register from private IP, rewriting\n&quot;);</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This will work only for user agents that support symmetric</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # communication. We tested quite many of them and majority is</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # smart smart enough to be symmetric. In some phones, like</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # it takes a configuration option. With Cisco 7960, it is</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # called NAT_Enable=Yes, with kphone it is called</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # &quot;symmetric media&quot; and &quot;symmetric signaling&quot;. (The latter</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # not part of public released yet.)</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact(); # Rewrite contact with source IP of signalling</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == &quot;INVITE&quot;) {</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_sdp(&quot;1&quot;);&nbsp; # Add direction=active to SDP</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rport();&nbsp; # Add rport parameter to topmost Via</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setflag(6);&nbsp;&nbsp;&nbsp;&nbsp; # Mark as NATed</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; };</FONT>

<BR><FONT SIZE=2 FACE="Courier New">};</FONT>
</P>
<BR>
<BR>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># we record-route all messages -- to make sure that</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># subsequent messages will go through our proxy; that's</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># particularly good if upstream and downstream entities</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># use different transport protocol</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">record_route(); </FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># loose-route processing</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">if (loose_route()) {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">t_relay();</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">break;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">};</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># if the request is for other domain use UsrLoc</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># (in case, it does not work, use the following command</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># with proper names and addresses in it)</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">if (uri==myself) {</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">if (method==&quot;REGISTER&quot;) {</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New"># Uncomment this if you want to use digest authentication</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">if (!www_authorize(&quot;200.151.192.13&quot;, &quot;subscriber&quot;)) {</FONT>

<BR>&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; <FONT SIZE=2 FACE="Courier New">www_challenge(&quot;200.151.192.13&quot;, &quot;0&quot;);</FONT>

<BR>&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; <FONT SIZE=2 FACE="Courier New">break;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">};</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">save(&quot;location&quot;);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">break;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">};</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># native SIP destinations are handled using our USRLOC DB</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">if (!lookup(&quot;location&quot;)) {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">sl_send_reply(&quot;404&quot;, &quot;Not Found&quot;);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">break;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">};</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">};</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># forward to current uri now; use stateful forwarding; that</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"># works reliably even if we forward from TCP to UDP</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">if (!t_relay()) {</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">sl_reply_error();</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">};</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2 FACE="Courier New">&nbsp; </FONT>

<BR><FONT SIZE=2 FACE="Courier New">}</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">#</FONT>

<BR><FONT SIZE=2 FACE="Courier New"># Forcing media relay if necessary</FONT>

<BR><FONT SIZE=2 FACE="Courier New">#</FONT>

<BR><FONT SIZE=2 FACE="Courier New">route[1] {</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; if (uri=~&quot;[@:](192\.168\.|10\.|172\.16)&quot; &amp;&amp; !search(&quot;^Route:&quot;)){</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;479&quot;, &quot;We don't forward to private IP addresses&quot;);</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; };</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; if (isflagset(6)) {</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rtp_proxy();</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply(&quot;1&quot;);</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append_hf(&quot;P-Behind-NAT: Yes\r\n&quot;);</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; };</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; if (!t_relay()) {</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_reply_error();</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; };</FONT>

<BR><FONT SIZE=2 FACE="Courier New">}</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Courier New">onreply_route[1] {</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; if (status =~ &quot;(183)|2[0-9][0-9]&quot;) {</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact();</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rtp_proxy();</FONT>

<BR><FONT SIZE=2 FACE="Courier New">&nbsp;&nbsp;&nbsp; };</FONT>

<BR><FONT SIZE=2 FACE="Courier New">}</FONT>
</P>
<BR>
<BR>
<BR>

<P><FONT FACE="Times New Roman">Thanks </FONT>

<BR><FONT FACE="Times New Roman">Paulo</FONT>
</P>
<BR>
<BR>

</BODY>
</HTML>