Hi Greger,
Thanks for replying and your help. I was able to solve the issue. But now
the call forward on no answer and busy are failing due to a different
reason. I get the following error message on the /var/log/messages
May 17 15:22:54 localhost /usr/local/sbin/ser[28719]: ERROR:
t_forward_nonack: no branched for forwarding
May 17 15:22:54 localhost /usr/local/sbin/ser[28719]: ERROR: w_t_relay
(failure mode): forwarding failed
May 17 15:22:54 localhost /usr/local/sbin/ser[28719]: ERROR: sl_reply_error
used: I'm terribly sorry, server error occurred (1/SL)
I observed in one of the mailing list that the solution for this problem is
to change the uri to the new, then append_branch. Any suggestions on how to
do this? Please point me to the change that is needed to solve this issue.
Here's the chunk of code for your reference from my ser.cfg:
# -----------------------------------------------------------------
# INVITE Message Handler
# -----------------------------------------------------------------
if (client_nat_test("3")) {
setflag(7);
force_rport();
fix_nated_contact();
};
if (!allow_trusted()) {
if (!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
break;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
break;
};
consume_credentials();
};
if (uri=~"^sip:1[0-9]{10}@") {
strip(1);
};
lookup("aliases");
if (!is_uri_host_local()) {
route(4);
route(1);
break;
};
if (uri=~"^sip:011[0-9]*@") {
route(4);
route(5);
break;
};
if (avp_db_load("$ruri/username", "s:callfwd")) {
setflag(22);
avp_pushto("$ruri", "s:callfwd");
route(6);
break;
};
if (!lookup("location")) {
if (uri=~"^sip:[0-9]{10}@") {
route(4);
route(5);
break;
};
sl_send_reply("404", "User Not Found");
break;
};
if (avp_db_load("$ruri/username", "s:fwdbusy")) {
if (!avp_check("s:fwdbusy", "eq/$ruri/i")) {
setflag(26);
};
};
if (avp_db_load("$ruri/username", "s:fwdnoanswer")) {
if (!avp_check("s:fwdnoanswer", "eq/$ruri/i")) {
setflag(27);
};
};
t_on_failure("1");
route(4);
route(1);
}
route[4] {
# -----------------------------------------------------------------
# NAT Traversal Section
# -----------------------------------------------------------------
if (isflagset(6) || isflagset(7)) {
if (!isflagset(8)) {
setflag(8);
use_media_proxy();
};
};
}
route[5] {
# -----------------------------------------------------------------
# PSTN Handler
# -----------------------------------------------------------------
rewritehost("192.0.2.245"); # INSERT YOUR PSTN GATEWAY IP ADDRESS
avp_write("i:45", "inv_timeout");
t_on_failure("1");
route(1);
}
route[6] {
# ------------------------------------------------------------------------
# Call Forwarding Reply Route Handler
#
# This must be done as a route block because sl_send_reply() cannot be
# called from the failure_route block
# ------------------------------------------------------------------------
if (uri=~"^sip:1[0-9]{10}@") {
strip(1);
};
lookup("aliases");
if (!is_uri_host_local()) {
if (!isflagset(22)) {
append_branch();
};
route(4);
route(1);
break;
};
if (uri=~"^sip:011[0-9]*@") {
route(4);
route(5);
break;
};
if (!lookup("location")) {
if (uri=~"^sip:[0-9]{10}@") {
route(4);
route(1);
break;
};
sl_send_reply("404", "User Not Found");
};
route(4);
route(1);
}
onreply_route[1] {
if ((isflagset(6) || isflagset(7)) &&
(status=~"(180)|(183)|2[0-9][0-9]")) {
if (!search("^Content-Length:[ ]*0")) {
use_media_proxy();
};
};
if (client_nat_test("1")) {
fix_nated_contact();
};
}
failure_route[1] {
if (t_check_status("487")) {
break;
};
if (isflagset(26) && t_check_status("486")) {
if (avp_pushto("$ruri", "s:fwdbusy")) {
avp_delete("s:fwdbusy");
resetflag(26);
route(6);
break;
};
};
if (isflagset(27) && t_check_status("408")) {
if (avp_pushto("$ruri", "s:fwdnoanswer")) {
avp_delete("s:fwdnoanswer");
resetflag(27);
route(6);
break;
};
};
end_media_session();
}
Thanks again,
Ranganath B
On 5/17/07, Greger Viken Teigre <greger(a)teigre.com> wrote:
Well,
ser.iptel.org does not exist in dns, so that's a uri that fails. Try
a working uri.
g-)
------- Original message -------
From: Ranganath B <ranganath.b(a)gmail.com>
Sent: 16.5.'07, 19:42
Hi,
I could get the blind (unconditional) call forward option working with
the
configuration that is provided in the IPTEL website but using the same
config file
and the ideas provided I couldn't get the call forward on busy and no
answer working. I get the following error in the /var/log/messages:
May 16 15:49:52 localhost /usr/local/sbin/ser[17563]: ERROR: mk_proxy:
could not
resolve hostname: " ser.iptel.org"
May 16 15:49:52 localhost
/usr/local/sbin/ser[17563]: ERROR: uri2proxy:
bad host name in URI <
sip:1234@ser.iptel.org >
May 16 15:49:52 localhost
/usr/local/sbin/ser[17563]: ERROR:
t_forward_nonack: failure to add branches
May 16 15:49:52 localhost
/usr/local/sbin/ser[17563]: ERROR: w_t_relay
(failure mode): forwarding failed
May 16 15:49:52 localhost
/usr/local/sbin/ser[17563]: error:
mediaproxy/sendMediaproxyCommand(): can't
connect to MediaProxy
May 16 15:49:52 localhost
/usr/local/sbin/ser[17563]: ERROR:
sl_reply_error used: I'm terribly sorry,
server error occurred (1/SL)
It would be of great help if anybody provide me input on how to resolve
this issue
or a configuration file using which I can get the call forward on
busy and
no response working. BTW, I am using the ser verison: 0.9.6 . I have
populated an entry for call forward no answer/busy in the mysql database for
the table
"usr_preferences". Thanks in advance.
Regards,
Ranganath B