Several small fixes

rearranging of javascript variables for HTML display in agent time and peerformance detail reports
adding of PHONE list to agent_monitor.agi script
adding of recording_filename to dispo_call_url

git-svn-id: svn://192.168.202.10@2002 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2013-07-18 11:53:20 +00:00
parent 691e4469a2
commit 746a72582f
5 changed files with 40 additions and 28 deletions
+3
View File
@@ -542,6 +542,8 @@ sub user_phone_gather
$PDtsSQLdate = "$Pyear$Pmon$Pmday$Phour$Pmin$Psec";
$stmtA = "SELECT user FROM vicidial_live_agents where last_update_time > \"$PDtsSQLdate\" and extension NOT LIKE \"R/%\" $campaigns_limitSQL order by last_update_time desc limit 100;";
if ($user_phone =~ /PHONE/)
{$stmtA = "SELECT extension FROM vicidial_live_agents where extension NOT LIKE \"R/%\" and last_update_time > \"$PDtsSQLdate\" $campaigns_limitSQL limit 100;";}
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -552,6 +554,7 @@ sub user_phone_gather
@aryA = $sthA->fetchrow_array;
$sox_cmd .= " /var/lib/asterisk/sounds/silence.wav /var/lib/asterisk/sounds/user.gsm";
$sox_user = $aryA[0];
$sox_user =~ s/IAX2\/|IAX\/|SIP\///gi;
$sox_user =~ s/\D//gi;
foreach $user_char (split //, $sox_user)
{
+6 -2
View File
@@ -333,10 +333,11 @@
# 130615-1126 - Added recording_id to dispo url
# 130617-0805 - Fixed issue with scheduled callbacks and campaign presets
# 130705-1512 - Added optional encrypted passwords compatibility
# 130718-0737 - Added recording_filename to dispo url
#
$version = '2.8-231';
$build = '130705-1512';
$version = '2.8-232';
$build = '130718-0737';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=533;
$one_mysql_log=0;
@@ -567,6 +568,8 @@ if (isset($_GET["inbound_email_groups"])) {$inbound_email_groups=$_GET["inboun
elseif (isset($_POST["inbound_email_groups"])) {$inbound_email_groups=$_POST["inbound_email_groups"];}
if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];}
elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];}
if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];}
elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];}
if (isset($_GET["orig_pass"])) {$orig_pass=$_GET["orig_pass"];}
elseif (isset($_POST["orig_pass"])) {$orig_pass=$_POST["orig_pass"];}
@@ -9478,6 +9481,7 @@ if ($ACTION == 'updateDISPO')
$dispo_call_url = preg_replace('/--A--user_group--B--/i',urlencode(trim($user_group)),$dispo_call_url);
$dispo_call_url = preg_replace('/--A--call_notes--B--/i',"$url_call_notes",$dispo_call_url);
$dispo_call_url = preg_replace('/--A--recording_id--B--/i',"$recording_id",$dispo_call_url);
$dispo_call_url = preg_replace('/--A--recording_filename--B--/i',"$recording_filename",$dispo_call_url);
if (strlen($FORMcustom_field_names)>2)
{
+8 -3
View File
@@ -406,10 +406,11 @@
# 130615-1125 - Added recording_id to dispo url
# 130625-0841 - Added more user log data on login
# 130705-1439 - Added optional encrypted passwords compatibility
# 130718-0745 - Added recording_filename to dispo_call_url
#
$version = '2.8-375c';
$build = '130705-1439';
$version = '2.8-376c';
$build = '130718-0745';
$mel=1; # Mysql Error Log enabled = 1
$mysql_log_count=79;
$one_mysql_log=0;
@@ -3721,6 +3722,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
var inbound_lead_search=0;
var VU_agent_choose_ingroups_skip_count=0;
var agent_select_territories_skip_count=0;
var last_recording_filename='';
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\" />";
@@ -5154,6 +5156,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
var RecDispNamE = RClookFILE_array[1];
last_recording_filename = RClookFILE_array[1];
if (RecDispNamE.length > 25)
{
RecDispNamE = RecDispNamE.substr(0,22);
@@ -5744,6 +5747,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
// recording_id = MDlogRecorDings_array[3];
var RecDispNamE = MDlogRecorDings_array[2];
last_recording_filename = MDlogRecorDings_array[2];
if (RecDispNamE.length > 25)
{
RecDispNamE = RecDispNamE.substr(0,22);
@@ -10318,6 +10322,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
customer_3way_hangup_counter_trigger=0;
waiting_on_dispo=1;
var VDDCU_recording_id=document.getElementById("RecorDID").innerHTML;
var VDDCU_recording_filename=last_recording_filename;
document.getElementById("callchannel").innerHTML = '';
document.vicidial_form.callserverip.value = '';
document.vicidial_form.xferchannel.value = '';
@@ -10363,7 +10368,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
}
if (xmlhttp)
{
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&orig_pass=" + orig_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 + "&dial_method" + dial_method + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + encodeURIComponent(CallBackCommenTs) + "&custom_field_names=" + custom_field_names + "&call_notes=" + encodeURIComponent(document.vicidial_form.call_notes_dispo.value) + "&qm_dispo_code=" + DispoQMcsCODE + "&email_enabled=" + email_enabled +"&recording_id="+VDDCU_recording_id;
DSupdate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=updateDISPO&format=text&user=" + user + "&pass=" + pass + "&orig_pass=" + orig_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 + "&dial_method" + dial_method + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&CallBackLeadStatus=" + CallBackLeadStatus + "&comments=" + encodeURIComponent(CallBackCommenTs) + "&custom_field_names=" + custom_field_names + "&call_notes=" + encodeURIComponent(document.vicidial_form.call_notes_dispo.value) + "&qm_dispo_code=" + DispoQMcsCODE + "&email_enabled=" + email_enabled + "&recording_id=" + VDDCU_recording_id + "&recording_filename=" + VDDCU_recording_filename;
xmlhttp.open('POST', 'vdc_db_query.php');
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
xmlhttp.send(DSupdate_query);
+21 -21
View File
@@ -966,25 +966,25 @@ for ($e=0; $e<count($statusesARY); $e++) {
$JS_onload.="\tDrawGraph('CALLS', '1');\n";
$JS_text.="function DrawGraph(graph, th_id) {\n";
$JS_text.=" var CALLS_graph=\"$CALLS_graph\";\n";
$JS_text.=" var TIME_graph=\"$TIME_graph\";\n";
$JS_text.=" var PAUSE_graph=\"$PAUSE_graph\";\n";
$JS_text.=" var PAUSEAVG_graph=\"$PAUSEAVG_graph\";\n";
$JS_text.=" var WAIT_graph=\"$WAIT_graph\";\n";
$JS_text.=" var WAITAVG_graph=\"$WAITAVG_graph\";\n";
$JS_text.=" var TALK_graph=\"$TALK_graph\";\n";
$JS_text.=" var TALKAVG_graph=\"$TALKAVG_graph\";\n";
$JS_text.=" var DISPO_graph=\"$DISPO_graph\";\n";
$JS_text.=" var DISPOAVG_graph=\"$DISPOAVG_graph\";\n";
$JS_text.=" var DEAD_graph=\"$DEAD_graph\";\n";
$JS_text.=" var DEADAVG_graph=\"$DEADAVG_graph\";\n";
$JS_text.=" var CUST_graph=\"$CUST_graph\";\n";
$JS_text.=" var CUSTAVG_graph=\"$CUSTAVG_graph\";\n";
$JS_text.=" var graph_CALLS=\"$CALLS_graph\";\n";
$JS_text.=" var graph_TIME=\"$TIME_graph\";\n";
$JS_text.=" var graph_PAUSE=\"$PAUSE_graph\";\n";
$JS_text.=" var graph_PAUSEAVG=\"$PAUSEAVG_graph\";\n";
$JS_text.=" var graph_WAIT=\"$WAIT_graph\";\n";
$JS_text.=" var graph_WAITAVG=\"$WAITAVG_graph\";\n";
$JS_text.=" var graph_TALK=\"$TALK_graph\";\n";
$JS_text.=" var graph_TALKAVG=\"$TALKAVG_graph\";\n";
$JS_text.=" var graph_DISPO=\"$DISPO_graph\";\n";
$JS_text.=" var graph_DISPOAVG=\"$DISPOAVG_graph\";\n";
$JS_text.=" var graph_DEAD=\"$DEAD_graph\";\n";
$JS_text.=" var graph_DEADAVG=\"$DEADAVG_graph\";\n";
$JS_text.=" var graph_CUST=\"$CUST_graph\";\n";
$JS_text.=" var graph_CUSTAVG=\"$CUSTAVG_graph\";\n";
for ($e=0; $e<count($statusesARY); $e++) {
$Sstatus=$statusesARY[$e];
$graph_var=$Sstatus."_graph";
$JS_text.=" var ".$Sstatus."_graph=\"".$$graph_var."\";\n";
$JS_text.=" var graph_".$Sstatus."=\"".$$graph_var."\";\n";
}
$JS_text.=" for (var i=1; i<=".(count($statusesARY)+14)."; i++) {\n";
@@ -994,7 +994,7 @@ $JS_text.=" }\n";
$JS_text.=" var cellID=\"callstatsgraph\"+th_id;\n";
$JS_text.=" document.getElementById(cellID).style.backgroundColor='#999999';\n";
$JS_text.="\n";
$JS_text.=" var graph_to_display=eval(graph+\"_graph\");\n";
$JS_text.=" var graph_to_display=eval(\"graph_\"+graph);\n";
$JS_text.=" document.getElementById('call_stats_graph').innerHTML=graph_to_display;\n";
$JS_text.="}\n";
$JS_text.="</script>\n";
@@ -1360,14 +1360,14 @@ for ($e=0; $e<count($sub_statusesARY); $e++) {
$JS_onload.="\tDrawPauseGraph('TOTAL', '1');\n";
$JS_text="<script language='Javascript'>\n";
$JS_text.="function DrawPauseGraph(graph, th_id) {\n";
$JS_text.=" var TOTAL_graph=\"$TOTAL_graph\";\n";
$JS_text.=" var NONPAUSE_graph=\"$NONPAUSE_graph\";\n";
$JS_text.=" var PAUSE_graph=\"$PAUSE_graph\";\n";
$JS_text.=" var graph_TOTAL=\"$TOTAL_graph\";\n";
$JS_text.=" var graph_NONPAUSE=\"$NONPAUSE_graph\";\n";
$JS_text.=" var graph_PAUSE=\"$PAUSE_graph\";\n";
for ($e=0; $e<count($sub_statusesARY); $e++) {
$Sstatus=$sub_statusesARY[$e];
$graph_var=$Sstatus."_graph";
$JS_text.=" var ".$Sstatus."_graph=\"".$$graph_var."\";\n";
$JS_text.=" var graph_".$Sstatus."=\"".$$graph_var."\";\n";
}
$JS_text.=" for (var i=1; i<=".(3+count($sub_statusesARY))."; i++) {\n";
@@ -1377,7 +1377,7 @@ $JS_text.=" }\n";
$JS_text.=" var cellID=\"pausegraph\"+th_id;\n";
$JS_text.=" document.getElementById(cellID).style.backgroundColor='#999999';\n";
$JS_text.="\n";
$JS_text.=" var graph_to_display=eval(graph+\"_graph\");\n";
$JS_text.=" var graph_to_display=eval(\"graph_\"+graph);\n";
$JS_text.=" document.getElementById('pause_detail_graph').innerHTML=graph_to_display;\n";
$JS_text.="}\n";
$JS_onload.="}\n";
+2 -2
View File
@@ -1232,7 +1232,7 @@ else
for ($e=0; $e<count($sub_statusesARY); $e++) {
$Sstatus=$sub_statusesARY[$e];
$graph_var=$Sstatus."_graph";
$JS_text.=" var ".$Sstatus."_graph=\"".$$graph_var."\";\n";
$JS_text.=" var graph_".$Sstatus."=\"".$$graph_var."\";\n";
}
$JS_text.=" for (var i=1; i<=".(14+count($sub_statusesARY))."; i++) {\n";
@@ -1242,7 +1242,7 @@ else
$JS_text.=" var cellID=\"timegraph\"+th_id;\n";
$JS_text.=" document.getElementById(cellID).style.backgroundColor='#999999';\n";
$JS_text.="\n";
$JS_text.=" var graph_to_display=eval(graph+\"_graph\");\n";
$JS_text.=" var graph_to_display=eval(\"graph_\"+graph);\n";
$JS_text.=" document.getElementById('agent_time_detail_graph').innerHTML=graph_to_display;\n";
$JS_text.="}\n";