From 6e2da2d4d044f911fbaf34d3451c4373df9b2a10 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 4 Mar 2011 21:55:05 +0000 Subject: [PATCH] Added DEFER options to the scheduled callbacks alert campaign feature git-svn-id: svn://192.168.202.10@1613 3d104415-ff17-0410-8863-d5cf3c621b8a --- UPGRADE | 5 ++ extras/MySQL_AST_CREATE_tables.sql | 4 +- extras/upgrade_2.4.sql | 4 ++ .../TO_BE_TRANSLATED_2.4.txt | 1 + www/agc/vicidial.php | 62 ++++++++++++++----- www/vicidial/admin.php | 9 +-- 6 files changed, 63 insertions(+), 22 deletions(-) diff --git a/UPGRADE b/UPGRADE index d03f40fc..1933665b 100644 --- a/UPGRADE +++ b/UPGRADE @@ -499,6 +499,11 @@ OTHER CHANGES: receiving the call. It is not recommended to use this on high-volume systems or systems with many agents available. +116. Added DEFER options to the Scheduled Callbacks Alert campaign feature. + These allow you to stop the blinking of the alert in the agent screen + after you have viewed the callbacks, but if the number of callbacks + changes the red and/or blink will start again. + diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 567da420..2de8bc88 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -762,7 +762,7 @@ xferconf_c_number VARCHAR(50) default '', xferconf_d_number VARCHAR(50) default '', xferconf_e_number VARCHAR(50) default '', use_custom_cid ENUM('Y','N') default 'N', -scheduled_callbacks_alert ENUM('NONE','BLINK','RED','BLINK_RED') default 'NONE', +scheduled_callbacks_alert ENUM('NONE','BLINK','RED','BLINK_RED','BLINK_DEFER','RED_DEFER','BLINK_RED_DEFER') default 'NONE', queuemetrics_callstatus_override ENUM('DISABLED','NO','YES') default 'DISABLED', extension_appended_cidname ENUM('Y','N') default 'N', scheduled_callbacks_count ENUM('LIVE','ALL_ACTIVE') default 'ALL_ACTIVE', @@ -2450,7 +2450,7 @@ ALTER TABLE vicidial_call_notes_archive MODIFY notesid INT(9) UNSIGNED NOT NULL; CREATE TABLE vicidial_lead_search_log_archive LIKE vicidial_lead_search_log; ALTER TABLE vicidial_lead_search_log_archive MODIFY search_log_id INT(9) UNSIGNED NOT NULL; -UPDATE system_settings SET db_schema_version='1264',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1265',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/extras/upgrade_2.4.sql b/extras/upgrade_2.4.sql index 078a3ba0..ba3e8358 100644 --- a/extras/upgrade_2.4.sql +++ b/extras/upgrade_2.4.sql @@ -711,3 +711,7 @@ ALTER TABLE vicidial_remote_agents ADD on_hook_ring_time SMALLINT(5) default '15 ALTER TABLE vicidial_auto_calls ADD agent_grab_extension VARCHAR(100) default ''; UPDATE system_settings SET db_schema_version='1264',db_schema_update_date=NOW(); + +ALTER TABLE vicidial_campaigns MODIFY scheduled_callbacks_alert ENUM('NONE','BLINK','RED','BLINK_RED','BLINK_DEFER','RED_DEFER','BLINK_RED_DEFER') default 'NONE'; + +UPDATE system_settings SET db_schema_version='1265',db_schema_update_date=NOW(); diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt index a33890a9..d385c6ae 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -596,6 +596,7 @@ On-Hook Agent Login|| This option is only used for inbound calls going to an agent logged in with this phone. This feature will call the agent and will not send the customer to the agents session until the line is answered. Default is N for disabled|| This is a Phone On-Hook Agent|| Maximum Ring Time|| +The DEFER options will stop blinking and-or displaying in red when you check the callbacks, until the number of callbacks changes|| ############################################################ MANAGER Manual diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index c8af0fa2..4e0b0b13 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -339,10 +339,11 @@ # 110224-1713 - Added compatibility with QM phone environment logging, QM pause code last call logging and active server twin check # 110225-1231 - Changed scheduled callbacks list to allow clicking to see lead info without dialing, and separate dial link # 110303-2321 - Added notice of on-hook phone use, and ability to click 'ring' to call into session, minor queue_log fix +# 110304-1623 - Added callback count notification defer options # -$version = '2.4-316c'; -$build = '110303-2321'; +$version = '2.4-317c'; +$build = '110304-1623'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=72; $one_mysql_log=0; @@ -3287,6 +3288,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var agent_lead_search_method=''; var qm_phone_environment=''; var LastCallCID=''; + var LastCallbackCount=0; + var LastCallbackViewed=0; var DiaLControl_auto_HTML = "\"\"Resume\""; var DiaLControl_auto_HTML_ready = "\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"\"Resume\""; @@ -5145,6 +5148,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection) { var CBpre = ''; var CBpost = ''; + var Defer=0; // alert(xmlhttp.responseText); var CBcounTtotal = xmlhttp.responseText; @@ -5156,21 +5160,34 @@ function set_length(SLnumber,SLlength_goal,SLdirection) else { var CBprint = CBcounT; + if ( (LastCallbackCount < CBcounT) || (LastCallbackCount > CBcounT) ) + { + LastCallbackCount = CBcounT; + LastCallbackViewed=0; + } - if (scheduled_callbacks_alert == 'BLINK') + if ( (scheduled_callbacks_alert == 'RED_DEFER') || (scheduled_callbacks_alert == 'BLINK_DEFER') || (scheduled_callbacks_alert == 'BLINK_RED_DEFER') ) + {Defer=1;} + + if ( (LastCallbackViewed > 0) && (Defer > 0) ) + {var do_nothing=1;} + else { - CBpre = ''; - CBpost = ''; - } - if (scheduled_callbacks_alert == 'RED') - { - CBpre = ''; - CBpost = ''; - } - if (scheduled_callbacks_alert == 'BLINK_RED') - { - CBpre = ''; - CBpost = ''; + if ( (scheduled_callbacks_alert == 'BLINK') || (scheduled_callbacks_alert == 'BLINK_DEFER') ) + { + CBpre = ''; + CBpost = ''; + } + if ( (scheduled_callbacks_alert == 'RED') || (scheduled_callbacks_alert == 'RED_DEFER') ) + { + CBpre = ''; + CBpost = ''; + } + if ( (scheduled_callbacks_alert == 'BLINK_RED') || (scheduled_callbacks_alert == 'BLINK_RED_DEFER') ) + { + CBpre = ''; + CBpost = ''; + } } } CBlinkCONTENT ="" + CBpre + '' + CBprint + '' + " ACTIVE CALLBACKS" + CBpost + ""; @@ -5192,6 +5209,8 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } else { + LastCallbackViewed=1; + showDiv('CallBacKsLisTBox'); var xmlhttp=false; @@ -5262,11 +5281,22 @@ function set_length(SLnumber,SLlength_goal,SLdirection) } +// ################################################################################ +// closes callback list screen + function CalLBacKsLisTClose() + { + hideDiv('CallBacKsLisTBox'); + CalLBacKsCounTCheck(); + } + + // ################################################################################ // Open up a callback customer record as manual dial preview mode function new_callback_call(taskCBid,taskLEADid) { // alt_phone_dialing=1; + LastCallbackViewed=1; + LastCallbackCount = (LastCallbackCount - 1); auto_dial_level=0; manual_dial_in_progress=1; MainPanelToFront(); @@ -12564,7 +12594,7 @@ Available Agents Transfer:   Refresh                 - Go Back + Go Back diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 31cb4daf..3afbf29a 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -2666,12 +2666,13 @@ else # 110222-2039 - Added USER, GROUP and TERRITORY restrictions to agent lead search # 110224-1427 - Added queuemetrics_phone_environment and active_twin_server_ip options # 110301-1206 - Added options for ring-all in-group next-agent-call +# 110304-1651 - Added DEFER options to the scheduled callbacks alert campaign feature # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.4-304a'; -$build = '110301-1206'; +$admin_version = '2.4-305a'; +$build = '110304-1651'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -4687,7 +4688,7 @@ if ($ADD==99999)

- Scheduled Callbacks Alert - This option allows the callbacks status line in the agent interface to be red, blink or blink red when there are AGENTONLY scheduled callbacks that have hit their trigger time and date. Default is NONE for standard status line. + Scheduled Callbacks Alert - This option allows the callbacks status line in the agent interface to be red, blink or blink red when there are AGENTONLY scheduled callbacks that have hit their trigger time and date. Default is NONE for standard status line. The DEFER options will stop blinking and-or displaying in red when you check the callbacks, until the number of callbacks changes.
@@ -19237,7 +19238,7 @@ if ($ADD==31) } echo "Scheduled Callbacks: $NWB#vicidial_campaigns-scheduled_callbacks$NWE\n"; - echo "Scheduled Callbacks Alert: $NWB#vicidial_campaigns-scheduled_callbacks_alert$NWE\n"; + echo "Scheduled Callbacks Alert: $NWB#vicidial_campaigns-scheduled_callbacks_alert$NWE\n"; echo "Scheduled Callbacks Count: $NWB#vicidial_campaigns-scheduled_callbacks_count$NWE\n";