From: Michael Jerris Date: Wed, 22 Jul 2015 16:00:54 +0000 (-0500) Subject: FS-7872: [mod_verto] handle attempting to transfer 1 legged call gracefully X-Git-Tag: v1.4.21~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79a99dfc8a1382bcd3f0a8dd11a240ca4f16c282;p=thirdparty%2Ffreeswitch.git FS-7872: [mod_verto] handle attempting to transfer 1 legged call gracefully --- diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index ab7efd2812..d392f130b3 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -2723,24 +2723,23 @@ static switch_bool_t attended_transfer(switch_core_session_t *session, switch_co tech_pvt = switch_core_session_get_private_class(session, SWITCH_PVT_SECONDARY); b_tech_pvt = switch_core_session_get_private_class(b_session, SWITCH_PVT_SECONDARY); - switch_assert(b_tech_pvt); - switch_assert(tech_pvt); - - switch_channel_set_variable(tech_pvt->channel, "refer_uuid", switch_core_session_get_uuid(b_tech_pvt->session)); - switch_channel_set_variable(b_tech_pvt->channel, "transfer_disposition", "replaced"); + if (tech_pvt && b_tech_pvt) { + switch_channel_set_variable(tech_pvt->channel, "refer_uuid", switch_core_session_get_uuid(b_tech_pvt->session)); + switch_channel_set_variable(b_tech_pvt->channel, "transfer_disposition", "replaced"); - br_a = switch_channel_get_partner_uuid(tech_pvt->channel); - br_b = switch_channel_get_partner_uuid(b_tech_pvt->channel); + br_a = switch_channel_get_partner_uuid(tech_pvt->channel); + br_b = switch_channel_get_partner_uuid(b_tech_pvt->channel); - if (!switch_ivr_uuid_exists(br_a)) { - br_a = NULL; - } + if (!switch_ivr_uuid_exists(br_a)) { + br_a = NULL; + } - if (!switch_ivr_uuid_exists(br_b)) { - br_b = NULL; + if (!switch_ivr_uuid_exists(br_b)) { + br_b = NULL; + } } - if (switch_channel_test_flag(b_tech_pvt->channel, CF_ORIGINATOR)) { + if (tech_pvt && b_tech_pvt && switch_channel_test_flag(b_tech_pvt->channel, CF_ORIGINATOR)) { switch_core_session_t *a_session; switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE,