case SWITCH_EVENT_CHANNEL_DESTROY:
sql = switch_mprintf("delete from channels where uuid='%q' and hostname='%q'",
switch_event_get_header_nil(event, "unique-id"), switch_core_get_variable("hostname"));
+ printf("%s\n", sql);
break;
case SWITCH_EVENT_CHANNEL_UUID:
{
}
if (sql) {
- if (switch_stristr("update channels", sql)) {
+ if (switch_stristr("update channels", sql) || switch_stristr("delete from channels", sql)) {
switch_queue_push(sql_manager.sql_queue[1], sql);
} else {
switch_queue_push(sql_manager.sql_queue[0], sql);