mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-31 07:34:19 +00:00
fix issue with global bypass_media_after_bridge messing up callflow
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15404 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
92896c6c36
commit
275e919f3c
6 files changed
+20
-19
No files matched your search
@@ -2144,7 +2144,7 @@ SWITCH_STANDARD_APP(audio_bridge_function)
|
||||
{
|
||||
switch_channel_t *caller_channel = switch_core_session_get_channel(session);
|
||||
switch_core_session_t *peer_session = NULL;
|
||||
const char *continue_on_fail = NULL, *failure_causes = NULL,
|
||||
const char *continue_on_fail = NULL, *failure_causes = NULL,
|
||||
*v_campon = NULL, *v_campon_retries, *v_campon_sleep, *v_campon_timeout, *v_campon_fallback_exten = NULL;
|
||||
switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
|
||||
int campon_retries = 100, campon_timeout = 10, campon_sleep = 10, tmp, camping = 0, fail = 0, thread_started = 0;
|
||||
@@ -2383,6 +2383,10 @@ SWITCH_STANDARD_APP(audio_bridge_function)
|
||||
b_key = NULL;
|
||||
}
|
||||
|
||||
if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE))) {
|
||||
switch_channel_set_flag(caller_channel, CF_BYPASS_MEDIA_AFTER_BRIDGE);
|
||||
}
|
||||
|
||||
switch_ivr_multi_threaded_bridge(session, peer_session, func, a_key, a_key);
|
||||
}
|
||||
|
||||
|
||||
@@ -727,7 +727,7 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
|
||||
}
|
||||
|
||||
while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session) && !switch_channel_test_flag(channel, CF_REQ_MEDIA))) {
|
||||
if (--sanity && switch_channel_ready(channel)) {
|
||||
if (--sanity && switch_channel_up(channel)) {
|
||||
switch_yield(10000);
|
||||
} else {
|
||||
switch_channel_hangup(tech_pvt->channel, SWITCH_CAUSE_RECOVERY_ON_TIMER_EXPIRE);
|
||||
|
||||
@@ -3922,7 +3922,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
|
||||
SOATAG_ORDERED_USER(1), SOATAG_AUDIO_AUX("cn telephone-event"),
|
||||
TAG_IF(sofia_test_pflag(profile, PFLAG_DISABLE_100REL), NUTAG_INCLUDE_EXTRA_SDP(1)), TAG_END());
|
||||
launch_media_on_hold(session);
|
||||
|
||||
|
||||
switch_core_session_rwunlock(other_session);
|
||||
goto done;
|
||||
}
|
||||
@@ -4391,14 +4391,6 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
||||
if (refer_to->r_url->url_headers && (rep = (char *)switch_stristr("Replaces=", refer_to->r_url->url_headers))) {
|
||||
sip_replaces_t *replaces;
|
||||
nua_handle_t *bnh;
|
||||
|
||||
if (switch_channel_test_flag(channel_a, CF_PROXY_MODE)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Cannot Attended Transfer BYPASS MEDIA CALLS!\n");
|
||||
switch_channel_set_variable(channel_a, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "ATTENDED_TRANSFER_ERROR");
|
||||
nua_notify(tech_pvt->nh, NUTAG_NEWSUB(1), SIPTAG_CONTENT_TYPE_STR("message/sipfrag"),
|
||||
NUTAG_SUBSTATE(nua_substate_terminated), SIPTAG_PAYLOAD_STR("SIP/2.0 403 Forbidden"), SIPTAG_EVENT_STR(etmp), TAG_END());
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (rep) {
|
||||
const char *br_a = NULL, *br_b = NULL;
|
||||
@@ -4515,7 +4507,7 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
||||
|
||||
if ((profile->media_options & MEDIA_OPT_BYPASS_AFTER_ATT_XFER) && (tmp = switch_core_session_locate(br_b))) {
|
||||
switch_channel_t *tchannel = switch_core_session_get_channel(tmp);
|
||||
switch_channel_set_variable(tchannel, SWITCH_BYPASS_MEDIA_AFTER_BRIDGE_VARIABLE, "true");
|
||||
switch_channel_set_flag(tchannel, CF_BYPASS_MEDIA_AFTER_BRIDGE);
|
||||
switch_core_session_rwunlock(tmp);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user