提交 7afd4cae authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-4677

上级 61033f42
...@@ -934,7 +934,7 @@ static void send_conference_data(sofia_profile_t *profile, switch_event_t *event ...@@ -934,7 +934,7 @@ static void send_conference_data(sofia_profile_t *profile, switch_event_t *event
sql = switch_mprintf("select full_to, full_from, contact %q ';_;isfocus', expires, call_id, event, network_ip, network_port, " sql = switch_mprintf("select full_to, full_from, contact %q ';_;isfocus', expires, call_id, event, network_ip, network_port, "
"'%q' as ct,'%q' as pt " "'%q' as ct,'%q' as pt "
" from sip_subscriptions where " " from sip_subscriptions where "
"hostname='%q' and profile_name='%q' and sub_to_user='%q' and sub_to_host='%q' and event='%q'" "hostname='%q' and profile_name='%q' and sub_to_user='%q' and sub_to_host='%q' and event='%q' "
"and call_id = '%q' ", "and call_id = '%q' ",
switch_sql_concat(), switch_sql_concat(),
type, type,
...@@ -956,10 +956,19 @@ static void send_conference_data(sofia_profile_t *profile, switch_event_t *event ...@@ -956,10 +956,19 @@ static void send_conference_data(sofia_profile_t *profile, switch_event_t *event
sofia_glue_execute_sql_callback(profile, profile->ireg_mutex, sql, sofia_presence_send_sql, &cb); sofia_glue_execute_sql_callback(profile, profile->ireg_mutex, sql, sofia_presence_send_sql, &cb);
if (switch_true(final)) { if (switch_true(final)) {
sql = switch_mprintf("delete from sip_subscriptions where " if (call_id) {
"hostname='%q' and profile_name='%q' and sub_to_user='%q' and sub_to_host='%q' and event='%q'", sql = switch_mprintf("delete from sip_subscriptions where "
mod_sofia_globals.hostname, profile->name, "hostname='%q' and profile_name='%q' and sub_to_user='%q' and sub_to_host='%q' and event='%q' "
from_user, from_host, event_str); "and call_id = '%q' ",
mod_sofia_globals.hostname, profile->name,
from_user, from_host, event_str, call_id);
} else {
sql = switch_mprintf("delete from sip_subscriptions where "
"hostname='%q' and profile_name='%q' and sub_to_user='%q' and sub_to_host='%q' and event='%q'",
mod_sofia_globals.hostname, profile->name,
from_user, from_host, event_str);
}
sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE); sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论