提交 b97103d6 authored 作者: Seven Du's avatar Seven Du

Oops, we already have auto_update with pulling

Only use events to update calls when not pulling
上级 bd71934e
......@@ -728,11 +728,28 @@ function eventCallback(data) {
direction: data["Call-Direction"]
}
App.channelsController.pushObject(App.Channel.create(channel));
var x = $('#auto_update_calls')[0];
if (typeof x != "undefined" && x.checked) {
return;
}
App.callsController.pushObject(App.Call.create(channel));
} else if (data["Event-Name"] == "CHANNEL_HANGUP_COMPLETE") {
App.channelsController.delete(data["Unique-ID"]);
var x = $('#auto_update_calls')[0];
if (typeof x != "undefined" && x.checked) {
return;
}
App.callsController.delete(data["Unique-ID"]);
} else if (data["Event-Name"] == "CHANNEL_BRIDGE") {
var x = $('#auto_update_calls')[0];
if (typeof x != "undefined" && x.checked) {
return;
}
App.callsController.delete(data["Unique-ID"]);
App.callsController.delete(data["Other-Leg-Unique-ID"]);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论