<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2>Ok, so ser worked for a few minutes 
in the following way:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>Me on live IP calling a nat user, 
their phone would ring, however me the A party got no ring, after 20 seconds I 
received NU tone.<BR>NAT user is able to call me with no problem.<BR>Then things 
just died and now when I run ser I get the following:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><A 
href="mailto:ser@max:/home/icepick$">ser@max:/home/icepick$</A> ser 
-Edddddd<BR>&nbsp;0(5134) read 244542925 from /dev/urandom<BR>&nbsp;0(5134) 
seeding PRNG with 1357656199<BR>&nbsp;0(5134) test random number 
985922484<BR>ERROR: bad config file (1 errors)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>ser.cfg (as per onsip.org, exact copy 
of the rtpproxy.cfg with 2 additional fields for linking asterisk)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff 
size=2>debug=3<BR>fork=yes<BR>log_stderror=no<BR>dns=no<BR>rev_dns=no<BR>fifo="/home/ser/ser_fifo"<BR>fifo_db_url="mysql://asterisk:4ster1skrawk5@localhost/ser"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>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/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/nathelper.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/textops.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/uri_db.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/uri.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/domain.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/acc.so"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("acc|auth_db|usrloc|uri_db", 
"db_url", "mysql://ser:ser@localhost/ser")</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("auth_db", "calculate_ha1", 
1)<BR>modparam("auth_db", "password_column", "password")</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("acc", "log_level", 
2)<BR>modparam("acc", "log_flag", 1 )<BR>modparam("acc", "log_missed_flag", 
2)<BR>modparam("acc", "log_fmt", "cdfimorstup") modparam("acc", 
"failed_transactions", 1) modparam("acc", "report_cancels", 1) modparam("acc", 
"db_flag", 1) modparam("acc", "db_missed_flag", 2)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("nathelper", 
"natping_interval", 30) <BR>modparam("nathelper", "ping_nated_only", 
1)&nbsp;&nbsp; <BR>modparam("nathelper", "rtpproxy_sock", 
"unix:/var/run/rtpproxy.sock")</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("usrloc", "db_mode", 
2)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("registrar", "nat_flag", 
6)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>modparam("rr", "enable_full_lr", 
1)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff 
size=2>alias="voip.fast.co.nz"<BR>alias=""</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>route {</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>&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;};</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>&nbsp;if (msg:len &gt; max_len) 
{<BR>&nbsp;&nbsp;sl_send_reply("513", "Message 
Overflow");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
Record Route Section<BR>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;if 
(method!="REGISTER") {<BR>&nbsp;&nbsp;record_route();<BR>&nbsp;};</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>&nbsp;if (method=="BYE" || 
method=="CANCEL") {<BR>&nbsp;&nbsp;unforce_rtp_proxy();<BR>&nbsp;} </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
Loose Route Section<BR>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;if 
(loose_route()) {</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>&nbsp;&nbsp;if (has_totag() 
&amp;&amp; method=="INVITE") {<BR>&nbsp;&nbsp;&nbsp;if (nat_uac_test("19")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;setflag(6);<BR>&nbsp;&nbsp;&nbsp;&nbsp;force_rport();<BR>&nbsp;&nbsp;&nbsp;&nbsp;fix_nated_contact();<BR>&nbsp;&nbsp;&nbsp;};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
force_rtp_proxy("l");<BR>&nbsp;&nbsp;};<BR>&nbsp; 
&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 

-----------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# send out 0 prefix to asterisk for IVR 
options<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
-----------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;if (uri=~"^sip:0[1-9]*@voip.fast.co.nz") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
setflag(1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
rewritehostport("202.150.105.150:5070");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
log("free call");<BR>&nbsp;&nbsp;&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;&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;};<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;}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
-----------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# send out 00 prefix to wholesale voip.fast.co.nz 
termination<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
-----------------------------------------------------------------<BR>&nbsp;if 
(uri=~"^sip:00[0-9].*@voip.fast.co.nz") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;if (!is_user_in("From", 
"ld")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;sl_send_reply("403", "Payment 
required");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;break;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff 
size=2>&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;setflag(1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;rewritehostport("voip.fast.co.nz:5070");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&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;};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=Arial color=#0000ff size=2>
<DIV><BR>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
Call Type Processing Section<BR>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;if 
(uri==myself) {<BR>&nbsp;&nbsp;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>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;if (!lookup("location")) 
{<BR>&nbsp;&nbsp;&nbsp;sl_send_reply("404", "User Not 
Found");<BR>&nbsp;&nbsp;&nbsp;break;<BR>&nbsp;&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;route(1);<BR>&nbsp;};<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>route[1] {</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
Default Message Handler<BR>&nbsp;# 
-----------------------------------------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;t_on_reply("1");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (!t_relay()) {<BR>&nbsp;&nbsp;if (method=="INVITE" &amp;&amp; 
isflagset(6)) {<BR>&nbsp;&nbsp;&nbsp; 
unforce_rtp_proxy();<BR>&nbsp;&nbsp;};<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;};<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>route[2] {</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
REGISTER Message Handler<BR>&nbsp;# 
----------------------------------------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (!search("^Contact: \*") &amp;&amp; nat_uac_test("19")) 
{<BR>&nbsp;&nbsp;setflag(6);<BR>&nbsp;&nbsp;fix_nated_register();<BR>&nbsp;&nbsp;force_rport();<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;sl_send_reply("100", "Trying");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (!www_authorize("","subscriber")) 
{<BR>&nbsp;&nbsp;www_challenge("","0");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (!check_to()) {<BR>&nbsp;&nbsp;sl_send_reply("401", 
"Unauthorized");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; consume_credentials();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (!save("location")) 
{<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;};<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>route[3] {</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;# 
-----------------------------------------------------------------<BR>&nbsp;# 
INVITE Message Handler<BR>&nbsp;# 
-----------------------------------------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (nat_uac_test("19")) 
{<BR>&nbsp;&nbsp;setflag(6);<BR>&nbsp;&nbsp;&nbsp;&nbsp; }</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (!lookup("location")) {<BR>&nbsp;&nbsp;sl_send_reply("404", "User 
Not Found");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (!proxy_authorize("voip.fast.co.nz","subscriber")) 
{<BR>&nbsp;&nbsp;proxy_challenge("voip.fast.co.nz","0");<BR>&nbsp;&nbsp;break;<BR>&nbsp;} 
else if (!check_from()) {<BR>&nbsp;&nbsp;sl_send_reply("403", "Use 
From=ID");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; consume_credentials();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (isflagset(6)) 
{<BR>&nbsp;&nbsp;force_rport();<BR>&nbsp;&nbsp;fix_nated_contact();<BR>&nbsp;&nbsp;force_rtp_proxy();<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;t_on_reply("1");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (!t_relay()) {<BR>&nbsp;&nbsp;if(isflagset(6)) 
{<BR>&nbsp;&nbsp;&nbsp;unforce_rtp_proxy();<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;sl_reply_error();<BR>&nbsp;};<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>onreply_route[1] {</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (isflagset(6) &amp;&amp; status=~"(180)|(183)|2[0-9][0-9]") 
{<BR>&nbsp; &nbsp;if (!search("^Content-Length:\ 0")) 
{<BR>&nbsp;&nbsp;&nbsp;force_rtp_proxy();<BR>&nbsp;&nbsp;};<BR>&nbsp;} else if 
(nat_uac_test("1")) {<BR>&nbsp;&nbsp;fix_nated_contact();<BR>&nbsp;};<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT>&nbsp;</DIV></BODY></HTML>