<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-9">
<META content="MSHTML 6.00.2900.2627" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear List,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I work with SER and as you see i do auth and acc
together with mediaproxy and pstn gateway. i create users, i connect my ATA, it
does not register :( then i dial a PSTN number, it dials and we speak, after
this part it's so strange... i can only register after doing this, what you
think... i add another ATA, again it does not register, i do same things and
call a cellular or landline, i talk a bit and after it register itself with SER.
when both registered i can make calls from each other and there's no
problem.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Anyone have an idea ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV><FONT face=Arial size=2>Ozan</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><<<<< starts here
<<<<<</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>debug=1<BR>fork=yes<BR>log_stderror=no</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>listen=212.XXX.104.YYY<BR>port=5060<BR>children=4</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>alias=212.XXX.104.YYY</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>dns=no<BR>rev_dns=no</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>fifo="/tmp/openser_fifo"<BR>fifo_db_url="mysql://openser:openserrw@localhost/openser"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>loadmodule
"/usr/local/lib/openser/modules/mysql.so"<BR>loadmodule
"/usr/local/lib/openser/modules/sl.so"<BR>loadmodule
"/usr/local/lib/openser/modules/tm.so"<BR>loadmodule
"/usr/local/lib/openser/modules/rr.so"<BR>loadmodule
"/usr/local/lib/openser/modules/maxfwd.so"<BR>loadmodule
"/usr/local/lib/openser/modules/usrloc.so"<BR>loadmodule
"/usr/local/lib/openser/modules/registrar.so"<BR>loadmodule
"/usr/local/lib/openser/modules/auth.so"<BR>loadmodule
"/usr/local/lib/openser/modules/auth_db.so"<BR>loadmodule
"/usr/local/lib/openser/modules/uri.so"<BR>loadmodule
"/usr/local/lib/openser/modules/uri_db.so"<BR>loadmodule
"/usr/local/lib/openser/modules/mediaproxy.so"<BR>loadmodule
"/usr/local/lib/openser/modules/nathelper.so"<BR>loadmodule
"/usr/local/lib/openser/modules/textops.so"<BR>loadmodule
"/usr/local/lib/openser/modules/domain.so"<BR>loadmodule
"/usr/local/lib/openser/modules/acc.so"</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>modparam("auth_db", "calculate_ha1",
1)<BR>modparam("auth_db", "password_column", "password")<BR>modparam("auth_db",
"use_domain", 1)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>modparam("domain", "db_mode", 1)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>modparam("nathelper", "rtpproxy_disable",
1)<BR>modparam("nathelper", "natping_interval", 0)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>modparam("mediaproxy","natping_interval",
30)<BR>modparam("mediaproxy","mediaproxy_socket",
"/var/run/mediaproxy.sock")<BR>modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/openser/sip-asymmetric-clients")<BR>modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/openser/rtp-asymmetric-clients")</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>modparam("usrloc", "db_mode",
2)<BR>modparam("usrloc", "use_domain", 1)<BR>modparam("usrloc",
"timer_interval", 120)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>modparam("registrar", "nat_flag",
6)<BR>modparam("registrar", "use_domain", 1)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>modparam("rr", "enable_full_lr", 1)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>modparam("acc", "db_url",
"mysql://openser:openserrw@localhost/openser")<BR>modparam("acc", "log_level",
1)<BR>modparam("acc", "log_flag", 1)<BR>modparam("acc", "db_flag",
1)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>route {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> #
-----------------------------------------------------------------<BR>
# Sanity Check Section<BR> #
-----------------------------------------------------------------<BR>
if (!mf_process_maxfwd_header("10"))
{<BR>
sl_send_reply("483", "Too Many
Hops");<BR>
break;<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(msg:len > max_len)
{<BR>
sl_send_reply("513", "Message
Overflow");<BR>
break;<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> #
-----------------------------------------------------------------<BR>
# Record Route Section and Acc
section<BR> #
-----------------------------------------------------------------<BR>
if (method=="INVITE" && client_nat_test("3"))
{<BR>
# INSERT YOUR IP ADDRESS
HERE<BR>
record_route_preset("212.XXX.104.YYY:5060;nat=yes");<BR>
} else if (method!="REGISTER")
{<BR>
record_route();<BR>
setflag(1);<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> #
-----------------------------------------------------------------<BR>
# Call Tear Down Section<BR> #
-----------------------------------------------------------------<BR>
if (method=="BYE" || method=="CANCEL")
{<BR>
end_media_session();<BR>
};</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> #
-----------------------------------------------------------------<BR>
# Loose Route Section<BR> #
-----------------------------------------------------------------<BR>
if (loose_route()) {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>
if (has_totag() && (method=="INVITE" || method=="ACK")) {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>
if (client_nat_test("3") || search("^Route:.*;nat=yes"))
{<BR>
setflag(6);<BR>
use_media_proxy();<BR>
};<BR>
};</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>
route(1);<BR>
break;<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> #
-----------------------------------------------------------------<BR>
# Call Type Processing Section<BR> #
-----------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(uri!=myself)
{<BR>
route(1);<BR>
break;<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(uri==myself) {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>
if (method=="CANCEL")
{<BR>
route(3);<BR>
break;<BR>
} else if (method=="INVITE")
{<BR>
route(3);<BR>
break;<BR>
} else if (method=="REGISTER")
{<BR>
route(2);<BR>
break;<BR>
};</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>
lookup("aliases");<BR>
if (uri!=myself)
{<BR>
route(1);<BR>
break;<BR>
};</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>
if (!lookup("location"))
{<BR>
sl_send_reply("404", "User Not
Found");<BR>
break;<BR>
};<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
route(1);<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>route[1] {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> #
-----------------------------------------------------------------<BR>
# Default Message Handler<BR> #
-----------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
t_on_reply("1");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(!t_relay()) {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>
if (method=="INVITE" || method=="ACK")
{<BR>
end_media_session();<BR>
};</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>
sl_reply_error();<BR>
};<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>route[2] {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> #
-----------------------------------------------------------------<BR>
# REGISTER Message Handler<BR> #
----------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(!search("^Contact:\ +\*") && client_nat_test("7"))
{<BR>
setflag(6);<BR>
fix_nated_register();<BR>
force_rport();<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
sl_send_reply("100", "Trying");</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(!www_authorize("","subscriber"))
{<BR>
www_challenge("","0");<BR>
break;<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(!check_to())
{<BR>
sl_send_reply("401",
"Unauthorized");<BR>
break;<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
consume_credentials();</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(!save("location"))
{<BR>
sl_reply_error();<BR>
};<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>route[3] {</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> #
-----------------------------------------------------------------<BR>
# CANCEL and INVITE Message
Handler<BR> #
-----------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(client_nat_test("3"))
{<BR>
setflag(7);<BR>
force_rport();<BR>
fix_nated_contact();<BR>
};</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
lookup("aliases");<BR> if
(uri!=myself)
{<BR>
route(1);<BR>
break;<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(uri=~"^sip:0[0-9]*@*")
{<BR>
rewritehost("P.S.T.N");<BR>
route(1);<BR>
break;<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(!lookup("location"))
{<BR>
sl_send_reply("404", "User Not
Found");<BR>
break;<BR> };</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> if
(method=="CANCEL")
{<BR>
route(1);<BR>
break;<BR> };</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> if
(!proxy_authorize("","subscriber"))
{<BR>
proxy_challenge("","0");<BR>
break;<BR> } else if (!check_from())
{<BR>
sl_send_reply("403", "Use
From=ID");<BR>
break;<BR> };</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>
consume_credentials();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> if
(isflagset(6) || isflagset(7))
{<BR>
use_media_proxy();<BR> };</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>
route(1);<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>onreply_route[1] {</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> if
((isflagset(6) || isflagset(7)) && (status=~"(180)|(183)|2[0-9][0-9]"))
{</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2>
if (!search("^Content-Length:\ +0"))
{<BR>
use_media_proxy();<BR>
};<BR> };</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> if
(client_nat_test("1"))
{<BR>
fix_nated_contact();<BR>
};<BR>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>>>>>> ends here
>>>>></DIV>
<DIV><BR></DIV></FONT></BODY></HTML>