From: Seven Du Date: Thu, 14 Nov 2019 04:31:20 +0000 (+0800) Subject: [core] use switch_core_session_get_partner in sched_hangup to hangup channel also... X-Git-Tag: v1.10.3^2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0aef355db47df0e8e17d3b76e80a67eab143643;p=thirdparty%2Ffreeswitch.git [core] use switch_core_session_get_partner in sched_hangup to hangup channel also in signalling bond state --- diff --git a/src/switch_ivr_async.c b/src/switch_ivr_async.c index becb7009cf..14d6a21c15 100644 --- a/src/switch_ivr_async.c +++ b/src/switch_ivr_async.c @@ -5163,7 +5163,6 @@ SWITCH_STANDARD_SCHED_FUNC(sch_hangup_callback) { struct hangup_helper *helper; switch_core_session_t *session, *other_session; - const char *other_uuid; switch_assert(task); @@ -5173,7 +5172,7 @@ SWITCH_STANDARD_SCHED_FUNC(sch_hangup_callback) switch_channel_t *channel = switch_core_session_get_channel(session); if (helper->bleg) { - if ((other_uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) && (other_session = switch_core_session_locate(other_uuid))) { + if (SWITCH_STATUS_SUCCESS == switch_core_session_get_partner(session, &other_session)) { switch_channel_t *other_channel = switch_core_session_get_channel(other_session); switch_channel_hangup(other_channel, helper->cause); switch_core_session_rwunlock(other_session);