added hard-coded vicidial.php option to allow for restriction of manual dialing to only the leads within the lists for the active campaigns

git-svn-id: svn://192.168.202.10@946 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2008-09-02 11:15:54 +00:00
parent 9b6c7e62da
commit 83f2b5aa45
2 changed files with 79 additions and 13 deletions
@@ -70,6 +70,7 @@
# - $omit_phone_code - ('Y','N')
# - $no_delete_sessions - ('0','1')
# - $LogouTKicKAlL - ('0','1');
# - $manual_dial_filter = ('NONE','CAMPLISTS','DNC','CAMPLISTS_DNC');
# CHANGELOG:
# 50629-1044 - First build of script
@@ -143,10 +144,12 @@
# 80128-1159 - fixed vicidial_log bugs
# 80402-0121 - Fixes for manual dial transfers on some systems, removed /n persist flag
# 80424-0442 - Added non_latin lookup from system_settings
# 80722-1000 - Fixed small bugs
# 80815-1020 - Added manual dial list restriction option
#
$version = '2.0.4-69';
$build = '80424-0442';
$version = '2.0.4-71';
$build = '80815-1020';
require("dbconnect.php");
@@ -281,6 +284,8 @@ if (isset($_GET["status"])) {$status=$_GET["status"];}
elseif (isset($_POST["status"])) {$status=$_POST["status"];}
if (isset($_GET["LogouTKicKAlL"])) {$LogouTKicKAlL=$_GET["LogouTKicKAlL"];}
elseif (isset($_POST["LogouTKicKAlL"])) {$LogouTKicKAlL=$_POST["LogouTKicKAlL"];}
if (isset($_GET["manual_dial_filter"])) {$manual_dial_filter=$_GET["manual_dial_filter"];}
elseif (isset($_POST["manual_dial_filter"])) {$manual_dial_filter=$_POST["manual_dial_filter"];}
header ("Content-type: text/html; charset=utf-8");
@@ -573,6 +578,33 @@ if ($ACTION == 'manDiaLnextCaLL')
exit;
}
}
if (ereg("CAMPLISTS",$manual_dial_filter))
{
$stmt="SELECT list_id,active from vicidial_lists where campaign_id='$campaign'";
$rslt=mysql_query($stmt, $link);
$lists_to_parse = mysql_num_rows($rslt);
$camp_lists='';
$o=0;
while ($lists_to_parse > $o)
{
$rowx=mysql_fetch_row($rslt);
if (ereg("Y", $rowx[1])) {$active_lists++; $camp_lists .= "'$rowx[0]',";}
if (ereg("N", $rowx[1])) {$inactive_lists++;}
$o++;
}
$camp_lists = eregi_replace(".$","",$camp_lists);
$stmt="SELECT count(*) FROM vicidial_list where phone_number='$phone_number' and list_id IN($camp_lists);";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$row=mysql_fetch_row($rslt);
if ($row[0] < 1)
{
echo "NUMBER NOT IN CAMPLISTS\n";
exit;
}
}
if ($stage=='lookup')
{
$stmt="SELECT lead_id FROM vicidial_list where phone_number='$phone_number' order by modify_date desc LIMIT 1;";
+45 -11
View File
@@ -177,10 +177,13 @@
# 80428-0413 - UTF8 changes and testing
# 80507-0932 - Fixed Script display bug (+ instead of space)
# 80519-1425 - Added calls in queue display
# 80722-1000 - Fixed quote display bug
# 80815-1015 - Added manual dial list restriction option
# 80823-2127 - Fixed form scroll for IE
#
$version = '2.0.4-148';
$build = '80519-1425';
$version = '2.0.4-151';
$build = '80823-2127';
require("dbconnect.php");
@@ -285,6 +288,7 @@ $PreseT_DiaL_LinKs = '1'; # set to 1 to show a DIAL link for Dial Presets
$LogiNAJAX = '1'; # set to 1 to do lookups
$HidEMonitoRSessionS = '1'; # set to 1 to hide remote monitoring channels from "session calls"
$LogouTKicKAlL = '1'; # set to 1 to hangup all calls in session upon agent logout
$CamPManDiaLLocK = '0'; # set to 1 to lock out all manual dials to only numbers in camp lists
$TEST_all_statuses = '0'; # TEST variable allows all statuses in dispo screen
@@ -348,6 +352,11 @@ echo "<html>\n";
echo "<head>\n";
echo "<!-- VERSION: $version BUILD: $build -->\n";
if ($CamPManDiaLLocK > 0)
{$manual_dial_filter = "CAMPLISTS_ONLY";}
else
{$manual_dial_filter = "NONE";}
if ($campaign_login_list > 0)
{
$camp_form_code = "<select size=1 name=VD_campaign id=VD_campaign onFocus=\"login_allowable_campaigns()\">\n";
@@ -1819,6 +1828,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var LogouTKicKAlL = '<? echo $LogouTKicKAlL ?>';
var flag_channels = '<? echo $flag_channels ?>';
var flag_string = '<? echo $flag_string ?>';
var manual_dial_filter = '<? echo $manual_dial_filter ?>';
var useIE = '<? echo $useIE ?>';
var DiaLControl_auto_HTML = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADready');\"><IMG SRC=\"./images/vdc_LB_resume.gif\" border=0 alt=\"Resume\"></a>";
var DiaLControl_auto_HTML_ready = "<a href=\"#\" onclick=\"AutoDial_ReSume_PauSe('VDADpause');\"><IMG SRC=\"./images/vdc_LB_pause.gif\" border=0 alt=\"Pause\"></a><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
var DiaLControl_auto_HTML_OFF = "<IMG SRC=\"./images/vdc_LB_pause_OFF.gif\" border=0 alt=\"Pause\"><IMG SRC=\"./images/vdc_LB_resume_OFF.gif\" border=0 alt=\"Resume\">";
@@ -3365,7 +3376,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
}
if (xmlhttp)
{
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&omit_phone_code=" + omit_phone_code;
manDiaLnext_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=manDiaLnextCaLL&conf_exten=" + session_id + "&user=" + user + "&pass=" + pass + "&campaign=" + campaign + "&ext_context=" + ext_context + "&dial_timeout=" + dial_timeout + "&dial_prefix=" + dial_prefix + "&campaign_cid=" + campaign_cid + "&preview=" + man_preview + "&agent_log_id=" + agent_log_id + "&callback_id=" + mdnCBid + "&lead_id=" + mdnBDleadid + "&phone_code=" + mdnDiaLCodE + "&phone_number=" + mdnPhonENumbeR + "&list_id=" + mdnLisT_id + "&stage=" + mdnStagE + "&use_internal_dnc=" + use_internal_dnc + "&omit_phone_code=" + omit_phone_code + "&manual_dial_filter=" + manual_dial_filter;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(manDiaLnext_query);
@@ -3379,14 +3390,36 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var MDnextResponse_array=MDnextResponse.split("\n");
MDnextCID = MDnextResponse_array[0];
if ( (MDnextCID == "HOPPER EMPTY") || (MDnextCID == "DNC NUMBER") )
var regMNCvar = new RegExp("HOPPER","ig");
var regMDFvarDNC = new RegExp("DNC","ig");
var regMDFvarCAMP = new RegExp("CAMPLISTS","ig");
if ( (MDnextCID.match(regMNCvar)) || (MDnextCID.match(regMDFvarDNC)) || (MDnextCID.match(regMDFvarCAMP)) )
{
if (MDnextCID == "HOPPER EMPTY")
{alert("No more leads in the hopper for campaign:\n" + campaign);}
else
{alert("This phone number is in the DNC list:\n" + mdnPhonENumbeR);}
var alert_displayed=0;
alt_phone_dialing=starting_alt_phone_dialing;
auto_dial_level=starting_dial_level;
MainPanelToFront();
CalLBacKsCounTCheck();
document.getElementById("DiaLControl").innerHTML = "<a href=\"#\" onclick=\"ManualDialNext('','','','','');\"><IMG SRC=\"./images/vdc_LB_dialnextnumber.gif\" border=0 alt=\"Dial Next Number\"></a>";
if (MDnextCID.match(regMNCvar))
{alert("No more leads in the hopper for campaign:\n" + campaign); alert_displayed=1;}
if (MDnextCID.match(regMDFvarDNC))
{alert("This phone number is in the DNC list:\n" + mdnPhonENumbeR); alert_displayed=1;}
if (MDnextCID.match(regMDFvarCAMP))
{alert("This phone number is not in the campaign lists:\n" + mdnPhonENumbeR); alert_displayed=1;}
if (alert_displayed==0)
{alert("Unspecified error:\n" + mdnPhonENumbeR + "|" + MDnextCID); alert_displayed=1;}
if (starting_dial_level == 0)
{
document.getElementById("DiaLControl").innerHTML = "<a href=\"#\" onclick=\"ManualDialNext('','','','','');\"><IMG SRC=\"./images/vdc_LB_dialnextnumber.gif\" border=0 alt=\"Dial Next Number\"></a>";
}
else
{
document.getElementById("MainStatuSSpan").style.background = panel_bgcolor;
document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML;
reselect_alt_dial = 0;
}
}
else
{
@@ -6439,7 +6472,8 @@ else
.skb_text {font-size: 13px; font-family: sans-serif; font-weight: bold;}
.ON_conf {font-size: 11px; font-family: monospace; color: black; background: #FFFF99}
.OFF_conf {font-size: 11px; font-family: monospace; color: black; background: #FFCC77}
.cust_form {font-family: sans-serif; font-size: 10px; overflow: auto}
.cust_form {font-family: sans-serif; font-size: 10px; overflow: hidden}
.cust_form_text {font-family: sans-serif; font-size: 10px; overflow: auto}
-->
</style>
@@ -6889,7 +6923,7 @@ RECORD ID: <font class="body_small"><span id="RecorDID"></span></font><BR>
<font class="body_text">
<?
if ( ($multi_line_comments) )
{echo "<TEXTAREA NAME=comments ROWS=2 COLS=65 class=\"cust_form\" value=\"\"></TEXTAREA>\n";}
{echo "<TEXTAREA NAME=comments ROWS=2 COLS=65 class=\"cust_form_text\" value=\"\"></TEXTAREA>\n";}
else
{echo "<input type=text size=65 name=comments maxlength=255 class=\"cust_form\" value=\"\">\n";}
?>