<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I installed "Ser-0.8.14"&nbsp;+ "nathelper" +&nbsp;"rtpproxy" in RedHat 9.0, and add "./rtpproxy" in startup script, when i tried both sipsoftphone in the internet behind NAT that can connect but "no voice" and auto hang-up, but when both sipsoftphone in local network that no problem !</DIV>
<DIV>&nbsp;</DIV>
<DIV>Which port range i need release for rtpproxy in the firewall ?</DIV>
<DIV>&nbsp;</DIV>
<DIV>my ser.cfg config as below :</DIV>
<DIV>&nbsp;</DIV>
<DIV># ----------- global configuration parameters ------------------------</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>/* Uncomment these lines to enter debugging mode <BR>fork=no<BR>*/<BR>#log_stderror=yes<BR>#debug=4<BR>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># ------------------ module loading ----------------------------------</DIV>
<DIV><BR>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>loadmodule "/usr/local/lib/ser/modules/textops.so"<BR>loadmodule "/usr/local/lib/ser/modules/nathelper.so"</DIV>
<DIV># Uncomment this if you want digest authentication<BR># mysql.so must be loaded !<BR>#loadmodule "/usr/local/lib/ser/modules/dbtext.so"<BR>#loadmodule "/usr/local/lib/ser/modules/auth.so"<BR>#loadmodule "/usr/local/lib/ser/modules/auth_db.so"<BR>#loadmodule "/usr/local/lib/ser/modules/mysql.so"</DIV>
<DIV># ----------------- setting module-specific parameters ---------------</DIV>
<DIV># -- usrloc params --</DIV>
<DIV>modparam("usrloc", "db_mode",&nbsp;&nbsp; 0)<BR>#modparam("auth_db", "db_url", "db:/var/dbtext")<BR>#modparam("auth_db", "user_column", "user")<BR>#modparam("auth_db", "domain_column", "domain")<BR>#modparam("auth_db", "password_column", "password")<BR>#modparam("auth_db", "calculate_ha1", 1)<BR>#modparam("auth_db", "password_column_2", "ha1_2")<BR>modparam("registrar", "nat_flag", 6)<BR>modparam("nathelper", "natping_interval", 30) # Ping interval 30 s<BR>modparam("nathelper", "ping_nated_only", 1)&nbsp;&nbsp; # Ping only clients behind NAT<BR>modparam("nathelper", "rtpproxy_sock","/var/run/rtpproxy.sock")</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># -- rr params --<BR># add value to ;lr param to make some broken UAs happy<BR>modparam("rr", "enable_full_lr", 1)</DIV>
<DIV># -------------------------&nbsp; request routing logic -------------------</DIV>
<DIV># main routing logic<BR>#define NAT_UAC_TEST_C_1918&nbsp;&nbsp;&nbsp;&nbsp; 0x01<BR>/*<BR>* test for occurences of RFC1918 addresses in Contact<BR>* header field<BR>*/<BR>#define NAT_UAC_TEST_RCVD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0x02<BR>/*<BR>* test if source address of signaling is different from<BR>* address advertised in Via<BR>*/<BR>#define NAT_UAC_TEST_V_1918&nbsp;&nbsp;&nbsp;&nbsp; 0x04<BR>/*<BR>* test for occurences of RFC1918 addresses in SDP body<BR>*/<BR>#define NAT_UAC_TEST_S_1918&nbsp;&nbsp;&nbsp;&nbsp; 0x08<BR>/*<BR>* test for occurences of RFC1918 addresses top Via<BR>*/<BR>route{</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;=&nbsp; max_len ) {<BR>&nbsp;&nbsp;sl_send_reply("513", "Message too big");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>&nbsp;if (nat_uac_test("3")) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append_hf("Alex-hint: NAThelper\r\n");<BR>fix_nated_contact(); # Rewrite contact with source IP of signalling<BR>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; if (method == "REGISTER" || ! search("^Record-Route:")) {<BR>#if (www_authorize("iptel.org", "subscriber")) {<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; www_challenge("iptel.org", "1");<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == "INVITE") {<BR>&nbsp;&nbsp;append_hf("Alex-hint: SDP rewritten\r\n");<BR>&nbsp;&nbsp;fix_nated_sdp("3"); #
 Add direction=active to SDP<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>log("LOG: Someone trying to register from private IP, rewriting\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rport(); # Add rport parameter to topmost Via<BR>&nbsp;&nbsp;setflag(6);&nbsp;&nbsp;&nbsp; # Mark as NATed<BR>&nbsp;&nbsp;&nbsp;&nbsp; };<BR>&nbsp;};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;if (!method=="REGISTER") record_route();&nbsp;</DIV>
<DIV>&nbsp;# subsequent messages withing a dialog should take the<BR>&nbsp;# path determined by record-routing<BR>&nbsp;if (loose_route()) {<BR>&nbsp;&nbsp;# mark routing logic in request<BR>&nbsp;&nbsp;append_hf("P-hint: rr-enforced\r\n"); <BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV>&nbsp;if (!uri==myself) {<BR>&nbsp;&nbsp;# mark routing logic in request<BR>&nbsp;&nbsp;append_hf("P-hint: outbound\r\n"); <BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&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) {<BR>&nbsp;&nbsp;if (method=="REGISTER") {<BR>&nbsp;&nbsp;&nbsp;save("location");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>&nbsp;&nbsp;lookup("aliases");<BR>&nbsp;&nbsp;if (!uri==myself) {<BR>&nbsp;&nbsp;&nbsp;append_hf("P-hint: outbound alias\r\n"); <BR>&nbsp;&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>&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;append_hf("P-hint: usrloc applied\r\n"); <BR>&nbsp;route(1);<BR>}</DIV>
<DIV>route[1]<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # !! Nathelper<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (isflagset(6)) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rtp_proxy();<BR>&nbsp;&nbsp;&nbsp;&nbsp; append_hf("NAT: ...\r\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # NAT processing of replies; apply to all transactions (for example,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # re-INVITEs from public to private UA are hard to identify as<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # NATed at the moment of request processing); look at replies<BR>&nbsp;t_on_reply("1");</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # send it out now; use stateful forwarding as it works reliably<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # even for UDP2TCP<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!t_relay()) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_reply_error();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>}<BR># !! Nathelper<BR>onreply_route[1] {<BR># NATed transaction ?<BR>&nbsp; append_hf("NAT: tes\r\n");<BR>if (isflagset(6) &amp;&amp; status == "(200)") {<BR>&nbsp; fix_nated_contact();<BR>&nbsp; fix_nated_sdp("3");<BR>&nbsp; force_rtp_proxy();<BR>&nbsp; append_hf("NAT: test\r\n");<BR># otherwise, is it a transaction behind a NAT and we did not<BR># know at time of request processing ? (RFC1918 contacts)<BR>} else if (nat_uac_test("1")) {<BR>&nbsp; fix_nated_contact();<BR>&nbsp; fix_nated_sdp("3");<BR>&nbsp; force_rtp_proxy();<BR>&nbsp; append_hf("NAT: test1\r\n");<BR>};<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>Please help !</DIV>
<DIV>&nbsp;</DIV>
<DIV>Tks a Lot !<BR>Freeman</DIV><p>
                É³¾¡¥ß§Yª¾