prevent invalid state change

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7365 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-01-26 01:53:42 +00:00
parent 2a4a8e765c
commit 57317dffff
2 changed files with 12 additions and 4 deletions
+3 -1
View File
@@ -1808,7 +1808,9 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
switch_channel_set_flag(nchannel, CF_OUTBOUND);
switch_set_flag_locked(tech_pvt, TFLAG_OUTBOUND);
switch_clear_flag_locked(tech_pvt, TFLAG_LATE_NEGOTIATION);
switch_channel_set_state(nchannel, CS_INIT);
if (switch_channel_get_state(nchannel) == CS_NEW) {
switch_channel_set_state(nchannel, CS_INIT);
}
tech_pvt->caller_profile = caller_profile;
*new_session = nsession;
cause = SWITCH_CAUSE_SUCCESS;