failure_route[1] should be called when route[1] falls.
I can't see your route(1) at all (except that on beginning with #).
** For the list administrator: a good idea is to change the list to add a Reply-To header.
davor jovanovic wrote:
Hi all,
I have a problem with sending a call to PSTN gateway when user is offline. I always get „404 Not found“ what is normal because user is not in location database, but I don't understand why failure_route[1] doesn't work. Below is my ser.cfg so if someone could help.
I’m using ser 0.9.3.
Any help would be appreciated.
Thanks
route{
# initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if (msg:len >= max_len ) { sl_send_reply("513", "Message too big"); break; }; if (method=="REGISTER") record_route(); loose_route(); if (uri==myself) { if (method=="REGISTER") { if (!www_authorize("srce.hr", "subscriber")) { www_challenge("srce.hr", "0"); break; }; save("location"); break; }; lookup("aliases"); # if (!uri==myself) { # append_hf("P-hint: outbound alias\r\n"); # route(1); # break; # }; if (method=="INVITE"){ t_on_failure("1"); }; if (!lookup("location")) { sl_send_reply("404", "Not Found"); route(2); break; }; }; if (!t_relay()) { sl_reply_error(); };
}
############
route[2] {
# non-Voip -- just send "off-line" if (!(method == "INVITE" || method == "ACK" || method ==
"CANCEL")) {
sl_send_reply("404", "Not Found"); break; }; # forward to gateway rewritehostport("161.53.2.235:5060"); t_relay_to_udp("161.53.2.235", "5060");
}
failure_route[1] {
revert_uri(); rewritehostport("161.53.2.235:5060"); append_branch(); t_relay_to_udp("161.53.2.235", "5060");
}
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers