From 4d27eb18d4c660565452e2aa134ae4aa05dbadba Mon Sep 17 00:00:00 2001 From: lazedo Date: Mon, 6 Jul 2020 14:52:34 +0000 Subject: [PATCH] configurable 480 reply from media with session in progress --- kamailio/default.cfg | 4 ++-- kamailio/defs.cfg | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/kamailio/default.cfg b/kamailio/default.cfg index 10451c6..637cc71 100644 --- a/kamailio/default.cfg +++ b/kamailio/default.cfg @@ -745,8 +745,8 @@ failure_route[INTERNAL_FAULT] } 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"); + xlog("L_INFO", "$ci|failure|overriding reply code 480 with $sel(cfg_get.kazoo.override_media_reply_480)\n"); + send_reply("$(sel(cfg_get.kazoo.override_media_reply_480){s.int})", "Endpoint Not Available"); } } else if (t_check_status("403") && $T_reply_reason=="Forbidden") { xlog("L_WARNING", "$ci|failure|Failed auth from IP $si\n"); diff --git a/kamailio/defs.cfg b/kamailio/defs.cfg index 0700322..6fe8d3f 100644 --- a/kamailio/defs.cfg +++ b/kamailio/defs.cfg @@ -21,6 +21,8 @@ #!trydef EXTERNAL_TO_INTERNAL_NO_RESPONSE_18X_TIMER 45000 #!trydef INTERNAL_TO_EXTERNAL_NO_RESPONSE_18X_TIMER 45000 +#!trydef OVERRIDE_MEDIA_REPLY_480 603 + kazoo.to_internal_no_response_timer = EXTERNAL_TO_INTERNAL_NO_RESPONSE_TIMER descr "external to internal no response timer" kazoo.to_external_no_response_timer = INTERNAL_TO_EXTERNAL_NO_RESPONSE_TIMER descr "internal to external no response timer" @@ -33,6 +35,8 @@ kazoo.to_external_no_response_100_timer = INTERNAL_TO_EXTERNAL_NO_RESPONSE_100_T kazoo.to_internal_no_response_18X_timer = EXTERNAL_TO_INTERNAL_NO_RESPONSE_18X_TIMER descr "external to internal no response timer after 18X" kazoo.to_external_no_response_18X_timer = INTERNAL_TO_EXTERNAL_NO_RESPONSE_18X_TIMER descr "internal to external no response timer after 18X" +kazoo.override_media_reply_480 = OVERRIDE_MEDIA_REPLY_480 descr "sip code to send upstream when media returns 480 with session in progress" + #!ifndef MY_HOSTNAME #!substdef "!MY_HOSTNAME!$HN(f)!g" #!endif