From f859a404f82eedf3ab582dc987fb9bb8e707a30e Mon Sep 17 00:00:00 2001 From: Brian West Date: Mon, 27 Mar 2017 11:42:18 -0500 Subject: [PATCH] FS-10183 [mod_sofia] Broadsoft Shared line pickup would fall if a-leg is PCMU and your pickup device has G722 as its first codec. --- src/mod/endpoints/mod_sofia/sofia.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 621129ac0e..a92820f3d9 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -10995,26 +10995,8 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia bridge_uuid = switch_channel_get_partner_uuid(b_channel); if (call_info) { - const char *olu; - switch_core_session_t *os; - switch_codec_implementation_t read_impl = { 0 }; - char *codec_str = ""; switch_event_t *event = NULL; - if (!zstr(bridge_uuid) && switch_channel_test_flag(b_channel, CF_LEG_HOLDING)) { - olu = bridge_uuid; - } else { - olu = b_private->uuid; - } - - if ((os = switch_core_session_locate(olu))) { - switch_core_session_get_real_read_impl(os, &read_impl); - switch_core_session_rwunlock(os); - - codec_str = switch_core_session_sprintf(session, "set:absolute_codec_string=%s@%di,", read_impl.iananame, - read_impl.microseconds_per_packet / 1000); - } - if (!zstr(bridge_uuid) && switch_channel_test_flag(b_channel, CF_LEG_HOLDING)) { const char *b_call_id = switch_channel_get_variable(b_channel, "sip_call_id"); @@ -11029,7 +11011,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia } switch_channel_set_flag(tech_pvt->channel, CF_SLA_INTERCEPT); tech_pvt->caller_profile->destination_number = switch_core_sprintf(tech_pvt->caller_profile->pool, - "%sanswer,intercept:%s", codec_str, bridge_uuid); + "answer,intercept:%s", bridge_uuid); if (sofia_test_pflag(profile, PFLAG_FIRE_TRANFER_EVENTS) && switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, MY_EVENT_REPLACED) == SWITCH_STATUS_SUCCESS) { @@ -11071,7 +11053,7 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia } tech_pvt->caller_profile->destination_number = switch_core_sprintf(tech_pvt->caller_profile->pool, - "%sanswer,sofia_sla:%s", codec_str, b_private->uuid); + "answer,sofia_sla:%s", b_private->uuid); } } else { char const *a_leg = NULL;