<!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&nbsp;am trying nathelper with rtpproxy to let client behind 
nat/firewall can make a call ,</FONT></DIV>
<DIV><FONT size=2>I have some questions...</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>(1)</FONT></DIV>
<DIV><FONT size=2>Client A (kphone 
3.14)------------------iptel.org-----------------------------NAT-------------------------Client 
B (kphone 3.14)</FONT></DIV>
<DIV><FONT 
size=2>61.217.126.64&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; 
195.37.77.101&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.217.xxx.xxx&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
77.77.77.17</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>B&nbsp;call&nbsp;A , and the call has setup , also ,&nbsp;both 
A and B send rtp packet to 195.37.77.101 , and receive in the port which 
describe in SDP</FONT></DIV>
<DIV><FONT size=2>but both client can't receive any voice ... maybe it's 
something wrong in client ...</FONT></DIV>
<DIV><FONT size=2>so is anyone have try if this scenario can work ? or iptel.org 
not support client behind NAT/ firewall ??</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>(2)</FONT></DIV>
<DIV><FONT size=2>before trying (1) , i have build the environment</FONT></DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>Client A (kphone 3.14)-------------SIP server SER + Rtpproxy 
---------------------NAT/Firewall-------------------------Client B (kphone 
3.14)</FONT></DIV>
<DIV>private&nbsp; 
IP&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; 
public 
IP&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; 
public&nbsp; 
IP&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; 
private IP</DIV>
<DIV>&nbsp;</DIV>
<DIV>whatever A call B , or B call A , the call can setup , but after forwarding 
by SER</DIV>
<DIV>the SDP didn't modify correctly , all the same as client send </DIV>
<DIV>it should modify to Ser server's ip and port , but it seems not...</DIV>
<DIV>&nbsp;</DIV>
<DIV>i think maybe is my ser.cfg has some mistake</DIV>
<DIV>could anyone give some idea where should i add or modify something ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>here is my ser.cfg which&nbsp;refered to (<A 
href="http://www.informatik.uni-bremen.de/~prelle/terena/cookbook/main/ch04s07.html">http://www.informatik.uni-bremen.de/~prelle/terena/cookbook/main/ch04s07.html</A>)</DIV>
<DIV>&nbsp;</DIV>
<DIV>regards</DIV>
<DIV>jimmy</DIV>
<DIV>&nbsp;</DIV>
<DIV>============================================================================================</DIV>
<DIV>#<BR># $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $<BR>#<BR># 
simple quick-start config script<BR>#</DIV>
<DIV>&nbsp;</DIV>
<DIV># ----------- global configuration parameters 
------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>#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)</DIV>
<DIV>&nbsp;</DIV>
<DIV>#/* Uncomment these lines to enter debugging mode 
<BR>debug=7<BR>#fork=no<BR>log_stderror=yes<BR>#*/</DIV>
<DIV>&nbsp;</DIV>
<DIV>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"</DIV>
<DIV>&nbsp;</DIV>
<DIV># ------------------ module loading 
----------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV># Uncomment this if you want to use SQL database<BR>#loadmodule 
"/usr/local/lib/ser/modules/mysql.so"</DIV>
<DIV>&nbsp;</DIV>
<DIV>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># 
Uncomment this if you want digest authentication<BR># mysql.so must be loaded 
!<BR>#loadmodule "/usr/local/lib/ser/modules/auth.so"<BR>#loadmodule 
"/usr/local/lib/ser/modules/auth_db.so"</DIV>
<DIV>&nbsp;</DIV>
<DIV># ----------------- setting module-specific parameters 
---------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>#++++++++++&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>#----------------------------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV># -- usrloc params --</DIV>
<DIV>&nbsp;</DIV>
<DIV>modparam("usrloc", "db_mode",&nbsp;&nbsp; 0)</DIV>
<DIV>&nbsp;</DIV>
<DIV># Uncomment this if you want to use SQL database <BR># for persistent 
storage and comment the previous line<BR>#modparam("usrloc", "db_mode", 2)</DIV>
<DIV>&nbsp;</DIV>
<DIV># -- auth params --<BR># Uncomment if you are using auth 
module<BR>#<BR>#modparam("auth_db", "calculate_ha1", yes)<BR>#<BR># If you set 
"calculate_ha1" parameter to yes (which true in this config), <BR># uncomment 
also the following parameter)<BR>#<BR>#modparam("auth_db", "password_column", 
"password")</DIV>
<DIV>&nbsp;</DIV>
<DIV># -- rr params --<BR># add value to ;lr param to make some broken UAs 
happy<BR>modparam("rr", "enable_full_lr", 1)</DIV>
<DIV>&nbsp;</DIV>
<DIV># -------------------------&nbsp; request routing logic 
-------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV># main routing logic</DIV>
<DIV>&nbsp;</DIV>
<DIV>route{</DIV>
<DIV>&nbsp;</DIV>
<DIV>#++++++++++&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;&nbsp;&nbsp;&nbsp;fix_nated_sdp("3");<BR>&nbsp;&nbsp;&nbsp;};<BR>&nbsp;&nbsp;&nbsp;force_rport();<BR>&nbsp;&nbsp;&nbsp;setflag(6);<BR>&nbsp;&nbsp;};<BR>&nbsp;};<BR>#----------------------------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>&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;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&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;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&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) {</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;if (method=="REGISTER") {</DIV>
<DIV>&nbsp;</DIV>
<DIV># Uncomment this if you want to use digest 
authentication<BR>#&nbsp;&nbsp;&nbsp;if (!www_authorize("iptel.org", 
"subscriber")) {<BR>#&nbsp;&nbsp;&nbsp;&nbsp;www_challenge("iptel.org", 
"0");<BR>#&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>#&nbsp;&nbsp;&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;save("location");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&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;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>#++++++++++&nbsp;&nbsp;&nbsp; jimmy added&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
+++++++++++++++++++++<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>#----------------------------------------------------<BR></DIV>
<DIV>
<DIV>============================================================================================</DIV></DIV>
<DIV>&nbsp;</DIV></FONT></DIV></BODY></HTML>