mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-22 03:04:18 +00:00
add optional call_id arg to sofia profile foo flush_inbound_reg [<call_id>]
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7965 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
d57e0387e6
commit
9943975660
3 files changed
+29
-4
No files matched your search
@@ -206,6 +206,24 @@ int sofia_reg_del_callback(void *pArg, int argc, char **argv, char **columnNames
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sofia_reg_expire_call_id(sofia_profile_t *profile, const char *call_id)
|
||||
{
|
||||
char sql[1024];
|
||||
char *psql = sql;
|
||||
|
||||
switch_snprintf(sql, sizeof(sql), "select *,'%s' from sip_registrations where call_id='%s'", profile->name, call_id);
|
||||
switch_mutex_lock(profile->ireg_mutex);
|
||||
sofia_glue_execute_sql_callback(profile,
|
||||
SWITCH_TRUE,
|
||||
NULL,
|
||||
sql,
|
||||
sofia_reg_del_callback,
|
||||
NULL);
|
||||
switch_mutex_unlock(profile->ireg_mutex);
|
||||
|
||||
switch_snprintf(sql, sizeof(sql), "delete from sip_registrations where call_id='%s'", call_id);
|
||||
sofia_glue_execute_sql(profile, &psql, SWITCH_FALSE);
|
||||
}
|
||||
|
||||
void sofia_reg_check_expire(sofia_profile_t *profile, time_t now)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user