On Nov 24, 2013, at 11:20 AM, Oliver Roth
<oliver.roth(a)triotel.ch> wrote:
Hi all
Question about error handling with kamailio.
We send call to carrier and get back error 404.
In carrierfailureroute we catch up this error and send call to an internal freeswitch
that plays a voiceprompt saying: “destination not available”
In accounting this calls is collected like a “normal” call – cause the internal
freeswitch did the connection.
I would like to play the voiceprompt but get the error 404 and see the call in the missed
calls acc table.
With 486 (busy) it is simple because we do not need an rtp response … just fast busy.
How can we handle this for errors we need to play a voiceprompt?
What we do in failure route:
failure_route[MANAGE_FAILURE] {
sip_trace();
setflag(22);
if (t_grep_status("486")){
xlog("L_INFO", "Status 486 - busy");
t_reply("486", "Busy");
exit;
}
revert_uri();
route(NATMANAGE);
if (t_is_canceled()) {
exit;
}
xlog("L_INFO", "failure_route rd: $rd replCode: $T_reply_code
trunk_in: $avp(s:trunk_in) Tree: $avp(s:tree), rU: $rU, todirection $avp(s:todirection)
fu: $fu\n");
if(!cr_next_domain("$avp(s:cr_pref_carr)", "$avp(s:tree)",
"$rU", "$avp(s:trunk_in)", "$T_reply_code",
"$avp(s:tree)" )){
xlog("cr_next_domain failed");
exit;
}
if(!cr_route("$avp(s:cr_pref_carr)", "$avp(s:tree)",
"$rU", "$rU", "call_id", "$avp(s:todirection)"
)){
xlog("cr_route failed");
exit;
}
xlog("L_INFO", "failure_route rd: $rd replCode: $T_reply_code
trunk_in: $avp(s:trunk_in) Tree: $avp(s:tree), rU: $rU, todirection $avp(s:todirection)
fu: $fu \n");
$avp(s:trunk_out) = $avp(s:todirection);
xlog(, "L_INFO", "RELAY - FailureRoute: Outbound sent via
$avp(s:trunk_out) rU $rU --------------------------------------------------------
");
if (is_method("INVITE"))
{
setflag(FLT_ACC); # do accounting
setflag(FLT_ACCMISSED); # oro 28.10.13
}
route(ALTERHEADER);
t_on_failure("MANAGE_FAILURE");
#append_branch();
if (!t_relay()) {
xlog("failureroute t_relay failed");
exit;
}
}
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users