From: Chris Rienzo Date: Tue, 28 Jul 2020 19:56:07 +0000 (-0400) Subject: [core] Do not log ERROR in switch_ivr_record_session() if media bug failed due to... X-Git-Tag: v1.10.7^2~101 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31fdf1b74682a5c188a7747f528b50033d11d261;p=thirdparty%2Ffreeswitch.git [core] Do not log ERROR in switch_ivr_record_session() if media bug failed due to hangup --- diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index d0e8a9e054..953d49ed7d 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -3238,7 +3238,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_record_session_event(switch_core_sess if ((status = switch_core_media_bug_add(session, "session_record", file, record_callback, rh, to, flags, &bug)) != SWITCH_STATUS_SUCCESS) { - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Error adding media bug for file %s\n", file); + if (switch_channel_ready(channel)) { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Error adding media bug for file %s\n", file); + } else { + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Error adding media bug for file %s\n", file); + } switch_goto_status(status, err); }