mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
fix sdp pass-thru of 200 OK in proxy mode aka (bypass_media=true)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7717 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -278,7 +278,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t
|
||||
}
|
||||
|
||||
|
||||
if (read_codec && (ringback_data || !switch_channel_test_flag(caller_channel, CF_BYPASS_MEDIA))) {
|
||||
if (read_codec && (ringback_data ||
|
||||
(!(switch_channel_test_flag(caller_channel, CF_PROXY_MODE) && switch_channel_test_flag(caller_channel, CF_PROXY_MEDIA))))) {
|
||||
if (!(pass = (uint8_t) switch_test_flag(read_codec, SWITCH_CODEC_FLAG_PASSTHROUGH))) {
|
||||
if (switch_core_codec_init(&write_codec,
|
||||
"L16",
|
||||
@@ -915,7 +916,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
}
|
||||
|
||||
if (session && (read_codec = switch_core_session_get_read_codec(session)) &&
|
||||
(ringback_data || !switch_channel_test_flag(caller_channel, CF_BYPASS_MEDIA))) {
|
||||
(ringback_data ||
|
||||
(!(switch_channel_test_flag(caller_channel, CF_PROXY_MODE) && switch_channel_test_flag(caller_channel, CF_PROXY_MEDIA))))) {
|
||||
|
||||
if (!(pass = (uint8_t) switch_test_flag(read_codec, SWITCH_CODEC_FLAG_PASSTHROUGH))) {
|
||||
if (switch_core_codec_init(&write_codec,
|
||||
@@ -1027,7 +1029,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
}
|
||||
|
||||
/* read from the channel while we wait if the audio is up on it */
|
||||
if (session && (ringback_data || !switch_channel_test_flag(caller_channel, CF_BYPASS_MEDIA)) &&
|
||||
if (session && (ringback_data ||
|
||||
!(switch_channel_test_flag(caller_channel, CF_PROXY_MODE) && switch_channel_test_flag(caller_channel, CF_PROXY_MODE))) &&
|
||||
(switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA))) {
|
||||
switch_status_t tstatus = switch_core_session_read_frame(session, &read_frame, 1000, 0);
|
||||
|
||||
@@ -1085,7 +1088,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
idx = IDX_CANCEL;
|
||||
}
|
||||
|
||||
if (session && (ringback_data || !switch_channel_test_flag(caller_channel, CF_BYPASS_MEDIA))) {
|
||||
if (session && (ringback_data || !(switch_channel_test_flag(caller_channel, CF_PROXY_MODE) &&
|
||||
switch_channel_test_flag(caller_channel, CF_PROXY_MEDIA)))) {
|
||||
switch_core_session_reset(session, SWITCH_FALSE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user