<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi all</FONT></DIV>
<DIV><FONT size=2>I am trying ser+nathelper+rtpproxy</FONT></DIV>
<DIV><FONT size=2>ser is&nbsp;downloaded&nbsp;form CVS on 
2004/04/22</FONT></DIV>
<DIV><FONT size=2>my environment is just like</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT 
size=2>nec-----------------Internet---------------ser+nathelper+rtpproxy---------------NAT-------------------jimmy</FONT></DIV>
<DIV><FONT 
size=2>61.61.61.3&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;61.61.61.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
192.168.5.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;61.61.61.2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
192.168.5.2</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>both client use kphone4.02 , Symmetric Signaling ,Symmetric 
Media</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>when jimmy call nec ,and after nec answer the call , kphone 
will crash...</FONT></DIV>
<DIV><FONT size=2>I think it may be something wrong..</FONT></DIV>
<DIV><FONT size=2>so i check the package...</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>the 200 OK with SDP after ser to jimmy is correct 
,</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>Connection Information (c): IN IP4 61.61.61.1</FONT></DIV>
<DIV>&nbsp;</DIV></FONT></DIV>
<DIV><FONT size=2>but&nbsp; <FONT size=2>the SDP of INVITE request after ser to 
nec </FONT></FONT></DIV>
<DIV><FONT size=2>the part of rtp will occur some incorrcet 
information</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Connection Information (c): IN IP4 
61.61.61.261.61.61.1</FONT></DIV>
<DIV><FONT 
size=2>&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
^^^^^^^^^^^^^^^^^^&nbsp; this is not correct</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>I don't know if this is a bug , or some thing wrong in my 
ser.cfg</FONT></DIV>
<DIV><FONT size=2>can anyone tell&nbsp;me where is wrong in&nbsp;my ser.cfg 
???</FONT></DIV>
<DIV><FONT size=2>thanks</FONT></DIV>
<DIV><FONT size=2>jimmy</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT 
size=2>ser.cfg==========================================================================</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2># ----------- global configuration parameters 
------------------------</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>#debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
debug level (cmd line: -dddddddddd)<BR>#fork=yes<BR>#log_stderror=no&nbsp;# (cmd 
line: -E)</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>#/* Uncomment these lines to enter debugging mode 
<BR>debug=4<BR>#fork=no<BR>log_stderror=yes<BR>#*/</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>check_via=no&nbsp;# (cmd. line: 
-v)<BR>dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
(cmd. line: -r)<BR>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: 
-R)<BR>#port=5060<BR>#children=4<BR>fifo="/tmp/ser_fifo"</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2># ------------------ module loading 
----------------------------------</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>loadmodule "/usr/local/lib/ser/modules/sl.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/tm.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/rr.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/maxfwd.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/usrloc.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/registrar.so"<BR>#++++++++++&nbsp;&nbsp;&nbsp; jimmy 
added&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ++++++++++++++++++<BR>loadmodule 
"/usr/local/lib/ser/modules/textops.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/nathelper.so"<BR>#----------------------------------------------------<BR></FONT></DIV>
<DIV><FONT size=2># ----------------- setting module-specific parameters 
---------------</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>#++++++++++&nbsp;&nbsp;&nbsp; jimmy 
added&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ++++++++++++++++++<BR>#we will you flag 6 to 
mark NATed contacts<BR>modparam("registrar","nat_flag",6)<BR>#Enable NAT 
pinging<BR>modparam("nathelper","natping_interval",3)<BR>#ping only contacts 
that are known to be behind 
NAT<BR>modparam("nathelper","ping_nated_only",1)<BR>#----------------------------------------------------</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2># -- usrloc params --</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>modparam("usrloc", "db_mode",&nbsp;&nbsp; 0)</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2># -- rr params --<BR># add value to ;lr param to make some 
broken UAs happy<BR>modparam("rr", "enable_full_lr", 1)</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2># -------------------------&nbsp; request routing logic 
-------------------</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2># main routing logic</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>route{</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>#++++++++++&nbsp;&nbsp;&nbsp; jimmy 
added&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
++++++++++++++++++<BR>&nbsp;if(nat_uac_test("3"))<BR>&nbsp;{<BR>&nbsp;&nbsp;if((method 
== "REGISTER") || 
!(search("^Record-Route:")))<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;log("LOG:Someone 
trying to register from private IP, 
rewriting\n");<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;fix_nated_contact();<BR>&nbsp;&nbsp;&nbsp;if(method 
== 
"INVITE")<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;fix_nated_sdp("3");<BR>&nbsp;&nbsp;&nbsp;&nbsp;force_rtp_proxy();<BR>&nbsp;&nbsp;&nbsp;&nbsp;t_on_reply("1");<BR>&nbsp;&nbsp;&nbsp;};<BR>&nbsp;&nbsp;&nbsp;force_rport();<BR>&nbsp;&nbsp;&nbsp;setflag(6);<BR>&nbsp;&nbsp;};<BR>&nbsp;};<BR>#----------------------------------------------------</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;# initial sanity checks -- messages with<BR>&nbsp;# 
max_forwards==0, or excessively long requests<BR>&nbsp;if 
(!mf_process_maxfwd_header("10")) {<BR>&nbsp;&nbsp;sl_send_reply("483","Too Many 
Hops");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>&nbsp;if ( msg:len &gt; max_len ) 
{<BR>&nbsp;&nbsp;sl_send_reply("513", "Message too 
big");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;# we record-route all messages -- to make sure 
that<BR>&nbsp;# subsequent messages will go through our proxy; that's<BR>&nbsp;# 
particularly good if upstream and downstream entities<BR>&nbsp;# use different 
transport protocol<BR>&nbsp;record_route();&nbsp;<BR>&nbsp;# loose-route 
processing<BR>&nbsp;if (loose_route()) 
{<BR>&nbsp;&nbsp;t_relay();<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;# if the request is for other domain use 
UsrLoc<BR>&nbsp;# (in case, it does not work, use the following 
command<BR>&nbsp;# with proper names and addresses in it)<BR>&nbsp;if 
(uri==myself) {</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;&nbsp;if (method=="REGISTER") {</FONT></DIV>
<DIV><FONT 
size=2>&nbsp;&nbsp;&nbsp;save("location");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>&nbsp;&nbsp;# native SIP destinations are handled using our 
USRLOC DB<BR>&nbsp;&nbsp;if (!lookup("location")) 
{<BR>&nbsp;&nbsp;&nbsp;sl_send_reply("404", "Not 
Found");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>&nbsp;};<BR>&nbsp;# 
forward to current uri now; use stateful forwarding; that<BR>&nbsp;# works 
reliably even if we forward from TCP to UDP<BR>&nbsp;if (!t_relay()) 
{<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;};</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>}</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV><FONT size=2>
<DIV><BR>route[1]<BR>{<BR>&nbsp;if(uri=~"[@:](192\.168\.|10\.|172\.16)" 
&amp;&amp; !search("^Route:"))<BR>&nbsp;{<BR>&nbsp;&nbsp;sl_send_reply("479","we 
don't forward to private IP 
address");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>&nbsp;if(isflagset(6))<BR>&nbsp;{<BR>&nbsp;&nbsp;force_rtp_proxy();<BR>&nbsp;&nbsp;t_on_reply("1");<BR>&nbsp;&nbsp;append_hf("P-Behind-NAT: 
Yes\r\n");<BR>&nbsp;}<BR>&nbsp;<BR>&nbsp;if(!t_relay())<BR>&nbsp;{<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;&nbsp;break;<BR>&nbsp;}<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>onreply_route[1]<BR>{<BR>&nbsp;if(status =~ 
"(183)|2[0-9][0-9]")<BR>&nbsp;{<BR>&nbsp;&nbsp;fix_nated_contact();<BR>&nbsp;&nbsp;force_rtp_proxy();<BR>&nbsp;};<BR>}<BR></FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV></BODY></HTML>