diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php index f49af654..d3bd38e7 100644 --- a/www/agc/vdc_db_query.php +++ b/www/agc/vdc_db_query.php @@ -476,10 +476,11 @@ # 190531-1045 - Added sip_event_logging # 190627-1535 - Added new options for campaign agent_screen_time_display feature # 190709-1846 - Added Call Quota logging +# 190722-1658 - Added ENABLED_EXTENDED_RANGE Agent Screen Time Display option # -$version = '2.14-370'; -$build = '190709-1846'; +$version = '2.14-371'; +$build = '190722-1658'; $php_script = 'vdc_db_query.php'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=797; @@ -18036,6 +18037,8 @@ if ($ACTION == 'AGENTtimeREPORT') if (strlen($end_date) < 8) {$end_date = $NOW_DATE;} +# $format='debug'; + $stmt="SELECT agent_screen_time_display from vicidial_campaigns where campaign_id='$campaign';"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00706',$user,$server_ip,$session_name,$one_mysql_log);} @@ -18116,6 +18119,20 @@ if ($ACTION == 'AGENTtimeREPORT') echo "   "._QXZ("PAUSE")."   "; echo ""; } + if (preg_match("/ENABLED_EXTENDED/",$stage)) + { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } if (preg_match("/ENABLED_BILL_BREAK_LUNCH_COACH/",$stage)) { echo "
  "._QXZ("DATE")."     "._QXZ("CAMPAIGN")."     "._QXZ("TOTAL
NON-PAUSE TIME")."  
  "._QXZ("WAIT")."     "._QXZ("TALK")."     "._QXZ("DISPO")."     "._QXZ("PAUSE")."     "._QXZ("TOTAL
LOGGED IN")."  
"; @@ -18127,6 +18144,12 @@ if ($ACTION == 'AGENTtimeREPORT') echo ""; echo ""; } + $GRANDpauseTOTAL=0; + $GRANDwaitTOTAL=0; + $GRANDtalkTOTAL=0; + $GRANDdispoTOTAL=0; + $GRANDloginTOTAL=0; + $GRANDnonpauseTOTAL=0; $day_ct=0; while ($days >= $day_ct) { @@ -18135,22 +18158,26 @@ if ($ACTION == 'AGENTtimeREPORT') if ($temp_date_epoch < $archive_cutoff) {$vicidial_agent_log = 'vicidial_agent_log_archive'; $archive_flag='';} $temp_date = date("Y-m-d",$temp_date_epoch); - $stmt="SELECT pause_epoch,wait_epoch,talk_epoch,dispo_epoch,dead_epoch,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,sub_status,agent_log_id from $vicidial_agent_log where user='$user' and event_time >= '$temp_date 00:00:00' and event_time <= '$temp_date 23:59:59' order by agent_log_id desc limit 10000;"; + $stmt="SELECT pause_epoch,wait_epoch,talk_epoch,dispo_epoch,dead_epoch,pause_sec,wait_sec,talk_sec,dispo_sec,dead_sec,sub_status,agent_log_id,campaign_id from $vicidial_agent_log where user='$user' and event_time >= '$temp_date 00:00:00' and event_time <= '$temp_date 23:59:59' order by campaign_id desc limit 10000;"; $rslt=mysql_to_mysqli($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} $time_logs_to_print = mysqli_num_rows($rslt); if ($format=='debug') {echo "|$stage|$time_logs_to_print|$stmt|";} $g=0; - $pauseTOTAL=0; - $waitTOTAL=0; - $talkTOTAL=0; - $dispoTOTAL=0; - $billTOTAL=0; - $breakTOTAL=0; - $lunchTOTAL=0; - $coachTOTAL=0; - $loginTOTAL=0; + $pauseTOTAL[0]=0; + $waitTOTAL[0]=0; + $talkTOTAL[0]=0; + $dispoTOTAL[0]=0; + $billTOTAL[0]=0; + $breakTOTAL[0]=0; + $lunchTOTAL[0]=0; + $coachTOTAL[0]=0; + $loginTOTAL[0]=0; + $nonpauseTOTAL[0]=0; + $campaignTOTAL[0]=''; + $ct=0; + while ($time_logs_to_print > $g) { $row=mysqli_fetch_row($rslt); @@ -18166,52 +18193,126 @@ if ($ACTION == 'AGENTtimeREPORT') $Tdead_sec[$g] = $row[9]; $Tsub_status[$g] = $row[10]; $Tagent_log_id[$g] = $row[11]; + $Tcampaign_id[$g] = $row[12]; + + if (strlen($campaignTOTAL[0]) < 1) {$campaignTOTAL[0] = $Tcampaign_id[$g];} + if ( ($g <= 0) or (!preg_match("/ENABLED_EXTENDED/",$stage)) ) + { + $campaignTOTAL[0] = $Tcampaign_id[$g]; + $test_campaign = $Tcampaign_id[$g]; + } + else + { + if (!preg_match("/^$test_campaign$/", $Tcampaign_id[$g])) + { + $ct++; + $campaignTOTAL[$ct] = $Tcampaign_id[$g]; + $test_campaign = $Tcampaign_id[$g]; + } + } if ($Tpause_sec[$g] < 65000) { - $pauseTOTAL = ($pauseTOTAL + $Tpause_sec[$g]); - if (preg_match("/break/i",$Tsub_status[$g])) {$breakTOTAL = ($breakTOTAL + $Tpause_sec[$g]);} - if (preg_match("/lunch/i",$Tsub_status[$g])) {$lunchTOTAL = ($lunchTOTAL + $Tpause_sec[$g]);} - if (preg_match("/coach/i",$Tsub_status[$g])) {$coachTOTAL = ($coachTOTAL + $Tpause_sec[$g]);} + $pauseTOTAL[$ct] = ($pauseTOTAL[$ct] + $Tpause_sec[$g]); + if (preg_match("/break/i",$Tsub_status[$g])) {$breakTOTAL[$ct] = ($breakTOTAL[$ct] + $Tpause_sec[$g]);} + if (preg_match("/lunch/i",$Tsub_status[$g])) {$lunchTOTAL[$ct] = ($lunchTOTAL[$ct] + $Tpause_sec[$g]);} + if (preg_match("/coach/i",$Tsub_status[$g])) {$coachTOTAL[$ct] = ($coachTOTAL[$ct] + $Tpause_sec[$g]);} + } + if ($Twait_sec[$g] < 65000) + { + $waitTOTAL[$ct] = ($waitTOTAL[$ct] + $Twait_sec[$g]); + $nonpauseTOTAL[$ct] = ($nonpauseTOTAL[$ct] + $Twait_sec[$g]); + } + if ($Ttalk_sec[$g] < 65000) + { + $talkTOTAL[$ct] = ($talkTOTAL[$ct] + $Ttalk_sec[$g]); + $nonpauseTOTAL[$ct] = ($nonpauseTOTAL[$ct] + $Ttalk_sec[$g]); + } + if ($Tdispo_sec[$g] < 65000) + { + $dispoTOTAL[$ct] = ($dispoTOTAL[$ct] + $Tdispo_sec[$g]); + $nonpauseTOTAL[$ct] = ($nonpauseTOTAL[$ct] + $Tdispo_sec[$g]); } - if ($Twait_sec[$g] < 65000) {$waitTOTAL = ($waitTOTAL + $Twait_sec[$g]);} - if ($Ttalk_sec[$g] < 65000) {$talkTOTAL = ($talkTOTAL + $Ttalk_sec[$g]);} - if ($Tdispo_sec[$g] < 65000) {$dispoTOTAL = ($dispoTOTAL + $Tdispo_sec[$g]);} - if ($format=='debug') {echo "|$g|$Tagent_log_id[$g]|$Tpause_epoch[$g]|$Tpause_sec[$g]|
\n";} + if ($format=='debug') {echo "|$g|$temp_date|$campaignTOTAL[$ct]|$ct|$Tagent_log_id[$g]|$Tpause_epoch[$g]|$Tpause_sec[$g]|$nonpauseTOTAL[$ct]|
\n";} $g++; } - $billTOTAL = ($waitTOTAL + $talkTOTAL + $dispoTOTAL); - $loginTOTAL = ($pauseTOTAL + $waitTOTAL + $talkTOTAL + $dispoTOTAL); - if (preg_match("/ENABLED_BASIC/",$stage)) + $ct_loop = $ct; + $ct=0; + while ($ct <= $ct_loop) { - echo ""; - echo ""; - echo ""; - } - if (preg_match("/ENABLED_FULL/",$stage)) - { - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - } - if (preg_match("/ENABLED_BILL_BREAK_LUNCH_COACH/",$stage)) - { - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; - echo ""; + $billTOTAL[$ct] = ($waitTOTAL[$ct] + $talkTOTAL[$ct] + $dispoTOTAL[$ct]); + $loginTOTAL[$ct] = ($pauseTOTAL[$ct] + $waitTOTAL[$ct] + $talkTOTAL[$ct] + $dispoTOTAL[$ct]); + + $GRANDpauseTOTAL = ($GRANDpauseTOTAL + $pauseTOTAL[$ct]); + $GRANDwaitTOTAL = ($GRANDwaitTOTAL + $waitTOTAL[$ct]); + $GRANDtalkTOTAL = ($GRANDtalkTOTAL + $talkTOTAL[$ct]); + $GRANDdispoTOTAL = ($GRANDdispoTOTAL + $dispoTOTAL[$ct]); + $GRANDloginTOTAL = ($GRANDloginTOTAL + $loginTOTAL[$ct]); + $GRANDnonpauseTOTAL = ($GRANDnonpauseTOTAL + $nonpauseTOTAL[$ct]); + + if (preg_match("/ENABLED_BASIC/",$stage)) + { + echo ""; + echo ""; + echo ""; + } + if (preg_match("/ENABLED_FULL/",$stage)) + { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + if (preg_match("/ENABLED_EXTENDED/",$stage)) + { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + if (preg_match("/ENABLED_BILL_BREAK_LUNCH_COACH/",$stage)) + { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + $ct++; } $day_ct++; $temp_date_epoch = ($temp_date_epoch + 86400); } + + if (preg_match("/ENABLED_EXTENDED/",$stage)) + { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + + + echo "
  "._QXZ("COACH")."  
  $temp_date   $archive_flag   " . gmdate("H:i:s", $loginTOTAL) . "  
  $temp_date   $archive_flag   " . gmdate("H:i:s", $loginTOTAL) . "     " . gmdate("H:i:s", $waitTOTAL) . "     " . gmdate("H:i:s", $talkTOTAL) . "     " . gmdate("H:i:s", $dispoTOTAL) . "     " . gmdate("H:i:s", $pauseTOTAL) . "  
  $temp_date   $archive_flag   " . gmdate("H:i:s", $billTOTAL) . "     " . gmdate("H:i:s", $breakTOTAL) . "     " . gmdate("H:i:s", $lunchTOTAL) . "     " . gmdate("H:i:s", $coachTOTAL) . "  
  $temp_date   $archive_flag   " . gmdate("H:i:s", $loginTOTAL[$ct]) . "  
  $temp_date   $archive_flag   " . gmdate("H:i:s", $loginTOTAL[$ct]) . "     " . gmdate("H:i:s", $waitTOTAL[$ct]) . "     " . gmdate("H:i:s", $talkTOTAL[$ct]) . "     " . gmdate("H:i:s", $dispoTOTAL[$ct]) . "     " . gmdate("H:i:s", $pauseTOTAL[$ct]) . "  
  $temp_date   $archive_flag   $campaignTOTAL[$ct]     " . gmdate("H:i:s", $nonpauseTOTAL[$ct]) . "     " . gmdate("H:i:s", $waitTOTAL[$ct]) . "     " . gmdate("H:i:s", $talkTOTAL[$ct]) . "     " . gmdate("H:i:s", $dispoTOTAL[$ct]) . "     " . gmdate("H:i:s", $pauseTOTAL[$ct]) . "     " . gmdate("H:i:s", $loginTOTAL[$ct]) . "  
  $temp_date   $archive_flag   " . gmdate("H:i:s", $billTOTAL[$ct]) . "     " . gmdate("H:i:s", $breakTOTAL[$ct]) . "     " . gmdate("H:i:s", $lunchTOTAL[$ct]) . "     " . gmdate("H:i:s", $coachTOTAL[$ct]) . "  
  "._QXZ("TOTALS").":       " . gmdate("H:i:s", $GRANDnonpauseTOTAL) . "     " . gmdate("H:i:s", $GRANDwaitTOTAL) . "     " . gmdate("H:i:s", $GRANDtalkTOTAL) . "     " . gmdate("H:i:s", $GRANDdispoTOTAL) . "     " . gmdate("H:i:s", $GRANDpauseTOTAL) . "     " . gmdate("H:i:s", $GRANDloginTOTAL) . "  
"; } } diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 41ad5aa6..33e1114b 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -4520,12 +4520,13 @@ else # 190628-0835 - Added copying/deleting of vicidial_url_multi records when copying/deleting campaigns/in-groups # 190628-1511 - Added API update_cid_group_entry function # 190705-1012 - Added call_quota_lead_ranking settings +# 190722-1602 - Added ENABLED_EXTENDED_RANGE Agent Screen Time campaign option # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time -$admin_version = '2.14-715a'; -$build = '190705-1012'; +$admin_version = '2.14-716a'; +$build = '190722-1602'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -23670,7 +23671,7 @@ if ($ADD==31) echo ""._QXZ("Agent Display Fields").": $NWB#campaigns-agent_display_fields$NWE\n"; - echo ""._QXZ("Agent Screen Time Display").": $NWB#campaigns-agent_screen_time_display$NWE\n"; + echo ""._QXZ("Agent Screen Time Display").": $NWB#campaigns-agent_screen_time_display$NWE\n"; echo ""._QXZ("Agent Display Queue Count").": $NWB#campaigns-display_queue_count$NWE\n"; diff --git a/www/vicidial/help_documentation.txt b/www/vicidial/help_documentation.txt index 839a58ae..a089b17c 100644 --- a/www/vicidial/help_documentation.txt +++ b/www/vicidial/help_documentation.txt @@ -1,4 +1,4 @@ -# version: 20190708131101 +# version: 20190722160501 users-user User ID This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. users-pass Password This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters. users-force_change_password Force Change Password If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage. Default is N. @@ -158,7 +158,7 @@ campaigns-auto_alt_dial Auto Alt-Number Dialing This setting is used to aut campaigns-dial_timeout Dial Timeout If defined, calls that would normally hang up after the timeout defined in extensions.conf would instead timeout at this amount of seconds if it is less than the extensions.conf timeout. This allows for quickly changing dial timeouts from server to server and limiting the effects to a single campaign. If you are having a lot of Answering Machine or Voicemail calls you may want to try changing this value to between 21-26 and see if results improve. campaigns-campaign_vdad_exten Routing Extension This field allows for a custom outbound routing extension. This allows you to use different call handling methods depending upon how you want to route calls through your outbound campaign. Formerly called Campaign VDAD extension.
- 8364 - same as 8368
- 8365 - Will send the call only to an agent on the same server as the call is placed on
- 8366 - Used for press-1, broadcast and survey campaigns
- 8367 - Will try to first send the call to an agent on the local server, then it will look on other servers
- 8368 - DEFAULT - Will send the call to the next available agent no matter what server they are on
- 8369 - Used for Answering Machine Detection after that, same behavior as 8368
- 8373 - Used for Answering Machine Detection after that same behavior as 8366
- 8374 - Used for press-1, broadcast and survey campaigns with Cepstral Text-to-speech
- 8375 - Used for Answering Machine Detection then press-1, broadcast and survey campaigns with Cepstral Text-to-speech campaigns-am_message_exten Answering Machine Message This field is for entering the prompt to play when the agent gets an answering machine and clicks on the Answering Machine Message button in the transfer conference frame. You must set this to either an audio file in the audio store or a TTS prompt if TTS is enabled on your system. You can also use lead fields to generate audio filenames using the DYN flag, for instance using DYN--A--user--B-- for agent 1234 would look for a file named 1234.wav in your audio store to play. -campaigns-waitforsilence_options WaitForSilence Options If Wait For Silence is desired on calls that are detected as Answering Machines then this field has those options. There are two settings separated by a comma, the first option is how long to detect silence in milliseconds and the second option is for how many times to detect that before playing the message. Default is EMPTY for disabled. A standard value for this would be wait for 2 seconds of silence twice: 2000,2 +campaigns-waitforsilence_options WaitForSilence Options If Wait For Silence is desired on calls that are detected as Answering Machines then this field has those options. There are three settings separated by a comma, the first option is how long to detect silence in milliseconds, the second option is for how many times to detect that before playing the message, the third is the maximum number of seconds to wait before timing out and playing the message. Default is EMPTY for disabled. A standard value for this would be wait for 2 seconds of silence twice: 2000,2,30 campaigns-am_message_wildcards AM Message Wildcards This option, if enabled, allows you to go to the AM Message Wildcard administration page where you can define wildcards that can match data in a default lead field and can play a different message based upon the data in a specific lead. Default is N for disabled. campaigns-amd_send_to_vmx AMD send to Action This option allows you to define whether a call is sent to the Answering Machine Message or CPD AMD Action when an answering machine is detected, or if it is hung up. If this is set to N, then the call will be hung up as soon as it is determined to be an answering machine. Default is N. campaigns-cpd_amd_action CPD AMD Action If you are using the Sangoma ParaXip Call Progress Detection software then you will want to enable this setting either setting it to DISPO which will disposition the call as AA and hang it up if the call is being processed and has not been sent to an agent yet or MESSAGE which will send the call to the defined Answering Machine Message for this campaign. Default is DISABLED. Setting this to INGROUP will send an answering machine to an inbound group. Setting this to CALLMENU will send an answering machine to a Call Menu in the system. @@ -298,7 +298,7 @@ campaigns-allow_required_fields Allow Required Fields Must be enabled for r campaigns-status_display_fields Status Display Fields You can select which variables for calls will be displayed in the status line of the agent screen. CALLID will display the 20 character unique call ID, LEADID will display the system lead ID, LISTID will display the list ID, NAME will display the customer name. Default is CALLID. campaigns-status_display_ingroup Status Display In-Group This option if set to ENABLED will display the In-Group name in the agent screen when an inbound call is sent to the agent. Default is ENABLED. campaigns-agent_display_fields Agent Display Fields This option allows you to display hidden fields as read-only in the agent screen. Available fields are entry_date, source_id, date_of_birth, rank, owner, last_local_call_time. Default is blank. -campaigns-agent_screen_time_display Agent Screen Time Display This option allows you to display a link on the agent screen that when clicked will open a frame showing the agent their time statistics for the day. There are several options that will determine what information is displayed. If RANGE is in the option, it will allow the agent to select a date range to see stats from. Default is DISABLED. +campaigns-agent_screen_time_display Agent Screen Time Display This option allows you to display a link on the agent screen that when clicked will open a frame showing the agent their time statistics for the day. There are several options that will determine what information is displayed. If RANGE is in the option, it will allow the agent to select a date range to see stats from. If EXTENDED is in the option, it will show additional columns and separate the time by campaign. Default is DISABLED. campaigns-use_internal_dnc Use Internal DNC List This defines whether this campaign is to filter leads against the Internal DNC list. If it is set to Y, the hopper will look for each phone number in the DNC list before placing it in the hopper. If it is in the DNC list then it will change that lead status to DNCL so it cannot be dialed. Default is N. The AREACODE option is just like the Y option, except it is used to also filter out an entire area code in North America from being dialed, in this case using the 201XXXXXXX entry in the DNC list would block all calls to the 201 areacode if enabled. campaigns-use_campaign_dnc Use Campaign DNC List This defines whether this campaign is to filter leads against a DNC list that is specific to that campaign only. If it is set to Y, the hopper will look for each phone number in the campaign-specific DNC list before placing it in the hopper. If it is in the campaign-specific DNC list then it will change that lead status to DNCC so it cannot be dialed. Default is N. The AREACODE option is just like the Y option, except it is used to also filter out an entire area code in North America from being dialed, in this case using the 201XXXXXXX entry in the DNC list would block all calls to the 201 areacode if enabled. campaigns-use_other_campaign_dnc Other Campaign DNC If the option Use Campaign DNC List is enabled, this option can allow you to use a different campaign DNC list, just put the Campaign ID of the other campaign in this field. If you use this option, the original campaign DNC list will no longer be checked, only the OTHER campaign DNC list will be used. This does not affect use of the Internal System DNC list. Default is EMPTY.