MODSOFIA-57 actually do the hangup handler, skipping sofiasip calls
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16655 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4bcb352602
commit
36542c2625
|
@ -381,13 +381,10 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
|||
int sip_cause = hangup_cause_to_sip(cause);
|
||||
const char *ps_cause = NULL, *use_my_cause;
|
||||
|
||||
if (sofia_test_pflag(tech_pvt->profile, PFLAG_DESTROY)) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
switch_mutex_lock(tech_pvt->sofia_mutex);
|
||||
|
||||
sofia_clear_flag(tech_pvt, TFLAG_RECOVERING);
|
||||
|
||||
sofia_glue_tech_untrack(tech_pvt->profile, session, SWITCH_TRUE);
|
||||
|
||||
if (!switch_channel_test_flag(channel, CF_ANSWERED)) {
|
||||
|
@ -414,7 +411,7 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
|||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Channel %s hanging up, cause: %s\n",
|
||||
switch_channel_get_name(channel), switch_channel_cause2str(cause));
|
||||
|
||||
if (tech_pvt->hash_key) {
|
||||
if (tech_pvt->hash_key && !sofia_test_pflag(tech_pvt->profile, PFLAG_DESTROY)) {
|
||||
switch_core_hash_delete(tech_pvt->profile->chat_hash, tech_pvt->hash_key);
|
||||
}
|
||||
|
||||
|
@ -430,7 +427,9 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
|||
switch_core_session_rwunlock(a_session);
|
||||
}
|
||||
|
||||
if (tech_pvt->nh && !sofia_test_flag(tech_pvt, TFLAG_BYE)) {
|
||||
if (sofia_test_pflag(tech_pvt->profile, PFLAG_DESTROY)) {
|
||||
sofia_set_flag(tech_pvt, TFLAG_BYE);
|
||||
} else if (tech_pvt->nh && !sofia_test_flag(tech_pvt, TFLAG_BYE)) {
|
||||
char reason[128] = "";
|
||||
char *bye_headers = sofia_glue_get_extra_headers(channel, SOFIA_SIP_BYE_HEADER_PREFIX);
|
||||
const char *val = NULL;
|
||||
|
@ -482,7 +481,6 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
sofia_set_flag_locked(tech_pvt, TFLAG_BYE);
|
||||
switch_safe_free(bye_headers);
|
||||
}
|
||||
|
|
|
@ -4701,8 +4701,7 @@ void sofia_glue_execute_sql_now(sofia_profile_t *profile, char **sqlp, switch_bo
|
|||
|
||||
switch_cache_db_handle_t *sofia_glue_get_db_handle(sofia_profile_t *profile)
|
||||
{
|
||||
switch_cache_db_connection_options_t options = { {0}
|
||||
};
|
||||
switch_cache_db_connection_options_t options = { {0} };
|
||||
switch_cache_db_handle_t *dbh = NULL;
|
||||
|
||||
if (!zstr(profile->odbc_dsn)) {
|
||||
|
|
Loading…
Reference in New Issue