<html><div style='background-color:'><DIV class=RTE>Hello everybody,</DIV>
<DIV class=RTE>I have the following problem...</DIV>
<DIV class=RTE>I have deployed ser 0.9.13 with mediaproxy and Linksys PAP2 UAs. Everything works fine if PAP2 is assigned a public IP address.<BR>The problem is with NAT and fake IPs. PAP gets registered but I can't establish any calls.<BR>This is what I get from my server all the time using ngrep:</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>U 2005/08/02 15:28:35.898207 XX.XX.XX.XX:5060 -&gt; XX.XX.XX.XX:5060<BR>NOTIFY sip:XXXXXXXXX.com SIP/2.0.<BR>Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK-e4fba0ab;rport.<BR>From: &lt;sip:2810300308@XXXXXXXXXX.com&gt;;tag=1941f583fc72838co0.<BR>To: &lt;sip:XXXXXXXXXX.com&gt;.<BR>Call-ID: <A href="mailto:84ff8693-27a3a5bc@192.168.1.2">84ff8693-27a3a5bc@192.168.1.2</A>.<BR>CSeq: 43 NOTIFY.<BR>Max-Forwards: 70.<BR>Event: keep-alive.<BR>User-Agent: Linksys/PAP2-2.0.12(LS).<BR>Content-Length: 0.<BR>.</DIV>
<DIV class=RTE>#<BR>U 2005/08/02 15:28:35.898604 XX.XX.XX.XX:5060 -&gt; XX.XX.XX.XX:5060<BR>SIP/2.0 404 User Not Found.<BR>Via: SIP/2.0/UDP XX.XX.XX.XX:5060;branch=z9hG4bK-e4fba0ab;rport=5060.<BR>From: &lt;sip:2810300308@XXXXXXXX.com&gt;;tag=1941f583fc72838co0.<BR>To: &lt;sip:easyvoipcall.com&gt;;tag=5f52b14eb2ca58a7910364a1cdbf6fd5.8d90.<BR>Call-ID: <A href="mailto:84ff8693-27a3a5bc@192.168.1.2">84ff8693-27a3a5bc@192.168.1.2</A>.<BR>CSeq: 43 NOTIFY.<BR>Server: Sip EXpress router (0.9.3 (i386/linux)).<BR>Content-Length: 0.<BR>Warning: 392 69.10.149.208:5060 "Noisy feedback tells:&nbsp; pid=5858 req_src_ip=XXXXXXX req_src_port=5060 in_uri=XXXXXXXXXXX.com out_uri=sip:XXXXXXXXX.com via_cnt==1".</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>Here's my ser.cfg:</DIV>
<DIV class=RTE>#debug=3<BR>#fork=yes<BR>#log_stderror=no</DIV>
<DIV class=RTE>listen=XX.XX.XX.XX&nbsp;&nbsp;# INSERT YOUR IP ADDRESS HERE</DIV>
<DIV class=RTE>alias=XXXXXXX.com<BR>alias=XX.XX.XX.XX<BR>alias=XXXXXXX.com<BR>alias=XXXXXXX.com</DIV>
<DIV class=RTE>port=5060<BR>children=6</DIV>
<DIV class=RTE>dns=no<BR>rev_dns=no</DIV>
<DIV class=RTE>fifo="/tmp/ser_fifo"<BR>fifo_mode=0666<BR>fifo_db_url="mysql://ser:Bj3Kn7g8f19Hdv6@localhost/ser"</DIV>
<DIV class=RTE>loadmodule "/usr/local/lib/ser/modules/mysql.so"<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/acc.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/uri.so"<BR>loadmodule "/usr/local/lib/ser/modules/uri_db.so"<BR>loadmodule "/usr/local/lib/ser/modules/mediaproxy.so"<BR>loadmodule "/usr/local/lib/ser/modules/nathelper.so"<BR>loadmodule "/usr/local/lib/ser/modules/textops.so"<BR>loadmodule "/usr/local/lib/ser/modules/avpops.so"<BR>loadmodule "/usr/local/lib/ser/modules/domain.so"<BR>loadmodule "/usr/local/lib/ser/modules/permissions.so"</DIV>
<DIV class=RTE>modparam("auth_db|permissions|uri_db|usrloc", <BR>&nbsp;"db_url", "mysql://ser:XXXXXXXXXXX@localhost/ser")<BR>modparam("auth_db", "calculate_ha1", yes)<BR>modparam("auth_db", "password_column", "password")</DIV>
<DIV class=RTE># -------------- accounting params ----------------<BR>modparam("acc", "log_missed_flag", 2)<BR>modparam("acc", "log_level", 1)<BR>modparam("acc", "log_flag", 2)<BR>modparam("acc", "db_url", "mysql://ser:XXXXXXXXXXX@localhost/ser")<BR>modparam("acc", "db_flag", 1)<BR>modparam("acc", "failed_transactions", 1)<BR>modparam("acc", "db_missed_flag", 2)</DIV>
<DIV class=RTE>modparam("nathelper", "rtpproxy_disable", 1)<BR>modparam("nathelper", "natping_interval", 0)</DIV>
<DIV class=RTE>modparam("mediaproxy","natping_interval", 30)<BR>modparam("mediaproxy","mediaproxy_socket", "/var/run/mediaproxy.sock")<BR>modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/ser/sip-clients")<BR>modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/ser/rtp-clients")</DIV>
<DIV class=RTE>modparam("usrloc", "db_mode", 2)<BR>modparam("usrloc", "db_url", "mysql://ser:XXXXXXXXXXX@localhost/ser")</DIV>
<DIV class=RTE>modparam("registrar", "nat_flag", 6)</DIV>
<DIV class=RTE>modparam("rr", "enable_full_lr", 1)</DIV>
<DIV class=RTE>modparam("tm", "fr_inv_timer", 27)<BR>modparam("tm", "fr_inv_timer_avp", "inv_timeout")</DIV>
<DIV class=RTE>modparam("permissions", "db_mode", 1)<BR>modparam("permissions", "trusted_table", "trusted")</DIV>
<DIV class=RTE><BR>route {</DIV>
<DIV class=RTE>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;# Sanity Check Section<BR>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;if (!mf_process_maxfwd_header("10")) {<BR>&nbsp;&nbsp;sl_send_reply("483", "Too Many Hops");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;if (msg:len &gt; max_len) {<BR>&nbsp;&nbsp;sl_send_reply("513", "Message Overflow");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;# Record Route Section<BR>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;if (method=="INVITE" &amp;&amp; client_nat_test("3")) {<BR>&nbsp;&nbsp;# INSERT YOUR IP ADDRESS HERE<BR>&nbsp;&nbsp;record_route_preset("XX.XX.XX.XX:5060;nat=yes");<BR>&nbsp;} else if (method!="REGISTER") {&nbsp;<BR>&nbsp;&nbsp;record_route();&nbsp;<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;# Call Tear Down Section<BR>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;if (method=="BYE" || method=="CANCEL") {<BR>&nbsp;&nbsp;end_media_session();<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;# Loose Route Section<BR>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;if (loose_route()) {</DIV>
<DIV class=RTE>&nbsp;&nbsp;if (has_totag() &amp;&amp; (method=="INVITE" || method=="ACK")) {</DIV>
<DIV class=RTE>&nbsp;&nbsp;&nbsp;if (client_nat_test("3")||search("^Route:.*;nat=yes")){<BR>&nbsp;&nbsp;&nbsp;&nbsp;setflag(6);<BR>&nbsp;&nbsp;&nbsp;&nbsp;use_media_proxy();<BR>&nbsp;&nbsp;&nbsp;};<BR>&nbsp;&nbsp;};</DIV>
<DIV class=RTE>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;# Call Type Processing Section<BR>&nbsp;# -----------------------------------------------------------------</DIV>
<DIV class=RTE>&nbsp;if (uri!=myself) {<BR>&nbsp;&nbsp;route(5);<BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;if (uri==myself) {</DIV>
<DIV class=RTE>&nbsp;&nbsp;if (method=="ACK") {<BR>&nbsp;&nbsp;&nbsp;route(6);<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;} else if (method=="CANCEL") {<BR>&nbsp;&nbsp;&nbsp;route(3);<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;} else if (method=="INVITE") {<BR>&nbsp;&nbsp;&nbsp;route(3);<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;} else &nbsp;if (method=="REGISTER") {<BR>&nbsp;&nbsp;&nbsp;route(2);<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};</DIV>
<DIV class=RTE>&nbsp;&nbsp;lookup("aliases");<BR>&nbsp;&nbsp;if (uri!=myself) {<BR>&nbsp;&nbsp;&nbsp;route(5);<BR>&nbsp;&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};</DIV>
<DIV class=RTE>&nbsp;&nbsp;if (!lookup("location")) {<BR>&nbsp;&nbsp;&nbsp;sl_send_reply("404", "User Not Found");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;route(1);<BR>}</DIV>
<DIV class=RTE>route[1] {</DIV>
<DIV class=RTE>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;# Default Message Handler<BR>&nbsp;# -----------------------------------------------------------------</DIV>
<DIV class=RTE>&nbsp;t_on_reply("1");</DIV>
<DIV class=RTE>&nbsp;if (!t_relay()) {</DIV>
<DIV class=RTE>&nbsp;&nbsp;if (method=="INVITE" || method=="ACK") {<BR>&nbsp;&nbsp;&nbsp;end_media_session();<BR>&nbsp;&nbsp;};</DIV>
<DIV class=RTE>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;};<BR>}</DIV>
<DIV class=RTE>route[2] {</DIV>
<DIV class=RTE>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;# REGISTER Message Handler<BR>&nbsp;# -----------------------------------------------------------------</DIV>
<DIV class=RTE>&nbsp;sl_send_reply("100", "Trying");</DIV>
<DIV class=RTE>&nbsp;if (!search("^Contact:\ +\*") &amp;&amp; client_nat_test("7")) {<BR>&nbsp;&nbsp;setflag(6);<BR>&nbsp;&nbsp;fix_nated_register();<BR>&nbsp;&nbsp;force_rport();<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;if (!www_authorize("XXXXXXX.com","subscriber")) {<BR>&nbsp;&nbsp;www_challenge("XXXXXXX.com","0");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;if (!check_to()) {<BR>&nbsp;&nbsp;sl_send_reply("401", "Unauthorized");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;consume_credentials();</DIV>
<DIV class=RTE>&nbsp;if (!save("location")) {<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;};<BR>}</DIV>
<DIV class=RTE>route[3] {</DIV>
<DIV class=RTE>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;# CANCEL and INVITE Message Handler<BR>&nbsp;# -----------------------------------------------------------------</DIV>
<DIV class=RTE>&nbsp;if (client_nat_test("3")) {<BR>&nbsp;&nbsp;setflag(7);<BR>&nbsp;&nbsp;force_rport();<BR>&nbsp;&nbsp;fix_nated_contact();<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;if (method=="INVITE" &amp;&amp; !allow_trusted()) {</DIV>
<DIV class=RTE>&nbsp;&nbsp;if (!proxy_authorize("XXXXXXX.com","subscriber")) {<BR>&nbsp;&nbsp;&nbsp;proxy_challenge("XXXXXXX.com","0");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;} else if (!check_from()) {<BR>&nbsp;&nbsp;&nbsp;sl_send_reply("403", "Use From=ID");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};</DIV>
<DIV class=RTE>&nbsp;&nbsp;consume_credentials();<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;lookup("aliases");<BR>&nbsp;if (uri!=myself) {<BR>&nbsp;&nbsp;route(5);<BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;if (uri=~"^sip:[0-9]*@") {&nbsp;&nbsp;# International PSTN<BR>&nbsp;&nbsp;route(4);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;/*if (!lookup("location")) {</DIV>
<DIV class=RTE>&nbsp;&nbsp;if (uri=~"^sip:435527[0-9]{14}@") {&nbsp;# Domestic PSTN<BR>&nbsp;&nbsp;&nbsp;route(4);<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};</DIV>
<DIV class=RTE>&nbsp;&nbsp;sl_send_reply("404", "User Not Found");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};*/</DIV>
<DIV class=RTE>&nbsp;if (method=="CANCEL") {<BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;route(5);<BR>&nbsp;route(1);<BR>}</DIV>
<DIV class=RTE>route[4] {</DIV>
<DIV class=RTE>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;# PSTN Handler<BR>&nbsp;# -----------------------------------------------------------------</DIV>
<DIV class=RTE>&nbsp;rewritehost("XX.XX.XX.XX:5060"); # INSERT YOUR PSTN GATEWAY IP ADDRESS</DIV>
<DIV class=RTE>&nbsp;avp_write("i:45", "inv_timeout");</DIV>
<DIV class=RTE>&nbsp;route(5);<BR>&nbsp;route(1);<BR>}</DIV>
<DIV class=RTE>route[5] {</DIV>
<DIV class=RTE>&nbsp;# -----------------------------------------------------------------<BR>&nbsp;# RTP Proxy Enabler<BR>&nbsp;# -----------------------------------------------------------------</DIV>
<DIV class=RTE>&nbsp;if (isflagset(6) || isflagset(7)) {<BR>&nbsp;&nbsp;use_media_proxy();<BR>&nbsp;};<BR>}</DIV>
<DIV class=RTE>route[6] {</DIV>
<DIV class=RTE>&nbsp;# ------------------------------------------------------------------------<BR>&nbsp;# ACK Handler<BR>&nbsp;# ------------------------------------------------------------------------</DIV>
<DIV class=RTE>&nbsp;# ------------------------------------------------------------------------<BR>&nbsp;# Aliases Section<BR>&nbsp;# ------------------------------------------------------------------------<BR>&nbsp;lookup("aliases");<BR>&nbsp;if (uri!=myself) {<BR>&nbsp;&nbsp;route(5);<BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;lookup("location");</DIV>
<DIV class=RTE>&nbsp;route(1);<BR>}</DIV>
<DIV class=RTE><BR>onreply_route[1] {</DIV>
<DIV class=RTE>&nbsp;if ((isflagset(6) || isflagset(7)) &amp;&amp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; (status=~"(180)|(183)|2[0-9][0-9]")) {</DIV>
<DIV class=RTE>&nbsp;&nbsp;if (!search("^Content-Length:\ +0")) {<BR>&nbsp;&nbsp;&nbsp;use_media_proxy();<BR>&nbsp;&nbsp;};<BR>&nbsp;};</DIV>
<DIV class=RTE>&nbsp;if (client_nat_test("1")) {<BR>&nbsp;&nbsp;fix_nated_contact();<BR>&nbsp;};<BR>}</DIV>
<DIV class=RTE><BR>Please any ideas? I've trying to solve this issue for days. Please help me.</DIV>
<DIV class=RTE>&nbsp;</DIV>
<DIV class=RTE>Thank you<BR>Yiannis Marios<BR></DIV></div><br clear=all><hr>FREE pop-up blocking with the new MSN Toolbar <a href="http://g.msn.com/8HMBEN/2755??PS=47575" target="_top">MSN Toolbar</a> Get it now!</html>