From: Brian West Date: Mon, 5 Nov 2018 21:03:14 +0000 (-0600) Subject: FS-11504: [core] do not send reneg event if call is not answered X-Git-Tag: v1.10.0~225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e06ed5ad19238da90eb65875d8ca33a64478b9d9;p=thirdparty%2Ffreeswitch.git FS-11504: [core] do not send reneg event if call is not answered --- diff --git a/src/switch_ivr.c b/src/switch_ivr.c index a448a5e67e..13de6a0fb6 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -2115,7 +2115,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_ return SWITCH_STATUS_FALSE; } - if ((flow = switch_core_session_media_flow(session, SWITCH_MEDIA_TYPE_AUDIO)) != SWITCH_MEDIA_FLOW_SENDRECV) { + if (switch_channel_test_flag(channel, CF_ANSWERED) && + (flow = switch_core_session_media_flow(session, SWITCH_MEDIA_TYPE_AUDIO)) != SWITCH_MEDIA_FLOW_SENDRECV) { switch_core_session_message_t msg = { 0 }; msg.message_id = SWITCH_MESSAGE_INDICATE_MEDIA_RENEG;