{
struct hangup_helper *helper;
switch_core_session_t *session, *other_session;
- const char *other_uuid;
switch_assert(task);
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);