<!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> </DIV>
<DIV><FONT size=2>In route[1], I used:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>if (isflagset(28)){<BR> avp_pushto("$ruri",
"s:fwdnoanswer");<BR> append_branch();<BR> lookup("location");<BR> xlog("L_INFO",
"No answer, relaying after lookup. method <%rm> From <%fu> To
<%tu> Contact <%ct> r-uri <%ru>\n");<BR>};</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>t_relay();</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>In failure _route[1], I used:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>if (isflagset(27) && t_check_status("408"))
{<BR> setflag(28);</FONT></DIV>
<DIV><FONT
size=2> revert_uri();<BR> 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 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> </DIV>
<DIV>Anyone can help? It's urgent! Thank you so much!</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Jerry.</DIV>
<DIV> </DIV>
<DIV>P.S., here is my original ser.cfg. Just for your reference:</DIV>
<DIV>=============================================================================<BR>debug=3
# debug level (cmd line: -dddddddddd)<BR>fork=no<BR>log_stderror=yes # (cmd
line: -E)</DIV>
<DIV> </DIV>
<DIV>listen=xx.xx.xx.xx</DIV>
<DIV> </DIV>
<DIV>check_via=no # (cmd. line:
-v)<BR>dns=no #
(cmd. line: -r)<BR>rev_dns=no # (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> </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> </DIV>
<DIV># ----------------- setting module-specific parameters
---------------<BR>modparam("rr", "enable_full_lr", 1)</DIV>
<DIV> </DIV>
<DIV>modparam("registrar", "nat_flag", 6)<BR>modparam("nathelper",
"natping_interval", 30) # Ping interval 30 s<BR>modparam("nathelper",
"ping_nated_only", 1) # Ping only clients behind NAT</DIV>
<DIV> </DIV>
<DIV>modparam("tm", "fr_timer", 20 )<BR>modparam("tm", "fr_inv_timer", 30
)</DIV>
<DIV> </DIV>
<DIV>modparam("usrloc", "db_mode", 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> </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> </DIV>
<DIV>modparam("avpops", "avp_url",
"mysql://ser:heslo@localhost/ser")<BR>modparam("avpops", "avp_table",
"usr_preferences")</DIV>
<DIV> </DIV>
<DIV># ------------------------- request routing logic
-------------------<BR>route<BR>{<BR> if (!mf_process_maxfwd_header("10"))
{<BR> sl_send_reply("483","Too Many
Hops");<BR> break;<BR> };<BR> if (msg:len >=
max_len ) {<BR> sl_send_reply("513", "Message too
big");<BR> break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (method == "REGISTER" || ! search("^Record-Route:"))
{<BR> fix_nated_contact(); # Rewrite contact with source IP of
signalling<BR> if (method == "INVITE")
<BR> {<BR> fix_nated_sdp("1"); # Add
direction=active to SDP<BR> };<BR> force_rport(); # Add
rport parameter to topmost Via<BR> setflag(6); #
Mark as NATed<BR> };</DIV>
<DIV> </DIV>
<DIV> setflag(1); # used for acc.</DIV>
<DIV> </DIV>
<DIV> if (method=="INVITE")<BR> log(1, "INVITE
message received\n");</DIV>
<DIV> </DIV>
<DIV> if (method=="ACK")<BR> log(1, "ACK message
received\n");</DIV>
<DIV> </DIV>
<DIV> if (method=="BYE")<BR> log(1, "BYE message
received\n");</DIV>
<DIV> </DIV>
<DIV> if (method=="CANCEL")<BR> log(1, "CANCEL
message received\n");</DIV>
<DIV> </DIV>
<DIV> if (!method=="REGISTER") <BR>
record_route(); </DIV>
<DIV> </DIV>
<DIV> if (loose_route())
{<BR> route(1);<BR> break;<BR> };<BR> <BR> if
(uri!=myself) {<BR> route(1);<BR> break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (method=="REGISTER")
{<BR> save("location");<BR> break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (method=="INVITE") {<BR> if
(avp_db_load("$ruri/username", "s:fwdnoanswer"))
{<BR> setflag(27);<BR> log(1, "dbg:
FWDBUSY/FWDNOANSWER
recorded!\n");<BR> lookup("location");<BR> };<BR> };</DIV>
<DIV> </DIV>
<DIV> t_on_failure("1");</DIV>
<DIV> </DIV>
<DIV> route(1);<BR>}</DIV>
<DIV> </DIV>
<DIV>route[1] <BR>{<BR> if (isflagset(6))
<BR> force_rtp_proxy();</DIV>
<DIV> </DIV>
<DIV> if (isflagset(28)){<BR> avp_pushto("$ruri",
"s:fwdnoanswer");<BR> append_branch();<BR> lookup("location");<BR> xlog("L_INFO",
"No answer, relaying after lookup. method <%rm> From <%fu> To
<%tu> Contact <%ct> r-uri <%ru>\n");<BR> };</DIV>
<DIV> </DIV>
<DIV> t_relay();<BR>}</DIV>
<DIV> </DIV>
<DIV>failure_route[1] {<BR> if (t_check_status("487"))
{<BR> break;<BR> };<BR> if (isflagset(27) &&
t_check_status("408"))
{<BR> revert_uri();<BR> setflag(28);<BR> route(1);<BR> };<BR>}<BR></FONT></DIV></BODY></HTML>