I'm using this piece of code as failure route:
failure_route[2] {
# ----- Re-Rutear menasje con CR -----
xlog("L_ERR", "Carrier fallo ruteando $ru\n"); if (t_check_status("408|404|5[0-9][0-9]|6[0-9][0-9]")) { if (!cr_next_domain("$avp(s:routeTree)", "$avp(s:rutaindice)", "$oU", "$avp(s:cr_host)", "$T_reply_code", "$avp(s:cfr_domain)")) { t_reply("404", "Not found"); exit; };
$avp(s:rutaindice) = $avp(s:cfr_domain);
if(!cr_route("$avp(s:routeTree)", "$avp(s:rutaindice)", "$oU", "$oU", "call_id")){ xlog("L_ERR", "No se encontraron mas carrier para rutear $rU\n"); t_reply("404", "Not found"); } else { xlog("L_ERR", "Se encontre otro carrier para rutear $rU\n"); append_branch(); route(2); }; } else { t_reply("404", "Not found"); exit; }; }
And right in the main route i have:
if (is_method("INVITE|BYE|CANCEL")) { setflag(1); setflag(2); }
In order to bill all messages.
Is there any error in the failure logic?
On Mon, Mar 30, 2009 at 1:02 PM, Henning Westerholt < henning.westerholt@1und1.de> wrote:
On Monday 30 March 2009, Uriel Rozenbaum wrote:
The issue I'm facing is that, when this happens I get no record on the missed_calls table, but only for this attempt; all other attempts are recorded.
This will impact on teh ASR calculation script we developed and the
routing
logic that uses those values.
Do you think it was fixed on 1.5?
Hi Uriel,
you should get an error in your script in this case, cr_next_domain return -1. So in your cfg kamailio will return 404 and exit the script. So i don't think its an error in cr, its probably related to the usage of the acc module in your cfg.
Cheers,
Henning