Added Active Voicemail Server and Auto Dial Limit to System Settings
Fixed agent manual dial logging bug Backported agent interface manual-dial blocking of agent monitoring git-svn-id: svn://192.168.202.10@1121 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -85,10 +85,11 @@
|
||||
# 90303-1144 - Fixed manual dial live hangup bug
|
||||
# 90304-1334 - Added account and usegroupalias and user campaign/in-group specific variables
|
||||
# 90305-1040 - Added agent_dialed_number and type for user_call_log feature
|
||||
# 90511-1020 - Added restriction not allowing dialing into agent sessions from manual dial
|
||||
#
|
||||
|
||||
$version = '2.0.5-38';
|
||||
$build = '90305-1040';
|
||||
$version = '2.0.5-39';
|
||||
$build = '90511-1020';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=83;
|
||||
$one_mysql_log=0;
|
||||
@@ -376,40 +377,47 @@ if ($ACTION=="OriginateVDRelogin")
|
||||
}
|
||||
|
||||
if ($ACTION=="Originate")
|
||||
{
|
||||
{
|
||||
if ( (strlen($exten)<1) or (strlen($channel)<1) or (strlen($ext_context)<1) or (strlen($queryCID)<10) )
|
||||
{
|
||||
echo "Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strlen($outbound_cid)>1)
|
||||
{$outCID = "\"$queryCID\" <$outbound_cid>";}
|
||||
else
|
||||
{$outCID = "$queryCID";}
|
||||
if ( ($usegroupalias > 0) and (strlen($account)>1) )
|
||||
{
|
||||
$RAWaccount = $account;
|
||||
$account = "Account: $account";
|
||||
$variable = "Variable: usegroupalias=1";
|
||||
echo "ERROR Exten $exten is not valid or queryCID $queryCID is not valid, Originate command not inserted\n";
|
||||
}
|
||||
else
|
||||
{$account=''; $variable='';}
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','$account','$variable','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02007',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
echo "Originate command sent for Exten $exten Channel $channel on $server_ip |$account|$variable|\n";
|
||||
{
|
||||
if ( (eregi('MANUAL',$agent_dialed_type)) and ( (preg_match("/^\d860\d\d\d\d$/i",$exten)) or (preg_match("/^860\d\d\d\d$/i",$exten)) ) )
|
||||
{
|
||||
echo "ERROR You are not allowed to dial into other agent sessions $exten\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($agent_dialed_number > 0)
|
||||
{
|
||||
$stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$exten','$channel','0','$outbound_cid','$RAWaccount')";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
if (strlen($outbound_cid)>1)
|
||||
{$outCID = "\"$queryCID\" <$outbound_cid>";}
|
||||
else
|
||||
{$outCID = "$queryCID";}
|
||||
if ( ($usegroupalias > 0) and (strlen($account)>1) )
|
||||
{
|
||||
$RAWaccount = $account;
|
||||
$account = "Account: $account";
|
||||
$variable = "Variable: usegroupalias=1";
|
||||
}
|
||||
else
|
||||
{$account=''; $variable='';}
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$queryCID','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $outCID','$account','$variable','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00192',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02007',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
echo "Originate command sent for Exten $exten Channel $channel on $server_ip |$account|$variable|\n";
|
||||
|
||||
if ($agent_dialed_number > 0)
|
||||
{
|
||||
$stmt = "INSERT INTO user_call_log (user,call_date,call_type,server_ip,phone_number,number_dialed,lead_id,callerid,group_alias_id) values('$user','$NOW_TIME','$agent_dialed_type','$server_ip','$exten','$channel','0','$outbound_cid','$RAWaccount')";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00192',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -192,10 +192,11 @@
|
||||
# 90305-1041 - Added agent_dialed_number and type for user_call_log feature
|
||||
# 90307-1735 - Added Shift enforcement and manager override features
|
||||
# 90320-0306 - Fixed agent log bug when using wrapup time
|
||||
# 90519-0634 - Fixed manual dial status and logging bug
|
||||
#
|
||||
|
||||
$version = '2.0.5-104';
|
||||
$build = '90320-0306';
|
||||
$version = '2.0.5-105';
|
||||
$build = '90519-0634';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=194;
|
||||
$one_mysql_log=0;
|
||||
@@ -3296,7 +3297,7 @@ if ($ACTION == 'updateDISPO')
|
||||
}
|
||||
else
|
||||
{
|
||||
### update the comments in vicidial_live_agents record
|
||||
### reset the API fields in vicidial_live_agents record
|
||||
$stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='' where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
@@ -3311,12 +3312,20 @@ if ($ACTION == 'updateDISPO')
|
||||
$retry_count++;
|
||||
}
|
||||
|
||||
if ($auto_dial_level < 1)
|
||||
{
|
||||
$stmt = "UPDATE vicidial_live_agents set status='PAUSED',callerid='' where user='$user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00214',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
|
||||
$stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00142',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$stmt = "select count(*) from vicidial_inbound_groups where group_id='$stage';";
|
||||
$stmt = "SELECT count(*) from vicidial_inbound_groups where group_id='$stage';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00143',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3330,10 +3339,80 @@ if ($ACTION == 'updateDISPO')
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00145',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
|
||||
|
||||
if ($auto_dial_level < 1)
|
||||
{
|
||||
$stmt = "SELECT count(*) from vicidial_log where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00213',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by uniqueid desc limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00145',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
else
|
||||
{
|
||||
$VLlist_id = ''; $VLphone_number = ''; $VLphone_code = ''; $user_group='';
|
||||
$stmt = "SELECT user_group FROM vicidial_users where user='$user';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00217',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VUinfo_ct = mysql_num_rows($rslt);
|
||||
if ($VUinfo_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$user_group = "$row[0]";
|
||||
}
|
||||
|
||||
$stmt = "SELECT list_id,phone_number,phone_code FROM vicidial_list where lead_id='$lead_id';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00216',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VLinfo_ct = mysql_num_rows($rslt);
|
||||
if ($VLinfo_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VLlist_id = "$row[0]";
|
||||
if (strlen($phone_number)<6)
|
||||
{
|
||||
$VLphone_number = "$row[1]";
|
||||
$VLalt = 'MAIN';
|
||||
}
|
||||
else
|
||||
{
|
||||
$VLphone_number = "$phone_number";
|
||||
if ($phone_number == "$row[1]")
|
||||
{$VLalt = 'MAIN';}
|
||||
else
|
||||
{$VLalt = 'ALT';}
|
||||
}
|
||||
if (strlen($phone_code)<1)
|
||||
{$VLphone_code = "$row[2]";}
|
||||
else
|
||||
{$VLphone_code = "$phone_code";}
|
||||
}
|
||||
|
||||
$PADlead_id = sprintf("%09s", $lead_id);
|
||||
while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);}
|
||||
$FAKEcall_id = "$StarTtime.$PADlead_id";
|
||||
$stmt = "INSERT INTO vicidial_log set uniqueid='$FAKEcall_id',lead_id='$lead_id',list_id='$VLlist_id',campaign_id='$campaign',call_date='$NOW_TIME',start_epoch='$StarTtime',end_epoch='$StarTtime',length_in_sec='0',status='$dispo_choice',phone_code='$VLphone_code',phone_number='$VLphone_number',user='$user',comments='MANUAL',processed='N',user_group='$user_group',term_reason='AGENT',alt_dial='$VLalt';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00215',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by uniqueid desc limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00145',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ($use_internal_dnc=='Y') and ($dispo_choice=='DNC') )
|
||||
@@ -3365,7 +3444,7 @@ if ($ACTION == 'updateDISPO')
|
||||
$dispo_sec=0;
|
||||
$dispo_epochSQL='';
|
||||
$StarTtime = date("U");
|
||||
$stmt = "select dispo_epoch,dispo_sec,talk_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
|
||||
$stmt = "select dispo_epoch,dispo_sec,talk_epoch,wait_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00150',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3373,9 +3452,15 @@ if ($ACTION == 'updateDISPO')
|
||||
if ($VDpr_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ( (eregi("NULL",$row[2])) or ($row[2] < 1000) )
|
||||
{
|
||||
$row[2]=$StarTtime;
|
||||
$wait_sec=($row[2] - $row[3]);
|
||||
$dispo_epochSQL = ",talk_epoch='$row[2]',wait_sec='$wait_sec'";
|
||||
}
|
||||
if ( (eregi("NULL",$row[0])) or ($row[0] < 1000) )
|
||||
{
|
||||
$dispo_epochSQL=",dispo_epoch='$StarTtime'";
|
||||
$dispo_epochSQL .= ",dispo_epoch='$StarTtime'";
|
||||
$row[0]=$row[2];
|
||||
}
|
||||
$dispo_sec = (($StarTtime - $row[0]) + $row[1]);
|
||||
|
||||
@@ -224,10 +224,12 @@
|
||||
# 90307-1736 - Added Shift enforcement and manager override features
|
||||
# 90320-0309 - Fixed agent log bug when using wrapup time
|
||||
# 90323-1554 - Initial call to agent phone now has campaign callerIDnumber
|
||||
# 90511-1018 - Added restriction not allowing dialing into agent sessions from manual dial
|
||||
# 90519-0636 - Fixed manual dial status and logging bug
|
||||
#
|
||||
|
||||
$version = '2.0.5-203';
|
||||
$build = '90323-1554';
|
||||
$version = '2.0.5-205';
|
||||
$build = '90519-0636';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=60;
|
||||
$one_mysql_log=0;
|
||||
@@ -432,7 +434,7 @@ $camp_form_code .= "<option value=\"\"></option>\n";
|
||||
$LOGallowed_campaignsSQL='';
|
||||
if ($relogin == 'YES')
|
||||
{
|
||||
$stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass'";
|
||||
$stmt="SELECT user_group from vicidial_users where user='$VD_login' and pass='$VD_pass';";
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01002',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -486,7 +488,7 @@ if ($MGR_override > 0)
|
||||
}
|
||||
|
||||
|
||||
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id";
|
||||
$stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where active='Y' $LOGallowed_campaignsSQL order by campaign_id;";
|
||||
if ($non_latin > 0) {$rslt=mysql_query("SET NAMES 'UTF8'");}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01004',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -2814,6 +2816,13 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
// alert(VMCoriginate_query);
|
||||
// alert(xmlhttp.responseText);
|
||||
|
||||
var regBOerr = new RegExp("ERROR","g");
|
||||
var BOresponse = xmlhttp.responseText;
|
||||
if (BOresponse.match(regBOerr))
|
||||
{
|
||||
alert(BOresponse);
|
||||
}
|
||||
|
||||
if ((taskdialvalue.length > 0) && (tasknowait != 'YES'))
|
||||
{
|
||||
XDnextCID = queryCID;
|
||||
@@ -4057,6 +4066,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
MDlookResponse = xmlhttp.responseText;
|
||||
var MDlookResponse_array=MDlookResponse.split("\n");
|
||||
var MDlookCID = MDlookResponse_array[0];
|
||||
var regMDL = new RegExp("^Local","ig");
|
||||
if (MDlookCID == "NO")
|
||||
{
|
||||
MD_ring_secondS++;
|
||||
@@ -4073,7 +4083,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
else
|
||||
{
|
||||
var regMDL = new RegExp("^Local","ig");
|
||||
if (taskCheckOR == 'YES')
|
||||
{
|
||||
XDuniqueid = MDlookResponse_array[0];
|
||||
@@ -6155,12 +6164,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
if (xmlhttp)
|
||||
{
|
||||
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&comments=" + CallBackCommenTs;
|
||||
xmlhttp.open('POST', 'vdc_db_query.php');
|
||||
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&phone_number=" + document.vicidial_form.phone_number.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&comments=" + CallBackCommenTs;
|
||||
xmlhttp.open('POST', 'vdc_db_query.php');
|
||||
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xmlhttp.send(DSupdate_query);
|
||||
xmlhttp.onreadystatechange = function()
|
||||
{
|
||||
// alert(DSupdate_query + "\n" +xmlhttp.responseText);
|
||||
|
||||
if ( (xmlhttp.readyState == 4 && xmlhttp.status == 200) && (auto_dial_level < 1) )
|
||||
{
|
||||
var check_dispo = null;
|
||||
|
||||
@@ -40,6 +40,15 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
|
||||
list in the call menu and in-group admin screens, and back-end audio
|
||||
synchronization utilities have been added for multi-server setups.
|
||||
|
||||
10. Added Active Voicemail Server setting to System Settings. Now the voicemail
|
||||
and prompt recording extensions are auto-generated so that they all
|
||||
direct to the same server and they should be removed from the
|
||||
extensions.conf file:
|
||||
8168, 8167, 85026666666666, 8500, 8501
|
||||
|
||||
11. Added auto dial limit setting to System Settings to allow setting of the
|
||||
top limit for Campaign Auto Dial Level pull-down menu in the Modify
|
||||
Campaign screens
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# agi-record_prompts.agi version 2.0.5-3
|
||||
# agi-record_prompts.agi version 2.2.0-4
|
||||
#
|
||||
# for recording prompts to GSM file over the phone
|
||||
# Saves recordings with 8-digit filenames to be played when exten is dialed
|
||||
@@ -29,10 +29,11 @@
|
||||
# - vm-msgsaved
|
||||
# - vm-goodbye
|
||||
#
|
||||
# Copyright (C) 2008 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2009 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGELOG
|
||||
# 71226-1303 - Added option to change format GSM/WAV and timeout through flags
|
||||
# 90519-1019 - Changed formatting to conform to other scripts
|
||||
#
|
||||
|
||||
$US='_';
|
||||
@@ -42,36 +43,35 @@ $AGI = new Asterisk::AGI;
|
||||
|
||||
### begin parsing run-time options ###
|
||||
if (length($ARGV[0])>1)
|
||||
{
|
||||
{
|
||||
$i=0;
|
||||
while ($#ARGV >= $i)
|
||||
{
|
||||
$args = "$args $ARGV[$i]";
|
||||
$i++;
|
||||
}
|
||||
{
|
||||
$args = "$args $ARGV[$i]";
|
||||
$i++;
|
||||
}
|
||||
|
||||
### list of command-line array arguments:
|
||||
@ARGV_vars = split(/-----/, $ARGV[0]);
|
||||
|
||||
$format = $ARGV_vars[0];
|
||||
$timeout = $ARGV_vars[1];
|
||||
}
|
||||
}
|
||||
|
||||
$|=1;
|
||||
while(<STDIN>) {
|
||||
while(<STDIN>)
|
||||
{
|
||||
chomp;
|
||||
last unless length($_);
|
||||
if ($V)
|
||||
{
|
||||
if (/^agi_(\w+)\:\s+(.*)$/)
|
||||
{
|
||||
if (/^agi_(\w+)\:\s+(.*)$/)
|
||||
{
|
||||
$AGI{$1} = $2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (/^agi_uniqueid\:\s+(.*)$/) {$unique_id = $1;}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if ($format =~ /WAV/i) {$format = 'wav';}
|
||||
else {$format = 'gsm';}
|
||||
@@ -91,7 +91,7 @@ $REC_id = 85100000;
|
||||
$REC_next = 0;
|
||||
|
||||
if (-e "/prompt_count.txt")
|
||||
{
|
||||
{
|
||||
open(test, "/prompt_count.txt") || die "can't open /prompt_count.txt: $!\n";
|
||||
@test = <test>;
|
||||
close(test);
|
||||
@@ -102,14 +102,14 @@ if (-e "/prompt_count.txt")
|
||||
open(test, ">/prompt_count.txt") || die "can't open /prompt_count.txt: $!\n";
|
||||
print test "$REC_next";
|
||||
close(test);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
open(test, ">/prompt_count.txt") || die "can't open /prompt_count.txt: $!\n";
|
||||
print test "1";
|
||||
close(test);
|
||||
$REC_id = ($REC_id + 1);
|
||||
}
|
||||
}
|
||||
|
||||
$session_recording = "$REC_id";
|
||||
print STDERR "Recording ID: $REC_id\n";
|
||||
@@ -118,199 +118,181 @@ print STDERR "Recording ID: $REC_id\n";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
print STDERR "DONE Exiting...\n";
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##### SUBROUTINES ########################################################
|
||||
##### steps ########################################################
|
||||
|
||||
sub welcome_1
|
||||
{
|
||||
##### Play welcome message and capture PIN ########################################################
|
||||
while ( (length($pin) ne 4) && (!$stop_loop) )
|
||||
{
|
||||
&enter_pin_number;
|
||||
&log_transfer;
|
||||
##### Play welcome message and capture PIN ########################################################
|
||||
while ( (length($pin) ne 4) && (!$stop_loop) )
|
||||
{
|
||||
&enter_pin_number;
|
||||
&log_transfer;
|
||||
|
||||
|
||||
$loop_counter++;
|
||||
if ($loop_counter > 3) {$stop_loop++; $quit_program++;}
|
||||
print STDERR "\nPIN|$pin|\n";
|
||||
$loop_counter++;
|
||||
if ($loop_counter > 3) {$stop_loop++; $quit_program++;}
|
||||
print STDERR "\nPIN|$pin|\n";
|
||||
}
|
||||
|
||||
##### Check PIN account in database ########################################################
|
||||
$rec_count=0;
|
||||
&lookup_account;
|
||||
if (!$rec_count)
|
||||
{
|
||||
# please enter the pin number followed by the pound key
|
||||
|
||||
$AGI->stream_file('ld_invalid_pin_number');
|
||||
|
||||
$quit_program++;
|
||||
}
|
||||
|
||||
##### quit program if error ########################################################
|
||||
if ($quit_program)
|
||||
{
|
||||
print STDERR "\nexiting the ping app\n";
|
||||
print "SET CONTEXT demo\n";
|
||||
checkresult($result);
|
||||
print "SET EXTENSION 8158\n";
|
||||
checkresult($result);
|
||||
print "SET PRIORITY 3\n";
|
||||
checkresult($result);
|
||||
exit;
|
||||
}
|
||||
|
||||
&record_prompts;
|
||||
}
|
||||
|
||||
|
||||
##### Check PIN account in database ########################################################
|
||||
$rec_count=0;
|
||||
&lookup_account;
|
||||
if (!$rec_count)
|
||||
{
|
||||
# please enter the pin number followed by the pound key
|
||||
|
||||
$AGI->stream_file('ld_invalid_pin_number');
|
||||
|
||||
$quit_program++;
|
||||
}
|
||||
|
||||
|
||||
##### quit program if error ########################################################
|
||||
if ($quit_program)
|
||||
{
|
||||
print STDERR "\nexiting the ping app\n";
|
||||
print "SET CONTEXT demo\n";
|
||||
checkresult($result);
|
||||
print "SET EXTENSION 8158\n";
|
||||
checkresult($result);
|
||||
print "SET PRIORITY 3\n";
|
||||
checkresult($result);
|
||||
exit;
|
||||
}
|
||||
|
||||
&record_prompts;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sub record_prompts
|
||||
{
|
||||
$AGI->stream_file('beep');
|
||||
print STDERR "\nrecord_prompts AGI welcome\n";
|
||||
$AGI->stream_file('vm-rec-generic');
|
||||
$AGI->stream_file('beep');
|
||||
{
|
||||
$AGI->stream_file('beep');
|
||||
print STDERR "\nrecord_prompts AGI welcome\n";
|
||||
$AGI->stream_file('vm-rec-generic');
|
||||
$AGI->stream_file('beep');
|
||||
|
||||
$digit='';
|
||||
$interrupt_digit='';
|
||||
$digit='';
|
||||
$interrupt_digit='';
|
||||
|
||||
$interrupt_digit = $AGI->record_file("$session_recording", "$format", '123456789*#', "$timeout", 1);
|
||||
$interrupt_digit = $AGI->record_file("$session_recording", "$format", '123456789*#', "$timeout", 1);
|
||||
|
||||
print STDERR "interrupt_digit |$interrupt_digit|\n";
|
||||
|
||||
$digits_being_entered=1;
|
||||
$digit_loop_counter=0;
|
||||
$totalDTMF='';
|
||||
if ($interrupt_digit > 1)
|
||||
{
|
||||
if ($interrupt_digit == 35) {$interrupt_digit='#';}
|
||||
if ($interrupt_digit == 42) {$interrupt_digit='*';}
|
||||
if ($interrupt_digit == 48) {$interrupt_digit=0;}
|
||||
if ($interrupt_digit == 49) {$interrupt_digit=1;}
|
||||
if ($interrupt_digit == 50) {$interrupt_digit=2;}
|
||||
if ($interrupt_digit == 51) {$interrupt_digit=3;}
|
||||
if ($interrupt_digit == 52) {$interrupt_digit=4;}
|
||||
if ($interrupt_digit == 53) {$interrupt_digit=5;}
|
||||
if ($interrupt_digit == 54) {$interrupt_digit=6;}
|
||||
if ($interrupt_digit == 55) {$interrupt_digit=7;}
|
||||
if ($interrupt_digit == 56) {$interrupt_digit=8;}
|
||||
if ($interrupt_digit == 57) {$interrupt_digit=9;}
|
||||
|
||||
$totalDTMF=$interrupt_digit;
|
||||
$digit_loop_counter++;
|
||||
$digits_being_entered=1;
|
||||
$digit_loop_counter=0;
|
||||
$totalDTMF='';
|
||||
if ($interrupt_digit > 1)
|
||||
{
|
||||
if ($interrupt_digit == 35) {$interrupt_digit='#';}
|
||||
if ($interrupt_digit == 42) {$interrupt_digit='*';}
|
||||
if ($interrupt_digit == 48) {$interrupt_digit=0;}
|
||||
if ($interrupt_digit == 49) {$interrupt_digit=1;}
|
||||
if ($interrupt_digit == 50) {$interrupt_digit=2;}
|
||||
if ($interrupt_digit == 51) {$interrupt_digit=3;}
|
||||
if ($interrupt_digit == 52) {$interrupt_digit=4;}
|
||||
if ($interrupt_digit == 53) {$interrupt_digit=5;}
|
||||
if ($interrupt_digit == 54) {$interrupt_digit=6;}
|
||||
if ($interrupt_digit == 55) {$interrupt_digit=7;}
|
||||
if ($interrupt_digit == 56) {$interrupt_digit=8;}
|
||||
if ($interrupt_digit == 57) {$interrupt_digit=9;}
|
||||
|
||||
$totalDTMF=$interrupt_digit;
|
||||
$digit_loop_counter++;
|
||||
}
|
||||
|
||||
$AGI->stream_file('beep');
|
||||
|
||||
if (length($totalDTMF) > 0) {print STDERR "digit |$digit| TotalDTMF |$totalDTMF|\n";}
|
||||
|
||||
&verify_recording;
|
||||
}
|
||||
|
||||
$AGI->stream_file('beep');
|
||||
|
||||
if (length($totalDTMF) > 0) {print STDERR "digit |$digit| TotalDTMF |$totalDTMF|\n";}
|
||||
|
||||
&verify_recording;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sub verify_recording
|
||||
{
|
||||
$digit='';
|
||||
$interrupt_digit='';
|
||||
{
|
||||
$digit='';
|
||||
$interrupt_digit='';
|
||||
|
||||
$interrupt_digit = $AGI->stream_file('vm-review','123456789');
|
||||
$interrupt_digit = $AGI->stream_file('vm-review','123456789');
|
||||
|
||||
print STDERR "interrupt_digit |$interrupt_digit|\n";
|
||||
|
||||
$digits_being_entered=1;
|
||||
$digit_loop_counter=0;
|
||||
$totalDTMF='';
|
||||
if ($interrupt_digit > 1)
|
||||
{
|
||||
if ($interrupt_digit == 35) {$interrupt_digit='#';}
|
||||
if ($interrupt_digit == 42) {$interrupt_digit='*';}
|
||||
if ($interrupt_digit == 48) {$interrupt_digit=0;}
|
||||
if ($interrupt_digit == 49) {$interrupt_digit=1;}
|
||||
if ($interrupt_digit == 50) {$interrupt_digit=2;}
|
||||
if ($interrupt_digit == 51) {$interrupt_digit=3;}
|
||||
if ($interrupt_digit == 52) {$interrupt_digit=4;}
|
||||
if ($interrupt_digit == 53) {$interrupt_digit=5;}
|
||||
if ($interrupt_digit == 54) {$interrupt_digit=6;}
|
||||
if ($interrupt_digit == 55) {$interrupt_digit=7;}
|
||||
if ($interrupt_digit == 56) {$interrupt_digit=8;}
|
||||
if ($interrupt_digit == 57) {$interrupt_digit=9;}
|
||||
|
||||
$totalDTMF=$interrupt_digit;
|
||||
$digit_loop_counter++;
|
||||
}
|
||||
|
||||
|
||||
while ($digit_loop_counter < 1)
|
||||
{
|
||||
$digit = chr($AGI->wait_for_digit('2000000')); # wait 0.2 seconds for input or until the pound key is pressed
|
||||
if ($digit =~ /\d/)
|
||||
$digits_being_entered=1;
|
||||
$digit_loop_counter=0;
|
||||
$totalDTMF='';
|
||||
if ($interrupt_digit > 1)
|
||||
{
|
||||
$totalDTMF = "$totalDTMF$digit";
|
||||
print STDERR "digit |$digit| TotalDTMF |$totalDTMF|\n";
|
||||
# $AGI->say_digits("$digit");
|
||||
undef $digit;
|
||||
if ($interrupt_digit == 35) {$interrupt_digit='#';}
|
||||
if ($interrupt_digit == 42) {$interrupt_digit='*';}
|
||||
if ($interrupt_digit == 48) {$interrupt_digit=0;}
|
||||
if ($interrupt_digit == 49) {$interrupt_digit=1;}
|
||||
if ($interrupt_digit == 50) {$interrupt_digit=2;}
|
||||
if ($interrupt_digit == 51) {$interrupt_digit=3;}
|
||||
if ($interrupt_digit == 52) {$interrupt_digit=4;}
|
||||
if ($interrupt_digit == 53) {$interrupt_digit=5;}
|
||||
if ($interrupt_digit == 54) {$interrupt_digit=6;}
|
||||
if ($interrupt_digit == 55) {$interrupt_digit=7;}
|
||||
if ($interrupt_digit == 56) {$interrupt_digit=8;}
|
||||
if ($interrupt_digit == 57) {$interrupt_digit=9;}
|
||||
|
||||
$totalDTMF=$interrupt_digit;
|
||||
$digit_loop_counter++;
|
||||
}
|
||||
|
||||
|
||||
while ($digit_loop_counter < 1)
|
||||
{
|
||||
$digit = chr($AGI->wait_for_digit('2000000')); # wait 0.2 seconds for input or until the pound key is pressed
|
||||
if ($digit =~ /\d/)
|
||||
{
|
||||
$totalDTMF = "$totalDTMF$digit";
|
||||
print STDERR "digit |$digit| TotalDTMF |$totalDTMF|\n";
|
||||
# $AGI->say_digits("$digit");
|
||||
undef $digit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$digit_loop_counter=1;
|
||||
}
|
||||
|
||||
$digit_loop_counter++;
|
||||
}
|
||||
|
||||
$totalDTMF =~ s/\D//gi;
|
||||
$pin = $totalDTMF;
|
||||
|
||||
if (length($pin)< 1)
|
||||
{
|
||||
&verify_recording;
|
||||
}
|
||||
else
|
||||
{
|
||||
$digit_loop_counter=1;
|
||||
}
|
||||
|
||||
$digit_loop_counter++;
|
||||
}
|
||||
if ($pin == '1')
|
||||
{
|
||||
$AGI->stream_file('auth-thankyou');
|
||||
$AGI->say_digits("$REC_id");
|
||||
$AGI->stream_file('beep');
|
||||
$AGI->say_digits("$REC_id");
|
||||
$AGI->stream_file('vm-goodbye');
|
||||
exit;
|
||||
}
|
||||
if ($pin == '2')
|
||||
{
|
||||
$AGI->stream_file("$session_recording");
|
||||
&verify_recording;
|
||||
}
|
||||
if ($pin == '3')
|
||||
{
|
||||
&record_prompts;
|
||||
}
|
||||
|
||||
$totalDTMF =~ s/\D//gi;
|
||||
$pin = $totalDTMF;
|
||||
|
||||
if (length($pin)< 1)
|
||||
{
|
||||
&verify_recording;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($pin == '1')
|
||||
{
|
||||
$AGI->stream_file('auth-thankyou');
|
||||
$AGI->say_digits("$REC_id");
|
||||
$AGI->stream_file('beep');
|
||||
$AGI->say_digits("$REC_id");
|
||||
$AGI->stream_file('vm-goodbye');
|
||||
exit;
|
||||
}
|
||||
if ($pin == '2')
|
||||
{
|
||||
$AGI->stream_file("$session_recording");
|
||||
&verify_recording;
|
||||
}
|
||||
if ($pin == '3')
|
||||
{
|
||||
&record_prompts;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -319,121 +301,115 @@ else
|
||||
##### SUBROUTINES PROCESSES ########################################################
|
||||
|
||||
sub log_transfer
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
{
|
||||
# nothing
|
||||
}
|
||||
|
||||
|
||||
sub lookup_account
|
||||
{
|
||||
|
||||
if ($pin eq '4321')
|
||||
{
|
||||
$rec_count++;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($pin eq '4321')
|
||||
{
|
||||
$rec_count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub get_time_now #get the current date and time and epoch for logging call lengths and datetimes
|
||||
{
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
$mon++;
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
if ($hour < 10) {$Fhour = "0$hour";}
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
{
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
$mon++;
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
if ($hour < 10) {$Fhour = "0$hour";}
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
|
||||
$now_date_epoch = time();
|
||||
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
||||
}
|
||||
$now_date_epoch = time();
|
||||
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sub enter_pin_number
|
||||
{
|
||||
# please enter the pin number followed by the pound key
|
||||
{
|
||||
# please enter the pin number followed by the pound key
|
||||
|
||||
$interrupt_digit='';
|
||||
$interrupt_digit='';
|
||||
|
||||
$interrupt_digit = $AGI->stream_file('ld_welcome_pin_number','123456789');
|
||||
$interrupt_digit = $AGI->stream_file('ld_welcome_pin_number','123456789');
|
||||
|
||||
print STDERR "interrupt_digit |$interrupt_digit|\n";
|
||||
|
||||
$digits_being_entered=1;
|
||||
$totalDTMF='';
|
||||
if ($interrupt_digit > 0)
|
||||
{
|
||||
if ($interrupt_digit == 48) {$interrupt_digit=0;}
|
||||
if ($interrupt_digit == 49) {$interrupt_digit=1;}
|
||||
if ($interrupt_digit == 50) {$interrupt_digit=2;}
|
||||
if ($interrupt_digit == 51) {$interrupt_digit=3;}
|
||||
if ($interrupt_digit == 52) {$interrupt_digit=4;}
|
||||
if ($interrupt_digit == 53) {$interrupt_digit=5;}
|
||||
if ($interrupt_digit == 54) {$interrupt_digit=6;}
|
||||
if ($interrupt_digit == 55) {$interrupt_digit=7;}
|
||||
if ($interrupt_digit == 56) {$interrupt_digit=8;}
|
||||
if ($interrupt_digit == 57) {$interrupt_digit=9;}
|
||||
|
||||
$totalDTMF=$interrupt_digit;
|
||||
$digits_being_entered=1;
|
||||
$totalDTMF='';
|
||||
if ($interrupt_digit > 0)
|
||||
{
|
||||
if ($interrupt_digit == 48) {$interrupt_digit=0;}
|
||||
if ($interrupt_digit == 49) {$interrupt_digit=1;}
|
||||
if ($interrupt_digit == 50) {$interrupt_digit=2;}
|
||||
if ($interrupt_digit == 51) {$interrupt_digit=3;}
|
||||
if ($interrupt_digit == 52) {$interrupt_digit=4;}
|
||||
if ($interrupt_digit == 53) {$interrupt_digit=5;}
|
||||
if ($interrupt_digit == 54) {$interrupt_digit=6;}
|
||||
if ($interrupt_digit == 55) {$interrupt_digit=7;}
|
||||
if ($interrupt_digit == 56) {$interrupt_digit=8;}
|
||||
if ($interrupt_digit == 57) {$interrupt_digit=9;}
|
||||
|
||||
$totalDTMF=$interrupt_digit;
|
||||
}
|
||||
|
||||
$digit_loop_counter=0;
|
||||
while ( ($digits_being_entered) && ($digit_loop_counter < 20) )
|
||||
{
|
||||
$digit = chr($AGI->wait_for_digit('90000')); # wait 90 seconds for input or until the pound key is pressed
|
||||
if ($digit =~ /\d/)
|
||||
{
|
||||
$totalDTMF = "$totalDTMF$digit";
|
||||
print STDERR "digit |$digit| TotalDTMF |$totalDTMF|\n";
|
||||
# $AGI->say_digits("$digit");
|
||||
undef $digit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$digits_being_entered=0;
|
||||
}
|
||||
|
||||
$digit_loop_counter++;
|
||||
}
|
||||
|
||||
$totalDTMF =~ s/\D//gi;
|
||||
$pin = $totalDTMF;
|
||||
if ($totalDTMF) {print STDERR "digit |$digit| TotalDTMF |$totalDTMF|\n";}
|
||||
}
|
||||
|
||||
$digit_loop_counter=0;
|
||||
while ( ($digits_being_entered) && ($digit_loop_counter < 20) )
|
||||
|
||||
sub checkresult
|
||||
{
|
||||
$digit = chr($AGI->wait_for_digit('90000')); # wait 90 seconds for input or until the pound key is pressed
|
||||
if ($digit =~ /\d/)
|
||||
{
|
||||
$totalDTMF = "$totalDTMF$digit";
|
||||
print STDERR "digit |$digit| TotalDTMF |$totalDTMF|\n";
|
||||
# $AGI->say_digits("$digit");
|
||||
undef $digit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$digits_being_entered=0;
|
||||
}
|
||||
|
||||
$digit_loop_counter++;
|
||||
}
|
||||
|
||||
$totalDTMF =~ s/\D//gi;
|
||||
$pin = $totalDTMF;
|
||||
if ($totalDTMF) {print STDERR "digit |$digit| TotalDTMF |$totalDTMF|\n";}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
sub checkresult {
|
||||
my ($res) = @_;
|
||||
my $retval;
|
||||
$tests++;
|
||||
chomp $res;
|
||||
if ($res =~ /^200/) {
|
||||
if ($res =~ /^200/)
|
||||
{
|
||||
$res =~ /result=(-?\d+)/;
|
||||
if (!length($1)) {
|
||||
if (!length($1))
|
||||
{
|
||||
print STDERR "FAIL ($res)\n";
|
||||
$fail++;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "PASS ($1)\n";
|
||||
$pass++;
|
||||
}
|
||||
} else {
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print STDERR "FAIL (unexpected result '$res')\n";
|
||||
$fail++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#
|
||||
# CHANGELOG
|
||||
# 90513-0458 - First Build
|
||||
# 90518-2107 - Added force-upload option
|
||||
#
|
||||
|
||||
# constants
|
||||
@@ -47,7 +48,15 @@ if (length($ARGV[0])>1)
|
||||
|
||||
if ($args =~ /--help/i)
|
||||
{
|
||||
print "allowed run time options(must stay in this order):\n [--debug] = debug\n [--debugX] = super debug\n [-t] = test\n [--upload] = upload audio not found on audio store\n [--force-download] = force download of everything from audio store\n [--settings-override] = ignore database settings and run sync anyway\n\n";
|
||||
print "allowed run time options(must stay in this order):\n";
|
||||
print " [--debug] = debug\n";
|
||||
print " [--debugX] = super debug\n";
|
||||
print " [-t] = test\n";
|
||||
print " [--upload] = upload audio not found on audio store\n";
|
||||
print " [--force-download] = force download of everything from audio store\n";
|
||||
print " [--force-upload] = force upload of all local audio files to the audio store\n";
|
||||
print " [--settings-override] = ignore database settings and run sync anyway\n";
|
||||
print "\n";
|
||||
exit;
|
||||
}
|
||||
else
|
||||
@@ -57,7 +66,7 @@ if (length($ARGV[0])>1)
|
||||
$DB=1;
|
||||
print "\n----- DEBUG -----\n\n";
|
||||
}
|
||||
if ($args =~ /--upload/i)
|
||||
if ($args =~ /-upload/i)
|
||||
{
|
||||
$upload=1;
|
||||
if ($DB) {print "\n----- UPLOAD -----\n\n";}
|
||||
@@ -67,6 +76,11 @@ if (length($ARGV[0])>1)
|
||||
$force_download=1;
|
||||
if ($DB) {print "\n----- FORCE DOWNLOAD -----\n\n";}
|
||||
}
|
||||
if ($args =~ /--force-upload/i)
|
||||
{
|
||||
$force_upload=1;
|
||||
if ($DB) {print "\n----- FORCE UPLOAD -----\n\n";}
|
||||
}
|
||||
if ($args =~ /--settings-override/i)
|
||||
{
|
||||
$settings_override=1;
|
||||
@@ -258,7 +272,7 @@ while ($i <= $#list)
|
||||
$k++;
|
||||
}
|
||||
|
||||
if ($found_file < 1)
|
||||
if ( ($found_file < 1) || ($force_download > 0) )
|
||||
{
|
||||
`$wgetbin -q --output-document=$PATHsounds/$filename http://$sounds_web_server/$sounds_web_directory/$filename`;
|
||||
$event_string = "DOWNLOADING: $filename $filesize";
|
||||
@@ -331,7 +345,7 @@ if ($upload > 0)
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($found_file < 1)
|
||||
if ( ($found_file < 1) || ($force_upload > 0) )
|
||||
{
|
||||
$curloptions = "-s 'http://$sounds_web_server/vicidial/audio_store.php?action=AUTOUPLOAD' -F \"audiofile=\@$PATHsounds/$soundname\"";
|
||||
`$curlbin $curloptions`;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
# 90409-1251 - Fixed voicemail conf file issue
|
||||
# 90506-1155 - Added Call Menu functionality
|
||||
# 90513-0449 - Added audio store sync functionality
|
||||
# 90519-1018 - Added upload file trigger for prompt recording if defined as voicemail server and voicemail/prompt recording extensions auto-generated
|
||||
#
|
||||
|
||||
$DB=0; # Debug flag
|
||||
@@ -469,6 +470,8 @@ foreach(@conf)
|
||||
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
|
||||
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
|
||||
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
|
||||
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
|
||||
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
|
||||
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
|
||||
@@ -486,6 +489,8 @@ foreach(@conf)
|
||||
|
||||
# Customized Variables
|
||||
$server_ip = $VARserver_ip; # Asterisk server IP
|
||||
$THISserver_voicemail=0;
|
||||
$voicemail_server_id='';
|
||||
if (!$VARDB_port) {$VARDB_port='3306';}
|
||||
|
||||
use DBI;
|
||||
@@ -493,6 +498,36 @@ use DBI;
|
||||
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
|
||||
or die "Couldn't connect to database: " . DBI->errstr;
|
||||
|
||||
##### Get the settings from system_settings #####
|
||||
$stmtA = "SELECT sounds_central_control_active,active_voicemail_server FROM system_settings;";
|
||||
# print "$stmtA\n";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$sounds_central_control_active = "$aryA[0]";
|
||||
$active_voicemail_server = "$aryA[1]";
|
||||
}
|
||||
$sthA->finish();
|
||||
if ( ($active_voicemail_server =~ /$server_ip/) && ((length($active_voicemail_server)) eq (length($server_ip))) )
|
||||
{$THISserver_voicemail=1;}
|
||||
else
|
||||
{
|
||||
$stmtA = "SELECT server_id FROM servers,system_settings where servers.server_ip=system_settings.active_voicemail_server;";
|
||||
# print "$stmtA\n";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$voicemail_server_id = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
##### Get the settings for this server's server_ip #####
|
||||
$stmtA = "SELECT active_asterisk_server,generate_vicidial_conf,rebuild_conf_files,asterisk_version,sounds_update FROM servers where server_ip='$server_ip';";
|
||||
# print "$stmtA\n";
|
||||
@@ -592,6 +627,41 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
##### Create Voicemail extensions for this server_ip
|
||||
if ( ($THISserver_voicemail > 0) || (length($voicemail_server_id) < 1) )
|
||||
{
|
||||
$Vext .= "; Voicemail Extensions:\n";
|
||||
$Vext .= "exten => _85026666666666.,1,Wait(1)\n";
|
||||
$Vext .= "exten => _85026666666666.,2,Voicemail(\${EXTEN:14}|u)\n";
|
||||
$Vext .= "exten => _85026666666666.,3,Hangup\n";
|
||||
$Vext .= "exten => 8500,1,VoicemailMain\n";
|
||||
$Vext .= "exten => 8500,2,Goto(s,6)\n";
|
||||
if ($asterisk_version =~ /^1.2/)
|
||||
{$Vext .= "exten => 8501,1,VoicemailMain(s\${CALLERIDNUM})\n";}
|
||||
else
|
||||
{$Vext .= "exten => 8501,1,VoicemailMain(s\${{CALLERID(num)}(num)})\n";}
|
||||
$Vext .= "exten => 8501,2,Hangup\n";
|
||||
$Vext .= "\n";
|
||||
$Vext .= "; Prompt Extensions:\n";
|
||||
$Vext .= "exten => 8167,1,Answer\n";
|
||||
$Vext .= "exten => 8167,2,AGI(agi-record_prompts.agi,wav-----720000)\n";
|
||||
$Vext .= "exten => 8167,3,Hangup\n";
|
||||
$Vext .= "exten => 8168,1,Answer\n";
|
||||
$Vext .= "exten => 8168,2,AGI(agi-record_prompts.agi,gsm-----720000)\n";
|
||||
$Vext .= "exten => 8168,3,Hangup\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$Vext .= "; Voicemail Extensions go to main voicemail server:\n";
|
||||
$Vext .= "exten => _85026666666666.,1,Dial(\${TRUNK$voicemail_server_id}/\${EXTEN},99,oT)\n";
|
||||
$Vext .= "exten => 8500,1,Dial(\${TRUNK$voicemail_server_id}/\${EXTEN},99,oT)\n";
|
||||
$Vext .= "exten => 8501,1,Dial(\${TRUNK$voicemail_server_id}/\${EXTEN},99,oT)\n";
|
||||
$Vext .= "\n";
|
||||
$Vext .= "; Prompt Extensions go to main voicemail server:\n";
|
||||
$Vext .= "exten => 8167,1,Dial(\${TRUNK$voicemail_server_id}/\${EXTEN},99,oT)\n";
|
||||
$Vext .= "exten => 8168,1,Dial(\${TRUNK$voicemail_server_id}/\${EXTEN},99,oT)\n";
|
||||
}
|
||||
|
||||
|
||||
##### Get the IAX carriers for this server_ip #####
|
||||
$stmtA = "SELECT carrier_id,carrier_name,registration_string,template_id,account_entry,globals_string,dialplan_entry FROM vicidial_server_carriers where server_ip='$server_ip' and active='Y' and protocol='IAX2' order by carrier_id;";
|
||||
@@ -1052,6 +1122,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
print ext 'exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})';
|
||||
print ext "\n";
|
||||
print ext "$Lext\n";
|
||||
print ext "$Vext\n";
|
||||
print ext "$Pext\n";
|
||||
|
||||
print iax "; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST\n";
|
||||
@@ -1116,25 +1187,47 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
################################################################################
|
||||
##### BEGIN Audio Store sync
|
||||
################################################################################
|
||||
if ( ($active_asterisk_server =~ /Y/) && ($sounds_update =~ /Y/) )
|
||||
{
|
||||
##### Get the settings from system_settings #####
|
||||
$stmtA = "SELECT sounds_central_control_active FROM system_settings;";
|
||||
# print "$stmtA\n";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$sounds_central_control_active = "$aryA[0]";
|
||||
}
|
||||
$sthA->finish();
|
||||
$upload_audio = 0;
|
||||
$upload_flag = '';
|
||||
$soundsec=0;
|
||||
|
||||
if ( ($active_voicemail_server =~ /$server_ip/) && ((length($active_voicemail_server)) eq (length($server_ip))) )
|
||||
{
|
||||
if (-e "/prompt_count.txt")
|
||||
{
|
||||
open(test, "/prompt_count.txt") || die "can't open /prompt_count.txt: $!\n";
|
||||
@test = <test>;
|
||||
close(test);
|
||||
chomp($test[0]);
|
||||
$test[0] = ($test[0] + 85100000);
|
||||
$last_file_gsm = "$test[0].gsm";
|
||||
$last_file_wav = "$test[0].wav";
|
||||
|
||||
if (-e "$PATHsounds/$last_file_gsm")
|
||||
{
|
||||
$sounddate = (-M "$PATHsounds/$last_file_gsm");
|
||||
$soundsec = ($sounddate * 86400);
|
||||
}
|
||||
if (-e "$PATHsounds/$last_file_wav")
|
||||
{
|
||||
$sounddate = (-M "$PATHsounds/$last_file_wav");
|
||||
$soundsec = ($sounddate * 86400);
|
||||
}
|
||||
if ($DB) {print "age of last audio prompt file: |$sounddate|$soundsec| ($PATHsounds/$last_file_gsm|$last_file_wav)\n";}
|
||||
if ( ($soundsec > 300) && ($soundsec <= 360) )
|
||||
{
|
||||
$upload_audio = 1;
|
||||
$upload_flag = '--upload';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ($active_asterisk_server =~ /Y/) && ( ($sounds_update =~ /Y/) || ($upload_audio > 0) ) )
|
||||
{
|
||||
if ($sounds_central_control_active > 0)
|
||||
{
|
||||
if ($DB) {print "running audio store sync process...\n";}
|
||||
`/usr/bin/screen -d -m -S AudioStore $PATHhome/ADMIN_audio_store_sync.pl 2>/dev/null 1>&2`;
|
||||
`/usr/bin/screen -d -m -S AudioStore $PATHhome/ADMIN_audio_store_sync.pl $upload_flag 2>/dev/null 1>&2`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,11 @@ NOTE: In a multi-server setup you may want to have your database and web server
|
||||
|
||||
NOTE: at the bottom of this document are conf examples for a 3 server load balancing setup.
|
||||
|
||||
NOTE: as of 2.0.5 most of these settings are already done for you if you are using auto-conf file generation
|
||||
|
||||
NOTE: as of SVN trunk 2009-05-19 the voicemail and prompt recording extensions are also auto-generated
|
||||
|
||||
|
||||
|
||||
1. The VICIDIAL/Asterisk servers need to have all of the perl scripts and cron jobs installed on them, except these which only need to be on one of the servers:
|
||||
- AST_VDhopper.pl (crontab)
|
||||
|
||||
@@ -192,7 +192,7 @@ $ wget http://www.eflo.net/files/leave.h
|
||||
$ mv -f enter.h apps/enter.h
|
||||
$ mv -f leave.h apps/leave.h
|
||||
$ vi codecs/gsm/Makefile
|
||||
add OPTIMIZE=-O2 to the file before the ifneq section, to fix GSM audio problems
|
||||
add OPTIMIZE=-O2 to the file before the ifeq section, to fix GSM audio problems
|
||||
$ wget http://download.vicidial.com/conf/res_agi_defunct.patch
|
||||
$ patch -p1 < res_agi_defunct.patch
|
||||
File to patch: res/res_agi.c
|
||||
@@ -202,6 +202,7 @@ $ wget http://download.vicidial.com/conf/app_waitforsilence.c
|
||||
$ cd ../channels/
|
||||
$ rm chan_sip.c
|
||||
$ wget http://download.vicidial.com/conf/chan_sip.c
|
||||
$ cd ../
|
||||
$ ./configure; make clean; make; make install
|
||||
$ make samples
|
||||
$ modprobe zaptel
|
||||
|
||||
@@ -42,32 +42,6 @@ exten => _78600XXX*.,1,AGI(agi-VDADfixCXFER.agi)
|
||||
exten => _08600XXX,1,Dial(${TRUNKblind}/6${EXTEN:1},55,To)
|
||||
|
||||
|
||||
;;;;;;;;;; BEGIN Voicemail and Prompts Section ;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Give voicemail at extension 8500
|
||||
exten => 8500,1,VoicemailMain
|
||||
exten => 8500,2,Goto(s,6)
|
||||
|
||||
; this is used to allow the GUI to send you directly into voicemail
|
||||
; don't forget to set GUI variable $voicemail_exten to this extension
|
||||
exten => 8501,1,VoicemailMain(s${CALLERIDNUM})
|
||||
exten => 8501,2,Hangup
|
||||
|
||||
; this is used to allow the GUI to send live calls directly into voicemail
|
||||
; don't forget to set GUI variable $voicemail_dump_exten to this extension
|
||||
exten => _85026666666666.,1,Wait(1)
|
||||
exten => _85026666666666.,2,Voicemail(${EXTEN:14}|u)
|
||||
exten => _85026666666666.,3,Hangup
|
||||
|
||||
; prompts for recording AGI script, ID is 4321
|
||||
; first variable is format (gsm/wav)
|
||||
; second variable is timeout in milliseconds (default is 720000 [12 minutes])
|
||||
exten => 8167,1,Answer
|
||||
exten => 8167,2,AGI(agi-record_prompts.agi,wav-----720000)
|
||||
exten => 8167,3,Hangup
|
||||
exten => 8168,1,Answer
|
||||
exten => 8168,2,AGI(agi-record_prompts.agi,gsm-----720000)
|
||||
exten => 8168,3,Hangup
|
||||
|
||||
; playback of recorded prompts
|
||||
exten => _851XXXXX,1,Answer
|
||||
exten => _851XXXXX,2,Playback(${EXTEN})
|
||||
@@ -80,9 +54,6 @@ exten => _7851XXXXX,3,AGI(VD_amd_post.agi,${EXTEN:1})
|
||||
exten => _7851XXXXX,4,Hangup
|
||||
|
||||
|
||||
;;;;;;;;;; END Voicemail and Prompts Section ;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
; FastAGI for VICIDIAL/astGUIclient call logging
|
||||
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
|
||||
|
||||
|
||||
@@ -42,32 +42,6 @@ exten => _78600XXX*.,1,AGI(agi-VDADfixCXFER.agi)
|
||||
exten => _08600XXX,1,Dial(${TRUNKblind}/6${EXTEN:1},55,To)
|
||||
|
||||
|
||||
;;;;;;;;;; BEGIN Voicemail and Prompts Section ;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Give voicemail at extension 8500
|
||||
exten => 8500,1,VoicemailMain
|
||||
exten => 8500,2,Goto(s,6)
|
||||
|
||||
; this is used to allow the GUI to send you directly into voicemail
|
||||
; don't forget to set GUI variable $voicemail_exten to this extension
|
||||
exten => 8501,1,VoicemailMain(s${{CALLERID(num)}(num)})
|
||||
exten => 8501,2,Hangup
|
||||
|
||||
; this is used to allow the GUI to send live calls directly into voicemail
|
||||
; don't forget to set GUI variable $voicemail_dump_exten to this extension
|
||||
exten => _85026666666666.,1,Wait(1)
|
||||
exten => _85026666666666.,2,Voicemail(${EXTEN:14}|u)
|
||||
exten => _85026666666666.,3,Hangup
|
||||
|
||||
; prompts for recording AGI script, ID is 4321
|
||||
; first variable is format (gsm/wav)
|
||||
; second variable is timeout in milliseconds (default is 720000 [12 minutes])
|
||||
exten => 8167,1,Answer
|
||||
exten => 8167,2,AGI(agi-record_prompts.agi,wav-----720000)
|
||||
exten => 8167,3,Hangup
|
||||
exten => 8168,1,Answer
|
||||
exten => 8168,2,AGI(agi-record_prompts.agi,gsm-----720000)
|
||||
exten => 8168,3,Hangup
|
||||
|
||||
; playback of recorded prompts
|
||||
exten => _851XXXXX,1,Answer
|
||||
exten => _851XXXXX,2,Playback(${EXTEN})
|
||||
@@ -80,9 +54,6 @@ exten => _7851XXXXX,3,AGI(VD_amd_post.agi,${EXTEN:1})
|
||||
exten => _7851XXXXX,4,Hangup
|
||||
|
||||
|
||||
;;;;;;;;;; END Voicemail and Prompts Section ;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
; FastAGI for VICIDIAL/astGUIclient call logging
|
||||
exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})
|
||||
|
||||
|
||||
@@ -1099,7 +1099,9 @@ enable_tts_integration ENUM('0','1') default '0',
|
||||
agentonly_callback_campaign_lock ENUM('0','1') default '1',
|
||||
sounds_central_control_active ENUM('0','1') default '0',
|
||||
sounds_web_server VARCHAR(15) default '127.0.0.1',
|
||||
sounds_web_directory VARCHAR(255) default ''
|
||||
sounds_web_directory VARCHAR(255) default '',
|
||||
active_voicemail_server VARCHAR(15) default '',
|
||||
auto_dial_limit VARCHAR(5) default '4'
|
||||
);
|
||||
|
||||
CREATE TABLE vicidial_campaigns_list_mix (
|
||||
@@ -1604,7 +1606,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number);
|
||||
CREATE INDEX date_user on vicidial_closer_log (call_date,user);
|
||||
CREATE INDEX comment_a on live_inbound_log (comment_a);
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1142';
|
||||
UPDATE system_settings SET db_schema_version='1143';
|
||||
|
||||
GRANT RELOAD ON *.* TO cron@'%';
|
||||
GRANT RELOAD ON *.* TO cron@localhost;
|
||||
|
||||
@@ -99,3 +99,7 @@ unique index userterritory (user, territory)
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1142';
|
||||
|
||||
ALTER TABLE system_settings ADD active_voicemail_server VARCHAR(15) default '';
|
||||
ALTER TABLE system_settings ADD auto_dial_limit VARCHAR(5) default '4';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1143';
|
||||
|
||||
@@ -115,6 +115,10 @@ Audio File to Upload||
|
||||
This utility allows you to upload audio files to the web server so that they can be distributed to all of the ViciDial servers in a multi-server cluster. An important note, only two audio file types will work, .wav files that are PCM 16bit 8k and .gsm files that are 8bit 8k. Please verify that your files are properly formatted before uploading them here||
|
||||
Sounds Update||
|
||||
If you want to force a check of the sound files on this server, and the central audio store is enabled as a system setting, then this field will allow the sounds updater to run at the next top of the minute. Any time an audio file is uploaded from the web interface this is automatically set to Y for all servers that have Asterisk active. Default is N||
|
||||
Active Voicemail Server||
|
||||
In multi-server systems, this is the server that will handle all voicemail boxes. This server is also where the dial-in generated prompts will be uploaded from, the 8168 recordings||
|
||||
Auto Dial Limit||
|
||||
This is the maximum limit of the auto dial level in the campaign screen||
|
||||
|
||||
|
||||
add-file: audio_store.php
|
||||
|
||||
@@ -199,12 +199,13 @@
|
||||
# 90408-0021 - Added API vtiger specific callback activity record ability
|
||||
# 90508-0726 - Changed to PHP long tags
|
||||
# 90511-0923 - Added agentonly_callback_campaign_lock option
|
||||
# 90519-0634 - Fixed manual dial status and logging bug
|
||||
#
|
||||
|
||||
$version = '2.2.0-110';
|
||||
$build = '90511-0923';
|
||||
$version = '2.2.0-111';
|
||||
$build = '90519-0634';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=212;
|
||||
$mysql_log_count=217;
|
||||
$one_mysql_log=0;
|
||||
|
||||
require("dbconnect.php");
|
||||
@@ -3305,7 +3306,7 @@ if ($ACTION == 'updateDISPO')
|
||||
}
|
||||
else
|
||||
{
|
||||
### update the comments in vicidial_live_agents record
|
||||
### reset the API fields in vicidial_live_agents record
|
||||
$stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='' where user='$user' and server_ip='$server_ip';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
@@ -3320,12 +3321,20 @@ if ($ACTION == 'updateDISPO')
|
||||
$retry_count++;
|
||||
}
|
||||
|
||||
if ($auto_dial_level < 1)
|
||||
{
|
||||
$stmt = "UPDATE vicidial_live_agents set status='PAUSED',callerid='' where user='$user';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00214',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
|
||||
$stmt="UPDATE vicidial_list set status='$dispo_choice', user='$user' where lead_id='$lead_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00142',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$stmt = "select count(*) from vicidial_inbound_groups where group_id='$stage';";
|
||||
$stmt = "SELECT count(*) from vicidial_inbound_groups where group_id='$stage';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00143',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3339,10 +3348,80 @@ if ($ACTION == 'updateDISPO')
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' order by uniqueid desc limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00145',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
|
||||
|
||||
if ($auto_dial_level < 1)
|
||||
{
|
||||
$stmt = "SELECT count(*) from vicidial_log where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\";";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00213',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ($row[0] > 0)
|
||||
{
|
||||
$stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by uniqueid desc limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00145',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
else
|
||||
{
|
||||
$VLlist_id = ''; $VLphone_number = ''; $VLphone_code = ''; $user_group='';
|
||||
$stmt = "SELECT user_group FROM vicidial_users where user='$user';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00217',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VUinfo_ct = mysql_num_rows($rslt);
|
||||
if ($VUinfo_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$user_group = "$row[0]";
|
||||
}
|
||||
|
||||
$stmt = "SELECT list_id,phone_number,phone_code FROM vicidial_list where lead_id='$lead_id';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00216',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VLinfo_ct = mysql_num_rows($rslt);
|
||||
if ($VLinfo_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$VLlist_id = "$row[0]";
|
||||
if (strlen($phone_number)<6)
|
||||
{
|
||||
$VLphone_number = "$row[1]";
|
||||
$VLalt = 'MAIN';
|
||||
}
|
||||
else
|
||||
{
|
||||
$VLphone_number = "$phone_number";
|
||||
if ($phone_number == "$row[1]")
|
||||
{$VLalt = 'MAIN';}
|
||||
else
|
||||
{$VLalt = 'ALT';}
|
||||
}
|
||||
if (strlen($phone_code)<1)
|
||||
{$VLphone_code = "$row[2]";}
|
||||
else
|
||||
{$VLphone_code = "$phone_code";}
|
||||
}
|
||||
|
||||
$PADlead_id = sprintf("%09s", $lead_id);
|
||||
while (strlen($PADlead_id) > 9) {$PADlead_id = substr("$PADlead_id", 0, -1);}
|
||||
$FAKEcall_id = "$StarTtime.$PADlead_id";
|
||||
$stmt = "INSERT INTO vicidial_log set uniqueid='$FAKEcall_id',lead_id='$lead_id',list_id='$VLlist_id',campaign_id='$campaign',call_date='$NOW_TIME',start_epoch='$StarTtime',end_epoch='$StarTtime',length_in_sec='0',status='$dispo_choice',phone_code='$VLphone_code',phone_number='$VLphone_number',user='$user',comments='MANUAL',processed='N',user_group='$user_group',term_reason='AGENT',alt_dial='$VLalt';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00215',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="UPDATE vicidial_log set status='$dispo_choice' where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by uniqueid desc limit 1;";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00145',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
|
||||
### find all DNC-type statuses in the system
|
||||
@@ -3410,7 +3489,7 @@ if ($ACTION == 'updateDISPO')
|
||||
$dispo_sec=0;
|
||||
$dispo_epochSQL='';
|
||||
$StarTtime = date("U");
|
||||
$stmt = "select dispo_epoch,dispo_sec,talk_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
|
||||
$stmt = "select dispo_epoch,dispo_sec,talk_epoch,wait_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00150',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -3418,9 +3497,15 @@ if ($ACTION == 'updateDISPO')
|
||||
if ($VDpr_ct > 0)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
if ( (eregi("NULL",$row[2])) or ($row[2] < 1000) )
|
||||
{
|
||||
$row[2]=$StarTtime;
|
||||
$wait_sec=($row[2] - $row[3]);
|
||||
$dispo_epochSQL = ",talk_epoch='$row[2]',wait_sec='$wait_sec'";
|
||||
}
|
||||
if ( (eregi("NULL",$row[0])) or ($row[0] < 1000) )
|
||||
{
|
||||
$dispo_epochSQL=",dispo_epoch='$StarTtime'";
|
||||
$dispo_epochSQL .= ",dispo_epoch='$StarTtime'";
|
||||
$row[0]=$row[2];
|
||||
}
|
||||
$dispo_sec = (($StarTtime - $row[0]) + $row[1]);
|
||||
|
||||
@@ -228,10 +228,11 @@
|
||||
# 90408-0104 - Added Vtiger callback record ability
|
||||
# 90508-0727 - Changed to PHP long tags
|
||||
# 90511-1018 - Added restriction not allowing dialing into agent sessions from manual dial
|
||||
# 90519-0635 - Fixed manual dial status and logging bug
|
||||
#
|
||||
|
||||
$version = '2.2.0-206';
|
||||
$build = '90511-1018';
|
||||
$version = '2.2.0-207';
|
||||
$build = '90519-0635';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=60;
|
||||
$one_mysql_log=0;
|
||||
@@ -6169,7 +6170,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
}
|
||||
if (xmlhttp)
|
||||
{
|
||||
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&comments=" + CallBackCommenTs;
|
||||
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&dispo_choice=" + DispoChoice + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign + "&auto_dial_level=" + auto_dial_level + "&agent_log_id=" + agent_log_id + "&CallBackDatETimE=" + CallBackDatETimE + "&list_id=" + document.vicidial_form.list_id.value + "&recipient=" + CallBackrecipient + "&use_internal_dnc=" + use_internal_dnc + "&use_campaign_dnc=" + use_campaign_dnc + "&MDnextCID=" + LasTCID + "&stage=" + group + "&vtiger_callback_id=" + vtiger_callback_id + "&phone_number=" + document.vicidial_form.phone_number.value + "&phone_code=" + document.vicidial_form.phone_code.value + "&comments=" + CallBackCommenTs;
|
||||
xmlhttp.open('POST', 'vdc_db_query.php');
|
||||
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xmlhttp.send(DSupdate_query);
|
||||
|
||||
@@ -1020,6 +1020,10 @@ if (isset($_GET["sounds_web_directory"])) {$sounds_web_directory=$_GET["sounds
|
||||
elseif (isset($_POST["sounds_web_directory"])) {$sounds_web_directory=$_POST["sounds_web_directory"];}
|
||||
if (isset($_GET["sounds_update"])) {$sounds_update=$_GET["sounds_update"];}
|
||||
elseif (isset($_POST["sounds_update"])) {$sounds_update=$_POST["sounds_update"];}
|
||||
if (isset($_GET["active_voicemail_server"])) {$active_voicemail_server=$_GET["active_voicemail_server"];}
|
||||
elseif (isset($_POST["active_voicemail_server"])) {$active_voicemail_server=$_POST["active_voicemail_server"];}
|
||||
if (isset($_GET["auto_dial_limit"])) {$auto_dial_limit=$_GET["auto_dial_limit"];}
|
||||
elseif (isset($_POST["auto_dial_limit"])) {$auto_dial_limit=$_POST["auto_dial_limit"];}
|
||||
|
||||
if (isset($script_id)) {$script_id= strtoupper($script_id);}
|
||||
if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);}
|
||||
@@ -1317,6 +1321,8 @@ $computer_ip = ereg_replace("[^\.0-9]","",$computer_ip);
|
||||
$queuemetrics_server_ip = ereg_replace("[^\.0-9]","",$queuemetrics_server_ip);
|
||||
$vtiger_server_ip = ereg_replace("[^\.0-9]","",$vtiger_server_ip);
|
||||
$sounds_web_server = ereg_replace("[^\.0-9]","",$sounds_web_server);
|
||||
$active_voicemail_server = ereg_replace("[^\.0-9]","",$active_voicemail_server);
|
||||
$auto_dial_limit = ereg_replace("[^\.0-9]","",$auto_dial_limit);
|
||||
|
||||
### ALPHA-NUMERIC and spaces and hash and star and comma
|
||||
$xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf);
|
||||
@@ -1810,7 +1816,7 @@ if ($force_logout)
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,auto_dial_limit FROM system_settings;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$qm_conf_ct = mysql_num_rows($rslt);
|
||||
@@ -1818,7 +1824,8 @@ $i=0;
|
||||
while ($i < $qm_conf_ct)
|
||||
{
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$non_latin = $row[0];
|
||||
$non_latin = $row[0];
|
||||
$SSauto_dial_limit = $row[1];
|
||||
$i++;
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
@@ -5218,20 +5225,30 @@ FR_SPAC 00 00 00 00 00 - France space separated phone number<BR>
|
||||
<B>Sounds Web Directory -</B> This auto-generated directory name is created at random by the system as the place that the audio store will be kept. All audio files will reside in this directory.
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-qc_features_active">
|
||||
<A NAME="settings-active_voicemail_server">
|
||||
<BR>
|
||||
<B>QC Features Active -</B> This option allows you to enable or disable the QC or Quality Control features. Default is 0 for inactive.
|
||||
<B>Active Voicemail Server -</B> In multi-server systems, this is the server that will handle all voicemail boxes. This server is also where the dial-in generated prompts will be uploaded from, the 8168 recordings.
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-outbound_autodial_active">
|
||||
<BR>
|
||||
<B>Outbound Auto-Dial Active -</B> This option allows you to enable or disable outbound auto-dialing within VICIDIAL, setting this field to 0 will remove the LISTS and FILTERS sections and many fields from the Campaign Modification screens. Manual entry dialing will still be allowable from within the agent screen, but no list dialing will be possible. Default is 1 for active.
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-auto_dial_limit">
|
||||
<BR>
|
||||
<B>Ratio Dial Limit -</B> This is the maximum limit of the auto dial level in the campaign screen.
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-outbound_calls_per_second">
|
||||
<BR>
|
||||
<B>Max FILL Calls per Second -</B> This setting determines the maximum number of calls that can be placed by the auto-FILL outbound auto-dialing script on for all servers, per second. Must be from 1 to 200. Default is 40.
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-qc_features_active">
|
||||
<BR>
|
||||
<B>QC Features Active -</B> This option allows you to enable or disable the QC or Quality Control features. Default is 0 for inactive.
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-enable_queuemetrics_logging">
|
||||
<BR>
|
||||
@@ -5724,7 +5741,62 @@ if ($ADD==11)
|
||||
{
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Allow Closers: </td><td align=left><select size=1 name=allow_closers><option>Y</option><option>N</option></select>$NWB#vicidial_campaigns-allow_closers$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Hopper Level: </td><td align=left><select size=1 name=hopper_level><option>1</option><option>5</option><option>10</option><option>20</option><option>50</option><option>100</option><option>200</option><option>500</option><option>1000</option><option>2000</option></select>$NWB#vicidial_campaigns-hopper_level$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Auto Dial Level: </td><td align=left><select size=1 name=auto_dial_level><option selected>0</option><option>1</option><option>1.1</option><option>1.2</option><option>1.3</option><option>1.4</option><option>1.5</option><option>1.6</option><option>1.7</option><option>1.8</option><option>1.9</option><option>2.0</option><option>2.2</option><option>2.5</option><option>2.7</option><option>3.0</option><option>3.5</option><option>4.0</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Auto Dial Level: </td><td align=left><select size=1 name=auto_dial_level><option selected>$auto_dial_level</option>\n";
|
||||
$adl=0;
|
||||
while($adl <= $SSauto_dial_limit)
|
||||
{
|
||||
echo "<option>$adl</option>\n";
|
||||
if ($adl < 1)
|
||||
{$adl = ($adl + 1);}
|
||||
else
|
||||
{
|
||||
if ($adl < 3)
|
||||
{$adl = ($adl + 0.1);}
|
||||
else
|
||||
{
|
||||
if ($adl < 4)
|
||||
{$adl = ($adl + 0.25);}
|
||||
else
|
||||
{
|
||||
if ($adl < 5)
|
||||
{$adl = ($adl + 0.5);}
|
||||
else
|
||||
{
|
||||
if ($adl < 10)
|
||||
{$adl = ($adl + 1);}
|
||||
else
|
||||
{
|
||||
if ($adl < 20)
|
||||
{$adl = ($adl + 2);}
|
||||
else
|
||||
{
|
||||
if ($adl < 40)
|
||||
{$adl = ($adl + 5);}
|
||||
else
|
||||
{
|
||||
if ($adl < 200)
|
||||
{$adl = ($adl + 10);}
|
||||
else
|
||||
{
|
||||
if ($adl < 400)
|
||||
{$adl = ($adl + 50);}
|
||||
else
|
||||
{
|
||||
if ($adl < 1000)
|
||||
{$adl = ($adl + 100);}
|
||||
else
|
||||
{$adl = ($adl + 1);}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "<option>$adl</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE</td></tr>\n";
|
||||
}
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Next Agent Call: </td><td align=left><select size=1 name=next_agent_call><option >random</option><option>oldest_call_start</option><option>oldest_call_finish</option><option>overall_user_level</option><option>campaign_rank</option><option>fewest_calls</option></select>$NWB#vicidial_campaigns-next_agent_call$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Local Call Time: </td><td align=left><select size=1 name=local_call_time>";
|
||||
@@ -11564,7 +11636,7 @@ if ($ADD==411111111111111)
|
||||
|
||||
echo "<br>VICIDIAL SYSTEM SETTINGS MODIFIED\n";
|
||||
|
||||
$stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory';";
|
||||
$stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit';";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
|
||||
### LOG INSERTION Admin Log Table ###
|
||||
@@ -14218,7 +14290,62 @@ if ($ADD==31)
|
||||
|
||||
echo "<tr bgcolor=#BDFFBD><td align=right>Dial Method: </td><td align=left><select size=1 name=dial_method><option >MANUAL</option><option>RATIO</option><option>ADAPT_HARD_LIMIT</option><option>ADAPT_TAPERED</option><option>ADAPT_AVERAGE</option><option>INBOUND_MAN</option><option SELECTED>$dial_method</option></select>$NWB#vicidial_campaigns-dial_method$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#BDFFBD><td align=right>Auto Dial Level: </td><td align=left><select size=1 name=auto_dial_level><option >0</option><option>1</option><option>1.1</option><option>1.2</option><option>1.3</option><option>1.4</option><option>1.5</option><option>1.6</option><option>1.7</option><option>1.8</option><option>1.9</option><option>2.0</option><option>2.2</option><option>2.5</option><option>2.7</option><option>3.0</option><option>3.5</option><option>4.0</option><option SELECTED>$auto_dial_level</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE <input type=checkbox name=dial_level_override value=\"1\">ADAPT OVERRIDE</td></tr>\n";
|
||||
echo "<tr bgcolor=#BDFFBD><td align=right>Auto Dial Level: </td><td align=left><select size=1 name=auto_dial_level><option selected>$auto_dial_level</option>\n";
|
||||
$adl=0;
|
||||
while($adl <= $SSauto_dial_limit)
|
||||
{
|
||||
echo "<option>$adl</option>\n";
|
||||
if ($adl < 1)
|
||||
{$adl = ($adl + 1);}
|
||||
else
|
||||
{
|
||||
if ($adl < 3)
|
||||
{$adl = ($adl + 0.1);}
|
||||
else
|
||||
{
|
||||
if ($adl < 4)
|
||||
{$adl = ($adl + 0.25);}
|
||||
else
|
||||
{
|
||||
if ($adl < 5)
|
||||
{$adl = ($adl + 0.5);}
|
||||
else
|
||||
{
|
||||
if ($adl < 10)
|
||||
{$adl = ($adl + 1);}
|
||||
else
|
||||
{
|
||||
if ($adl < 20)
|
||||
{$adl = ($adl + 2);}
|
||||
else
|
||||
{
|
||||
if ($adl < 40)
|
||||
{$adl = ($adl + 5);}
|
||||
else
|
||||
{
|
||||
if ($adl < 200)
|
||||
{$adl = ($adl + 10);}
|
||||
else
|
||||
{
|
||||
if ($adl < 400)
|
||||
{$adl = ($adl + 50);}
|
||||
else
|
||||
{
|
||||
if ($adl < 1000)
|
||||
{$adl = ($adl + 100);}
|
||||
else
|
||||
{$adl = ($adl + 1);}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "<option>$adl</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE <input type=checkbox name=dial_level_override value=\"1\">ADAPT OVERRIDE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#BDFFBD><td align=right>Available Only Tally: </td><td align=left><select size=1 name=available_only_ratio_tally><option >Y</option><option>N</option><option SELECTED>$available_only_ratio_tally</option></select>$NWB#vicidial_campaigns-available_only_ratio_tally$NWE</td></tr>\n";
|
||||
|
||||
@@ -15355,7 +15482,62 @@ if ($ADD==34)
|
||||
|
||||
echo "<tr bgcolor=#BDFFBD><td align=right>Dial Method: </td><td align=left><select size=1 name=dial_method><option >MANUAL</option><option>RATIO</option><option>ADAPT_HARD_LIMIT</option><option>ADAPT_TAPERED</option><option>ADAPT_AVERAGE</option><option>INBOUND_MAN</option><option SELECTED>$dial_method</option></select>$NWB#vicidial_campaigns-dial_method$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#BDFFBD><td align=right>Auto Dial Level: </td><td align=left><select size=1 name=auto_dial_level><option >0</option><option>1</option><option>1.1</option><option>1.2</option><option>1.3</option><option>1.4</option><option>1.5</option><option>1.6</option><option>1.7</option><option>1.8</option><option>1.9</option><option>2.0</option><option>2.2</option><option>2.5</option><option>2.7</option><option>3.0</option><option>3.5</option><option>4.0</option><option SELECTED>$auto_dial_level</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#BDFFBD><td align=right>Auto Dial Level: </td><td align=left><select size=1 name=auto_dial_level><option selected>$auto_dial_level</option>\n";
|
||||
$adl=0;
|
||||
while($adl <= $SSauto_dial_limit)
|
||||
{
|
||||
echo "<option>$adl</option>\n";
|
||||
if ($adl < 1)
|
||||
{$adl = ($adl + 1);}
|
||||
else
|
||||
{
|
||||
if ($adl < 3)
|
||||
{$adl = ($adl + 0.1);}
|
||||
else
|
||||
{
|
||||
if ($adl < 4)
|
||||
{$adl = ($adl + 0.25);}
|
||||
else
|
||||
{
|
||||
if ($adl < 5)
|
||||
{$adl = ($adl + 0.5);}
|
||||
else
|
||||
{
|
||||
if ($adl < 10)
|
||||
{$adl = ($adl + 1);}
|
||||
else
|
||||
{
|
||||
if ($adl < 20)
|
||||
{$adl = ($adl + 2);}
|
||||
else
|
||||
{
|
||||
if ($adl < 40)
|
||||
{$adl = ($adl + 5);}
|
||||
else
|
||||
{
|
||||
if ($adl < 200)
|
||||
{$adl = ($adl + 10);}
|
||||
else
|
||||
{
|
||||
if ($adl < 400)
|
||||
{$adl = ($adl + 50);}
|
||||
else
|
||||
{
|
||||
if ($adl < 1000)
|
||||
{$adl = ($adl + 100);}
|
||||
else
|
||||
{$adl = ($adl + 1);}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "<option>$adl</option></select>(0 = off)$NWB#vicidial_campaigns-auto_dial_level$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#BDFFBD><td align=right>Adapt Intensity Modifier: </td><td align=left><select size=1 name=adaptive_intensity>\n";
|
||||
$n=40;
|
||||
@@ -18874,7 +19056,7 @@ if ($ADD==311111111111111)
|
||||
echo "<TABLE><TR><TD>\n";
|
||||
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||
|
||||
$stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory from system_settings;";
|
||||
$stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit from system_settings;";
|
||||
$rslt=mysql_query($stmt, $link);
|
||||
$row=mysql_fetch_row($rslt);
|
||||
$version = $row[0];
|
||||
@@ -18915,6 +19097,8 @@ if ($ADD==311111111111111)
|
||||
$sounds_central_control_active = $row[35];
|
||||
$sounds_web_server = $row[36];
|
||||
$sounds_web_directory = $row[37];
|
||||
$active_voicemail_server = $row[38];
|
||||
$auto_dial_limit = $row[39];
|
||||
|
||||
echo "<br>MODIFY VICIDIAL SYSTEM SETTINGS<form action=$PHP_SELF method=POST>\n";
|
||||
echo "<input type=hidden name=ADD value=411111111111111>\n";
|
||||
@@ -18938,7 +19122,6 @@ if ($ADD==311111111111111)
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Enable Agent Transfer Logfile: </td><td align=left><select size=1 name=enable_agc_xfer_log><option>1</option><option>0</option><option selected>$enable_agc_xfer_log</option></select>$NWB#settings-enable_agc_xfer_log$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Timeclock End Of Day: </td><td align=left><input type=text name=timeclock_end_of_day size=5 maxlength=4 value=\"$timeclock_end_of_day\">$NWB#settings-timeclock_end_of_day$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Timeclock Last Auto Logout: </td><td align=left> $timeclock_last_reset_date</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>QC Last Pull Time: </td><td align=left> $qc_last_pull_time</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Agent Screen Header Date Format: </td><td align=left><select size=1 name=vdc_header_date_format>\n";
|
||||
echo "<option>MS_DASH_24HR 2008-06-24 23:59:59</option>\n";
|
||||
echo "<option>US_SLASH_24HR 06/24/2008 23:59:59</option>\n";
|
||||
@@ -18978,11 +19161,84 @@ if ($ADD==311111111111111)
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Sounds Web Server IP: </td><td align=left><input type=text name=sounds_web_server size=18 maxlength=15 value=\"$sounds_web_server\">$NWB#settings-sounds_web_server$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Sounds Web Directory: </td><td align=left><a href=\"http://$sounds_web_server/$sounds_web_directory\">$sounds_web_directory</a> $NWB#settings-sounds_web_directory$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>QC Features Active: </td><td align=left><select size=1 name=qc_features_active><option>1</option><option>0</option><option selected>$qc_features_active</option></select>$NWB#settings-qc_features_active$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Active Voicemail Server: </td><td align=left><select size=1 name=active_voicemail_server>\n";
|
||||
##### get server listing for dynamic pulldown
|
||||
$stmt="SELECT server_ip,server_description from servers order by server_ip";
|
||||
$rsltx=mysql_query($stmt, $link);
|
||||
$servers_to_print = mysql_num_rows($rsltx);
|
||||
$servers_list='';
|
||||
|
||||
$o=0;
|
||||
while ($servers_to_print > $o)
|
||||
{
|
||||
$rowx=mysql_fetch_row($rsltx);
|
||||
$servers_list .= "<option value=\"$rowx[0]\">$rowx[0] - $rowx[1]</option>\n";
|
||||
$o++;
|
||||
}
|
||||
|
||||
echo "$servers_list";
|
||||
echo "<option SELECTED>$active_voicemail_server</option>\n";
|
||||
echo "</select>$NWB#settings-active_voicemail_server$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Auto Dial Limit: </td><td align=left><select size=1 name=auto_dial_limit><option selected>$auto_dial_limit</option>\n";
|
||||
$adl=1;
|
||||
while($adl < 1000)
|
||||
{
|
||||
echo "<option>$adl</option>\n";
|
||||
if ($adl < 3)
|
||||
{$adl = ($adl + 0.1);}
|
||||
else
|
||||
{
|
||||
if ($adl < 4)
|
||||
{$adl = ($adl + 0.25);}
|
||||
else
|
||||
{
|
||||
if ($adl < 5)
|
||||
{$adl = ($adl + 0.5);}
|
||||
else
|
||||
{
|
||||
if ($adl < 10)
|
||||
{$adl = ($adl + 1);}
|
||||
else
|
||||
{
|
||||
if ($adl < 20)
|
||||
{$adl = ($adl + 2);}
|
||||
else
|
||||
{
|
||||
if ($adl < 40)
|
||||
{$adl = ($adl + 5);}
|
||||
else
|
||||
{
|
||||
if ($adl < 200)
|
||||
{$adl = ($adl + 10);}
|
||||
else
|
||||
{
|
||||
if ($adl < 400)
|
||||
{$adl = ($adl + 50);}
|
||||
else
|
||||
{
|
||||
if ($adl < 1000)
|
||||
{$adl = ($adl + 100);}
|
||||
else
|
||||
{$adl = ($adl + 1);}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "<option>$adl</option></select>$NWB#settings-auto_dial_limit$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Outbound Auto-Dial Active: </td><td align=left><select size=1 name=outbound_autodial_active><option>1</option><option>0</option><option selected>$outbound_autodial_active</option></select>$NWB#settings-outbound_autodial_active$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>Max FILL Calls per Second: </td><td align=left><input type=text name=outbound_calls_per_second size=4 maxlength=3 value=\"$outbound_calls_per_second\">$NWB#settings-outbound_calls_per_second$NWE</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>QC Features Active: </td><td align=left><select size=1 name=qc_features_active><option>1</option><option>0</option><option selected>$qc_features_active</option></select>$NWB#settings-qc_features_active$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#B6D3FC><td align=right>QC Last Pull Time: </td><td align=left> $qc_last_pull_time</td></tr>\n";
|
||||
|
||||
echo "<tr bgcolor=#99FFCC><td align=right>Enable QueueMetrics Logging: </td><td align=left><select size=1 name=enable_queuemetrics_logging><option>1</option><option>0</option><option selected>$enable_queuemetrics_logging</option></select>$NWB#settings-enable_queuemetrics_logging$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#99FFCC><td align=right>QueueMetrics Server IP: </td><td align=left><input type=text name=queuemetrics_server_ip size=18 maxlength=15 value=\"$queuemetrics_server_ip\">$NWB#settings-queuemetrics_server_ip$NWE</td></tr>\n";
|
||||
echo "<tr bgcolor=#99FFCC><td align=right>QueueMetrics DB Name: </td><td align=left><input type=text name=queuemetrics_dbname size=18 maxlength=50 value=\"$queuemetrics_dbname\">$NWB#settings-queuemetrics_dbname$NWE</td></tr>\n";
|
||||
|
||||
@@ -678,6 +678,8 @@ $admin_home_url_LU = $row[0];
|
||||
else {$settings_sh=''; $settings_fc='BLACK';}
|
||||
if ($sh=='status') {$status_sh="bgcolor=\"$status_color\""; $status_fc="$status_font";} # pink
|
||||
else {$status_sh=''; $status_fc='BLACK';}
|
||||
if ($sh=='audio') {$audio_sh="bgcolor=\"$audio_color\""; $audio_fc="$audio_font";} # pink
|
||||
else {$audio_sh=''; $audio_fc='BLACK';}
|
||||
|
||||
?>
|
||||
<TR BGCOLOR=<?php echo $admin_color ?>>
|
||||
@@ -702,8 +704,8 @@ $admin_home_url_LU = $row[0];
|
||||
</TR>
|
||||
<?php if ( ($sounds_central_control_active > 0) or ($SSsounds_central_control_active > 0) )
|
||||
{ ?>
|
||||
<TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $status_sh ?>>
|
||||
<a href="audio_store.php"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $status_fc ?> SIZE=<?php echo $header_font_size ?>> Audio Store </a></TD>
|
||||
<TR BGCOLOR=<?php echo $admin_color ?>><TD ALIGN=LEFT <?php echo $audio_sh ?>>
|
||||
<a href="audio_store.php"><FONT FACE="ARIAL,HELVETICA" COLOR=<?php echo $audio_fc ?> SIZE=<?php echo $header_font_size ?>> Audio Store </a></TD>
|
||||
</TR>
|
||||
|
||||
<?php }
|
||||
|
||||
Reference in New Issue
Block a user