From 25d176d3efe99fbcaabcc6e0146a5183ee8f13fa Mon Sep 17 00:00:00 2001 From: lazedo Date: Thu, 18 Jun 2020 11:01:53 +0000 Subject: [PATCH] override 480 if call is progress * FLAG_SESSION_PROGRESS is set when the media server sends a 180/183 which is triggered after a route reply. if there are no endpoints to bridge to (dnd, faulty callflow) the return code from the media can be 480 if not set explicitly by callflow action. in that case we were passing it to the incoming leg carrier/endpoint and some carriers retry the call which we don't want. --- kamailio/default.cfg | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kamailio/default.cfg b/kamailio/default.cfg index d9fb9e6..53c8344 100644 --- a/kamailio/default.cfg +++ b/kamailio/default.cfg @@ -744,6 +744,10 @@ failure_route[INTERNAL_FAULT] xlog("L_INFO", "$ci|failure|ignoring call barred\n"); } else if (isflagset(FLAG_SESSION_PROGRESS)) { xlog("L_INFO", "$ci|failure|ignoring failure after session progress\n"); + if (t_check_status("480")) { + xlog("L_INFO", "$ci|failure|overriding reply code 480 with 486\n"); + send_reply("486", "Endpoint Not Available"); + } } else if (t_check_status("403") && $T_reply_reason=="Forbidden") { xlog("L_WARNING", "$ci|failure|Failed auth from IP $si\n"); } else if (t_check_status("(401)|(486)")) {