<DIV>Harry,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I tried reinstall ser-0.8.14 and rtpproxy in same box, i create two start script for ser and rtpproxy :</DIV>
<DIV>&nbsp;</DIV>
<DIV>for ser</DIV>
<DIV>/usr/local/bin/ser start</DIV>
<DIV>&nbsp;</DIV>
<DIV>for rtpproxy</DIV>
<DIV>cd /</DIV>
<DIV>./usr/local/bin/rtpproxy</DIV>
<DIV>&nbsp;</DIV>
<DIV>and the ser.cfg, i following the ser-0.9.0 nathelper.cfg, but i tried connect both softphone outside the internet and behind NAT, but "No Voice" and "auto hang-up" !</DIV>
<DIV>&nbsp;</DIV>
<DIV>Please help to fix the problem !</DIV>
<DIV>&nbsp;</DIV>
<DIV>for ser.cfg</DIV>
<DIV>&nbsp;</DIV>
<DIV>#<BR># $Id: nathelper.cfg,v 1.1 2003/11/10 14:15:36 janakj Exp $<BR>#<BR># simple quick-start config script including nathelper support</DIV>
<DIV># This default script includes nathelper support. To make it work<BR># you will also have to install Maxim's RTP proxy. The proxy is enforced<BR># if one of the parties is behind a NAT.<BR>#<BR># If you have an endpoing in the public internet which is known to<BR># support symmetric RTP (Cisco PSTN gateway or voicemail, for example),<BR># then you don't have to force RTP proxy. If you don't want to enforce<BR># RTP proxy for some destinations than simply use t_relay() instead of<BR># route(1)<BR>#<BR># Sections marked with !! Nathelper contain modifications for nathelper<BR>#<BR># NOTE !! This config is EXPERIMENTAL !<BR>#<BR># ----------- 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>log_stderror=yes<BR>*/</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># ------------------ module loading ----------------------------------</DIV>
<DIV># Uncomment this if you want to use SQL database<BR>#loadmodule "/usr/local/lib/ser/modules/mysql.so"</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>loadmodule "/usr/local/lib/ser/modules/textops.so"</DIV>
<DIV># 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># !! Nathelper<BR>loadmodule "/usr/local/lib/ser/modules/nathelper.so"</DIV>
<DIV># ----------------- setting module-specific parameters ---------------</DIV>
<DIV># -- usrloc params --</DIV>
<DIV>modparam("usrloc", "db_mode",&nbsp;&nbsp; 0)</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># -- 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># !! Nathelper<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</DIV>
<DIV># -------------------------&nbsp; request routing logic -------------------</DIV>
<DIV># main routing logic</DIV>
<DIV>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;};</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # !! Nathelper<BR>&nbsp;# Special handling for NATed clients; first, NAT test is<BR>&nbsp;# executed: it looks for via!=received and RFC1918 addresses<BR>&nbsp;# in Contact (may fail if line-folding is used); also,<BR>&nbsp;# the received test should, if completed, should check all<BR>&nbsp;# vias for rpesence of received<BR>&nbsp;if (nat_uac_test("3")) {<BR>&nbsp;&nbsp;# Allow RR-ed requests, as these may indicate that<BR>&nbsp;&nbsp;# a NAT-enabled proxy takes care of it; unless it is<BR>&nbsp;&nbsp;# a REGISTER</DIV>
<DIV>&nbsp;&nbsp;if (method == "REGISTER" || ! search("^Record-Route:")) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log("LOG: Someone trying to register from private IP, rewriting\n");</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # This will work only for user agents that support symmetric<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # communication. We tested quite many of them and majority is<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # smart enough to be symmetric. In some phones it takes a configuration<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # option. With Cisco 7960, it is called NAT_Enable=Yes, with kphone it is<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # called "symmetric media" and "symmetric signalling".</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact(); # Rewrite contact with source IP of signalling<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method == "INVITE") {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_sdp("1"); # Add direction=active to SDP<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; force_rport(); # Add rport parameter to topmost Via<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setflag(6);&nbsp;&nbsp;&nbsp; # Mark as NATed<BR>&nbsp;&nbsp;};<BR>&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;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) {</DIV>
<DIV>&nbsp;&nbsp;if (method=="REGISTER") {</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;&nbsp;&nbsp;save("location");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};</DIV>
<DIV>&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;};</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;append_hf("P-hint: usrloc applied\r\n"); <BR>&nbsp;route(1);<BR>}</DIV>
<DIV>route[1] <BR>{<BR>&nbsp;# !! Nathelper<BR>&nbsp;if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" &amp;&amp; !search("^Route:")){<BR>&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply("479", "We don't forward to private IP addresses");<BR>&nbsp;&nbsp;&nbsp;&nbsp; break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>&nbsp;<BR>&nbsp;# if client or server know to be behind a NAT, enable relay<BR>&nbsp;if (isflagset(6)) {<BR>&nbsp;&nbsp;&nbsp;&nbsp; force_rtp_proxy();<BR>&nbsp;};</DIV>
<DIV>&nbsp;# NAT processing of replies; apply to all transactions (for example,<BR>&nbsp;# re-INVITEs from public to private UA are hard to identify as<BR>&nbsp;# NATed at the moment of request processing); look at replies<BR>&nbsp;t_on_reply("1");</DIV>
<DIV>&nbsp;# send it out now; use stateful forwarding as it works reliably<BR>&nbsp;# even for UDP2TCP<BR>&nbsp;if (!t_relay()) {<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;};<BR>}</DIV>
<DIV># !! Nathelper<BR>onreply_route[1] {<BR>&nbsp;&nbsp;&nbsp; # NATed transaction ?<BR>&nbsp;&nbsp;&nbsp; if (isflagset(6) &amp;&amp; status =~ "(183)|2[0-9][0-9]") {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact();<BR>&nbsp;force_rtp_proxy();<BR>&nbsp;&nbsp;&nbsp; # otherwise, is it a transaction behind a NAT and we did not<BR>&nbsp;&nbsp;&nbsp; # know at time of request processing ? (RFC1918 contacts)<BR>&nbsp;&nbsp;&nbsp; } else if (nat_uac_test("1")) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fix_nated_contact();<BR>&nbsp;&nbsp;&nbsp; };<BR>}<BR><BR><BR><B><I>harry gaillac &lt;gaillacharry@yahoo.fr&gt;</I></B> 說:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">hello,<BR><BR>rtpproxy is not documented unless you look at sources<BR><BR>it's a good idea but onsip.org need some fixings too<BR>many people waste time to ask for the same problems on<BR>mailing list.<BR><BR>documentation is not updated or missing.<BR>you can reply me: "do you want to write how-to ?"<BR><BR>onsip.org help me however i spent time (not waste<BR>time) to understand why i could not call others<BR>domains or get rtp streams with proxy rtp.<BR><BR>Regards<BR><BR>Harry<BR><BR><BR>--- "Greger V. Teigre" <GREGER@TEIGRE.COM>a 嶰rit :<BR><BR>&gt; I have registered the following issue with a<BR>&gt; suggestion for README text:<BR>&gt; http://bugs.sip-router.org/browse/SER-45<BR>&gt; <BR>&gt; I encourage everybody to register documentation<BR>&gt; needs!!<BR>&gt; g-)<BR>&gt; <BR>&gt; harry gaillac wrote:<BR>&gt; &gt; look at rtpp_defines.h<BR>&gt; &gt; re-compile
 rtpproxy.<BR>&gt; &gt; put a rtpproxy script in /etc/rc.d/init.d redhat<BR>&gt; &gt; you must add option in this script if ser run on<BR>&gt; the<BR>&gt; &gt; same box.<BR>&gt; &gt; So look at your ser.cfg script if you want call<BR>&gt; others<BR>&gt; &gt; domains or your own domain<BR>&gt; &gt;<BR>&gt; &gt; Harry<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt; --- Freeman <HYKH080@YAHOO.COM.HK>a 嶰rit :<BR>&gt; &gt;<BR>&gt; &gt;&gt; How can i get more information about config port<BR>&gt; &gt;&gt; range of rtpproxy,<BR>&gt; &gt;&gt; because not found in onsip.org !<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Tks a Lot !<BR>&gt; &gt;&gt; Freeman<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; harry gaillac <GAILLACHARRY@YAHOO.FR>說:Hello,<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; If ser and rtpproxy run on the same box your<BR>&gt; ser.cfg<BR>&gt; &gt;&gt; is wrong.<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; you need to define rtp range ports when you<BR>&gt; compile<BR>&gt; &gt;&gt; rtpproxy according to the
 rules of you fiwerall<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Look at onsip.org for help !<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Harry<BR>&gt; &gt;&gt; --- Freeman a 嶰rit :<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt;&gt; Hi,<BR>&gt; &gt;&gt;&gt;<BR>&gt; &gt;&gt;&gt; I installed "Ser-0.8.14" + "nathelper" +<BR>&gt; &gt;&gt;&gt; "rtpproxy" in RedHat 9.0, and add "./rtpproxy"<BR>&gt; in<BR>&gt; &gt;&gt;&gt; startup script, when i tried both sipsoftphone<BR>&gt; in<BR>&gt; &gt;&gt;&gt; the internet behind NAT that can connect but "no<BR>&gt; &gt;&gt;&gt; voice" and auto hang-up, but when both<BR>&gt; &gt;&gt; sipsoftphone<BR>&gt; &gt;&gt;&gt; in local network that no problem !<BR>&gt; &gt;&gt;&gt;<BR>&gt; &gt;&gt;&gt; Which port range i need release for rtpproxy in<BR>&gt; &gt;&gt; the<BR>&gt; &gt;&gt;&gt; firewall ?<BR>&gt; &gt;&gt;&gt;<BR>&gt; &gt;&gt;&gt; my ser.cfg config as below :<BR>&gt; &gt;&gt;&gt;<BR>&gt; &gt;&gt;&gt; # ----------- global configuration parameters<BR>&gt; &gt;&gt;&gt;
 ------------------------<BR>&gt; &gt;&gt;&gt; #debug=3 # debug level (cmd line:<BR>&gt; &gt;&gt;&gt; -dddddddddd)<BR>&gt; &gt;&gt;&gt; #fork=yes<BR>&gt; &gt;&gt;&gt; #log_stderror=no # (cmd line: -E)<BR>&gt; &gt;&gt;&gt; /* Uncomment these lines to enter debugging mode<BR>&gt; &gt;&gt;&gt; fork=no<BR>&gt; &gt;&gt;&gt; */<BR>&gt; &gt;&gt;&gt; #log_stderror=yes<BR>&gt; &gt;&gt;&gt; #debug=4<BR>&gt; &gt;&gt;&gt; check_via=no # (cmd. line: -v)<BR>&gt; &gt;&gt;&gt; dns=no # (cmd. line: -r)<BR>&gt; &gt;&gt;&gt; rev_dns=no # (cmd. line: -R)<BR>&gt; &gt;&gt;&gt; #port=5060<BR>&gt; &gt;&gt;&gt; #children=4<BR>&gt; &gt;&gt;&gt; fifo="/tmp/ser_fifo"<BR>&gt; &gt;&gt;&gt; # ------------------ module loading<BR>&gt; &gt;&gt;&gt; ----------------------------------<BR>&gt; &gt;&gt;&gt;<BR>&gt; &gt;&gt;&gt; loadmodule "/usr/local/lib/ser/modules/sl.so"<BR>&gt; &gt;&gt;&gt; loadmodule "/usr/local/lib/ser/modules/tm.so"<BR>&gt; &gt;&gt;&gt; loadmodule "/usr/local/lib/ser/modules/rr.so"<BR>&gt;
 &gt;&gt;&gt; loadmodule<BR>&gt; "/usr/local/lib/ser/modules/maxfwd.so"<BR>&gt; &gt;&gt;&gt; loadmodule<BR>&gt; "/usr/local/lib/ser/modules/usrloc.so"<BR>&gt; &gt;&gt;&gt; loadmodule<BR>&gt; &gt;&gt; "/usr/local/lib/ser/modules/registrar.so"<BR>&gt; &gt;&gt;&gt; loadmodule<BR>&gt; "/usr/local/lib/ser/modules/textops.so"<BR>&gt; &gt;&gt;&gt; loadmodule<BR>&gt; &gt;&gt; "/usr/local/lib/ser/modules/nathelper.so"<BR>&gt; &gt;&gt;&gt; # Uncomment this if you want digest<BR>&gt; authentication<BR>&gt; &gt;&gt;&gt; # mysql.so must be loaded !<BR>&gt; &gt;&gt;&gt; #loadmodule<BR>&gt; "/usr/local/lib/ser/modules/dbtext.so"<BR>&gt; &gt;&gt;&gt; #loadmodule "/usr/local/lib/ser/modules/auth.so"<BR>&gt; &gt;&gt;&gt; #loadmodule<BR>&gt; &gt;&gt; "/usr/local/lib/ser/modules/auth_db.so"<BR>&gt; &gt;&gt;&gt; #loadmodule<BR>&gt; "/usr/local/lib/ser/modules/mysql.so"<BR>&gt; &gt;&gt;&gt; # ----------------- setting module-specific<BR>&gt; &gt;&gt;&gt; parameters ---------------<BR>&gt; &gt;&gt;&gt; #
 -- usrloc params --<BR>&gt; &gt;&gt;&gt; modparam("usrloc", "db_mode", 0)<BR>&gt; &gt;&gt;&gt; #modparam("auth_db", "db_url", "db:/var/dbtext")<BR>&gt; &gt;&gt;&gt; #modparam("auth_db", "user_column", "user")<BR>&gt; &gt;&gt;&gt; #modparam("auth_db", "domain_column", "domain")<BR>&gt; &gt;&gt;&gt; #modparam("auth_db", "password_column",<BR>&gt; &gt;&gt; "password")<BR>&gt; &gt;&gt;&gt; #modparam("auth_db", "calculate_ha1", 1)<BR>&gt; &gt;&gt;&gt; #modparam("auth_db", "password_column_2",<BR>&gt; "ha1_2")<BR>&gt; &gt;&gt;&gt; modparam("registrar", "nat_flag", 6)<BR>&gt; &gt;&gt;&gt; modparam("nathelper", "natping_interval", 30) #<BR>&gt; &gt;&gt; Ping<BR>&gt; &gt;&gt;&gt; interval 30 s<BR>&gt; &gt;&gt;&gt; modparam("nathelper", "ping_nated_only", 1) #<BR>&gt; Ping<BR>&gt; &gt;&gt;&gt; only clients behind NAT<BR>&gt; &gt;&gt;&gt; modparam("nathelper",<BR>&gt; &gt;&gt;&gt; "rtpproxy_sock","/var/run/rtpproxy.sock")<BR>&gt; &gt;&gt;&gt; # -- auth params --<BR>&gt; &gt;&gt;&gt; #
 Uncomment if you are using auth module<BR>&gt; &gt;&gt;&gt; #<BR>&gt; &gt;&gt;&gt; #modparam("auth_db", "calculate_ha1", yes)<BR>&gt; &gt;&gt;&gt; #<BR>&gt; &gt;&gt;&gt; # If you set "calculate_ha1" parameter to yes<BR>&gt; &gt;&gt; (which<BR>&gt; &gt;&gt;&gt; true in this config),<BR>&gt; &gt;&gt;&gt; # uncomment also the following parameter)<BR>&gt; &gt;&gt;&gt; #<BR>&gt; &gt;&gt;&gt; #modparam("auth_db", "password_column",<BR>&gt; &gt;&gt; "password")<BR>&gt; &gt;&gt;&gt; # -- rr params --<BR>&gt; &gt;&gt;&gt; # add value to ;lr param to make some broken UAs<BR>&gt; &gt;&gt;&gt; happy<BR>&gt; &gt;&gt;&gt; modparam("rr", "enable_full_lr", 1)<BR>&gt; &gt;&gt;&gt; # ------------------------- request routing<BR>&gt; logic<BR>&gt; &gt;&gt;&gt; -------------------<BR>&gt; &gt;&gt;&gt; # main routing logic<BR>&gt; &gt;&gt;&gt; #define NAT_UAC_TEST_C_1918 0x01<BR>&gt; &gt;&gt;&gt; /*<BR>&gt; &gt;&gt;&gt; * test for occurences of RFC1918 addresses in<BR>&gt; &gt;&gt;&gt; Contact<BR>&gt;
 &gt;&gt;&gt; * header field<BR>&gt; &gt;&gt;&gt; */<BR>&gt; &gt;&gt;&gt; #define NAT_UAC_TEST_RCVD 0x02<BR>&gt; &gt;&gt;&gt; /*<BR>&gt; &gt;&gt;&gt; * test if source address of signaling is<BR>&gt; different<BR>&gt; &gt;&gt;&gt; from<BR>&gt; &gt;&gt;&gt; * address advertised in Via<BR>&gt; &gt;&gt;&gt; */<BR>&gt; &gt;&gt;&gt; #define NAT_UAC_TEST_V_1918 0x04<BR>&gt; &gt;&gt;&gt; /*<BR>&gt; &gt;&gt;&gt; * test for occurences of RFC1918 addresses in<BR>&gt; SDP<BR>&gt; &gt;&gt;&gt; body<BR>&gt; &gt;&gt;&gt; */<BR>&gt; &gt;&gt;&gt; #define NAT_UAC_TEST_S_1918 0x08<BR>&gt; &gt;&gt;&gt; /*<BR>&gt; &gt;&gt;&gt; * test for occurences of RFC1918 addresses top<BR>&gt; Via<BR>&gt; &gt;&gt;&gt; */<BR>&gt; &gt;&gt;&gt; route{<BR>&gt; &gt;&gt;&gt; # initial sanity checks -- messages with<BR>&gt; &gt;&gt;&gt; # max_forwards==0, or excessively long requests<BR>&gt; &gt;&gt;&gt; if (!mf_process_maxfwd_header("10")) {<BR>&gt; &gt;&gt;&gt; sl_send_reply("483","Too Many Hops");<BR>&gt; &gt;&gt;&gt;
 break;<BR>&gt; &gt;&gt;&gt; };<BR>&gt; &gt;&gt;&gt; if (msg:len &gt;= max_len ) {<BR>&gt; &gt;&gt;&gt; sl_send_reply("513", "Message too big");<BR>&gt; &gt;&gt;&gt; break;<BR>&gt; &gt;&gt;&gt; };<BR>&gt; &gt;&gt;&gt; if (nat_uac_test("3")) {<BR>&gt; &gt;&gt;&gt; append_hf("Alex-hint: NAThelper\r\n");<BR>&gt; &gt;&gt;&gt; fix_nated_contact(); # Rewrite contact with<BR>&gt; source<BR>&gt; &gt;&gt;&gt; IP of signalling<BR>&gt; &gt;&gt;&gt; if (method == "REGISTER" || !<BR>&gt; &gt;&gt;&gt; search("^Record-Route:")) {<BR>&gt; &gt;&gt;&gt; #if (www_authorize("iptel.org", "subscriber")) {<BR>&gt; &gt;&gt;&gt; # www_challenge("iptel.org", "1");<BR>&gt; &gt;&gt;&gt; # };<BR>&gt; &gt;&gt;&gt; if (method == "INVITE") {<BR>&gt; &gt;&gt;&gt; append_hf("Alex-hint: SDP rewritten\r\n");<BR>&gt; &gt;&gt;&gt; fix_nated_sdp("3"); # Add direction=active to<BR>&gt; SDP<BR>&gt; &gt;&gt;&gt; };<BR>&gt; &gt;&gt;&gt; log("LOG: Someone trying to register from<BR>&gt; private<BR>&gt; <BR>=== message
 truncated ===<BR><BR><BR><BR><BR><BR><BR><BR>___________________________________________________________________________ <BR>Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger <BR>T幨嶰hargez cette version sur http://fr.messenger.yahoo.com<BR><BR>_______________________________________________<BR>Serusers mailing list<BR>serusers@lists.iptel.org<BR>http://lists.iptel.org/mailman/listinfo/serusers<BR></BLOCKQUOTE><p>
                有即時通知,收艂