提交 997e9217 authored 作者: Anthony Minessale's avatar Anthony Minessale

add transfer command

上级 bf197196
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
color: #eeeeee; color: #eeeeee;
background-color: #0000ae; background-color: #0000ae;
font-face: arial; font-face: arial;
height:18px;
font-size:7pt;
} }
.ctlbtn:hover { .ctlbtn:hover {
......
This diff was suppressed by a .gitattributes entry.
...@@ -1192,13 +1192,15 @@ ...@@ -1192,13 +1192,15 @@
var box_id = "box_" + x; var box_id = "box_" + x;
var volup_id = "volume_in_up" + x; var volup_id = "volume_in_up" + x;
var voldn_id = "volume_in_dn" + x; var voldn_id = "volume_in_dn" + x;
var transfer_id = "transfer" + x;
var html = "<div id='" + box_id + "'>" + var html = "<div id='" + box_id + "'>" +
"<button class='ctlbtn' id='" + kick_id + "'>KICK</button>" + "<button class='ctlbtn' id='" + kick_id + "'>Kick</button>" +
"<button class='ctlbtn' id='" + tmute_id + "'>MUTE</button>" + "<button class='ctlbtn' id='" + tmute_id + "'>Mute</button>" +
"<button class='ctlbtn' id='" + voldn_id + "'>vol -</button>" + "<button class='ctlbtn' id='" + voldn_id + "'>Vol -</button>" +
"<button class='ctlbtn' id='" + volup_id + "'>vol +</button>" + "<button class='ctlbtn' id='" + volup_id + "'>Vol +</button>" +
"<button class='ctlbtn' id='" + transfer_id + "'>Transfer</button>" +
"</div>" "</div>"
; ;
...@@ -1218,6 +1220,11 @@ ...@@ -1218,6 +1220,11 @@
$("#" + box_id).hide(); $("#" + box_id).hide();
}); });
$("#" + transfer_id).click(function() {
var xten = prompt("Enter Extension");
confMan.modCommand("transfer", x, xten);
});
$("#" + kick_id).click(function() { $("#" + kick_id).click(function() {
confMan.modCommand("kick", x); confMan.modCommand("kick", x);
}); });
...@@ -1261,13 +1268,13 @@ ...@@ -1261,13 +1268,13 @@
if (confMan.params.onBroadcast) { if (confMan.params.onBroadcast) {
confMan.params.onBroadcast(verto, confMan, e.data); confMan.params.onBroadcast(verto, confMan, e.data);
} }
if (confMan.params.displayID) { if (!confMan.destroyed && confMan.params.displayID) {
$(confMan.params.displayID).html(e.data.response + "<br><br>"); $(confMan.params.displayID).html(e.data.response + "<br><br>");
if (confMan.lastTimeout) { if (confMan.lastTimeout) {
clearTimeout(confMan.lastTimeout); clearTimeout(confMan.lastTimeout);
confMan.lastTimeout = 0; confMan.lastTimeout = 0;
} }
confMan.lastTimeout = setTimeout(function() { $(confMan.params.displayID).html("Moderator Controls Ready<br><br>")}, 4000); confMan.lastTimeout = setTimeout(function() { $(confMan.params.displayID).html(confMan.destroyed ? "" : "Moderator Controls Ready<br><br>")}, 4000);
} }
} }
...@@ -1361,6 +1368,8 @@ ...@@ -1361,6 +1368,8 @@
$.verto.confMan.prototype.destroy = function() { $.verto.confMan.prototype.destroy = function() {
var confMan = this; var confMan = this;
confMan.destroyed = true;
if (confMan.lt) { if (confMan.lt) {
confMan.lt.destroy(); confMan.lt.destroy();
} }
......
...@@ -1590,6 +1590,22 @@ static void conference_mod_event_channel_handler(const char *event_channel, cJSO ...@@ -1590,6 +1590,22 @@ static void conference_mod_event_channel_handler(const char *event_channel, cJSO
argv[1] = "all"; argv[1] = "all";
} }
exec = switch_mprintf("%s %s %s %s", conf_name, action, argv[0], argv[1]); exec = switch_mprintf("%s %s %s %s", conf_name, action, argv[0], argv[1]);
} else if (!strcasecmp(action, "transfer") && cid) {
conference_member_t *member;
conference_obj_t *conference;
exec = switch_mprintf("%s %s %s", argv[0], switch_str_nil(argv[1]), switch_str_nil(argv[2]));
stream.write_function(&stream, "+OK Call transferred to %s", argv[0]);
if ((conference = conference_find(conf_name, NULL))) {
if ((member = conference_member_get(conference, cid))) {
switch_ivr_session_transfer(member->session, argv[0], argv[1], argv[2]);
switch_thread_rwlock_unlock(member->rwlock);
}
switch_thread_rwlock_unlock(conference->rwlock);
}
goto end;
} }
if (exec) { if (exec) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论