mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 21:22:09 +00:00
FS-4406 please test asap and report back
This commit is contained in:
@@ -5041,11 +5041,13 @@ static void sofia_handle_sip_r_options(switch_core_session_t *session, int statu
|
||||
} else if (sofia_test_pflag(profile, PFLAG_UNREG_OPTIONS_FAIL) && (status != 200 && status != 486) && sip && sip->sip_to) {
|
||||
char *sql;
|
||||
time_t now = switch_epoch_time_now(NULL);
|
||||
const char *call_id = sip->sip_call_id->i_id;
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Expire registration '%s@%s' due to options failure\n",
|
||||
sip->sip_to->a_url->url_user, sip->sip_to->a_url->url_host);
|
||||
|
||||
sql = switch_mprintf("update sip_registrations set expires=%ld where sip_user='%s' and sip_host='%s'",
|
||||
(long) now, sip->sip_to->a_url->url_user, sip->sip_to->a_url->url_host);
|
||||
sql = switch_mprintf("update sip_registrations set expires=%ld where sip_user='%s' and sip_host='%s' and call_id='%q'",
|
||||
(long) now, sip->sip_to->a_url->url_user, sip->sip_to->a_url->url_host, call_id);
|
||||
sofia_glue_execute_sql(profile, &sql, SWITCH_TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user