<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV> I installed "Ser-0.8.14" + "nathelper" + "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> </DIV>
<DIV>Which port range i need release for rtpproxy in the firewall ?</DIV>
<DIV> </DIV>
<DIV>my ser.cfg config as below :</DIV>
<DIV> </DIV>
<DIV># ----------- global configuration parameters ------------------------</DIV>
<DIV>#debug=3 # debug level (cmd line: -dddddddddd)<BR>#fork=yes<BR>#log_stderror=no # (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 # (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"</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", 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) # 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># ------------------------- request routing logic -------------------</DIV>
<DIV># main routing logic<BR>#define NAT_UAC_TEST_C_1918 0x01<BR>/*<BR>* test for occurences of RFC1918 addresses in Contact<BR>* header field<BR>*/<BR>#define NAT_UAC_TEST_RCVD 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 0x04<BR>/*<BR>* test for occurences of RFC1918 addresses in SDP body<BR>*/<BR>#define NAT_UAC_TEST_S_1918 0x08<BR>/*<BR>* test for occurences of RFC1918 addresses top Via<BR>*/<BR>route{</DIV>
<DIV> # 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> };<BR> if (nat_uac_test("3")) {<BR> append_hf("Alex-hint: NAThelper\r\n");<BR>fix_nated_contact(); # Rewrite contact with source IP of signalling<BR> if (method == "REGISTER" || ! search("^Record-Route:")) {<BR>#if (www_authorize("iptel.org", "subscriber")) {<BR># www_challenge("iptel.org", "1");<BR># };<BR> if (method == "INVITE") {<BR> append_hf("Alex-hint: SDP rewritten\r\n");<BR> fix_nated_sdp("3"); #
Add direction=active to SDP<BR> };<BR>log("LOG: Someone trying to register from private IP, rewriting\n");<BR> force_rport(); # Add rport parameter to topmost Via<BR> setflag(6); # Mark as NATed<BR> };<BR> };<BR> <BR> if (!method=="REGISTER") record_route(); </DIV>
<DIV> # subsequent messages withing a dialog should take the<BR> # path determined by record-routing<BR> if (loose_route()) {<BR> # mark routing logic in request<BR> append_hf("P-hint: rr-enforced\r\n"); <BR> route(1);<BR> break;<BR> };</DIV>
<DIV> if (!uri==myself) {<BR> # mark routing logic in request<BR> append_hf("P-hint: outbound\r\n"); <BR> route(1);<BR> break;<BR> };</DIV>
<DIV> # 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) {<BR> if (method=="REGISTER") {<BR> save("location");<BR> break;<BR> };<BR> lookup("aliases");<BR> if (!uri==myself) {<BR> append_hf("P-hint: outbound alias\r\n"); <BR> route(1);<BR> break;<BR> };<BR> # 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> append_hf("P-hint: usrloc applied\r\n"); <BR> route(1);<BR>}</DIV>
<DIV>route[1]<BR>{<BR> # !! Nathelper<BR> if (isflagset(6)) {<BR> force_rtp_proxy();<BR> append_hf("NAT: ...\r\n");<BR> };<BR> # NAT processing of replies; apply to all transactions (for example,<BR> # re-INVITEs from public to private UA are hard to identify as<BR> # NATed at the moment of request processing); look at replies<BR> t_on_reply("1");</DIV>
<DIV> # send it out now; use stateful forwarding as it works reliably<BR> # even for UDP2TCP<BR> if (!t_relay()) {<BR> sl_reply_error();<BR> };<BR>}<BR># !! Nathelper<BR>onreply_route[1] {<BR># NATed transaction ?<BR> append_hf("NAT: tes\r\n");<BR>if (isflagset(6) && status == "(200)") {<BR> fix_nated_contact();<BR> fix_nated_sdp("3");<BR> force_rtp_proxy();<BR> 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> fix_nated_contact();<BR> fix_nated_sdp("3");<BR> force_rtp_proxy();<BR> append_hf("NAT: test1\r\n");<BR>};<BR>}</DIV>
<DIV> </DIV>
<DIV>Please help !</DIV>
<DIV> </DIV>
<DIV>Tks a Lot !<BR>Freeman</DIV><p>
                É³¾¡¥ß§Yª¾