<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>I have been jailed by this script for almost one week. I 
refered all archives available(including Onsip's Getting Started) and simply 
couldn't make the Call Forwarding(at no answer) run properly.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>In route[1], I used:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>if (isflagset(28)){<BR>&nbsp;&nbsp;avp_pushto("$ruri", 
"s:fwdnoanswer");<BR>&nbsp;&nbsp;append_branch();<BR>&nbsp;&nbsp;lookup("location");<BR>&nbsp;&nbsp;xlog("L_INFO", 
"No answer, relaying after lookup. method &lt;%rm&gt; From &lt;%fu&gt; To 
&lt;%tu&gt; Contact &lt;%ct&gt; r-uri &lt;%ru&gt;\n");<BR>};</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>t_relay();</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>In failure _route[1], I used:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>if (isflagset(27) &amp;&amp; t_check_status("408")) 
{<BR>&nbsp;&nbsp;setflag(28);</FONT></DIV>
<DIV><FONT 
size=2>&nbsp;&nbsp;revert_uri();<BR>&nbsp;&nbsp;route(1);<BR>};<BR></DIV>
<DIV>I think this is quite simple and straightforward,right? However, after I 
did revert_uri, avp_pushto, append_branch and lookup, t_relay&nbsp;never could 
relay the INVITE message to the new branch(I knew this because I checked with 
ngrep and found no any INVITE message for the new branch).</DIV>
<DIV>&nbsp;</DIV>
<DIV>Anyone can help? It's urgent!&nbsp;Thank you so much!</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Jerry.</DIV>
<DIV>&nbsp;</DIV>
<DIV>P.S., here is my original ser.cfg. Just for your reference:</DIV>
<DIV>=============================================================================<BR>debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# debug level (cmd line: -dddddddddd)<BR>fork=no<BR>log_stderror=yes&nbsp;# (cmd 
line: -E)</DIV>
<DIV>&nbsp;</DIV>
<DIV>listen=xx.xx.xx.xx</DIV>
<DIV>&nbsp;</DIV>
<DIV>check_via=no&nbsp;# (cmd. line: 
-v)<BR>dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
(cmd. line: -r)<BR>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: 
-R)<BR>port=5060<BR>children=4<BR>fifo="/tmp/ser_fifo"<BR>fifo_db_url="mysql://ser:heslo@localhost/ser"<BR>alias="sip.xx.com"<BR>alias="xx.xx.xx.xx"<BR>alias="xx.com"</DIV>
<DIV>&nbsp;</DIV>
<DIV># ------------------ module loading 
----------------------------------<BR>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/textops.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/group.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/nathelper.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/acc.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/avpops.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/xlog.so"</DIV>
<DIV>&nbsp;</DIV>
<DIV># ----------------- setting module-specific parameters 
---------------<BR>modparam("rr", "enable_full_lr", 1)</DIV>
<DIV>&nbsp;</DIV>
<DIV>modparam("registrar", "nat_flag", 6)<BR>modparam("nathelper", 
"natping_interval", 30) # Ping interval 30 s<BR>modparam("nathelper", 
"ping_nated_only", 1)&nbsp;&nbsp; # Ping only clients behind NAT</DIV>
<DIV>&nbsp;</DIV>
<DIV>modparam("tm", "fr_timer", 20 )<BR>modparam("tm", "fr_inv_timer", 30 
)</DIV>
<DIV>&nbsp;</DIV>
<DIV>modparam("usrloc", "db_mode",&nbsp;&nbsp; 2)<BR>modparam("usrloc", 
"db_url", "mysql://ser:heslo@localhost/ser")<BR>modparam("auth_db", 
"calculate_ha1", yes)<BR>modparam("auth_db", "password_column", 
"password")<BR>modparam("auth_db", "db_url", 
"mysql://ser:heslo@localhost/ser")<BR>modparam("uri_db", "db_url", 
"mysql://ser:heslo@localhost/ser")</DIV>
<DIV>&nbsp;</DIV>
<DIV>modparam("acc", "log_level", 1)<BR>modparam("acc", "log_flag", 1 
)<BR>modparam("acc", 
"db_url","mysql://ser:heslo@localhost/ser")<BR>modparam("acc", "db_flag", 1 
)</DIV>
<DIV>&nbsp;</DIV>
<DIV>modparam("avpops", "avp_url", 
"mysql://ser:heslo@localhost/ser")<BR>modparam("avpops", "avp_table", 
"usr_preferences")</DIV>
<DIV>&nbsp;</DIV>
<DIV># -------------------------&nbsp; request routing logic 
-------------------<BR>route<BR>{<BR>&nbsp;if (!mf_process_maxfwd_header("10")) 
{<BR>&nbsp;&nbsp;sl_send_reply("483","Too Many 
Hops");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>&nbsp;if (msg:len &gt;=&nbsp; 
max_len ) {<BR>&nbsp;&nbsp;sl_send_reply("513", "Message too 
big");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (method == "REGISTER" || ! search("^Record-Route:")) 
{<BR>&nbsp;&nbsp;fix_nated_contact(); # Rewrite contact with source IP of 
signalling<BR>&nbsp;&nbsp;if (method == "INVITE") 
<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;fix_nated_sdp("1"); # Add 
direction=active to SDP<BR>&nbsp;&nbsp;};<BR>&nbsp;&nbsp;force_rport(); # Add 
rport parameter to topmost Via<BR>&nbsp;&nbsp;setflag(6);&nbsp;&nbsp;&nbsp; # 
Mark as NATed<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;setflag(1); # used for acc.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (method=="INVITE")<BR>&nbsp;&nbsp;&nbsp;&nbsp; log(1, "INVITE 
message received\n");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (method=="ACK")<BR>&nbsp;&nbsp;&nbsp;&nbsp; log(1, "ACK message 
received\n");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (method=="BYE")<BR>&nbsp;&nbsp;&nbsp;&nbsp; log(1, "BYE message 
received\n");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (method=="CANCEL")<BR>&nbsp;&nbsp;&nbsp;&nbsp; log(1, "CANCEL 
message received\n");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (!method=="REGISTER")&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
record_route();&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (loose_route()) 
{<BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>&nbsp;<BR>&nbsp;if 
(uri!=myself) {<BR>&nbsp;&nbsp;route(1);<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (method=="REGISTER") 
{<BR>&nbsp;&nbsp;save("location");<BR>&nbsp;&nbsp;break;<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (method=="INVITE") {<BR>&nbsp;&nbsp;if 
(avp_db_load("$ruri/username", "s:fwdnoanswer")) 
{<BR>&nbsp;&nbsp;&nbsp;setflag(27);<BR>&nbsp;&nbsp;&nbsp;log(1, "dbg: 
FWDBUSY/FWDNOANSWER 
recorded!\n");<BR>&nbsp;&nbsp;&nbsp;lookup("location");<BR>&nbsp;&nbsp;};<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;t_on_failure("1");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;route(1);<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>route[1] <BR>{<BR>&nbsp;if (isflagset(6)) 
<BR>&nbsp;&nbsp;force_rtp_proxy();</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;if (isflagset(28)){<BR>&nbsp;&nbsp;avp_pushto("$ruri", 
"s:fwdnoanswer");<BR>&nbsp;&nbsp;append_branch();<BR>&nbsp;&nbsp;lookup("location");<BR>&nbsp;&nbsp;xlog("L_INFO", 
"No answer, relaying after lookup. method &lt;%rm&gt; From &lt;%fu&gt; To 
&lt;%tu&gt; Contact &lt;%ct&gt; r-uri &lt;%ru&gt;\n");<BR>&nbsp;};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;t_relay();<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>failure_route[1] {<BR>&nbsp;if (t_check_status("487")) 
{<BR>&nbsp;&nbsp;break;<BR>&nbsp;};<BR>&nbsp;if (isflagset(27) &amp;&amp; 
t_check_status("408")) 
{<BR>&nbsp;&nbsp;revert_uri();<BR>&nbsp;&nbsp;setflag(28);<BR>&nbsp;&nbsp;route(1);<BR>&nbsp;};<BR>}<BR></FONT></DIV></BODY></HTML>