mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 08:05:37 +00:00
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.
This commit is contained in:
parent
6ef27805d8
commit
f859a404f8
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user