<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi guys, </FONT></DIV>
<DIV><FONT face=Arial size=2>I have some problems with ser. When trying to call 
from internal ip (nat) I can hear</FONT></DIV>
<DIV><FONT face=Arial size=2>user that is behind nat but he can't hear me. Same 
problem exist when to users behind </FONT></DIV>
<DIV><FONT face=Arial size=2>nat call each other. The main problem comes when I 
forward calls - all calls starting </FONT></DIV>
<DIV><FONT face=Arial size=2>with 1-9 are forwarded to pstn provider (quintum 
gw). Whatever - internal or external </FONT></DIV>
<DIV><FONT face=Arial size=2>ip is used I cannot hear user at the other side but 
he hears me!</FONT></DIV>
<DIV><FONT face=Arial size=2>Here is my configuration:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>debug=9&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # debug level 
(cmd line: -dddddddddd)<BR>#fork=yes<BR>log_stderror=yes&nbsp;# (cmd line: 
-E)</FONT></DIV>
<DIV><FONT face=Arial size=2>check_via=no&nbsp;# (cmd. line: 
-v)<BR>dns=yes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
(cmd. line: -r)<BR>rev_dns=yes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: 
-R)<BR>port=5060<BR>children=4<BR>fifo="/tmp/ser_fifo"<BR>fifo_mode=0777<BR># 
------------------ module loading 
----------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># Uncomment this if you want to use SQL 
database<BR>loadmodule "/usr/local/lib/ser/modules/mysql.so"</FONT></DIV>
<DIV><FONT face=Arial size=2>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/auth.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/auth_db.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/textops.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/domain.so"<BR>#loadmodule 
"/usr/local/lib/ser/modules/mediaproxy.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/acc.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/msilo.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/nathelper.so"<BR># ----------------- setting 
module-specific parameters ---------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># -- usrloc params --<BR>modparam("usrloc", 
"db_mode", 2)<BR>modparam("usrloc", "db_url", 
"mysql://ser:heslo@192.168.2.15/ser")<BR>modparam("auth_db", "calculate_ha1", 
yes)<BR>modparam("auth_db", "password_column", "password")<BR>modparam("rr", 
"enable_full_lr", 1)<BR>modparam("acc", "db_url", 
"mysql://ser:heslo@192.168.2.15/ser")<BR>modparam("acc", "log_level", 2) 
<BR>modparam("acc", "log_flag", 3)<BR>modparam("acc", "log_level", 1)<BR># 
number of flag, which will be used for accounting; if a message is<BR># labeled 
with this flag, its completion status will be reported<BR>modparam("acc", 
"log_flag", 1)<BR>modparam("acc", "log_fmt", "cdfimorstup")<BR>modparam("acc", 
"db_url", "mysql://ser:heslo@192.168.2.15/ser")<BR>modparam("acc", "db_flag", 
1)<BR>modparam("acc", "log_missed_flag", 1)<BR>modparam("msilo", "db_url", 
"mysql://ser:heslo@80.72.68.187/ser")<BR>modparam("msilo", "db_table", 
"silo")<BR>#modparam("msilo", "registrar", 
"sip:registrar@iptel.org")<BR>modparam("msilo", "expire_time", 
259200)<BR>modparam("msilo", "check_time", 10)<BR>#modparam("msilo", 
"clean_period", "3")<BR>modparam("msilo", "use_contact", 
1)<BR>#modparam("rtpproxy", "rtpproxy_socket", 
"/var/run/rtpproxy.sock")<BR>#modparam("nathelper", "rtpproxy_socket", 
"/var/run/rtpproxy.sock")<BR>modparam("nathelper","rtpproxy_sock", 
"/var/run/rtpproxy.sock")<BR>modparam("registrar", "nat_flag", 
6)<BR>modparam("nathelper", "natping_interval", 30) # Ping interval 30 
s<BR>modparam("nathelper", "ping_nated_only", 1) </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT face=Arial>listen=83.74.45.87</FONT><BR></FONT><FONT 
face=Arial size=2># -------------------------&nbsp; request routing logic 
-------------------<BR># main routing logic<BR>route{<BR>&nbsp;if 
(!mf_process_maxfwd_header("70")) {<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;};<BR>&nbsp;record_route();&nbsp;<BR>&nbsp;if 
(loose_route()) 
{<BR>&nbsp;&nbsp;t_relay();<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV><FONT face=Arial size=2>
<DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (nat_uac_test("3")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# Allow RR-ed requests, as there may indicate 
that<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# a NAT-enabled proxy takes care of it; unless it 
is<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# a 
REGISTER<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if (method == "REGISTER" || ! search("^Record-Route:")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
log("LOG: Someone trying to register from private IP, 
rewriting\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fix_nated_contact(); # Rewrite contact with source IP of 
signalling<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (uri==myself) {<BR>&nbsp;&nbsp;if (method=="REGISTER") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if (!www_authorize("83.74.45.87", "subscriber")) 
{<BR>&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; 
www_challenge("83.74.45.87", 
"0");<BR>&nbsp;&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;};<BR>&nbsp;&nbsp;&nbsp;force_rtp_proxy();<BR>&nbsp;&nbsp;&nbsp;save("aliases");<BR>&nbsp;&nbsp;&nbsp;save("location");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if 
(m_dump())<BR>&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; 
{<BR>&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; 
log("MSILO: offline messages dumped - if they 
were\n");<BR>&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; 
}else{<BR>&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; 
log("MSILO: no offline messages 
dumped\n");<BR>&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; 
};<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>};<BR><BR>if 
(uri=~"^sip:[1-9]*@83.74.45.87") 
{&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
rewritehost("122.44.75.176");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
forward( 122.44.75.176, 5060 );</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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nbsp;if (!t_relay()) 
{<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>}<BR>#route[1] {<BR>#&nbsp;if (!t_relay()) 
{<BR>#&nbsp;&nbsp;sl_reply_error();<BR>#&nbsp;};<BR>#}</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>route[1] {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sl_send_reply("479", "We don't forward to private IP 
addresses");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (isflagset(6)) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
force_rtp_proxy();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
t_on_reply("1");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
append_hf("P-Behind-NAT: 
Yes\r\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>onreply_route[1] {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # NATed 
transaction ?<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (status =~ 
"(183)|2[0-9][0-9]") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fix_nated_contact();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
force_rtp_proxy();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # otherwise, is 
it a transaction behind a NAT and we did 
not<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # know at time or request 
processing ? (RFC1918 contacts)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } 
else if (nat_uac_test("1")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fix_nated_contact();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>failure_route[1] {<BR>&nbsp;&nbsp;&nbsp; # forwarding failed -- check 
if the request was a MESSAGE<BR>&nbsp;&nbsp;&nbsp; if 
(!method=="MESSAGE")<BR>&nbsp;&nbsp;&nbsp; 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<BR>&nbsp;&nbsp;&nbsp; 
};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; log(1,"MSILO:the downstream UA doesn't support 
MESSAGEs\n");<BR>&nbsp;&nbsp;&nbsp; # we have changed the R-URI with the contact 
address, ignore it now<BR>&nbsp;&nbsp;&nbsp; if 
(m_store("1"))<BR>&nbsp;&nbsp;&nbsp; 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log("MSILO: offline message 
stored\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_reply("202", 
"Accepted");<BR>&nbsp;&nbsp;&nbsp; 
}else{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; log("MSILO: offline message 
NOT stored\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_reply("503", 
"Service Unavailable");<BR>&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks in advance :)</DIV>
<DIV>&nbsp;</DIV>
<DIV>Pavel<BR></DIV></FONT></BODY></HTML>