FSCORE-479

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15329 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-11-03 16:50:16 +00:00
parent f2fdcf6b6f
commit ef9fa1df1a
4 changed files with 15 additions and 2 deletions

View File

@ -927,6 +927,8 @@ typedef enum {
CF_THREAD_SLEEPING,
CF_DISABLE_RINGBACK,
CF_NOT_READY,
CF_SIGNAL_BRIDGE_TTL,
CF_MEDIA_BRIDGE_TTL,
/* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
CF_FLAG_MAX
} switch_channel_flag_t;

View File

@ -768,7 +768,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_set_variable_partner_var_check(sw
SWITCH_DECLARE(uint32_t) switch_channel_test_flag(switch_channel_t *channel, switch_channel_flag_t flag)
{
switch_assert(channel != NULL);
return channel->flags[flag] ? 1 : 0;
return channel->flags[flag];
}
SWITCH_DECLARE(switch_bool_t) switch_channel_set_flag_partner(switch_channel_t *channel, switch_channel_flag_t flag)

View File

@ -77,7 +77,11 @@ static void switch_core_standard_on_routing(switch_core_session_t *session)
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s Standard ROUTING\n", switch_channel_get_name(session->channel));
if (switch_channel_test_flag(session->channel, CF_PROXY_MODE)) {
if (
(switch_channel_test_flag(session->channel, CF_ANSWERED) ||
switch_channel_test_flag(session->channel, CF_EARLY_MEDIA) ||
switch_channel_test_flag(session->channel, CF_SIGNAL_BRIDGE_TTL)) &&
switch_channel_test_flag(session->channel, CF_PROXY_MODE)) {
switch_ivr_media(session->uuid_str, SMF_NONE);
}

View File

@ -850,6 +850,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_signal_bridge(switch_core_session_t *
return SWITCH_STATUS_FALSE;
}
switch_channel_set_flag_recursive(caller_channel, CF_SIGNAL_BRIDGE_TTL);
switch_channel_set_flag_recursive(peer_channel, CF_SIGNAL_BRIDGE_TTL);
switch_channel_set_variable(caller_channel, SWITCH_SIGNAL_BRIDGE_VARIABLE, switch_core_session_get_uuid(peer_session));
switch_channel_set_variable(peer_channel, SWITCH_SIGNAL_BRIDGE_VARIABLE, switch_core_session_get_uuid(session));
@ -921,6 +924,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
return switch_ivr_signal_bridge(session, peer_session);
}
switch_channel_set_flag_recursive(caller_channel, CF_MEDIA_BRIDGE_TTL);
switch_channel_set_flag_recursive(peer_channel, CF_MEDIA_BRIDGE_TTL);
switch_channel_set_flag_recursive(caller_channel, CF_BRIDGE_ORIGINATOR);
switch_channel_clear_flag(peer_channel, CF_BRIDGE_ORIGINATOR);