fix linksys transfers
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10429 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
84c502eb1b
commit
65f179ca92
|
@ -527,6 +527,7 @@ static switch_status_t uuid_bridge_on_reset(switch_core_session_t *session)
|
|||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CUSTOM RESET\n", switch_channel_get_name(channel));
|
||||
|
||||
switch_channel_clear_flag(channel, CF_TRANSFER);
|
||||
switch_channel_clear_flag(channel, CF_ORIGINATING);
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_ORIGINATOR)) {
|
||||
switch_channel_set_state(channel, CS_SOFT_EXECUTE);
|
||||
|
|
|
@ -1645,16 +1645,18 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||
continue;
|
||||
}
|
||||
|
||||
switch_channel_clear_flag(peer_channels[i], CF_ORIGINATING);
|
||||
if (status == SWITCH_STATUS_SUCCESS) {
|
||||
switch_channel_clear_flag(peer_channels[i], CF_ORIGINATING);
|
||||
if (bleg && *bleg && *bleg == peer_sessions[i]) {
|
||||
continue;
|
||||
}
|
||||
} else if ((state=switch_channel_get_state(peer_channels[i])) < CS_HANGUP) {
|
||||
if (!(state == CS_RESET || switch_channel_test_flag(peer_channels[i], CF_TRANSFER))) {
|
||||
} else if ((state=switch_channel_get_state(peer_channels[i])) < CS_HANGUP && switch_channel_test_flag(peer_channels[i], CF_ORIGINATING)) {
|
||||
if (!(state == CS_RESET || switch_channel_test_flag(peer_channels[i], CF_TRANSFER) ||
|
||||
switch_channel_test_flag(peer_channels[i], CF_BRIDGED))) {
|
||||
switch_channel_hangup(peer_channels[i], *cause);
|
||||
}
|
||||
}
|
||||
switch_channel_clear_flag(peer_channels[i], CF_ORIGINATING);
|
||||
|
||||
switch_core_session_rwunlock(peer_sessions[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue