From 5b71dffb8004c6e7045afeaf42c6a785c7496975 Mon Sep 17 00:00:00 2001 From: Spencer Thomason Date: Thu, 19 May 2016 13:28:01 -0700 Subject: [PATCH] FS-9183: [mod_sofia] Handle 415 Unsupported Media Type as 488 Handle 415 Unsupported Media Type the same as 488 Not Acceptable Here after t.38 ReINVITE. This resolves an issue where the call would fail and translates the response code to the more standard 488 Not Acceptable Here allowing the call to continue in audio mode. FS-9183 #resolve --- src/mod/endpoints/mod_sofia/sofia.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index dad12ed7b4..0330dc1941 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -6526,6 +6526,12 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status switch_core_media_proxy_remote_addr(session, NULL); } + if (status == 415) { + int new_status = 488; + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Overriding %d %s with %d\n", status, phrase, new_status); + status = new_status; + } + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Passing %d %s to other leg\n%s\n", status, phrase, switch_str_nil(r_sdp)); if (switch_core_session_compare(session, other_session)) {