提交 4371d3c8 authored 作者: Leon de Rooij's avatar Leon de Rooij

Merge branch 'master' of ssh://git.freeswitch.org/freeswitch

...@@ -2625,8 +2625,10 @@ SWITCH_STANDARD_API(cc_config_api_function) ...@@ -2625,8 +2625,10 @@ SWITCH_STANDARD_API(cc_config_api_function)
cc_queue_t *queue = NULL; cc_queue_t *queue = NULL;
if ((queue = get_queue(queue_name))) { if ((queue = get_queue(queue_name))) {
queue_rwunlock(queue); queue_rwunlock(queue);
}
stream->write_function(stream, "%s", "+OK\n"); stream->write_function(stream, "%s", "+OK\n");
} else {
stream->write_function(stream, "%s", "-ERR Invalid Queue not found!\n");
}
} }
} else if (action && !strcasecmp(action, "unload")) { } else if (action && !strcasecmp(action, "unload")) {
if (argc-initial_argc < 1) { if (argc-initial_argc < 1) {
...@@ -2648,8 +2650,10 @@ SWITCH_STANDARD_API(cc_config_api_function) ...@@ -2648,8 +2650,10 @@ SWITCH_STANDARD_API(cc_config_api_function)
destroy_queue(queue_name, SWITCH_FALSE); destroy_queue(queue_name, SWITCH_FALSE);
if ((queue = get_queue(queue_name))) { if ((queue = get_queue(queue_name))) {
queue_rwunlock(queue); queue_rwunlock(queue);
}
stream->write_function(stream, "%s", "+OK\n"); stream->write_function(stream, "%s", "+OK\n");
} else {
stream->write_function(stream, "%s", "-ERR Invalid Queue not found!\n");
}
} }
} else if (action && !strcasecmp(action, "list")) { } else if (action && !strcasecmp(action, "list")) {
if (argc-initial_argc < 1) { if (argc-initial_argc < 1) {
...@@ -2671,7 +2675,6 @@ SWITCH_STANDARD_API(cc_config_api_function) ...@@ -2671,7 +2675,6 @@ SWITCH_STANDARD_API(cc_config_api_function)
goto done; goto done;
} else { } else {
const char *queue_name = argv[0 + initial_argc]; const char *queue_name = argv[0 + initial_argc];
struct list_result cbt; struct list_result cbt;
cbt.row_process = 0; cbt.row_process = 0;
cbt.stream = stream; cbt.stream = stream;
......
...@@ -1160,15 +1160,14 @@ static void core_event_handler(switch_event_t *event) ...@@ -1160,15 +1160,14 @@ static void core_event_handler(switch_event_t *event)
case SWITCH_EVENT_CHANNEL_DESTROY: case SWITCH_EVENT_CHANNEL_DESTROY:
{ {
const char *uuid = switch_event_get_header(event, "unique-id"); const char *uuid = switch_event_get_header(event, "unique-id");
const char *sig = switch_event_get_header(event, "signal_bridge");
if (uuid) { if (uuid) {
new_sql() = switch_mprintf("delete from channels where uuid='%q' and hostname='%q'", new_sql() = switch_mprintf("delete from channels where uuid='%q' and hostname='%q'",
uuid, switch_core_get_variable("hostname")); uuid, switch_core_get_variable("hostname"));
if (switch_true(sig)) {
new_sql() = switch_mprintf("delete from calls where (caller_uuid='%q' || callee_uuid='%q') and hostname='%q'", new_sql() = switch_mprintf("delete from calls where (caller_uuid='%q' or callee_uuid='%q') and hostname='%q'",
uuid, uuid, switch_core_get_variable("hostname")); uuid, uuid, switch_core_get_variable("hostname"));
}
} }
} }
break; break;
...@@ -1410,7 +1409,7 @@ static void core_event_handler(switch_event_t *event) ...@@ -1410,7 +1409,7 @@ static void core_event_handler(switch_event_t *event)
} }
break; break;
case SWITCH_EVENT_CHANNEL_UNBRIDGE: case SWITCH_EVENT_CHANNEL_UNBRIDGE:
new_sql() = switch_mprintf("delete from calls where caller_uuid='%s' and hostname='%q'", new_sql() = switch_mprintf("delete from calls where (caller_uuid='%s' or callee_uuid='%q') and hostname='%q'",
switch_event_get_header_nil(event, "caller-unique-id"), switch_core_get_variable("hostname")); switch_event_get_header_nil(event, "caller-unique-id"), switch_core_get_variable("hostname"));
break; break;
case SWITCH_EVENT_SHUTDOWN: case SWITCH_EVENT_SHUTDOWN:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论