|
|
|
@@ -173,10 +173,11 @@
|
|
|
|
|
# 71129-2025 - restricted callbacks count and list to campaign only
|
|
|
|
|
# 71226-1117 - added option to kick all calls from conference upon logout
|
|
|
|
|
# 80330-0823 - Added new AST_blind monitoring ability and minor cleanup for release
|
|
|
|
|
# 80402-0121 - Fixes for Manual Dial hangups and transfers
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
$version = '2.0.4-144';
|
|
|
|
|
$build = '80330-0823';
|
|
|
|
|
$version = '2.0.4-145';
|
|
|
|
|
$build = '80402-0121';
|
|
|
|
|
|
|
|
|
|
require("dbconnect.php");
|
|
|
|
|
|
|
|
|
@@ -1827,6 +1828,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
var DispO3wayCalLxfernumber = '';
|
|
|
|
|
var DispO3wayCalLcamptail = '';
|
|
|
|
|
var PausENotifYCounTer = 0;
|
|
|
|
|
var RedirecTxFEr = 0;
|
|
|
|
|
var phone_ip = '<? echo $phone_ip ?>';
|
|
|
|
|
var enable_sipsak_messages = '<? echo $enable_sipsak_messages ?>';
|
|
|
|
|
var allow_sipsak_messages = '<? echo $allow_sipsak_messages ?>';
|
|
|
|
@@ -2578,6 +2580,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
// Covers the following types: XFER, VMAIL, ENTRY, CONF, PARK, FROMPARK, XfeRLOCAL, XfeRINTERNAL, XfeRBLIND, VfeRVMAIL
|
|
|
|
|
function mainxfer_send_redirect(taskvar,taskxferconf,taskserverip,taskdebugnote)
|
|
|
|
|
{
|
|
|
|
|
if (auto_dial_level == 0) {RedirecTxFEr = 1;}
|
|
|
|
|
var xmlhttp=false;
|
|
|
|
|
/*@cc_on @*/
|
|
|
|
|
/*@if (@_jscript_version >= 5)
|
|
|
|
@@ -2650,7 +2653,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS;
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + blindxferdialstring + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (taskvar == 'XfeRINTERNAL')
|
|
|
|
@@ -2669,25 +2672,25 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
// "90009*$group**$lead_id**$phone_number*$user*";
|
|
|
|
|
var redirectdestination = closerxferinternal + '90009*' + XfeRSelecT.value + '**' + document.vicidial_form.lead_id.value + '**' + document.vicidial_form.phone_number.value + '*' + user + '*';
|
|
|
|
|
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS;
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectVD&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&auto_dial_level=" + auto_dial_level + "&campaign=" + campaign + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&secondS=" + VD_live_call_secondS + "&session_id=" + session_id;
|
|
|
|
|
}
|
|
|
|
|
if (taskvar == 'XfeR')
|
|
|
|
|
{
|
|
|
|
|
var queryCID = "LRvdcW" + epoch_sec + user_abb;
|
|
|
|
|
var redirectdestination = document.vicidial_form.extension_xfer.value;
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1";
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectName&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id;
|
|
|
|
|
}
|
|
|
|
|
if (taskvar == 'VMAIL')
|
|
|
|
|
{
|
|
|
|
|
var queryCID = "LVvdcW" + epoch_sec + user_abb;
|
|
|
|
|
var redirectdestination = document.vicidial_form.extension_xfer.value;
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1";
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectNameVmail&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + voicemail_dump_exten + "&extenName=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id;
|
|
|
|
|
}
|
|
|
|
|
if (taskvar == 'ENTRY')
|
|
|
|
|
{
|
|
|
|
|
var queryCID = "LEvdcW" + epoch_sec + user_abb;
|
|
|
|
|
var redirectdestination = document.vicidial_form.extension_xfer_entry.value;
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1";
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=Redirect&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id;
|
|
|
|
|
}
|
|
|
|
|
if (taskvar == '3WAY')
|
|
|
|
|
{
|
|
|
|
@@ -2709,7 +2712,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
DispO3wayCalLxfernumber = document.vicidial_form.xfernumber.value;
|
|
|
|
|
DispO3wayCalLcamptail = '';
|
|
|
|
|
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=" + XfeRSelecT.value;
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=" + redirecttype + "&format=text&channel=" + redirectvalue + "&call_server_ip=" + redirectserverip + "&queryCID=" + queryCID + "&exten=" + redirectdestination + "&ext_context=" + ext_context + "&ext_priority=1&extrachannel=" + redirectXTRAvalue + "&lead_id=" + document.vicidial_form.lead_id.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&phone_number=" + document.vicidial_form.phone_number.value+ "&filename=" + taskdebugnote + "&campaign=" + XfeRSelecT.value + "&session_id=" + session_id;
|
|
|
|
|
|
|
|
|
|
if (taskdebugnote == 'FIRST')
|
|
|
|
|
{
|
|
|
|
@@ -2722,7 +2725,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
var redirectdestination = taskxferconf;
|
|
|
|
|
var redirectdestserverip = taskserverip;
|
|
|
|
|
var parkedby = protocol + "/" + extension;
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby;
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id;
|
|
|
|
|
|
|
|
|
|
document.getElementById("ParkControl").innerHTML ="<a href=\"#\" onclick=\"mainxfer_send_redirect('FROMParK','" + redirectdestination + "','" + redirectdestserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_grabparkedcall.gif\" border=0 alt=\"Grab Parked Call\"></a>";
|
|
|
|
|
customerparked=1;
|
|
|
|
@@ -2743,7 +2746,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
{var dest_dialstring = session_id;}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1";
|
|
|
|
|
xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id;
|
|
|
|
|
|
|
|
|
|
document.getElementById("ParkControl").innerHTML ="<a href=\"#\" onclick=\"mainxfer_send_redirect('ParK','" + redirectdestination + "','" + redirectdestserverip + "');return false;\"><IMG SRC=\"./images/vdc_LB_parkcall.gif\" border=0 alt=\"Park Call\"></a>";
|
|
|
|
|
customerparked=0;
|
|
|
|
@@ -2764,11 +2767,55 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
}
|
|
|
|
|
delete xmlhttp;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// used to send second Redirect for manual dial calls
|
|
|
|
|
if (auto_dial_level == 0)
|
|
|
|
|
{
|
|
|
|
|
RedirecTxFEr = 1;
|
|
|
|
|
var xmlhttp=false;
|
|
|
|
|
/*@cc_on @*/
|
|
|
|
|
/*@if (@_jscript_version >= 5)
|
|
|
|
|
// JScript gives us Conditional compilation, we can cope with old IE versions.
|
|
|
|
|
// and security blocked creation of the objects.
|
|
|
|
|
try {
|
|
|
|
|
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
|
|
|
|
|
} catch (e) {
|
|
|
|
|
try {
|
|
|
|
|
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
|
|
|
|
} catch (E) {
|
|
|
|
|
xmlhttp = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@end @*/
|
|
|
|
|
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
|
|
|
|
|
{
|
|
|
|
|
xmlhttp = new XMLHttpRequest();
|
|
|
|
|
}
|
|
|
|
|
if (xmlhttp)
|
|
|
|
|
{
|
|
|
|
|
xmlhttp.open('POST', 'manager_send.php');
|
|
|
|
|
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
|
|
|
|
xmlhttp.send(xferredirect_query + "&stage=2NDXfeR");
|
|
|
|
|
xmlhttp.onreadystatechange = function()
|
|
|
|
|
{
|
|
|
|
|
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
|
|
|
|
|
{
|
|
|
|
|
Nactiveext = null;
|
|
|
|
|
Nactiveext = xmlhttp.responseText;
|
|
|
|
|
// alert(RedirecTxFEr + "|" + xmlhttp.responseText);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
delete xmlhttp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( (taskvar == 'XfeRLOCAL') || (taskvar == 'XfeRBLIND') || (taskvar == 'XfeRVMAIL') )
|
|
|
|
|
{
|
|
|
|
|
if (auto_dial_level == 0) {RedirecTxFEr = 1;}
|
|
|
|
|
document.vicidial_form.callchannel.value = '';
|
|
|
|
|
document.vicidial_form.callserverip.value = '';
|
|
|
|
|
if( document.images ) { document.images['livecall'].src = image_livecall_OFF.src;}
|
|
|
|
|
// alert(RedirecTxFEr + "|" + auto_dial_level);
|
|
|
|
|
dialedcall_send_hangup();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -2879,6 +2926,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
}
|
|
|
|
|
delete xmlhttp;
|
|
|
|
|
}
|
|
|
|
|
RedirecTxFEr=0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -4287,7 +4335,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
AgainCalLSecondS = VD_live_call_secondS;
|
|
|
|
|
AgaiNCalLCID = CalLCID;
|
|
|
|
|
var process_post_hangup=0;
|
|
|
|
|
if (MD_channel_look==1)
|
|
|
|
|
if ( (RedirecTxFEr < 1) && ( (MD_channel_look==1) || (auto_dial_level == 0) ) )
|
|
|
|
|
{
|
|
|
|
|
MD_channel_look=0;
|
|
|
|
|
DialTimeHangup();
|
|
|
|
@@ -4572,6 +4620,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
// Send Hangup command for any Local call that is not in the quiet(7) entry - used to stop manual dials even if no connect
|
|
|
|
|
function DialTimeHangup()
|
|
|
|
|
{
|
|
|
|
|
if (RedirecTxFEr < 1)
|
|
|
|
|
{
|
|
|
|
|
// alert("RedirecTxFEr|" + RedirecTxFEr);
|
|
|
|
|
MD_channel_look=0;
|
|
|
|
|
var xmlhttp=false;
|
|
|
|
|
/*@cc_on @*/
|
|
|
|
@@ -4610,6 +4661,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
|
|
|
|
}
|
|
|
|
|
delete xmlhttp;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|