<!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 downloaded form CVS on
2004/04/22</FONT></DIV>
<DIV><FONT size=2>my environment is just like</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT
size=2>nec-----------------Internet---------------ser+nathelper+rtpproxy---------------NAT-------------------jimmy</FONT></DIV>
<DIV><FONT
size=2>61.61.61.3 61.61.61.1
192.168.5.1 61.61.61.2
192.168.5.2</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>both client use kphone4.02 , Symmetric Signaling ,Symmetric
Media</FONT></DIV>
<DIV><FONT size=2></FONT> </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> </DIV>
<DIV><FONT size=2>the 200 OK with SDP after ser to jimmy is correct
,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>Connection Information (c): IN IP4 61.61.61.1</FONT></DIV>
<DIV> </DIV></FONT></DIV>
<DIV><FONT size=2>but <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> </DIV>
<DIV><FONT size=2>Connection Information (c): IN IP4
61.61.61.261.61.61.1</FONT></DIV>
<DIV><FONT
size=2>
^^^^^^^^^^^^^^^^^^ this is not correct</FONT></DIV>
<DIV><FONT size=2></FONT> </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 me where is wrong in my ser.cfg
???</FONT></DIV>
<DIV><FONT size=2>thanks</FONT></DIV>
<DIV><FONT size=2>jimmy</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT
size=2>ser.cfg==========================================================================</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2># ----------- global configuration parameters
------------------------</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>#debug=3 #
debug level (cmd line: -dddddddddd)<BR>#fork=yes<BR>#log_stderror=no # (cmd
line: -E)</FONT></DIV>
<DIV><FONT size=2></FONT> </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> </DIV>
<DIV><FONT size=2>check_via=no # (cmd. line:
-v)<BR>dns=no #
(cmd. line: -r)<BR>rev_dns=no # (cmd. line:
-R)<BR>#port=5060<BR>#children=4<BR>fifo="/tmp/ser_fifo"</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2># ------------------ module loading
----------------------------------</FONT></DIV>
<DIV><FONT size=2></FONT> </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>#++++++++++ jimmy
added ++++++++++++++++++<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> </DIV>
<DIV><FONT size=2>#++++++++++ jimmy
added ++++++++++++++++++<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> </DIV>
<DIV><FONT size=2># -- usrloc params --</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>modparam("usrloc", "db_mode", 0)</FONT></DIV>
<DIV><FONT size=2></FONT> </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> </DIV>
<DIV><FONT size=2># ------------------------- request routing logic
-------------------</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2># main routing logic</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>route{</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>#++++++++++ jimmy
added
++++++++++++++++++<BR> if(nat_uac_test("3"))<BR> {<BR> if((method
== "REGISTER") ||
!(search("^Record-Route:")))<BR> {<BR> log("LOG:Someone
trying to register from private IP,
rewriting\n");<BR> <BR> fix_nated_contact();<BR> if(method
==
"INVITE")<BR> {<BR> fix_nated_sdp("3");<BR> force_rtp_proxy();<BR> t_on_reply("1");<BR> };<BR> force_rport();<BR> setflag(6);<BR> };<BR> };<BR>#----------------------------------------------------</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> # initial sanity checks -- messages with<BR> #
max_forwards==0, or excessively long requests<BR> if
(!mf_process_maxfwd_header("10")) {<BR> sl_send_reply("483","Too Many
Hops");<BR> break;<BR> };<BR> if ( msg:len > max_len )
{<BR> sl_send_reply("513", "Message too
big");<BR> break;<BR> };</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> # we record-route all messages -- to make sure
that<BR> # subsequent messages will go through our proxy; that's<BR> #
particularly good if upstream and downstream entities<BR> # use different
transport protocol<BR> record_route(); <BR> # loose-route
processing<BR> if (loose_route())
{<BR> t_relay();<BR> break;<BR> };</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> # if the request is for other domain use
UsrLoc<BR> # (in case, it does not work, use the following
command<BR> # with proper names and addresses in it)<BR> if
(uri==myself) {</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> if (method=="REGISTER") {</FONT></DIV>
<DIV><FONT
size=2> save("location");<BR> break;<BR> };</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> # native SIP destinations are handled using our
USRLOC DB<BR> if (!lookup("location"))
{<BR> sl_send_reply("404", "Not
Found");<BR> break;<BR> };<BR> };<BR> #
forward to current uri now; use stateful forwarding; that<BR> # works
reliably even if we forward from TCP to UDP<BR> if (!t_relay())
{<BR> sl_reply_error();<BR> };</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>}</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV><FONT size=2>
<DIV><BR>route[1]<BR>{<BR> if(uri=~"[@:](192\.168\.|10\.|172\.16)"
&& !search("^Route:"))<BR> {<BR> sl_send_reply("479","we
don't forward to private IP
address");<BR> break;<BR> };<BR> if(isflagset(6))<BR> {<BR> force_rtp_proxy();<BR> t_on_reply("1");<BR> append_hf("P-Behind-NAT:
Yes\r\n");<BR> }<BR> <BR> if(!t_relay())<BR> {<BR> sl_reply_error();<BR> break;<BR> }<BR>}</DIV>
<DIV> </DIV>
<DIV>onreply_route[1]<BR>{<BR> if(status =~
"(183)|2[0-9][0-9]")<BR> {<BR> fix_nated_contact();<BR> force_rtp_proxy();<BR> };<BR>}<BR></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV></BODY></HTML>