From 24966d14e4ecf7534b59641bf7a06c5482b8674f Mon Sep 17 00:00:00 2001 From: mattf Date: Mon, 6 Jul 2009 18:42:02 +0000 Subject: [PATCH] Added Agents Status View sidebar to agent interface Added vailable transfer agent frame to AGENTDIRECT transfers when clicking on the NUMBER TO CALL field in the transfer conference frame Fixed Calls in Queue count for AGENTDIRECT calls git-svn-id: svn://192.168.202.10@1179 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/UPGRADE | 3 + .../trunk/extras/MySQL_AST_CREATE_tables.sql | 8 +- agc_2-X/trunk/extras/upgrade_2.2.0.sql | 5 + .../TO_BE_TRANSLATED_2.2.0.txt | 7 + agc_2-X/trunk/www/agc/conf_exten_check.php | 13 +- agc_2-X/trunk/www/agc/vdc_db_query.php | 129 ++++++++- agc_2-X/trunk/www/agc/vicidial.php | 251 ++++++++++++++---- .../trunk/www/vicidial/AST_CLOSERstats.php | 14 +- agc_2-X/trunk/www/vicidial/admin.php | 76 +++++- 9 files changed, 433 insertions(+), 73 deletions(-) diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE index 9fc031e4..84ee1605 100644 --- a/agc_2-X/trunk/UPGRADE +++ b/agc_2-X/trunk/UPGRADE @@ -124,6 +124,9 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom Detection) proxy as well as a new netborder sip patch: netborder-cpd-1.4.patch +33. Added Agents Status View sidebar to agent interface, and available transfer + agent frame to AGENTDIRECT transfers when clicking on the NUMBER TO CALL + field in the transfer conference frame diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql index bac4bb03..d66b65d7 100644 --- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql +++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql @@ -531,7 +531,9 @@ qc_allowed_campaigns TEXT, qc_allowed_inbound_groups TEXT, group_shifts TEXT, forced_timeclock_login ENUM('Y','N','ADMIN_EXEMPT') default 'N', -shift_enforcement ENUM('OFF','START','ALL') default 'OFF' +shift_enforcement ENUM('OFF','START','ALL') default 'OFF', +agent_status_viewable_groups TEXT, +agent_status_view_time ENUM('Y','N') default 'N' ); CREATE TABLE vicidial_campaigns ( @@ -1623,7 +1625,7 @@ INSERT INTO system_settings (version,install_date) values('2.2.0b0.5', CURDATE() INSERT INTO vicidial_status_categories (vsc_id,vsc_name) values('UNDEFINED','Default Category'); -INSERT INTO vicidial_user_groups SET user_group='ADMIN',group_name='VICIDIAL ADMINISTRATORS',allowed_campaigns=' -ALL-CAMPAIGNS- - -'; +INSERT INTO vicidial_user_groups SET user_group='ADMIN',group_name='VICIDIAL ADMINISTRATORS',allowed_campaigns=' -ALL-CAMPAIGNS- - -',agent_status_viewable_groups=' --ALL-GROUPS-- '; INSERT INTO vicidial_call_times SET call_time_id='24hours',call_time_name='default 24 hours calling',ct_default_start='0',ct_default_stop='2400'; INSERT INTO vicidial_call_times SET call_time_id='9am-9pm',call_time_name='default 9am to 9pm calling',ct_default_start='900',ct_default_stop='2100'; @@ -1719,7 +1721,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='1160'; +UPDATE system_settings SET db_schema_version='1161'; GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/agc_2-X/trunk/extras/upgrade_2.2.0.sql b/agc_2-X/trunk/extras/upgrade_2.2.0.sql index 14b73ae3..45586e18 100644 --- a/agc_2-X/trunk/extras/upgrade_2.2.0.sql +++ b/agc_2-X/trunk/extras/upgrade_2.2.0.sql @@ -286,3 +286,8 @@ index (trigger_time) INSERT INTO vicidial_process_triggers SET trigger_id='LOAD_LEADS',server_ip='10.10.10.15',trigger_name='Load Leads',trigger_time='2009-01-01 00:00:00',trigger_run='0',trigger_lines='/usr/share/astguiclient/VICIDIAL_IN_new_leads_file.pl'; UPDATE system_settings SET db_schema_version='1160'; + +ALTER TABLE vicidial_user_groups ADD agent_status_viewable_groups TEXT; +ALTER TABLE vicidial_user_groups ADD agent_status_view_time ENUM('Y','N') default 'N'; + +UPDATE system_settings SET db_schema_version='1161'; diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt index bf0cae98..c1dfb1a2 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt @@ -223,6 +223,11 @@ for a 1 second break. You can also use several variables such as first name, las Multiple Campaign Drop Rate Group|| This feature allows you to set a campaign as a member of a Campaign Drop Rate Group, or a group of campaigns whose Human Answered calls and Drop calls for all campaigns in the group will be combined into a shared drop percentage, or abandon rate. This allows you to to run multiple campaigns at once and more easily control your drop rate. This is particularly useful in the UK where regulations permit this drop rate calculation method with campaign grouping for the same company even if there are several campaigns that company is running during the same day. To enable this for a campaign, just select a group from the list. There are 10 groups defined in the system by default, you can contact your system administrator to add more. Default is DISABLED|| IMPORTANT, this is the password only for the agent web interface phone login, to change the sip.conf or iax.conf password, or secret, for this phone device you need to modify the Conf File Secret field further down on this page|| +Agent Status Viewable Groups|| +This is a selectable list of User Groups and user functions to which members of this user group can view the status of as well as transfer calls to inside of the agent screen. The ALL-GROUPS option allows the users in this group to see and transfer calls to any user on the system. The CAMPAIGN-AGENTS option allows users in this group to see and transfer calls to any user in the campaign that they are logged into|| +Agent Status View Time|| +This option defines whether the agent will see the amount of time that users in their agent sidebar have been in their current status. Default is N for no or disabled|| +This option allows an agent to disposition a call as CALLBK and choose the date and time at which the lead will be re-activated|| add-file: user_territories.php @@ -234,6 +239,8 @@ add-file: AST_agent_timeclock_detail.php You are not allowed to dial into other agent sessions|| QUICK TRANSFER|| +Other Agents Status|| +Available Agents Transfer|| ############################################################ MANAGER Manual diff --git a/agc_2-X/trunk/www/agc/conf_exten_check.php b/agc_2-X/trunk/www/agc/conf_exten_check.php index e752c6da..401529a7 100644 --- a/agc_2-X/trunk/www/agc/conf_exten_check.php +++ b/agc_2-X/trunk/www/agc/conf_exten_check.php @@ -45,10 +45,11 @@ # 90307-1855 - Added shift enforcement to send logout flag if outside of shift hours # 90408-0020 - Added API vtiger specific callback activity record ability # 90508-0727 - Changed to PHP long tags +# 90706-1430 - Fixed AGENTDIRECT calls in queue display count # -$version = '2.2.0-20'; -$build = '90508-0727'; +$version = '2.2.0-21'; +$build = '90706-1430'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=17; $one_mysql_log=0; @@ -238,6 +239,7 @@ echo " if ($campagentstdisp == 'YES') { + $ADsql=''; ### grab the status of this agent to display $stmt="SELECT status,campaign_id,closer_campaigns from vicidial_live_agents where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "|$stmt|\n";} @@ -249,9 +251,14 @@ echo " $AccampSQL=$row[2]; $AccampSQL = ereg_replace(' -','', $AccampSQL); $AccampSQL = ereg_replace(' ',"','", $AccampSQL); + if (eregi('AGENTDIRECT', $AccampSQL)) + { + $AccampSQL = ereg_replace('AGENTDIRECT','', $AccampSQL); + $ADsql = "or ( (campaign_id LIKE \"%AGENTDIRECT%\") and (agent_only='$user') )"; + } ### grab the number of calls being placed from this server and campaign - $stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) );"; + $stmt="SELECT count(*) from vicidial_auto_calls where status IN('LIVE') and ( (campaign_id='$Acampaign') or (campaign_id IN('$AccampSQL')) $ADsql);"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'03007',$user,$server_ip,$session_name,$one_mysql_log);} diff --git a/agc_2-X/trunk/www/agc/vdc_db_query.php b/agc_2-X/trunk/www/agc/vdc_db_query.php index 6585257c..18d8afea 100644 --- a/agc_2-X/trunk/www/agc/vdc_db_query.php +++ b/agc_2-X/trunk/www/agc/vdc_db_query.php @@ -13,7 +13,7 @@ # - $pass # optional variables: # - $format - ('text','debug') -# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl') +# - $ACTION - ('regCLOSER','manDiaLnextCALL','manDiaLskip','manDiaLonly','manDiaLlookCALL','manDiaLlogCALL','userLOGout','updateDISPO','VDADpause','VDADready','VDADcheckINCOMING','UpdatEFavoritEs','CalLBacKLisT','CalLBacKCounT','PauseCodeSubmit','LogiNCamPaigns','alt_phone_change','AlertControl','AGENTSview') # - $stage - ('start','finish','lookup','new') # - $closer_choice - ('CL_TESTCAMP_L CL_OUT123_L -') # - $conf_exten - ('8600011',...) @@ -201,12 +201,14 @@ # 90511-0923 - Added agentonly_callback_campaign_lock option # 90519-0634 - Fixed manual dial status and logging bug # 90611-1423 - Fixed agent log and vicidial log bugs +# 90705-2008 - Added AGENTSview function +# 90706-1431 - Added Agent view transfer selection # -$version = '2.2.0-112'; -$build = '90611-1423'; +$version = '2.2.0-114'; +$build = '90706-1431'; $mel=1; # Mysql Error Log enabled = 1 -$mysql_log_count=224; +$mysql_log_count=227; $one_mysql_log=0; require("dbconnect.php"); @@ -4513,6 +4515,125 @@ echo " Pause Code has been updated to $status for $agent_log_id\n"; } +################################################################################ +### AGENTSview - List statuses of other agents in sidebar or xfer frame +################################################################################ +if ($ACTION == 'AGENTSview') + { + $stmt="SELECT user_group from vicidial_users where user='$user' and pass='$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,'00225',$user,$server_ip,$session_name,$one_mysql_log);} + $row=mysql_fetch_row($rslt); + $VU_user_group = $row[0]; + + $agent_status_viewable_groupsSQL=''; + ### Gather timeclock and shift enforcement restriction settings + $stmt="SELECT agent_status_viewable_groups,agent_status_view_time from vicidial_user_groups where user_group='$VU_user_group';"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00226',$VD_login,$server_ip,$session_name,$one_mysql_log);} + $row=mysql_fetch_row($rslt); + $agent_status_viewable_groups = $row[0]; + $agent_status_viewable_groupsSQL = eregi_replace(' ','',$agent_status_viewable_groups); + $agent_status_viewable_groupsSQL = eregi_replace(' ',"','",$agent_status_viewable_groupsSQL); + $agent_status_viewable_groupsSQL = "user_group IN('$agent_status_viewable_groupsSQL')"; + $agent_status_view = 0; + if (strlen($agent_status_viewable_groups) > 2) + {$agent_status_view = 1;} + $agent_status_view_time=0; + if ($row[1] == 'Y') + {$agent_status_view_time=1;} + $andSQL=''; + if (ereg("ALL-CAMPAIGNS",$agent_status_viewable_groups)) + {$AGENTviewSQL = "";} + else + { + $AGENTviewSQL = "($agent_status_viewable_groupsSQL)"; + + if (ereg("CAMPAIGN-AGENTS",$agent_status_viewable_groups)) + {$AGENTviewSQL = "($AGENTviewSQL or (campaign_id='$campaign'))";} + $andSQL=' and'; + } + if ($comments=='AgentXferViewSelect') + {$AGENTviewSQL .= "$andSQL (vla.closer_campaigns LIKE \"%AGENTDIRECT%\")";} + + + echo ""; + ### Gather agents data and statuses + $stmt="SELECT vla.user,vla.status,vu.full_name,UNIX_TIMESTAMP(last_call_time),UNIX_TIMESTAMP(last_call_finish) from vicidial_live_agents vla,vicidial_users vu where vla.user=vu.user and $AGENTviewSQL order by vu.full_name;"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00227',$VD_login,$server_ip,$session_name,$one_mysql_log);} + if ($rslt) {$agents_count = mysql_num_rows($rslt);} + $loop_count=0; + while ($agents_count > $loop_count) + { + $row=mysql_fetch_row($rslt); + $user = $row[0]; + $status = $row[1]; + $full_name = $row[2]; + $call_start = $row[3]; + $call_finish = $row[4]; + + if ( ($status=='READY') or ($status=='CLOSER') ) + { + $statuscolor='#ADD8E6'; + $call_time = ($StarTtime - $call_finish); + } + if ( ($status=='QUEUE') or ($status=='INCALL') ) + { + $statuscolor='#D8BFD8'; + $call_time = ($StarTtime - $call_start); + } + if ($status=='PAUSED') + { + $statuscolor='#F0E68C'; + $call_time = ($StarTtime - $call_finish); + } + + if ($call_time < 1) + { + $call_time = "0:00"; + } + else + { + $Fminutes_M = ($call_time / 60); + $Fminutes_M_int = floor($Fminutes_M); + $Fminutes_M_int = intval("$Fminutes_M_int"); + $Fminutes_S = ($Fminutes_M - $Fminutes_M_int); + $Fminutes_S = ($Fminutes_S * 60); + $Fminutes_S = round($Fminutes_S, 0); + if ($Fminutes_S < 10) {$Fminutes_S = "0$Fminutes_S";} + $call_time = "$Fminutes_M_int:$Fminutes_S"; + } + + if ($comments=='AgentXferViewSelect') + { + echo ""; + if ($agent_status_view_time > 0) + {echo "";} + echo ""; + } + else + { + echo ""; + if ($agent_status_view_time > 0) + {echo "";} + echo ""; + } + $loop_count++; + } + echo "
  $row[0] - $row[2]   $call_time  
  "; + echo "$row[0] - $row[2]"; + echo "   $call_time  

\n"; + echo "    -READY      -INCALL      -PAUSED  \n"; + if ($comments=='AgentXferViewSelect') + { + echo "

Close Window "; + } + echo "
\n"; + } + + ################################################################################ ### CalLBacKLisT - List the USERONLY callbacks for an agent ################################################################################ diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index e57f158b..aea6d0d5 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -234,10 +234,12 @@ # 90531-0635 - Added option to hide customer phone number # 90611-1422 - Fixed multiple logging bugs # 90628-0655 - Added Quick Transfer button and Preset Prepopulate option +# 90705-1400 - Added Agent view sidebar option +# 90706-1432 - Added Agent view transfer selection # -$version = '2.2.0-212'; -$build = '90628-0655'; +$version = '2.2.0-214'; +$build = '90706-1432'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=61; $one_mysql_log=0; @@ -376,6 +378,7 @@ $BROWSER_HEIGHT = 500; # set to the minimum browser height, default=500 $BROWSER_WIDTH = 770; # set to the minimum browser width, default=770 $MAIN_COLOR = '#CCCCCC'; # old default is E0C2D6 $SCRIPT_COLOR = '#E6E6E6'; # old default is FFE7D0 +$SIDEBAR_COLOR = '#F6F6F6'; # options now set in DB: #$alt_phone_dialing = '1'; # allow agents to call alt phone numbers @@ -391,23 +394,25 @@ if ($MASTERwidth < 430) {$MASTERwidth = '430';} if ($MASTERheight < 300) {$MASTERheight = '300';} $CAwidth = ($MASTERwidth + 340); # 770 - cover all (none-in-session, customer hunngup, etc...) +$SBwidth = ($MASTERwidth + 331); # 761 - SideBar starting point $MNwidth = ($MASTERwidth + 330); # 760 - main frame $XFwidth = ($MASTERwidth + 320); # 750 - transfer/conference $HCwidth = ($MASTERwidth + 310); # 740 - hotkeys and callbacks $AMwidth = ($MASTERwidth + 270); # 700 - agent mute and preset-dial links -$SCwidth = ($MASTERwidth + 230); # 670 - live call seconds counter +$SCwidth = ($MASTERwidth + 230); # 670 - live call seconds counter, sidebar link $SSwidth = ($MASTERwidth + 176); # 606 - scroll script $SDwidth = ($MASTERwidth + 170); # 600 - scroll script, customer data and calls-in-session $HKwidth = ($MASTERwidth + 70); # 500 - Hotkeys button $HSwidth = ($MASTERwidth + 1); # 431 - Header spacer +$SLheight = ($MASTERheight + 125); # 425 - SideBar link $HKheight = ($MASTERheight + 105); # 405 - HotKey active Button $AMheight = ($MASTERheight + 100); # 400 - Agent mute and preset dial links $MBheight = ($MASTERheight + 65); # 365 - Manual Dial Buttons $CBheight = ($MASTERheight + 50); # 350 - Agent Callback, pause code, volume control Buttons and agent status $SSheight = ($MASTERheight + 31); # 331 - script content $HTheight = ($MASTERheight + 10); # 310 - transfer frame, callback comments and hotkey -$BPheight = ($MASTERheight - 250); # 50 - bottom buffer +$BPheight = ($MASTERheight - 250); # 50 - bottom buffer, Agent Xfer Span $US='_'; @@ -791,7 +796,7 @@ $VDloginDISPLAY=0; else {$VU_alert_enabled = 'OFF';} ### Gather timeclock and shift enforcement restriction settings - $stmt="SELECT forced_timeclock_login,shift_enforcement,group_shifts from vicidial_user_groups where user_group='$VU_user_group';"; + $stmt="SELECT forced_timeclock_login,shift_enforcement,group_shifts,agent_status_viewable_groups,agent_status_view_time from vicidial_user_groups where user_group='$VU_user_group';"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01052',$VD_login,$server_ip,$session_name,$one_mysql_log);} $row=mysql_fetch_row($rslt); @@ -800,6 +805,16 @@ $VDloginDISPLAY=0; $LOGgroup_shiftsSQL = eregi_replace(' ','',$row[2]); $LOGgroup_shiftsSQL = eregi_replace(' ',"','",$LOGgroup_shiftsSQL); $LOGgroup_shiftsSQL = "shift_id IN('$LOGgroup_shiftsSQL')"; + $agent_status_viewable_groups = $row[3]; + $agent_status_viewable_groupsSQL = eregi_replace(' ','',$agent_status_viewable_groups); + $agent_status_viewable_groupsSQL = eregi_replace(' ',"','",$agent_status_viewable_groupsSQL); + $agent_status_viewable_groupsSQL = "user_group IN('$agent_status_viewable_groupsSQL')"; + $agent_status_view = 0; + if (strlen($agent_status_viewable_groups) > 2) + {$agent_status_view = 1;} + $agent_status_view_time=0; + if ($row[4] == 'Y') + {$agent_status_view_time=1;} ### BEGIN - CHECK TO SEE IF AGENT IS LOGGED IN TO TIMECLOCK, IF NOT, OUTPUT ERROR if ( (ereg('Y',$forced_timeclock_login)) or ( (ereg('ADMIN_EXEMPT',$forced_timeclock_login)) and ($VU_user_level < 8) ) ) @@ -2075,7 +2090,7 @@ for( $Ccount=0;$Ccount<(6*7);$Ccount++) $CDCLR="#ffffff"; if ( ($Cdayarray['mday'] < $CTODAYmday) and ($CPRNTDAY == $CTODAY) ) { - $CDCLR="#CCCCCC"; + $CDCLR="$MAIN_COLOR"; $CBL = ''; $CEL = ''; } @@ -2427,6 +2442,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var alert_enabled = ''; var shift_logout_flag = 0; var vtiger_callback_id = 0; + var agent_status_view = ''; + var agent_status_view_time = ''; + var agent_status_view_active = 0; + var xfer_select_agents_active = 0; + var even=0; + var VU_user_group = ''; var quick_transfer_button = ''; var quick_transfer_button_enabled = ''; var prepopulate_transfer_preset = ''; @@ -3159,7 +3180,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var LMAcontent_match=0; agentphonelive=0; var conv_start=-1; - var live_conf_HTML = "LIVE CALLS IN YOUR SESSION:
>"; + var live_conf_HTML = "LIVE CALLS IN YOUR SESSION:
#REMOTE CHANNELHANGUPVOLUME
>>"; if ( (LMAcount > live_conf_calls) || (LMAcount < live_conf_calls) || (LMAforce > 0)) { LMAe[0]=''; LMAe[1]=''; LMAe[2]=''; LMAe[3]=''; LMAe[4]=''; LMAe[5]=''; @@ -3888,7 +3909,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var CB_calls = all_CBs_array[0]; var loop_ct=0; var conv_start=0; - var CB_HTML = "
#REMOTE CHANNELHANGUPVOLUME
" + var CB_HTML = "
# CALLBACK DATE/TIMENUMBERNAME STATUSCAMPAIGNLAST CALL DATE/TIME COMMENTS
>" while (loop_ct < CB_calls) { loop_ct++; @@ -7224,13 +7245,114 @@ function phone_number_format(formatphone) { }; +// ################################################################################ +// Refresh the agents view sidebar or xfer frame + function refresh_agents_view(RAlocation,RAcount) + { + if (RAcount > 0) + { + if (even > 0) + { + var xmlhttp=false; + /*@cc_on @*/ + /*@if (@_jscript_version >= 5) + // JScript gives us Conditional compilation, we can cope with old IE versions. + // and security blocked creation of the objects. + try { + xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (E) { + xmlhttp = false; + } + } + @end @*/ + if (!xmlhttp && typeof XMLHttpRequest!='undefined') + { + xmlhttp = new XMLHttpRequest(); + } + if (xmlhttp) + { + RAview_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&ACTION=AGENTSview&format=text&user=" + user + "&pass=" + pass + "&user_group=" + VU_user_group + "&conf_exten=" + session_id + "&extension=" + extension + "&protocol=" + protocol + "&stage=" + agent_status_view_time + "&campaign=" + campaign + "&comments=" + RAlocation; + xmlhttp.open('POST', 'vdc_db_query.php'); + xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); + xmlhttp.send(RAview_query); + xmlhttp.onreadystatechange = function() + { + if (xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + // alert(xmlhttp.responseText); + document.getElementById(RAlocation).innerHTML = xmlhttp.responseText + "\n"; + } + } + delete xmlhttp; + } + + } + } + } + + +// ################################################################################ +// Open or close the agents view sidebar or xfer frame + function AgentsViewOpen(AVlocation,AVoperation) + { + if (AVoperation=='open') + { + if (AVlocation=='AgentViewSpan') + { + document.getElementById("AgentViewLink").innerHTML = "Agents View -"; + agent_status_view_active=1; + } + showDiv(AVlocation); + } + else + { + if (AVlocation=='AgentViewSpan') + { + document.getElementById("AgentViewLink").innerHTML = "Agents View +"; + agent_status_view_active=0; + } + hideDiv(AVlocation); + } + } + + +// ################################################################################ +// Populate the number to dial field with the selected user ID + function AgentsXferSelect(AXuser,AXlocation) + { + xfer_select_agents_active=0; + hideDiv('AgentXferViewSpan'); + hideDiv(AXlocation); + document.vicidial_form.xfernumber.value = AXuser; + } + + +// ################################################################################ +// OnFocus function for number to dial + function XferAgentSelectLaunch() + { + var XfeRSelecT = document.getElementById("XfeRGrouP"); + var XScheck = XfeRSelecT.value + if (XScheck.match(/AGENTDIRECT/)) + { + showDiv('AgentXferViewSpan'); + AgentsViewOpen('AgentXferViewSelect','open'); + refresh_agents_view('AgentXferViewSelect',agent_status_view) + xfer_select_agents_active=1; + } + } + + // ################################################################################ // Move the Dispo frame out of the way and change the link to maximize function DispoMinimize() { - showDiv('DispoButtonHideA'); - showDiv('DispoButtonHideB'); - showDiv('DispoButtonHideC'); + showDiv('DispoButtonHideA'); + showDiv('DispoButtonHideB'); + showDiv('DispoButtonHideC'); document.getElementById("DispoSelectBox").style.top = 340; document.getElementById("DispoSelectMaxMin").innerHTML = " maximize "; } @@ -7242,9 +7364,9 @@ function phone_number_format(formatphone) { { document.getElementById("DispoSelectBox").style.top = 1; document.getElementById("DispoSelectMaxMin").innerHTML = " minimize "; - hideDiv('DispoButtonHideA'); - hideDiv('DispoButtonHideB'); - hideDiv('DispoButtonHideC'); + hideDiv('DispoButtonHideA'); + hideDiv('DispoButtonHideB'); + hideDiv('DispoButtonHideC'); } @@ -7443,6 +7565,8 @@ else hideDiv('NeWManuaLDiaLBox'); hideDiv('PauseCodeSelectBox'); hideDiv('GroupAliasSelectBox'); + hideDiv('AgentViewSpan'); + hideDiv('AgentXferViewSpan'); if (agentonly_callbacks != '1') {hideDiv('CallbacksButtons');} // if ( (agentcall_manual != '1') && (starting_dial_level > 0) ) @@ -7460,6 +7584,8 @@ else {hideDiv('VolumeControlSpan');} if (DefaulTAlTDiaL == '1') {document.vicidial_form.DiaLAltPhonE.checked=true;} + if (agent_status_view != '1') + {document.getElementById("AgentViewLink").innerHTML = "";} document.vicidial_form.LeadLookuP.checked=true; @@ -7565,6 +7691,15 @@ else { // check for live channels in conference room and get current datetime check_for_conf_calls(session_id, '0'); + // refresh agent status view + if (agent_status_view_active > 0) + { + refresh_agents_view('AgentViewStatus',agent_status_view); + } + if (xfer_select_agents_active > 0) + { + refresh_agents_view('AgentXferViewSelect',agent_status_view); + } if (agentonly_callbacks == '1') {CB_count_check++;} @@ -7683,6 +7818,9 @@ else { epoch_sec++; check_n++; + even++; + if (even > 1) + {even=0;} var year= t.getYear() var month= t.getMonth() month++; @@ -8193,7 +8331,7 @@ echo "\n";
- +
# CALLBACK DATE/TIMENUMBERNAME STATUSCAMPAIGNLAST CALL DATE/TIME COMMENTS
height=460>
CALLBACKS FOR AGENT :
Click on a callback below to call the customer back now. If you click on a record below to call it, it will be removed from the list.
@@ -8204,7 +8342,7 @@ echo "\n";
- + height=460> @@ -8295,7 +8433,18 @@ Your Status:
Calls Dialing: px;z-index:23;" id="HotKeyActionBox"> + +
NEW MANUAL DIAL LEAD FOR :

Enter information below for the new lead you wish to call.

Calls Dialing:            
- LOCAL CLOSER - Hangup Xfer Line - Hangup Both Lines + LOCAL CLOSER + Hangup Xfer Line + Hangup Both Lines
- Number to call   + Number to call   DIAL OVERRIDE   - LEAVE 3-WAY CALL - Dial Blind Transfer + LEAVE 3-WAY CALL + Dial Blind Transfer D1 D2 @@ -8285,9 +8423,9 @@ Your Status:
Calls Dialing:   channel - Dial With Customer - Park Customer Dial - Blind Transfer VMail Message + Dial With Customer + Park Customer Dial + Blind Transfer VMail Message
  +Other Agents Status:  
 
+ +
+Available Agents Transfer:
+ +
Agents View +
+ + + + height=70>
Lead Dispositioned As:

-
@@ -8303,7 +8452,7 @@ Your Status:
Calls Dialing: px;z-index:24;" id="HotKeyEntriesBox"> + height=70> @@ -8319,7 +8468,7 @@ Your Status:
Calls Dialing: px;z-index:25;" id="CBcommentsBox"> +
Disposition Hot Keys: When active, simply press the keyboard key for the desired disposition for this call. The call will then be hungup and dispositioned automatically:
height=70> @@ -8336,7 +8485,7 @@ Your Status:
Calls Dialing: px;z-index:26;" id="EAcommentsBox"> +
Previous Callback Information:
height=70> @@ -8353,14 +8502,14 @@ Your Status:
Calls Dialing: px;z-index:27;" id="EAcommentsMinBox"> +
Extended Alt Phone Information:
maximize
Alt Phone Info
- + height=500>
Noone is in your session:
Go Back

@@ -8368,7 +8517,7 @@ Your Status:
Calls Dialing: + height=500>
Customer has hung up:
Go Back

@@ -8377,7 +8526,7 @@ Your Status:
Calls Dialing: + height=550>
Call Wrapup: seconds remaining in wrapup



@@ -8386,33 +8535,33 @@ Your Status:
Calls Dialing: + height=500>
Your session has been disabled
LOGOUT

Go Back
- + height=500>
There is a time synchronization problem with your system, please tell your system administrator


Go Back
- + height=500>

LOGOUT
- +
- +
 
- + height=47>
Any changes made to the customer information below at this time will not be comitted, You must change customer information before you Hangup the call.
- + height=460>
DISPOSITION CALL :       Hangup Again       minimize
End-of-call Disposition Selection
@@ -8425,7 +8574,7 @@ Your Status:
Calls Dialing: + height=460>
SELECT A PAUSE CODE :
Pause Code Selection @@ -8433,7 +8582,7 @@ Your Status:
Calls Dialing: + height=460>
SELECT A GROUP ALIAS :
Group Alias Selection @@ -8441,10 +8590,10 @@ Your Status:
Calls Dialing: + - + height=460>
Select a CallBack Date :
@@ -8497,7 +8646,7 @@ Your Status:
Calls Dialing: + height=460> diff --git a/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php b/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php index c8813916..b6d6d035 100644 --- a/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php +++ b/agc_2-X/trunk/www/vicidial/AST_CLOSERstats.php @@ -194,14 +194,14 @@ echo "
CLOSER INBOUND GROUP SELECTION
Closer Inbound Group Selection
@@ -8515,7 +8664,7 @@ Your Status:
Calls Dialing: + Channel Channel @@ -8587,22 +8736,22 @@ RECORDING FILE:
RECORD ID:
-Start Recording
+Start Recording

Web Form

-Park Call
-Transfer - Conference
+Park Call
+Transfer - Conference
0) - {echo "\"Quick
\n";} + {echo "\"Quick
\n";} ?>
Hangup Customer

-
Send DTMF

+
Send DTMF

\n"; echo "Inbound Groups: \n"; echo "\n"; echo "\n"; echo "\n"; diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 9ccd98b1..c4bc64db 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -1067,6 +1067,10 @@ if (isset($_GET["tts_text"])) {$tts_text=$_GET["tts_text"];} elseif (isset($_POST["tts_text"])) {$tts_text=$_POST["tts_text"];} if (isset($_GET["drop_rate_group"])) {$drop_rate_group=$_GET["drop_rate_group"];} elseif (isset($_POST["drop_rate_group"])) {$drop_rate_group=$_POST["drop_rate_group"];} +if (isset($_GET["agent_status_viewable_groups"])) {$agent_status_viewable_groups=$_GET["agent_status_viewable_groups"];} + elseif (isset($_POST["agent_status_viewable_groups"])) {$agent_status_viewable_groups=$_POST["agent_status_viewable_groups"];} +if (isset($_GET["agent_status_view_time"])) {$agent_status_view_time=$_GET["agent_status_view_time"];} + elseif (isset($_POST["agent_status_view_time"])) {$agent_status_view_time=$_POST["agent_status_view_time"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} @@ -1320,6 +1324,7 @@ if ($non_latin < 1) $unworkable = ereg_replace("[^NY]","",$unworkable); $sounds_update = ereg_replace("[^NY]","",$sounds_update); $carrier_logging_active = ereg_replace("[^NY]","",$carrier_logging_active); + $agent_status_view_time = ereg_replace("[^NY]","",$agent_status_view_time); $qc_enabled = ereg_replace("[^0-9NY]","",$qc_enabled); $active = ereg_replace("[^0-9NY]","",$active); @@ -1844,7 +1849,7 @@ else # 90514-0607 - Added select prompts from list in call menu and in-group screens # 90521-0029 - Added user territories enable option # 90522-0506 - Security fix for logins when using non-latin setting -# 90524-2307 - Chaned Reports screen layout +# 90524-2307 - Changed Reports screen layout # 90528-2055 - Added ViciDial recording limit field in servers and phone_context to phones # 90530-1206 - Changed List Mix to allow for 40 mixes # 90531-1802 - Added auto-generated options for users, campaigns, in-groups, etc..., added option to HIDE custphone @@ -1861,11 +1866,12 @@ else # 90627-2333 - Added default transfer button and prepopulate preset options # 90628-0924 - Added Text To Speech(TTS) fields # 90628-2213 - Added Multi-campaign drop rate groups +# 90705-0926 - Added User Group agent view options # # 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.2.0-203'; -$build = '90628-2213'; +$admin_version = '2.2.0-204'; +$build = '90705-0926'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -2862,7 +2868,7 @@ echo "\n"; + + echo "\n"; + + echo "\n"; + if ($SSqc_features_active > 0) { echo "

-Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the data and time at which the lead will be re-activated. +Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the date and time at which the lead will be re-activated.
@@ -4402,6 +4408,16 @@ if ($SSoutbound_autodial_active > 0)
Allowed Campaigns - This is a selectable list of Campaigns to which members of this user group can log in to. The ALL-CAMPAIGNS option allows the users in this group to see and log in to any campaign on the system. +
+
+
+Agent Status Viewable Groups - This is a selectable list of User Groups and user functions to which members of this user group can view the status of as well as transfer calls to inside of the agent screen. The ALL-GROUPS option allows the users in this group to see and transfer calls to any user on the system. The CAMPAIGN-AGENTS option allows users in this group to see and transfer calls to any user in the campaign that they are logged into. + +
+
+
+Agent Status View Time - This option defines whether the agent will see the amount of time that users in their agent sidebar have been in their current status. Default is N for no or disabled. + 0) { @@ -11632,10 +11648,21 @@ if ($ADD==411111) $group_shifts_ct = count($group_shifts); while ($p <= $group_shifts_ct) { + $group_shifts[$p] = ereg_replace("[^ -_0-9a-zA-Z]","",$group_shifts[$p]); $GROUP_shifts .= "$group_shifts[$p] "; $p++; } - $stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name',allowed_campaigns='$campaigns_value',qc_allowed_campaigns='$qc_campaigns_value',qc_allowed_inbound_groups='$qc_groups_value',group_shifts='$GROUP_shifts',forced_timeclock_login='$forced_timeclock_login',shift_enforcement='$shift_enforcement' where user_group='$OLDuser_group';"; + $p=0; + $VGROUP_vgroups=' '; + $vgroup_vgroups_ct = count($agent_status_viewable_groups); + while ($p <= $vgroup_vgroups_ct) + { + $agent_status_viewable_groups[$p] = ereg_replace("[^ -_0-9a-zA-Z]","",$agent_status_viewable_groups[$p]); + $VGROUP_vgroups .= "$agent_status_viewable_groups[$p] "; + $p++; + } + + $stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name',allowed_campaigns='$campaigns_value',qc_allowed_campaigns='$qc_campaigns_value',qc_allowed_inbound_groups='$qc_groups_value',group_shifts='$GROUP_shifts',forced_timeclock_login='$forced_timeclock_login',shift_enforcement='$shift_enforcement',agent_status_viewable_groups='$VGROUP_vgroups',agent_status_view_time='$agent_status_view_time' where user_group='$OLDuser_group';"; $rslt=mysql_query($stmt, $link); echo "
USER GROUP MODIFIED\n"; @@ -18688,6 +18715,8 @@ if ($ADD==311111) $GROUP_shifts = $row[5]; $forced_timeclock_login = $row[6]; $shift_enforcement = $row[7]; + $VGROUP_vgroups = $row[8]; + $agent_status_view_time = $row[9]; echo ""; @@ -18732,6 +18761,43 @@ if ($ADD==311111) } echo "
 
Agent Status Viewable Groups:
$NWB#vicidial_user_groups-agent_status_viewable_groups$NWE
\n"; + echo "ALL-GROUPS - All user groups in the system
\n"; + echo "CAMPAIGN-AGENTS - All users logged into the same camapaign as the agent
\n"; + + $stmt="SELECT user_group,group_name from vicidial_user_groups order by user_group"; + $rslt=mysql_query($stmt, $link); + $view_groups_to_print = mysql_num_rows($rslt); + $o=0; + while ($view_groups_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $vgroups_id_value = $rowx[0]; + $vgroups_name_value = $rowx[1]; + echo " $vgroups_id_value - $vgroups_name_value
\n"; + $o++; + } + echo "
 
Agent Status View Time: $NWB#vicidial_user_groups-agent_status_view_time$NWE
QC Allowed Campaigns:
$NWB#vicidial_user_groups-qc_allowed_campaigns$NWE
\n";