<DIV>Hi Marian, </DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm having the same issue as the one&nbsp;below,&nbsp; I&nbsp; tried to follow this thread&nbsp;on seruser Archives but I did not see a solution on this.. your help is really appreciated..</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks in Advance.<BR><BR><B><I>Marian Danisek &lt;majo@sunteq.sk&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">hello i have ser 0.8.14 working, some clients are behind nat others not.<BR>i have setup pstn gateway - asterisk a try to route some call here, but <BR>there is some problem with audio, from both clients - with real ip <BR>address and clients behind nat. Called party hear everything what caller <BR>say, but caller hear nothing.<BR><BR>calling between client with real address and other behind nat works fine.<BR>ser and pstn-gateway have real ip addresses, they are no same subnet.<BR>Can anybody help me to solve this problem ?<BR><BR>below is my sr.cfg<BR><BR>best regards Marian<BR><BR><BR><BR>#<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>#<BR><BR># ----------- global configuration parameters ------------------------<BR><BR>#debug=3 # debug level (cmd line: -dddddddddd)<BR>#fork=yes<BR>#log_stderror=no # (cmd line:
 -E)<BR><BR>/* Uncomment these lines to enter debugging mode<BR>debug=7<BR>fork=no<BR>log_stderror=yes<BR>*/<BR>alias=mdk10.sunteq.sk<BR>alias=sunteq.sk<BR>#alias=atlas.sunteq.sk<BR><BR><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"<BR><BR># ------------------ module loading ----------------------------------<BR><BR># Uncomment this if you want to use SQL database<BR>loadmodule "/lib/ser/modules/mysql.so"<BR><BR>loadmodule "/lib/ser/modules/sl.so"<BR>loadmodule "/lib/ser/modules/tm.so"<BR>loadmodule "/lib/ser/modules/rr.so"<BR>loadmodule "/lib/ser/modules/maxfwd.so"<BR>loadmodule "/lib/ser/modules/usrloc.so"<BR>loadmodule "/lib/ser/modules/registrar.so"<BR>loadmodule "/lib/ser/modules/textops.so"<BR><BR># Uncomment this if you want digest authentication<BR># mysql.so must be loaded !<BR>loadmodule "/lib/ser/modules/auth.so"<BR>loadmodule "/lib/ser/modules/auth_db.so"<BR><BR># load the
 voicemail module<BR>#loadmodule "/lib/ser/modules/vm.so"<BR><BR># load the enum module<BR>loadmodule "/lib/ser/modules/enum.so"<BR><BR># load the group module, to verify if a user forwards to voicemail<BR>loadmodule "/lib/ser/modules/group.so"<BR><BR># load the nathelper module<BR>loadmodule "/lib/ser/modules/nathelper.so"<BR>loadmodule "/lib/ser/modules/acc.so"<BR><BR># ----------------- setting module-specific parameters ---------------<BR><BR># -- registrar parameter<BR># special NAT flag indicates that a registered client is behind NAT<BR>modparam("registrar", "nat_flag", 6)<BR><BR># -- usrloc params --<BR><BR>#modparam("usrloc", "db_mode", 0)<BR><BR># Uncomment this if you want to use SQL database<BR># for persistent storage and comment the previous line<BR>modparam("usrloc", "db_mode", 2)<BR>#modparam("usrloc", "db_url", "mysql://ser:heslo@localhost/ser")<BR>modparam("usrloc|auth_db|acc|group|msilo|uri","db_url","mysql://ser:heslo@localhost/ser")<BR><BR># -- 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")<BR>#modparam("auth_db", "db_url", "mysql://ser:heslo@localhost/ser")<BR><BR># -- rr params --<BR># add value to ;lr param to make some broken UAs happy<BR>modparam("rr", "enable_full_lr", 1)<BR><BR># -- voicemail params --<BR>#modparam("voicemail", "db_url","mysql://ser:heslo@localhost/ser")<BR><BR># -- voicemail params --<BR>#modparam("group", "db_url","mysql://serro:heslo@localhost/ser")<BR><BR># -- nathelper params --<BR>modparam("nathelper", "natping_interval", 3)<BR>modparam("nathelper", "ping_nated_only", 1)<BR><BR>modparam("tm", "fr_inv_timer", 30 )<BR>#modparam("tm", "fr_inv_timer", 8 )<BR><BR><BR><BR># ------------------------- request routing logic -------------------<BR><BR># main routing
 logic<BR><BR>route{<BR><BR>log(1, "-------------------------------------------\n");<BR>log(1, "entering main loop\n");<BR><BR>if (nat_uac_test("2")) {<BR>log(1, "src address different than via header-&gt;NAT <BR>detected\n");<BR>log(1, "force_rport and fix_nated_contact and <BR>setflag(5)\n");<BR>#try NAT traversal, works only if the client is symmetrical<BR>force_rport();<BR>fix_nated_contact();<BR>append_hf("P-hint: fixed NAT contact for request\r\n");<BR># flag 5 indicates that incoming request is from NATed <BR>client<BR>setflag(5);<BR>};<BR><BR>if (method=="REGISTER")<BR>log(1, "REGISTER message received\n");<BR><BR>if (method=="INVITE")<BR>log(1, "INVITE message received\n");<BR><BR>if (method=="ACK")<BR>log(1, "ACK message received\n");<BR><BR>if (method=="BYE")<BR>log(1, "BYE message received\n");<BR><BR>if (method=="CANCEL")<BR>log(1, "CANCEL message received\n");<BR><BR>if (method=="SUBSCRIBE")<BR>log(1, "SUBSCRIBE message received\n");<BR><BR>if
 (method=="NOTIFY")<BR>log(1, "NOTIFY message received\n");<BR><BR>if (method=="OPTIONS")<BR>log(1, "OPTIONS message received\n");<BR><BR>if (method=="INFO")<BR>log(1, "INFO message received\n");<BR><BR>if (method=="MESSAGE")<BR>log(1, "MESSAGE message received\n");<BR><BR>if (method=="REFER")<BR>log(1, "REFER message received\n");<BR><BR><BR># 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><BR>if (msg:len &gt; max_len) {<BR>#if (len_gt( max_len )) {<BR>sl_send_reply("513", "Message too big");<BR>break;<BR>};<BR><BR># loose-route processing<BR>if (loose_route()) {<BR>log(1, "loose_route processing\n");<BR>t_relay();<BR>break;<BR>};<BR><BR># Check for PSTN access<BR>if (uri=~"^sip:0[0-9]*@.*") {<BR>log(1, "going to PSTN route3\n");<BR>route(3);<BR>break;<BR>};<BR><BR><BR># 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><BR>if (method=="REGISTER") {<BR>log(1, "analyzing REGISTER request\n");<BR># Uncomment this if you want to use digest authentication<BR>if (!www_authorize("mdk10.sunteq.sk", <BR>"subscriber")) {<BR>www_challenge("mdk10.sunteq.sk", "0");<BR>break;<BR>};<BR><BR>if (isflagset(5)) {<BR>#register from nated client, save <BR>nat_flag=6<BR>#in location table<BR>setflag(6);<BR>};<BR>if (!save("location")) {<BR>log(1, "save location error\n");<BR>sl_reply_error();<BR>};<BR>break;<BR>};<BR><BR>lookup("aliases");<BR><BR>#mark transaction for voicemail<BR>#if (is_user_in("Request-URI", "voicemail\n")) {<BR># log(1, "requested user is in voicemail group");<BR># setflag(4);<BR>#};<BR><BR># Process Aliases<BR>lookup("aliases");<BR><BR><BR># native SIP destinations are handled using our USRLOC DB<BR>if (!lookup("location")) {<BR># handle user which was not found<BR>log(1, "requested user not
 found\n");<BR>route(4);<BR>break;<BR>};<BR>};<BR><BR>#add failure route which should be performed if response code &gt;=300<BR>if (method=="INVITE" &amp;&amp; isflagset(4)) {<BR>log(1, "invite for voicemail user-&gt;initiate <BR>failureroute[1]\n");<BR>t_on_failure("1");<BR>};<BR><BR># forward to current uri now; use stateful forwarding; that<BR># works reliably even if we forward from TCP to UDP<BR><BR>route(1);<BR>}<BR><BR>route[1]{<BR>log(1, "-------------------------------------------\n");<BR>log(1, "entering route[1] - relaying SIP message\n");<BR>if ((isflagset(5)) || (isflagset(6))) {<BR>log(1, "at least one of the participants is <BR>NATed-&gt;record_route\n");<BR>record_route();<BR>log(1, " --&gt;setting up reply processing <BR>-&gt;onreply_route[1]");<BR>t_on_reply("1");<BR>if (method=="INVITE") {<BR>log(1, " INVITE request--&gt;force_rtp_proxy, <BR>set NATED-INVITE flag(7)");<BR>force_rtp_proxy();<BR>append_hf("P-hint: request forced to rtp
 <BR>proxy\r\n");<BR>setflag(7);<BR>};<BR>};<BR><BR>log(1, "relaying message ...\n");<BR>if (!t_relay()) {<BR>log(1, "t_relay error occured\n");<BR>sl_reply_error();<BR>};<BR><BR>}<BR><BR># all incoming replies for t_onrepli-ed transactions enter here<BR>onreply_route[1] {<BR>log(1, "-------------------------------------------\n");<BR>log(1, "onreply_route[1] entered\n");<BR><BR>if (isflagset(6)) {<BR>log(1, "transaction was sent to a NATED client -&gt; fix <BR>nated contact\n");<BR>fix_nated_contact();<BR>append_hf("P-hint: fixed NAT contact for response\r\n");<BR>}<BR><BR>if ( (status=~"100") ) {<BR>log(1, "status 100 received\n");<BR>};<BR><BR>if ( (status=~"180") ) {<BR>log(1, "status 180 received\n");<BR>};<BR><BR>if ( (status=~"202") ) {<BR>log(1, "status 202 received\n");<BR>};<BR><BR>if ( (status=~"200" || status=~"183") ) {<BR>log(1, "status 2xx or 183");<BR>if ( isflagset(7) ) {<BR>log(1, "marked(7) as NATED-INVITE -&gt; <BR>force_rtp_proxy
 \n");<BR>force_rtp_proxy();<BR>append_hf("P-hint: response forced to rtp <BR>proxy\r\n");<BR>};<BR>};<BR>}<BR><BR>route[3] {<BR>if (method=="INVITE" &amp;&amp; (!src_ip==194.1.222.26)) {<BR>log(1, "method is invite\n");<BR>if (!proxy_authorize( "mdk10.sunteq.sk","subscriber")) {<BR>proxy_challenge( "mdk10.sunteq.sk", "0");<BR>break;<BR>};<BR># let's check from=id ... avoids accounting confusion<BR><BR>if(!is_user_in("credentials", "local")) {<BR>sl_send_reply("403", "NO PSTN Privileges...");<BR>break;<BR>};<BR>consume_credentials();<BR><BR>}; # INVITE to authorized PSTN<BR>log(1, "authorized to PSTN\n");<BR><BR># if you have passed through all the checks, let your call go to GW!<BR>force_rtp_proxy();<BR>record_route();<BR>t_on_reply("1");<BR># snom conditioner<BR>if (method=="INVITE" &amp;&amp; search("User-Agent: snom")) {<BR>replace("100rel, ", "");<BR>};<BR><BR>append_hf("P-hint: GATEWAY\r\n");<BR># use UDP to guarantee well-known sender port (TCP
 ephemeral)<BR>t_relay_to_udp("194.1.222.26","5060");<BR>}<BR><BR><BR>route[4]{<BR>log(1, "-------------------------------------------\n");<BR>log(1, "entering route[4] = requested user not online\n");<BR># non-Voip -- just send "off-line"<BR>if (!(method == "INVITE" || method == "ACK" || method == <BR>"CANCEL" || method == "REFER" || method == "BYE")) {<BR>log(1, "no invite,ack,cancel,refer-&gt;return 404\n");<BR>sl_send_reply("404", "Not Found");<BR>break;<BR>};<BR><BR># not voicemail subscriber and no echo/conference call<BR>if ( isflagset(4)) {<BR>log(1, "flag(4) active\n");<BR>};<BR>if (uri =~ "conference") {<BR>log(1, "conference call\n");<BR>};<BR>if (uri =~ "echo") {<BR>log(1, "echo call\n");<BR>};<BR>if ( !( isflagset(4) || (uri =~ "conference") || (uri =~ <BR>"echo") ) ) {<BR>log(1, "no voicemail subscriber-&gt;return 404");<BR>sl_send_reply("404", "Not Found and no voicemail turned <BR>on");<BR>break;<BR>};<BR><BR>if ( isflagset(5) ) {<BR>log(1, "caller is
 NATed-&gt;record_route\n");<BR>record_route();<BR>log(1, " --&gt;setting up reply processing <BR>-&gt;onreply_route[1]");<BR>t_on_reply("1");<BR>if (method=="INVITE") {<BR>log(1, " INVITE request--&gt;force_rtp_proxy");<BR>force_rtp_proxy();<BR>};<BR>};<BR><BR># forward to voicemail now<BR>rewritehostport("192.168.1.253:5060");<BR>log(1, "forward to voicemail\n");<BR>t_relay_to_udp("192.168.1.253", "5060");<BR><BR>}<BR><BR>failure_route[1] {<BR>/* XX: note: unsafe if preloaded routes without username used */<BR>log(1, "-------------------------------------------\n");<BR>log(1, "failureroute[1] entered\");<BR>revert_uri();<BR>rewritehostport("212.17.35.184:5060");<BR>append_branch();<BR>t_relay_to_udp("212.17.35.184", "5060");<BR><BR>}<BR><BR>_______________________________________________<BR>Serusers mailing list<BR>serusers@lists.iptel.org<BR>http://lists.iptel.org/mailman/listinfo/serusers<BR></BLOCKQUOTE><p><br><hr size=1>Post your free ad now! <a
 href="http://ca.personals.yahoo.com/"><b>Yahoo! Canada Personals</b></a><br>