diff --git a/UPGRADE b/UPGRADE index cd834612..70463827 100644 --- a/UPGRADE +++ b/UPGRADE @@ -370,6 +370,15 @@ OTHER CHANGES: click selection dialing of phone numbers on web pages to a logged-in ViciDial Agent session. See "extras/firefox_plugin" for more info. +82. Added ability to change users' in-group settings from the in-group + modification screen in bulk. + +83. Added Agent Average time stats option to the real-time screen. Must enable + realtime_agent_time_stats option in campaign screen. + +84. Added customer park time counter to the agent screen when customer is on + park. Also, added logging of parked calls to park_log table + diff --git a/agi/agi-VDAD_ALL_inbound.agi b/agi/agi-VDAD_ALL_inbound.agi index af9dc323..2bae27b3 100644 --- a/agi/agi-VDAD_ALL_inbound.agi +++ b/agi/agi-VDAD_ALL_inbound.agi @@ -796,7 +796,7 @@ if ($call_handle_method =~ /LOOKUP/) ### Grab all lists associated with Scampaign_id $cbc=0; $SlistsSQL=''; - $stmtA = "SELECT list_id FROM vicidial_lists where campaign_id='$Scampaign_id' limit 100;"; + $stmtA = "SELECT list_id FROM vicidial_lists where campaign_id='$Scampaign_id' limit 1000;"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; diff --git a/bin/ADMIN_keepalive_ALL.pl b/bin/ADMIN_keepalive_ALL.pl index 066e568a..4acbe20a 100644 --- a/bin/ADMIN_keepalive_ALL.pl +++ b/bin/ADMIN_keepalive_ALL.pl @@ -56,6 +56,7 @@ # 100811-2221 - Added --cu3way flag for new optional leave3way cleaning script # 100812-0515 - Added --cu3way-delay= flag for setting delay in the leave3way cleaning script # 100814-2206 - Added clearing and optimization for vicidial_xfer_stats table +# 101022-1655 - Added new variables to be cleared from vicidial_cacmpaign_stats table # $DB=0; # Debug flag @@ -695,7 +696,7 @@ if ($timeclock_end_of_day_NOW > 0) if ($DB) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";} $sthA->finish(); - $stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0', calls_today='0', answers_today='0', drops_today='0', drops_today_pct='0', drops_answers_today_pct='0', calls_hour='0', answers_hour='0', drops_hour='0', drops_hour_pct='0', calls_halfhour='0', answers_halfhour='0', drops_halfhour='0', drops_halfhour_pct='0', calls_fivemin='0', answers_fivemin='0', drops_fivemin='0', drops_fivemin_pct='0', calls_onemin='0', answers_onemin='0', drops_onemin='0', drops_onemin_pct='0', differential_onemin='0', agents_average_onemin='0', balance_trunk_fill='0', status_category_count_1='0', status_category_count_2='0', status_category_count_3='0', status_category_count_4='0';"; + $stmtA = "UPDATE vicidial_campaign_stats SET dialable_leads='0', calls_today='0', answers_today='0', drops_today='0', drops_today_pct='0', drops_answers_today_pct='0', calls_hour='0', answers_hour='0', drops_hour='0', drops_hour_pct='0', calls_halfhour='0', answers_halfhour='0', drops_halfhour='0', drops_halfhour_pct='0', calls_fivemin='0', answers_fivemin='0', drops_fivemin='0', drops_fivemin_pct='0', calls_onemin='0', answers_onemin='0', drops_onemin='0', drops_onemin_pct='0', differential_onemin='0', agents_average_onemin='0', balance_trunk_fill='0', status_category_count_1='0', status_category_count_2='0', status_category_count_3='0', status_category_count_4='0',agent_calls_today='0',agent_pause_today='0',agent_wait_today='0',agent_custtalk_today='0',agent_acw_today='0';"; if($DBX){print STDERR "\n|$stmtA|\n";} $affected_rows = $dbhA->do($stmtA); if($DB){print STDERR "\n|$affected_rows vicidial_campaign_stats records reset|\n";} @@ -712,7 +713,7 @@ if ($timeclock_end_of_day_NOW > 0) $stmtA = "UPDATE vicidial_drop_rate_groups SET calls_today='0', answers_today='0', drops_today='0', drops_today_pct='0', drops_answers_today_pct='0';"; if($DBX){print STDERR "\n|$stmtA|\n";} $affected_rows = $dbhA->do($stmtA); - if($DB){print STDERR "\n|$affected_rows vicidial_campaign_stats records reset|\n";} + if($DB){print STDERR "\n|$affected_rows vicidial_drop_rate_groups records reset|\n";} $stmtA = "optimize table vicidial_drop_rate_groups;"; if($DBX){print STDERR "\n|$stmtA|\n";} diff --git a/bin/AST_VDadapt.pl b/bin/AST_VDadapt.pl index 97ac8ba4..90b6530b 100644 --- a/bin/AST_VDadapt.pl +++ b/bin/AST_VDadapt.pl @@ -365,11 +365,11 @@ while ($master_loop<$CLIloops) if ($CLIcampaign) { - $stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,UNIX_TIMESTAMP(campaign_changedate),campaign_stats_refresh,campaign_allow_inbound,drop_rate_group,UNIX_TIMESTAMP(campaign_calldate) from vicidial_campaigns where campaign_id='$CLIcampaign'"; + $stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,UNIX_TIMESTAMP(campaign_changedate),campaign_stats_refresh,campaign_allow_inbound,drop_rate_group,UNIX_TIMESTAMP(campaign_calldate),realtime_agent_time_stats from vicidial_campaigns where campaign_id='$CLIcampaign'"; } else { - $stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,UNIX_TIMESTAMP(campaign_changedate),campaign_stats_refresh,campaign_allow_inbound,drop_rate_group,UNIX_TIMESTAMP(campaign_calldate) from vicidial_campaigns where ( (active='Y') or (campaign_stats_refresh='Y') )"; + $stmtA = "SELECT campaign_id,lead_order,hopper_level,auto_dial_level,local_call_time,lead_filter_id,use_internal_dnc,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,UNIX_TIMESTAMP(campaign_changedate),campaign_stats_refresh,campaign_allow_inbound,drop_rate_group,UNIX_TIMESTAMP(campaign_calldate),realtime_agent_time_stats from vicidial_campaigns where ( (active='Y') or (campaign_stats_refresh='Y') )"; } $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; @@ -400,6 +400,7 @@ while ($master_loop<$CLIloops) $campaign_allow_inbound[$rec_count] = $aryA[16]; $drop_rate_group[$rec_count] = $aryA[17]; $campaign_calldate_epoch[$rec_count] = $aryA[18]; + $realtime_agent_time_stats[$rec_count] = $aryA[19]; $rec_count++; } @@ -822,6 +823,11 @@ sub calculate_drops $VCSdrops_one[$i]=0; $VCSdrops_one_pct[$i]=0; $VCSagent_nonpause_time[$i]=0; + $VCSagent_pause_today[$i]=0; + $VCSagent_wait_today[$i]=0; + $VCSagent_custtalk_today[$i]=0; + $VCSagent_acw_today[$i]=0; + $VCSagent_calls_today[$i]=0; # LAST ONE MINUTE CALL AND DROP STATS $stmtA = "SELECT count(*) from $vicidial_log where campaign_id='$campaign_id[$i]' and call_date > '$VDL_one';"; @@ -1137,12 +1143,43 @@ sub calculate_drops { @aryA = $sthA->fetchrow_array; if ($DBX) {print " DROP RATE GROUP USED: $drop_rate_group[$i] $aryA[0]|$VCSdrops_answers_today_pct[$i]\n";} - $VCSdrops_answers_today_pct[$i] = "$aryA[0]"; + $VCSdrops_answers_today_pct[$i] = $aryA[0]; } $sthA->finish(); } + + # if campaign realtime agent time stats is enabled, gather those here + if ($realtime_agent_time_stats[$i] =~ /WAIT_CUST_ACW/) + { + $stmtA = "SELECT sum(pause_sec),sum(wait_sec),sum(talk_sec) - sum(dead_sec) as custtalk,sum(dispo_sec) + sum(dead_sec) as acw from vicidial_agent_log where event_time > '$VDL_date' and campaign_id='$campaign_id[$i]' and pause_sec < 65000 and wait_sec < 65000 and talk_sec < 65000 and dispo_sec < 65000 and dead_sec < 65000;"; + $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; + if ($DBX) {print " AGENT TIME STATS: $aryA[0] $aryA[1] $aryA[2] $aryA[3]|$stmtA\n";} + $VCSagent_pause_today[$i] = $aryA[0]; + $VCSagent_wait_today[$i] = $aryA[1]; + $VCSagent_custtalk_today[$i] = $aryA[2]; + $VCSagent_acw_today[$i] = $aryA[3]; + } - $stmtA = "UPDATE vicidial_campaign_stats SET calls_today='$VCScalls_today[$i]',answers_today='$VCSanswers_today[$i]',drops_today='$VCSdrops_today[$i]',drops_today_pct='$VCSdrops_today_pct[$i]',drops_answers_today_pct='$VCSdrops_answers_today_pct[$i]',calls_hour='$VCScalls_hour[$i]',answers_hour='$VCSanswers_hour[$i]',drops_hour='$VCSdrops_hour[$i]',drops_hour_pct='$VCSdrops_hour_pct[$i]',calls_halfhour='$VCScalls_halfhour[$i]',answers_halfhour='$VCSanswers_halfhour[$i]',drops_halfhour='$VCSdrops_halfhour[$i]',drops_halfhour_pct='$VCSdrops_halfhour_pct[$i]',calls_fivemin='$VCScalls_five[$i]',answers_fivemin='$VCSanswers_five[$i]',drops_fivemin='$VCSdrops_five[$i]',drops_fivemin_pct='$VCSdrops_five_pct[$i]',calls_onemin='$VCScalls_one[$i]',answers_onemin='$VCSanswers_one[$i]',drops_onemin='$VCSdrops_one[$i]',drops_onemin_pct='$VCSdrops_one_pct[$i]',agent_non_pause_sec='$VCSagent_nonpause_time[$i]',$VSCupdateSQL where campaign_id='$campaign_id[$i]';"; + $stmtA = "SELECT count(*) from vicidial_agent_log where event_time > '$VDL_date' and campaign_id='$campaign_id[$i]' and lead_id > 0;"; + $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; + if ($DBX) {print " AGENT CALLS: $aryA[0]|$stmtA\n";} + $VCSagent_calls_today[$i] = $aryA[0]; + } + + $sthA->finish(); + } + + $stmtA = "UPDATE vicidial_campaign_stats SET calls_today='$VCScalls_today[$i]',answers_today='$VCSanswers_today[$i]',drops_today='$VCSdrops_today[$i]',drops_today_pct='$VCSdrops_today_pct[$i]',drops_answers_today_pct='$VCSdrops_answers_today_pct[$i]',calls_hour='$VCScalls_hour[$i]',answers_hour='$VCSanswers_hour[$i]',drops_hour='$VCSdrops_hour[$i]',drops_hour_pct='$VCSdrops_hour_pct[$i]',calls_halfhour='$VCScalls_halfhour[$i]',answers_halfhour='$VCSanswers_halfhour[$i]',drops_halfhour='$VCSdrops_halfhour[$i]',drops_halfhour_pct='$VCSdrops_halfhour_pct[$i]',calls_fivemin='$VCScalls_five[$i]',answers_fivemin='$VCSanswers_five[$i]',drops_fivemin='$VCSdrops_five[$i]',drops_fivemin_pct='$VCSdrops_five_pct[$i]',calls_onemin='$VCScalls_one[$i]',answers_onemin='$VCSanswers_one[$i]',drops_onemin='$VCSdrops_one[$i]',drops_onemin_pct='$VCSdrops_one_pct[$i]',agent_non_pause_sec='$VCSagent_nonpause_time[$i]',agent_calls_today='$VCSagent_calls_today[$i]',agent_pause_today='$VCSagent_pause_today[$i]',agent_wait_today='$VCSagent_wait_today[$i]',agent_custtalk_today='$VCSagent_custtalk_today[$i]',agent_acw_today='$VCSagent_acw_today[$i]',$VSCupdateSQL where campaign_id='$campaign_id[$i]';"; $affected_rows = $dbhA->do($stmtA); if ($DBX) {print "OUTBOUND $campaign_id[$i]|$affected_rows|$stmtA|\n";} } diff --git a/bin/AST_VDsales_export.pl b/bin/AST_VDsales_export.pl index b645a56b..72c77ff9 100644 --- a/bin/AST_VDsales_export.pl +++ b/bin/AST_VDsales_export.pl @@ -1,13 +1,13 @@ #!/usr/bin/perl # -# AST_VDsales_export.pl version: 2.2.0 +# AST_VDsales_export.pl version: 2.4 # # This script is designed to gather sales for a VICIDIAL Outbound-only campaign and # post them to a directory # # /usr/share/astguiclient/AST_VDsales_export.pl --campaign=GOODB-GROUP1-GROUP3-GROUP4-SPECIALS-DNC_BEDS --output-format=fixed-as400 --sale-statuses=SALE --debug --filename=BEDSsaleMMDD.txt --date=yesterday --email-list=test@gmail.com --email-sender=test@test.com # -# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # CHANGES # 61219-1118 - First version @@ -26,6 +26,7 @@ # 90825-1249 - Added without-camp and without-in options # 90902-0437 - Added outbound-calltime-ignore and ftp-norun options # 90909-2322 - Added totals-only option +# 101022-1022 - Added hours minutes seconds to filename variables # $txt = '.txt'; @@ -105,7 +106,7 @@ if (length($ARGV[0])>1) print "allowed run time options:\n"; print " [--date=YYYY-MM-DD] = date override\n"; print " [--hour-offset=X] = print datetime strings with this hour offset\n"; - print " [--filename=XXX] = Name to be used for file\n"; + print " [--filename=XXX] = Name to be used for file, variables: YYYY=year, MM=month, DD=day, HH=hour, II=minute, SS=second\n"; print " [--campaign=XXX] = Campaign that sales will be pulled from\n"; print " [--without-camp=XXX] = Campaign that will be excluded from ALL\n"; print " [--sale-statuses=XXX-XXY] = Statuses that are deemed to be \"Sales\". Default SALE\n"; @@ -236,6 +237,9 @@ if (length($ARGV[0])>1) $filename =~ s/YYYY/$year/gi; $filename =~ s/MM/$mon/gi; $filename =~ s/DD/$mday/gi; + $filename =~ s/HH/$hour/gi; + $filename =~ s/II/$min/gi; + $filename =~ s/SS/$sec/gi; $filename_override=1; } if ($args =~ /--sale-statuses=/i) diff --git a/bin/FastAGI_log.pl b/bin/FastAGI_log.pl index 4aff7eba..805ae397 100644 --- a/bin/FastAGI_log.pl +++ b/bin/FastAGI_log.pl @@ -401,7 +401,7 @@ sub process_request $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; @aryA = $sthA->fetchrow_array; - $is_client_phone = "$aryA[0]"; + $is_client_phone = $aryA[0]; $sthA->finish(); if ($is_client_phone < 1) @@ -425,7 +425,7 @@ sub process_request $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; @aryA = $sthA->fetchrow_array; - $is_client_phone = "$aryA[0]"; + $is_client_phone = $aryA[0]; $sthA->finish(); if ($is_client_phone < 1) @@ -473,8 +473,8 @@ sub process_request if ($sthArows > 0) { @aryA = $sthA->fetchrow_array; - $cmd_line_b = "$aryA[0]"; - $cmd_line_d = "$aryA[1]"; + $cmd_line_b = $aryA[0]; + $cmd_line_d = $aryA[1]; $cmd_line_b =~ s/Exten: //gi; $cmd_line_d =~ s/Channel: Local\/|@.*//gi; $rec_count++; @@ -702,7 +702,7 @@ sub process_request $affected_rows = $dbhA->do($stmtA); ##### BEGIN Park Log entry check and update ##### - $stmtA = "SELECT UNIX_TIMESTAMP(parked_time),UNIX_TIMESTAMP(grab_time) FROM park_log where uniqueid='$unique_id' and server_ip='$VARserver_ip' LIMIT 1;"; + $stmtA = "SELECT UNIX_TIMESTAMP(parked_time),UNIX_TIMESTAMP(grab_time) FROM park_log where uniqueid='$unique_id' and server_ip='$VARserver_ip' and (parked_sec is null or parked_sec < 1) order by parked_time desc LIMIT 1;"; $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; @@ -710,8 +710,8 @@ sub process_request if ($sthArows > 0) { @aryA = $sthA->fetchrow_array; - $parked_time = "$aryA[0]"; - $grab_time = "$aryA[1]"; + $parked_time = $aryA[0]; + $grab_time = $aryA[1]; if ($AGILOG) {$agi_string = "|$aryA[0]|$aryA[1]|"; &agi_output;} $rec_count++; } @@ -731,7 +731,7 @@ sub process_request $parked_sec=($grab_time - $parked_time); } - $stmtA = "UPDATE park_log set status='HUNGUP',hangup_time='$now_date',parked_sec='$parked_sec',talked_sec='$talked_sec' where uniqueid='$unique_id' and server_ip='$VARserver_ip'"; + $stmtA = "UPDATE park_log set status='HUNGUP',hangup_time='$now_date',parked_sec='$parked_sec',talked_sec='$talked_sec' where uniqueid='$unique_id' and server_ip='$VARserver_ip' order by parked_time desc LIMIT 1"; $affected_rows = $dbhA->do($stmtA); } ##### END Park Log entry check and update ##### @@ -779,7 +779,7 @@ sub process_request if ($sthArows > 0) { @aryA = $sthA->fetchrow_array; - $cpd_result = "$aryA[0]"; + $cpd_result = $aryA[0]; $sthA->finish(); if ($cpd_result =~ /Busy/i) {$VDL_status='CPDB'; $VDAC_status='BUSY'; $CPDfound++;} if ($cpd_result =~ /Unknown/i) {$VDL_status='CPDUK'; $VDAC_status='NA'; $CPDfound++;} @@ -1028,12 +1028,12 @@ sub process_request if ($sthArows > 0) { @aryA = $sthA->fetchrow_array; - $VD_start_epoch = "$aryA[0]"; - $VD_status = "$aryA[1]"; - $VD_user = "$aryA[2]"; - $VD_term_reason = "$aryA[3]"; - $VD_comments = "$aryA[4]"; - $epc_countCUSTDATA++; + $VD_start_epoch = $aryA[0]; + $VD_status = $aryA[1]; + $VD_user = $aryA[2]; + $VD_term_reason = $aryA[3]; + $VD_comments = $aryA[4]; + $epc_countCUSTDATA++; } $sthA->finish(); } @@ -1064,14 +1064,14 @@ sub process_request if ($sthArows > 0) { @aryA = $sthA->fetchrow_array; - $VD_start_epoch = "$aryA[0]"; - $VD_status = "$aryA[1]"; - $VD_closecallid = "$aryA[2]"; - $VD_user = "$aryA[3]"; - $VD_term_reason = "$aryA[4]"; - $VD_length_in_sec = "$aryA[5]"; - $VD_queue_seconds = "$aryA[6]"; - $VD_comments = "$aryA[7]"; + $VD_start_epoch = $aryA[0]; + $VD_status = $aryA[1]; + $VD_closecallid = $aryA[2]; + $VD_user = $aryA[3]; + $VD_term_reason = $aryA[4]; + $VD_length_in_sec = $aryA[5]; + $VD_queue_seconds = $aryA[6]; + $VD_comments = $aryA[7]; $epc_countCUSTDATA++; } $sthA->finish(); diff --git a/docs/AGENT_API.txt b/docs/AGENT_API.txt index eab53ff3..953b40d5 100644 --- a/docs/AGENT_API.txt +++ b/docs/AGENT_API.txt @@ -161,7 +161,7 @@ focus - YES - change the focus of the screen to the vicidial.php agent interface, brings up an alert in the browser window NO - do not change focus vendor_id - - Any valid Vendor lead code + OPTIONAL, any valid Vendor lead code dial_prefix - OPTIONAL, any dial prefix that you want to add to the beginning of the dial string for this call group_alias - diff --git a/docs/REQUIRED_APPS_INSTALL.txt b/docs/REQUIRED_APPS_INSTALL.txt index 5cd1e6d4..63a264d8 100644 --- a/docs/REQUIRED_APPS_INSTALL.txt +++ b/docs/REQUIRED_APPS_INSTALL.txt @@ -635,3 +635,12 @@ Edit the following two lines: #> vim /etc/php5/conf.d/eaccelerator.ini Add the following line: eaccelerator.allowed_admin_path = "/srv/www/htdocs/" + + + +!!!!! FOR REFERENCE ONLY, WE CURRENTLY DO NOT SUPPORT THESE VERSIONS OF ASTERISK !!!!! + +http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.4.36.tar.gz +http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.6.2.13.tar.gz +http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-1.8.0.tar.gz + diff --git a/docs/conf_examples/extensions.conf.sample b/docs/conf_examples/extensions.conf.sample index ee59e4e5..3c7f39e5 100644 --- a/docs/conf_examples/extensions.conf.sample +++ b/docs/conf_examples/extensions.conf.sample @@ -119,6 +119,9 @@ exten => _9119XXXXXXXX,1,Dial(${TRUNKblind}/9998819112,55,to) ;exten => _91866NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) ;exten => _91866NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) ;exten => _91866NXXXXXX,3,Hangup +;exten => _91855NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91855NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) +;exten => _91855NXXXXXX,3,Hangup ; dial a long distance outbound number ; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls diff --git a/docs/conf_examples/extensions.conf.sample-1.4 b/docs/conf_examples/extensions.conf.sample-1.4 index 12b8093b..205fd99f 100644 --- a/docs/conf_examples/extensions.conf.sample-1.4 +++ b/docs/conf_examples/extensions.conf.sample-1.4 @@ -123,6 +123,9 @@ exten => _9119XXXXXXXX,1,Dial(${TRUNKblind}/9998819112,55,to) ;exten => _91866NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) ;exten => _91866NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) ;exten => _91866NXXXXXX,3,Hangup +;exten => _91855NXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log) +;exten => _91855NXXXXXX,2,Dial(${TRUNK}/${EXTEN:1},,To) +;exten => _91855NXXXXXX,3,Hangup ; dial a long distance outbound number ; This 'o' Dial flag is VERY important for VICIDIAL on outbound calls diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 6a4a3340..8b740d0e 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -233,7 +233,7 @@ index (channel) ); CREATE TABLE park_log ( -uniqueid VARCHAR(20) PRIMARY KEY NOT NULL, +uniqueid VARCHAR(20) default '', status VARCHAR(10), channel VARCHAR(100), channel_group VARCHAR(30), @@ -245,9 +245,13 @@ parked_sec INT(10), talked_sec INT(10), extension VARCHAR(100), user VARCHAR(20), -index (parked_time) +lead_id INT(9) UNSIGNED default '0', +index (parked_time), +index (lead_id) ); +CREATE INDEX uniqueid_park on park_log (uniqueid); + CREATE TABLE vicidial_manager ( man_id INT(9) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, uniqueid VARCHAR(20), @@ -768,7 +772,8 @@ customer_3way_hangup_seconds SMALLINT(5) UNSIGNED default '5', customer_3way_hangup_action ENUM('NONE','DISPO') default 'NONE', ivr_park_call ENUM('DISABLED','ENABLED','ENABLED_PARK_ONLY','ENABLED_BUTTON_HIDDEN') default 'DISABLED', ivr_park_call_agi TEXT, -manual_preview_dial ENUM('DISABLED','PREVIEW_AND_SKIP','PREVIEW_ONLY') default 'PREVIEW_AND_SKIP' +manual_preview_dial ENUM('DISABLED','PREVIEW_AND_SKIP','PREVIEW_ONLY') default 'PREVIEW_AND_SKIP', +realtime_agent_time_stats ENUM('DISABLED','WAIT_CUST_ACW','WAIT_CUST_ACW_PAUSE','CALLS_WAIT_CUST_ACW_PAUSE') default 'CALLS_WAIT_CUST_ACW_PAUSE' ); CREATE TABLE vicidial_lists ( @@ -1201,7 +1206,12 @@ hold_sec_stat_two MEDIUMINT(8) UNSIGNED default '0', agent_non_pause_sec MEDIUMINT(8) UNSIGNED default '0', hold_sec_answer_calls MEDIUMINT(8) UNSIGNED default '0', hold_sec_drop_calls MEDIUMINT(8) UNSIGNED default '0', -hold_sec_queue_calls MEDIUMINT(8) UNSIGNED default '0' +hold_sec_queue_calls MEDIUMINT(8) UNSIGNED default '0', +agent_calls_today INT(9) UNSIGNED default '0', +agent_wait_today BIGINT(14) UNSIGNED default '0', +agent_custtalk_today BIGINT(14) UNSIGNED default '0', +agent_acw_today BIGINT(14) UNSIGNED default '0', +agent_pause_today BIGINT(14) UNSIGNED default '0' ); CREATE TABLE vicidial_dnc ( @@ -2002,6 +2012,8 @@ comments VARCHAR(20), sub_status VARCHAR(6), dead_epoch INT(10) UNSIGNED, dead_sec SMALLINT(5) UNSIGNED default '0', +processed ENUM('Y','N') default 'N', +uniqueid VARCHAR(20) default '', index (lead_id), index (user), index (event_time) @@ -2374,7 +2386,7 @@ ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT N CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log; -UPDATE system_settings SET db_schema_version='1249',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1250',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 e7da4e3e..f85d8370 100644 --- a/extras/upgrade_2.4.sql +++ b/extras/upgrade_2.4.sql @@ -572,3 +572,20 @@ ALTER TABLE vicidial_inbound_groups ADD eht_minimum_prompt_no_block ENUM('N','Y' ALTER TABLE vicidial_inbound_groups ADD eht_minimum_prompt_seconds SMALLINT(5) default '10'; UPDATE system_settings SET db_schema_version='1249',db_schema_update_date=NOW(); + +ALTER TABLE vicidial_campaigns ADD realtime_agent_time_stats ENUM('DISABLED','WAIT_CUST_ACW','WAIT_CUST_ACW_PAUSE','CALLS_WAIT_CUST_ACW_PAUSE') default 'CALLS_WAIT_CUST_ACW_PAUSE'; + +ALTER TABLE vicidial_campaign_stats ADD agent_calls_today INT(9) UNSIGNED default '0'; +ALTER TABLE vicidial_campaign_stats ADD agent_wait_today BIGINT(14) UNSIGNED default '0'; +ALTER TABLE vicidial_campaign_stats ADD agent_custtalk_today BIGINT(14) UNSIGNED default '0'; +ALTER TABLE vicidial_campaign_stats ADD agent_acw_today BIGINT(14) UNSIGNED default '0'; +ALTER TABLE vicidial_campaign_stats ADD agent_pause_today BIGINT(14) UNSIGNED default '0'; + +ALTER TABLE park_log MODIFY uniqueid VARCHAR(20) default ''; +ALTER TABLE park_log ADD lead_id INT(9) UNSIGNED default '0'; +ALTER TABLE park_log DROP PRIMARY KEY; +ALTER TABLE park_log DROP KEY uniqueid; +CREATE INDEX lead_id_park on park_log (lead_id); +CREATE INDEX uniqueid_park on park_log (uniqueid); + +UPDATE system_settings SET db_schema_version='1250',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 a921bafe..e4f11e7e 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -461,6 +461,8 @@ Estimated Hold Time Minimum Prompt Seconds|| This field needs to be set to the number of seconds that the Estimated Hold Time Minimum Filename prompt plays for. Default is 10|| This field allows you to customize the name of the recording when Campaign recording is ONDEMAND or ALLCALLS. The allowed variables are|| The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this|| +Real-Time Agent Time Stats|| +Setting this to anything but DISABLED will enable the gathering of agent time stats for today for this campaign, that are viewable through the Real-Time report. CALLS are the average calls handled per agent, WAIT is the average agent wait time, CUST is the average customer talk time, ACW is the average After Call Work time, PAUSE is the average pause time. Default is DISABLED|| AST_LISTS_campaign_stats.php diff --git a/www/agc/manager_send.php b/www/agc/manager_send.php index c78fc445..f91091ed 100644 --- a/www/agc/manager_send.php +++ b/www/agc/manager_send.php @@ -101,10 +101,11 @@ # 100527-1014 - Added SysCIDdtmfOriginate function # 100813-0833 - Added preset_name variable and logging # 101004-1345 - Added Ivr park functions +# 101024-1638 - Added park_log logging for parked calls # -$version = '2.4-51'; -$build = '101004-1345'; +$version = '2.4-52'; +$build = '101024-1638'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=97; $one_mysql_log=0; @@ -838,6 +839,11 @@ if ($ACTION=="RedirectToPark") if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02025',$user,$server_ip,$session_name,$one_mysql_log);} $ACTION="Redirect"; + $stmt = "INSERT INTO park_log SET uniqueid='$uniqueid',status='PARKED',channel='$channel',channel_group='$campaign',server_ip='$server_ip',parked_time='$NOW_TIME',parked_sec=0,extension='$CalLCID',user='$user',lead_id='$lead_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);} + # $fp = fopen ("./vicidial_debug.txt", "a"); # fwrite ($fp, "$NOW_TIME|MS_LOG_0|$queryCID|$stmt|\n"); # fclose($fp); @@ -870,6 +876,22 @@ if ($ACTION=="RedirectFromPark") $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02026',$user,$server_ip,$session_name,$one_mysql_log);} $ACTION="Redirect"; + + $parked_sec=0; + $stmt = "SELECT UNIX_TIMESTAMP(parked_time) FROM park_log where uniqueid='$uniqueid' and server_ip='$server_ip' and extension='$CalLCID' and (parked_sec < 1 or grab_time is NULL) order by parked_time desc limit 1;"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VAC_pl_ct = mysql_num_rows($rslt); + if ($VAC_pl_ct > 0) + { + $row=mysql_fetch_row($rslt); + $parked_sec = ($StarTtime - $row[0]); + + $stmt = "UPDATE park_log SET status='GRABBED',grab_time='$NOW_TIME',parked_sec='$parked_sec' where uniqueid='$uniqueid' and server_ip='$server_ip' and extension='$CalLCID' order by parked_time desc limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } } $stmt="UPDATE vicidial_live_agents SET external_park='' where user='$user';"; @@ -907,6 +929,11 @@ if ($ACTION=="RedirectToParkIVR") $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02088',$user,$server_ip,$session_name,$one_mysql_log);} + $stmt = "INSERT INTO park_log SET uniqueid='$uniqueid',status='IVRPARKED',channel='$channel',channel_group='$campaign',server_ip='$server_ip',parked_time='$NOW_TIME',parked_sec=0,extension='$CalLCID',user='$user',lead_id='$lead_id';"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);} + # $fp = fopen ("./vicidial_debug.txt", "a"); # fwrite ($fp, "$NOW_TIME|MS_LOG_0|$queryCID|$stmt|\n"); # fclose($fp); @@ -944,6 +971,22 @@ if ($ACTION=="RedirectFromParkIVR") if ($format=='debug') {echo "\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02090',$user,$server_ip,$session_name,$one_mysql_log);} + + $parked_sec=0; + $stmt = "SELECT UNIX_TIMESTAMP(parked_time) FROM park_log where uniqueid='$uniqueid' and server_ip='$server_ip' and extension='$CalLCID' and (parked_sec < 1 or grab_time is NULL) order by parked_time desc limit 1;"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VAC_pl_ct = mysql_num_rows($rslt); + if ($VAC_pl_ct > 0) + { + $row=mysql_fetch_row($rslt); + $parked_sec = ($StarTtime - $row[0]); + + $stmt = "UPDATE park_log SET status='GRABBEDIVR',grab_time='$NOW_TIME',parked_sec='$parked_sec' where uniqueid='$uniqueid' and server_ip='$server_ip' and extension='$CalLCID' order by parked_time desc limit 1;"; + if ($format=='debug') {echo "\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);} + } } $stmt="UPDATE vicidial_live_agents SET external_park='' where user='$user';"; diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php index b8b75e7f..cf3c9037 100644 --- a/www/agc/vdc_db_query.php +++ b/www/agc/vdc_db_query.php @@ -259,10 +259,11 @@ # 100916-2144 - Added custom list names export with lead data # 100927-1618 - Added ability to use custom fields in web form and dispo_call_url # 101001-1451 - Added full name display to Call Log functionality +# 101022-1243 - Fixed missing variables from start and dispo call urls # -$version = '2.4-165'; -$build = '101001-1451'; +$version = '2.4-166'; +$build = '101022-1243'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=345; $one_mysql_log=0; @@ -4866,8 +4867,8 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_start_call_url = eregi_replace('--A--phone_pass--B--',urlencode(trim($phone_pass)),$VDCL_start_call_url); $VDCL_start_call_url = eregi_replace('--A--fronter--B--',urlencode(trim($fronter)),$VDCL_start_call_url); $VDCL_start_call_url = eregi_replace('--A--closer--B--',urlencode(trim($closer)),$VDCL_start_call_url); - $VDCL_start_call_url = eregi_replace('--A--group--B--',urlencode(trim($group)),$VDCL_start_call_url); - $VDCL_start_call_url = eregi_replace('--A--channel_group--B--',urlencode(trim($channel_group)),$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--group--B--',urlencode(trim($VDADchannel_group)),$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--channel_group--B--',urlencode(trim($VDADchannel_group)),$VDCL_start_call_url); $VDCL_start_call_url = eregi_replace('--A--SQLdate--B--',urlencode(trim($SQLdate)),$VDCL_start_call_url); $VDCL_start_call_url = eregi_replace('--A--epoch--B--',urlencode(trim($epoch)),$VDCL_start_call_url); $VDCL_start_call_url = eregi_replace('--A--uniqueid--B--',urlencode(trim($uniqueid)),$VDCL_start_call_url); @@ -4894,7 +4895,14 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_start_call_url = eregi_replace('--A--user_custom_five--B--',urlencode(trim($user_custom_five)),$VDCL_start_call_url); $VDCL_start_call_url = eregi_replace('--A--talk_time--B--',"0",$VDCL_start_call_url); $VDCL_start_call_url = eregi_replace('--A--talk_time_min--B--',"0",$VDCL_start_call_url); - $VDCL_start_call_url = eregi_replace('--A--entry_list_id--B--',"$entry_list_id",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--entry_list_id--B--',urlencode(trim($entry_list_id)),$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--did_id--B--',urlencode(trim($DID_id)),$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--did_extension--B--',urlencode(trim($DID_extension)),$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--did_pattern--B--',urlencode(trim($DID_pattern)),$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--did_description--B--',urlencode(trim($DID_description)),$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--closecallid--B--',urlencode(trim($INclosecallid)),$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--xfercallid--B--',urlencode(trim($INxfercallid)),$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--agent_log_id--B--',urlencode(trim($agent_log_id)),$VDCL_start_call_url); if (strlen($custom_field_names)>2) { @@ -6224,6 +6232,56 @@ if ($ACTION == 'updateDISPO') } } + if (eregi('--A--did_',$dispo_call_url)) + { + $DID_id=''; + $DID_extension=''; + $DID_pattern=''; + $DID_description=''; + + $stmt = "SELECT did_id,extension from vicidial_did_log where uniqueid='$uniqueid' order by call_date desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDIDL_ct = mysql_num_rows($rslt); + if ($VDIDL_ct > 0) + { + $row=mysql_fetch_row($rslt); + $DID_id = $row[0]; + $DID_extension = $row[1]; + + $stmt = "SELECT did_pattern,did_description from vicidial_inbound_dids where did_id='$DID_id' limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDIDL_ct = mysql_num_rows($rslt); + if ($VDIDL_ct > 0) + { + $row=mysql_fetch_row($rslt); + $DID_pattern = $row[0]; + $DID_description = $row[1]; + } + } + } + + if ((eregi('callid--B--',$dispo_call_url)) or (eregi('group--B--',$dispo_call_url))) + { + $INclosecallid=''; + $INxfercallid=''; + $VDADchannel_group=$campaign; + $stmt = "SELECT campaign_id,closecallid,xfercallid from vicidial_closer_log where uniqueid='$uniqueid' and user='$user' order by call_date desc limit 1;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00XXX',$user,$server_ip,$session_name,$one_mysql_log);} + $VDCL_mvac_ct = mysql_num_rows($rslt); + if ($VDCL_mvac_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDADchannel_group = $row[0]; + $INclosecallid = $row[1]; + $INxfercallid = $row[2]; + } + } ##### grab the data from vicidial_list for the lead_id $stmt="SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; @@ -6300,9 +6358,9 @@ if ($ACTION == 'updateDISPO') $dispo_call_url = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$dispo_call_url); $dispo_call_url = eregi_replace('--A--phone_pass--B--',"$phone_pass",$dispo_call_url); $dispo_call_url = eregi_replace('--A--fronter--B--',"$fronter",$dispo_call_url); - $dispo_call_url = eregi_replace('--A--closer--B--',"$closer",$dispo_call_url); - $dispo_call_url = eregi_replace('--A--group--B--',"$group",$dispo_call_url); - $dispo_call_url = eregi_replace('--A--channel_group--B--',"$channel_group",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--closer--B--',"$user",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--group--B--',"$VDADchannel_group",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--channel_group--B--',"$VDADchannel_group",$dispo_call_url); $dispo_call_url = eregi_replace('--A--SQLdate--B--',"$SQLdate",$dispo_call_url); $dispo_call_url = eregi_replace('--A--epoch--B--',"$epoch",$dispo_call_url); $dispo_call_url = eregi_replace('--A--uniqueid--B--',"$uniqueid",$dispo_call_url); @@ -6333,6 +6391,12 @@ if ($ACTION == 'updateDISPO') $dispo_call_url = eregi_replace('--A--talk_time_min--B--',"$talk_time_min",$dispo_call_url); $dispo_call_url = eregi_replace('--A--agent_log_id--B--',"$CALL_agent_log_id",$dispo_call_url); $dispo_call_url = eregi_replace('--A--entry_list_id--B--',"$entry_list_id",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--did_id--B--',urlencode(trim($DID_id)),$dispo_call_url); + $dispo_call_url = eregi_replace('--A--did_extension--B--',urlencode(trim($DID_extension)),$dispo_call_url); + $dispo_call_url = eregi_replace('--A--did_pattern--B--',urlencode(trim($DID_pattern)),$dispo_call_url); + $dispo_call_url = eregi_replace('--A--did_description--B--',urlencode(trim($DID_description)),$dispo_call_url); + $dispo_call_url = eregi_replace('--A--closecallid--B--',urlencode(trim($INclosecallid)),$dispo_call_url); + $dispo_call_url = eregi_replace('--A--xfercallid--B--',urlencode(trim($INxfercallid)),$dispo_call_url); if (strlen($FORMcustom_field_names)>2) { diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 95e01ddc..e78c9ca6 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -319,10 +319,11 @@ # 101006-1358 - Raised limits on several dynamic items from the database # 101008-0356 - Added manual_preview_dial and two new variables for recording filenames # 101012-1656 - Added scroll command at dispo submission to for scrolling to the top of the screen +# 101024-1639 - Added parked call counter # -$version = '2.4-296'; -$build = '101012-1656'; +$version = '2.4-297'; +$build = '101024-1639'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=68; $one_mysql_log=0; @@ -2864,6 +2865,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var park_on_extension = ''; var park_count=0; var customerparked=0; + var customerparkedcounter=0; var check_n = 0; var conf_check_recheck = 0; var lastconf=''; @@ -4538,7 +4540,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id + "&CalLCID=" + CalLCID; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id + "&CalLCID=" + CalLCID + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign; document.getElementById("ParkControl").innerHTML ="\"Grab"; if ( (ivr_park_call=='ENABLED') || (ivr_park_call=='ENABLED_PARK_ONLY') ) @@ -4546,6 +4548,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("ivrParkControl").innerHTML ="\"Grab"; } customerparked=1; + customerparkedcounter=0; } if (taskvar == 'FROMParK') { @@ -4564,7 +4567,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id + "&CalLCID=" + CalLCID; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromPark&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id + "&CalLCID=" + CalLCID + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign; document.getElementById("ParkControl").innerHTML ="\"Park"; if ( (ivr_park_call=='ENABLED') || (ivr_park_call=='ENABLED_PARK_ONLY') ) @@ -4572,6 +4575,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("ivrParkControl").innerHTML ="\"IVR"; } customerparked=0; + customerparkedcounter=0; } if (taskvar == 'ParKivr') { @@ -4584,7 +4588,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var redirectdestination = taskxferconf; var redirectdestserverip = taskserverip; var parkedby = protocol + "/" + extension; - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToParkIVR&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id + "&CalLCID=" + CalLCID; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectToParkIVR&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + park_on_extension + "&ext_context=" + ext_context + "&ext_priority=1&extenName=park&parkedby=" + parkedby + "&session_id=" + session_id + "&CalLCID=" + CalLCID + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign; document.getElementById("ParkControl").innerHTML ="\"Grab"; if (ivr_park_call=='ENABLED_PARK_ONLY') @@ -4596,6 +4600,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("ivrParkControl").innerHTML ="\"Grab"; } customerparked=1; + customerparkedcounter=0; } if (taskvar == 'FROMParKivr') { @@ -4614,7 +4619,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {var dest_dialstring = session_id;} } - xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromParkIVR&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id + "&CalLCID=" + CalLCID; + xferredirect_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=RedirectFromParkIVR&format=text&channel=" + redirectdestination + "&call_server_ip=" + redirectdestserverip + "&queryCID=" + queryCID + "&exten=" + dest_dialstring + "&ext_context=" + ext_context + "&ext_priority=1" + "&session_id=" + session_id + "&CalLCID=" + CalLCID + "&uniqueid=" + document.vicidial_form.uniqueid.value + "&lead_id=" + document.vicidial_form.lead_id.value + "&campaign=" + campaign; document.getElementById("ParkControl").innerHTML ="\"Park"; if ( (ivr_park_call=='ENABLED') || (ivr_park_call=='ENABLED_PARK_ONLY') ) @@ -4622,6 +4627,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("ivrParkControl").innerHTML ="\"IVR"; } customerparked=0; + customerparkedcounter=0; } var XFRDop = ''; @@ -7989,6 +7995,9 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} custom_field_names=''; custom_field_values=''; custom_field_types=''; + customerparked=0; + customerparkedcounter=0; + document.getElementById("ParkCounterSpan").innerHTML = ''; document.vicidial_form.xfername.value=''; document.vicidial_form.xfernumhidden.value=''; document.getElementById("debugbottomspan").innerHTML = ''; @@ -10569,6 +10578,16 @@ else XD_live_call_secondS++; document.vicidial_form.xferlength.value = XD_live_call_secondS; } + if (customerparked==1) + { + customerparkedcounter++; + var parked_mm = Math.floor(customerparkedcounter/60); // The minutes + var parked_ss = customerparkedcounter % 60; // The balance of seconds + if (parked_ss < 10) + {parked_ss = "0" + parked_ss;} + var parked_mmss = parked_mm + ":" + parked_ss; + document.getElementById("ParkCounterSpan").innerHTML = "Time On Park: " + parked_mmss; + } if (customer_3way_hangup_counter_trigger > 0) { if (customer_3way_hangup_counter > customer_3way_hangup_seconds) @@ -11310,7 +11329,7 @@ $zi=1; if ($enable_second_webform > 0) {echo "\"Web
\n";} ?> -
+  
Park Call
0) $select_list .= ""; } +$select_list .= ""; +$select_list .= "Agent Time Stats: \n"; echo "\n"; echo "\n"; echo "\n"; +echo "\n"; echo "Real-Time Report                                                                               \n"; echo "\n"; echo ""; echo ""; + if ($AGENTtimeSTATS>0) + { + if ( ($VSCagentcalls > 0) and ($VSCagentpause > 0) ) + { + $avgpauseTODAY = ($VSCagentpause / $VSCagentcalls); + $avgpauseTODAY = round($avgpauseTODAY, 0); + $avgpauseTODAY = sprintf("%01.0f", $avgpauseTODAY); + } + else + {$avgpauseTODAY=0;} + + if ( ($VSCagentcalls > 0) and ($VSCagentwait > 0) ) + { + $avgwaitTODAY = ($VSCagentwait / $VSCagentcalls); + $avgwaitTODAY = round($avgwaitTODAY, 0); + $avgwaitTODAY = sprintf("%01.0f", $avgwaitTODAY); + } + else + {$avgwaitTODAY=0;} + + if ( ($VSCagentcalls > 0) and ($VSCagentcust > 0) ) + { + $avgcustTODAY = ($VSCagentcust / $VSCagentcalls); + $avgcustTODAY = round($avgcustTODAY, 0); + $avgcustTODAY = sprintf("%01.0f", $avgcustTODAY); + } + else + {$avgcustTODAY=0;} + + if ( ($VSCagentcalls > 0) and ($VSCagentacw > 0) ) + { + $avgacwTODAY = ($VSCagentacw / $VSCagentcalls); + $avgacwTODAY = round($avgacwTODAY, 0); + $avgacwTODAY = sprintf("%01.0f", $avgacwTODAY); + } + else + {$avgacwTODAY=0;} + + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + echo "$DROPINGROUPstatsHTML\n"; echo "$CARRIERstatsHTML\n"; echo "$PRESETstatsHTML\n"; @@ -1614,60 +1682,60 @@ echo "$ingroup_detail"; if ($adastats<2) { - echo "+ VIEW MORE"; + echo "+ VIEW MORE"; } else { - echo "+ VIEW LESS"; + echo "+ VIEW LESS"; } if ($UGdisplay>0) { - echo "       HIDE USER GROUP"; + echo "       HIDE USER GROUP"; } else { - echo "       VIEW USER GROUP"; + echo "       VIEW USER GROUP"; } if ($SERVdisplay>0) { - echo "       HIDE SERVER INFO"; + echo "       HIDE SERVER INFO"; } else { - echo "       SHOW SERVER INFO"; + echo "       SHOW SERVER INFO"; } if ($CALLSdisplay>0) { - echo "       HIDE WAITING CALLS"; + echo "       HIDE WAITING CALLS"; } else { - echo "       SHOW WAITING CALLS"; + echo "       SHOW WAITING CALLS"; } if ($ALLINGROUPstats>0) { - echo "       HIDE IN-GROUP STATS"; + echo "       HIDE IN-GROUP STATS"; } else { - echo "       SHOW IN-GROUP STATS"; + echo "       SHOW IN-GROUP STATS"; } if ($PHONEdisplay>0) { - echo "       HIDE PHONES"; + echo "       HIDE PHONES"; } else { - echo "       SHOW PHONES"; + echo "       SHOW PHONES"; } if ($CUSTPHONEdisplay>0) { - echo "       HIDE CUSTPHONES"; + echo "       HIDE CUSTPHONES"; } else { - echo "       SHOW CUSTPHONES"; + echo "       SHOW CUSTPHONES"; } echo ""; echo ""; @@ -1896,6 +1964,7 @@ if ($p<1) $agent_incall=0; $agent_ready=0; $agent_paused=0; +$agent_dispo=0; $agent_dead=0; $agent_total=0; @@ -1925,25 +1994,25 @@ $HTbegin = "|"; $HDstation = "----------------+"; $HTstation = " STATION |"; $HDphone = "-------------+"; -$HTphone = " PHONE |"; +$HTphone = " PHONE |"; $HDuser = "------------------------+"; -$HTuser = " USER "; +$HTuser = " USER "; if ($UidORname>0) { - $HTuser .= "SHOW ID "; + $HTuser .= "SHOW ID "; } else { - $HTuser .= "SHOW NAME"; + $HTuser .= "SHOW NAME"; } $HTuser .= " INFO |"; $HDusergroup = "--------------+"; -$HTusergroup = " USER GROUP |"; +$HTusergroup = " USER GROUP |"; $HDsessionid = "------------------+"; $HTsessionid = " SESSIONID |"; $HDbarge = "-------+"; @@ -1957,9 +2026,9 @@ $HTserver_ip = " SERVER IP |"; $HDcall_server_ip = "-----------------+"; $HTcall_server_ip = " CALL SERVER IP |"; $HDtime = "---------+"; -$HTtime = " MM:SS |"; +$HTtime = " MM:SS |"; $HDcampaign = "------------+"; -$HTcampaign = " CAMPAIGN |"; +$HTcampaign = " CAMPAIGN |"; $HDcalls = "-------+"; $HTcalls = " CALLS |"; $HDpause = ''; @@ -2343,7 +2412,7 @@ $calls_to_list = mysql_num_rows($rslt); {$j++; continue;} else { - $agent_paused++; $agent_total++; + $agent_dispo++; $agent_total++; $G=''; $EG=''; if ($call_time_S >= 10) {$G=''; $EG='';} if ($call_time_S >= 60) {$G=''; $EG='';} @@ -2472,6 +2541,7 @@ $calls_to_list = mysql_num_rows($rslt); echo "$NFB$B  $agent_ready $BG$NFE agents waiting       \n"; echo "$NFB$agent_paused$NFE paused agents       \n"; echo "$NFB$agent_dead$NFE agents in dead calls      \n"; + echo "$NFB$agent_dispo$NFE agents in dispo      \n"; echo "
";
 		echo "";
diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php
index 7c4fcb25..f75f7dbf 100644
--- a/www/vicidial/admin.php
+++ b/www/vicidial/admin.php
@@ -1473,6 +1473,8 @@ if (isset($_GET["eht_minimum_prompt_no_block"]))			{$eht_minimum_prompt_no_block
 	elseif (isset($_POST["eht_minimum_prompt_no_block"]))	{$eht_minimum_prompt_no_block=$_POST["eht_minimum_prompt_no_block"];}
 if (isset($_GET["eht_minimum_prompt_seconds"]))				{$eht_minimum_prompt_seconds=$_GET["eht_minimum_prompt_seconds"];}
 	elseif (isset($_POST["eht_minimum_prompt_seconds"]))	{$eht_minimum_prompt_seconds=$_POST["eht_minimum_prompt_seconds"];}
+if (isset($_GET["realtime_agent_time_stats"]))				{$realtime_agent_time_stats=$_GET["realtime_agent_time_stats"];}
+	elseif (isset($_POST["realtime_agent_time_stats"]))		{$realtime_agent_time_stats=$_POST["realtime_agent_time_stats"];}
 
 
 if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -2041,6 +2043,7 @@ if ($non_latin < 1)
 	$default_server_password = ereg_replace("[^-_0-9a-zA-Z]","",$default_server_password);
 	$ivr_park_call = ereg_replace("[^-_0-9a-zA-Z]","",$ivr_park_call);
 	$manual_preview_dial = ereg_replace("[^-_0-9a-zA-Z]","",$manual_preview_dial);
+	$realtime_agent_time_stats = ereg_replace("[^-_0-9a-zA-Z]","",$realtime_agent_time_stats);
 
 	### ALPHA-NUMERIC and underscore and dash and slash and dot
 	$menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt);
@@ -2573,11 +2576,12 @@ else
 # 100928-1634 - Moved Realtime Block User Info user setting into the new ADMIN REPORT OPTIONS section
 # 100929-1203 - Added add_lead_url feature to In-Groups
 # 101008-0349 - Added Estimated Hold Time Minimum options, Manual Dial Preview settings and two new variables for recording filenames
+# 101022-1427 - Added ability to change user in-group prefs from in-group mod screen, added realtime_agent_time_stats campaign option
 #
 # 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-284';
-$build = '101008-0349';
+$admin_version = '2.4-285';
+$build = '101022-1427';
 
 $STARTtime = date("U");
 $SQLdate = date("Y-m-d H:i:s");
@@ -4004,6 +4008,11 @@ if ($ADD==99999)
 	
Campaign Stats Refresh - This checkbox will allow you to force a vicidial stats refresh, even if the campaign is not active. +
+ +
+ Real-Time Agent Time Stats - Setting this to anything but DISABLED will enable the gathering of agent time stats for today for this campaign, that are viewable through the Real-Time report. CALLS are the average calls handled per agent, WAIT is the average agent wait time, CUST is the average customer talk time, ACW is the average After Call Work time, PAUSE is the average pause time. Default is DISABLED. +

@@ -10111,7 +10120,7 @@ if ($ADD==20) { echo "
CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id\n"; - $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial from vicidial_campaigns where campaign_id='$source_campaign_id';"; + $stmt="INSERT INTO vicidial_campaigns (campaign_name,campaign_id,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats) SELECT \"$campaign_name\",\"$campaign_id\",\"N\",dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,\"DISABLED\",campaign_allow_inbound,manual_dial_list_id,default_xfer_group,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,qc_get_record_launch,qc_show_recording,qc_shift_id,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_fourth_digit,survey_third_audio_file,survey_fourth_audio_file,survey_third_status,survey_fourth_status,survey_third_exten,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats from vicidial_campaigns where campaign_id='$source_campaign_id';"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; @@ -12961,7 +12970,7 @@ if ($ADD==41) if ( (!ereg("DISABLED",$list_order_mix)) and ($hopper_level < 100) ) {$hopper_level='100';} - $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid',scheduled_callbacks_alert='$scheduled_callbacks_alert',queuemetrics_callstatus_override='$queuemetrics_callstatus',extension_appended_cidname='$extension_appended_cidname',scheduled_callbacks_count='$scheduled_callbacks_count',manual_dial_override='$manual_dial_override',blind_monitor_warning='$blind_monitor_warning',blind_monitor_message='" . mysql_real_escape_string($blind_monitor_message) . "',blind_monitor_filename='$blind_monitor_filename',inbound_queue_no_dial='$inbound_queue_no_dial',timer_action_destination='$timer_action_destination',enable_xfer_presets='$enable_xfer_presets',hide_xfer_number_to_dial='$hide_xfer_number_to_dial',manual_dial_prefix='$manual_dial_prefix',customer_3way_hangup_logging='$customer_3way_hangup_logging',customer_3way_hangup_seconds='$customer_3way_hangup_seconds',customer_3way_hangup_action='$customer_3way_hangup_action',ivr_park_call='$ivr_park_call',ivr_park_call_agi='$ivr_park_call_agi',manual_preview_dial='$manual_preview_dial' where campaign_id='$campaign_id';"; + $stmtA="UPDATE vicidial_campaigns set campaign_name='$campaign_name',active='$active',dial_status_a='$dial_status_a',dial_status_b='$dial_status_b',dial_status_c='$dial_status_c',dial_status_d='$dial_status_d',dial_status_e='$dial_status_e',lead_order='$lead_order',allow_closers='$allow_closers',hopper_level='$hopper_level', $adlSQL next_agent_call='$next_agent_call', local_call_time='$local_call_time', voicemail_ext='$voicemail_ext', dial_timeout='$dial_timeout', dial_prefix='$dial_prefix', campaign_cid='$campaign_cid', campaign_vdad_exten='$campaign_vdad_exten', web_form_address='" . mysql_real_escape_string($web_form_address) . "', park_ext='$park_ext', park_file_name='$park_file_name', campaign_rec_exten='$campaign_rec_exten', campaign_recording='$campaign_recording', campaign_rec_filename='$campaign_rec_filename', campaign_script='$script_id', get_call_launch='$get_call_launch', am_message_exten='$am_message_exten', amd_send_to_vmx='$amd_send_to_vmx', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number',xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',lead_filter_id='$lead_filter_id',alt_number_dialing='$alt_number_dialing',scheduled_callbacks='$scheduled_callbacks',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',safe_harbor_exten='$safe_harbor_exten',wrapup_seconds='$wrapup_seconds',wrapup_message='$wrapup_message',closer_campaigns='$groups_value',use_internal_dnc='$use_internal_dnc',allcalls_delay='$allcalls_delay',omit_phone_code='$omit_phone_code',dial_method='$dial_method',available_only_ratio_tally='$available_only_ratio_tally',adaptive_dropped_percentage='$adaptive_dropped_percentage',adaptive_maximum_level='$adaptive_maximum_level',adaptive_latest_server_time='$adaptive_latest_server_time',adaptive_intensity='$adaptive_intensity',adaptive_dl_diff_target='$adaptive_dl_diff_target',concurrent_transfers='$concurrent_transfers',auto_alt_dial='$auto_alt_dial',agent_pause_codes_active='$agent_pause_codes_active',campaign_description='$campaign_description',campaign_changedate='$SQLdate',campaign_stats_refresh='$campaign_stats_refresh',disable_alter_custdata='$disable_alter_custdata',no_hopper_leads_logins='$no_hopper_leads_logins',list_order_mix='$list_order_mix',campaign_allow_inbound='$campaign_allow_inbound',manual_dial_list_id='$manual_dial_list_id',default_xfer_group='$default_xfer_group',xfer_groups='$XFERgroups_value',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',disable_alter_custphone='$disable_alter_custphone',display_queue_count='$display_queue_count',manual_dial_filter='$manual_dial_filter',agent_clipboard_copy='$agent_clipboard_copy',agent_extended_alt_dial='$agent_extended_alt_dial',use_campaign_dnc='$use_campaign_dnc',three_way_call_cid='$three_way_call_cid',three_way_dial_prefix='$three_way_dial_prefix',web_form_target='$web_form_target',vtiger_search_category='$vtiger_search_category',vtiger_create_call_record='$vtiger_create_call_record',vtiger_create_lead_record='$vtiger_create_lead_record',vtiger_screen_login='$vtiger_screen_login',cpd_amd_action='$cpd_amd_action',agent_allow_group_alias='$agent_allow_group_alias',default_group_alias='$default_group_alias',vtiger_search_dead='$vtiger_search_dead',vtiger_status_call='$vtiger_status_call',drop_lockout_time='$drop_lockout_time',quick_transfer_button='$quick_transfer_button',prepopulate_transfer_preset='$prepopulate_transfer_preset',drop_rate_group='$drop_rate_group',view_calls_in_queue='$view_calls_in_queue',view_calls_in_queue_launch='$view_calls_in_queue_launch',grab_calls_in_queue='$grab_calls_in_queue',call_requeue_button='$call_requeue_button',pause_after_each_call='$pause_after_each_call',no_hopper_dialing='$no_hopper_dialing',agent_dial_owner_only='$agent_dial_owner_only',agent_display_dialable_leads='$agent_display_dialable_leads',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',waitforsilence_options='$waitforsilence_options',agent_select_territories='$agent_select_territories',crm_popup_login='$crm_popup_login',crm_login_address='" . mysql_real_escape_string($crm_login_address) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',use_custom_cid='$use_custom_cid',scheduled_callbacks_alert='$scheduled_callbacks_alert',queuemetrics_callstatus_override='$queuemetrics_callstatus',extension_appended_cidname='$extension_appended_cidname',scheduled_callbacks_count='$scheduled_callbacks_count',manual_dial_override='$manual_dial_override',blind_monitor_warning='$blind_monitor_warning',blind_monitor_message='" . mysql_real_escape_string($blind_monitor_message) . "',blind_monitor_filename='$blind_monitor_filename',inbound_queue_no_dial='$inbound_queue_no_dial',timer_action_destination='$timer_action_destination',enable_xfer_presets='$enable_xfer_presets',hide_xfer_number_to_dial='$hide_xfer_number_to_dial',manual_dial_prefix='$manual_dial_prefix',customer_3way_hangup_logging='$customer_3way_hangup_logging',customer_3way_hangup_seconds='$customer_3way_hangup_seconds',customer_3way_hangup_action='$customer_3way_hangup_action',ivr_park_call='$ivr_park_call',ivr_park_call_agi='$ivr_park_call_agi',manual_preview_dial='$manual_preview_dial',realtime_agent_time_stats='$realtime_agent_time_stats' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmtA, $link); if ($reset_hopper == 'Y') @@ -17982,7 +17991,7 @@ if ($ADD==31) $enable_vtiger_integration_LU = $row[0]; $vtiger_url_LU = $row[1]; - $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial from vicidial_campaigns where campaign_id='$campaign_id';"; + $stmt="SELECT campaign_id,campaign_name,active,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,park_ext,park_file_name,web_form_address,allow_closers,hopper_level,auto_dial_level,next_agent_call,local_call_time,voicemail_ext,dial_timeout,dial_prefix,campaign_cid,campaign_vdad_exten,campaign_rec_exten,campaign_recording,campaign_rec_filename,campaign_script,get_call_launch,am_message_exten,amd_send_to_vmx,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,lead_filter_id,drop_call_seconds,drop_action,safe_harbor_exten,display_dialable_count,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,dial_method,available_only_ratio_tally,adaptive_dropped_percentage,adaptive_maximum_level,adaptive_latest_server_time,adaptive_intensity,adaptive_dl_diff_target,concurrent_transfers,auto_alt_dial,auto_alt_dial_statuses,agent_pause_codes_active,campaign_description,campaign_changedate,campaign_stats_refresh,campaign_logindate,dial_statuses,disable_alter_custdata,no_hopper_leads_logins,list_order_mix,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,queue_priority,drop_inbound_group,qc_enabled,qc_statuses,qc_lists,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,survey_first_audio_file,survey_dtmf_digits,survey_ni_digit,survey_opt_in_audio_file,survey_ni_audio_file,survey_method,survey_no_response_action,survey_ni_status,survey_response_digit_map,survey_xfer_exten,survey_camp_record_dir,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,agent_extended_alt_dial,use_campaign_dnc,three_way_call_cid,three_way_dial_prefix,web_form_target,vtiger_search_category,vtiger_create_call_record,vtiger_create_lead_record,vtiger_screen_login,cpd_amd_action,agent_allow_group_alias,default_group_alias,vtiger_search_dead,vtiger_status_call,survey_third_digit,survey_third_audio_file,survey_third_status,survey_third_exten,survey_fourth_digit,survey_fourth_audio_file,survey_fourth_status,survey_fourth_exten,drop_lockout_time,quick_transfer_button,prepopulate_transfer_preset,drop_rate_group,view_calls_in_queue,view_calls_in_queue_launch,grab_calls_in_queue,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,waitforsilence_options,agent_select_territories,campaign_calldate,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,use_custom_cid,scheduled_callbacks_alert,queuemetrics_callstatus_override,extension_appended_cidname,scheduled_callbacks_count,manual_dial_override,blind_monitor_warning,blind_monitor_message,blind_monitor_filename,inbound_queue_no_dial,timer_action_destination,enable_xfer_presets,hide_xfer_number_to_dial,manual_dial_prefix,customer_3way_hangup_logging,customer_3way_hangup_seconds,customer_3way_hangup_action,ivr_park_call,ivr_park_call_agi,manual_preview_dial,realtime_agent_time_stats from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $campaign_name = $row[1]; @@ -18143,6 +18152,7 @@ if ($ADD==31) $ivr_park_call = $row[159]; $ivr_park_call_agi = $row[160]; $manual_preview_dial = $row[161]; + $realtime_agent_time_stats = $row[162]; if (ereg("DISABLED",$list_order_mix)) @@ -18870,6 +18880,8 @@ if ($ADD==31) echo "
\n"; + echo "\n"; + echo "\n"; echo "\n"; @@ -21735,6 +21747,8 @@ if ($ADD==3111) echo "
MODIFY A GROUPS RECORD: $row[0]
\n"; echo "\n"; echo "\n"; + echo "\n"; + echo "\n"; echo "
\n"; @@ -865,9 +882,9 @@ echo "\n"; echo "\n"; echo "   "; echo "\n"; -echo "STOP | "; -echo "SLOW | "; -echo "GO"; +echo "STOP | "; +echo "SLOW | "; +echo "GO"; if (eregi('ALL-ACTIVE',$group_string)) { echo "       MODIFY | \n"; @@ -1420,7 +1437,7 @@ else $multi_drop++; $stmt="select avg(auto_dial_level),min(dial_status_a),min(dial_status_b),min(dial_status_c),min(dial_status_d),min(dial_status_e),min(lead_order),min(lead_filter_id),sum(hopper_level),min(dial_method),avg(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),min(available_only_ratio_tally),min(adaptive_latest_server_time),min(local_call_time),avg(dial_timeout),min(dial_statuses),max(agent_pause_codes_active),max(list_order_mix) from vicidial_campaigns where active='Y' $group_SQLand;"; - $stmtB="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today),max(status_category_1),sum(status_category_count_1),max(status_category_2),sum(status_category_count_2),max(status_category_3),sum(status_category_count_3),max(status_category_4),sum(status_category_count_4) from vicidial_campaign_stats where calls_today > -1 $non_inboundSQL;"; + $stmtB="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today),max(status_category_1),sum(status_category_count_1),max(status_category_2),sum(status_category_count_2),max(status_category_3),sum(status_category_count_3),max(status_category_4),sum(status_category_count_4),sum(agent_calls_today),sum(agent_wait_today),sum(agent_custtalk_today),sum(agent_acw_today),sum(agent_pause_today) from vicidial_campaign_stats where calls_today > -1 $non_inboundSQL;"; } else { @@ -1433,13 +1450,13 @@ else $stmt="select auto_dial_level,dial_status_a,dial_status_b,dial_status_c,dial_status_d,dial_status_e,lead_order,lead_filter_id,hopper_level,dial_method,adaptive_maximum_level,adaptive_dropped_percentage,adaptive_dl_diff_target,adaptive_intensity,available_only_ratio_tally,adaptive_latest_server_time,local_call_time,dial_timeout,dial_statuses,agent_pause_codes_active,list_order_mix from vicidial_campaigns where campaign_id IN ($group_SQL,$closer_campaignsSQL);"; - $stmtB="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today),max(status_category_1),sum(status_category_count_1),max(status_category_2),sum(status_category_count_2),max(status_category_3),sum(status_category_count_3),max(status_category_4),sum(status_category_count_4) from vicidial_campaign_stats where campaign_id IN ($group_SQL,$closer_campaignsSQL);"; + $stmtB="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today),max(status_category_1),sum(status_category_count_1),max(status_category_2),sum(status_category_count_2),max(status_category_3),sum(status_category_count_3),max(status_category_4),sum(status_category_count_4),sum(agent_calls_today),sum(agent_wait_today),sum(agent_custtalk_today),sum(agent_acw_today),sum(agent_pause_today) from vicidial_campaign_stats where campaign_id IN ($group_SQL,$closer_campaignsSQL);"; } else { $stmt="select avg(auto_dial_level),max(dial_status_a),max(dial_status_b),max(dial_status_c),max(dial_status_d),max(dial_status_e),max(lead_order),max(lead_filter_id),max(hopper_level),max(dial_method),max(adaptive_maximum_level),avg(adaptive_dropped_percentage),avg(adaptive_dl_diff_target),avg(adaptive_intensity),max(available_only_ratio_tally),max(adaptive_latest_server_time),max(local_call_time),max(dial_timeout),max(dial_statuses),max(agent_pause_codes_active),max(list_order_mix) from vicidial_campaigns where campaign_id IN($group_SQL);"; - $stmtB="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today),max(status_category_1),sum(status_category_count_1),max(status_category_2),sum(status_category_count_2),max(status_category_3),sum(status_category_count_3),max(status_category_4),sum(status_category_count_4) from vicidial_campaign_stats where campaign_id IN($group_SQL);"; + $stmtB="select sum(dialable_leads),sum(calls_today),sum(drops_today),avg(drops_answers_today_pct),avg(differential_onemin),avg(agents_average_onemin),sum(balance_trunk_fill),sum(answers_today),max(status_category_1),sum(status_category_count_1),max(status_category_2),sum(status_category_count_2),max(status_category_3),sum(status_category_count_3),max(status_category_4),sum(status_category_count_4),sum(agent_calls_today),sum(agent_wait_today),sum(agent_custtalk_today),sum(agent_acw_today),sum(agent_pause_today) from vicidial_campaign_stats where campaign_id IN($group_SQL);"; } } if ($DB > 0) {echo "\n|$stmt|$stmtB|\n";} @@ -1503,6 +1520,11 @@ else $VSCcat3tally = $row[13]; $VSCcat4 = $row[14]; $VSCcat4tally = $row[15]; + $VSCagentcalls = $row[16]; + $VSCagentwait = $row[17]; + $VSCagentcust = $row[18]; + $VSCagentacw = $row[19]; + $VSCagentpause = $row[20]; if ( ($diffONEMIN != 0) and ($agentsONEMIN > 0) ) { @@ -1591,6 +1613,52 @@ else echo "ORDER:  $DIALorder    
AGENT AVG WAIT:  $avgwaitTODAY  AVG CUSTTIME:  $avgcustTODAY  AVG ACW:  $avgacwTODAY  AVG PAUSE:  $avgpauseTODAY  
Campaign Stats Refresh: $NWB#vicidial_campaigns-campaign_stats_refresh$NWE
Real-Time Agent Time Stats: $NWB#vicidial_campaigns-realtime_agent_time_stats$NWE
Disable Alter Customer Data: $NWB#vicidial_campaigns-disable_alter_custdata$NWE
Disable Alter Customer Phone: $NWB#vicidial_campaigns-disable_alter_custphone$NWE
\n"; echo "\n"; echo "\n"; @@ -22159,16 +22173,17 @@ if ($ADD==3111) } echo "
Group ID: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
\n"; - echo "

\n"; + echo "


\n"; ### list of agent rank or skill-level for this inbound group + # ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ echo "
\n"; echo "
AGENT RANKS FOR THIS INBOUND GROUP:
\n"; - echo "\n"; - echo "\n"; + echo "
USER     RANK     CALLS TODAY
\n"; + echo "\n"; - $stmt="SELECT vu.user,viga.group_rank,calls_today,full_name from vicidial_inbound_group_agents viga, vicidial_users vu where group_id='$group_id' and active='Y' and vu.user=viga.user;"; + $stmt="SELECT vu.user,viga.group_rank,calls_today,full_name,closer_campaigns from vicidial_inbound_group_agents viga, vicidial_users vu where group_id='$group_id' and active='Y' and vu.user=viga.user;"; $rsltx=mysql_query($stmt, $link); $users_to_print = mysql_num_rows($rsltx); @@ -22178,15 +22193,138 @@ if ($ADD==3111) $rowx=mysql_fetch_row($rsltx); $o++; + $ARIG_user[$o] = $rowx[0]; + $ARIG_rank[$o] = $rowx[1]; + $ARIG_calls[$o] = $rowx[2]; + $ARIG_name[$o] = $rowx[3]; + $ARIG_close[$o] = $rowx[4]; + $ARIG_check[$o] = ''; + if (preg_match("/ $group_id /",$ARIG_close[$o])) + {$ARIG_check[$o] = ' CHECKED';} + } + + if ($stage=='SUBMIT') + { + $o=0; + while ($users_to_print > $o) + { + $o++; + + $ARIG_checked=''; + $ARIG_ranked=''; + + $checkbox_field="CHECK_$ARIG_user[$o]$US$group_id"; + $rank_field="RANK_$ARIG_user[$o]$US$group_id"; + + if (isset($_GET["$checkbox_field"])) {$ARIG_checked=$_GET["$checkbox_field"];} + elseif (isset($_POST["$checkbox_field"])) {$ARIG_checked=$_POST["$checkbox_field"];} + if (isset($_GET["$rank_field"])) {$ARIG_ranked=$_GET["$rank_field"];} + elseif (isset($_POST["$rank_field"])) {$ARIG_ranked=$_POST["$rank_field"];} + $ARIG_checked = ereg_replace("[^A-Z]","",$ARIG_checked); + $ARIG_ranked = ereg_replace("[^-0-9]","",$ARIG_ranked); + + $stmtA=''; + $stmtB=''; + $stmtC=''; + $ARIG_updated=0; + $ARIG_changenotes=''; + if ( ($ARIG_check[$o]=='') and ($ARIG_checked=='YES') ) + { + if (strlen($ARIG_close[$o]) < 4) {$ARIG_close[$o]=' - ';} + $stmtA="UPDATE vicidial_users set closer_campaigns=' $group_id$ARIG_close[$o]' where user='$ARIG_user[$o]';"; + $rslt=mysql_query($stmtA, $link); + if ($DB > 0) {echo "|$stmtA|";} + $ARIG_updated++; + $ARIG_changenotes .= "added $group_id to selected in-groups|"; + } + if ( ($ARIG_check[$o]==' CHECKED') and ($ARIG_checked=='') ) + { + $ARIG_close[$o] = preg_replace("/ $group_id /",' ',$ARIG_close[$o]); + $stmtB="UPDATE vicidial_users set closer_campaigns='$ARIG_close[$o]' where user='$ARIG_user[$o]';"; + $rslt=mysql_query($stmtB, $link); + if ($DB > 0) {echo "|$stmtB|";} + $ARIG_updated++; + $ARIG_changenotes .= "removed $group_id from selected in-groups|"; + } + if ( ($ARIG_ranked < $ARIG_rank[$o]) or ($ARIG_ranked > $ARIG_rank[$o]) ) + { + $stmtC="UPDATE vicidial_inbound_group_agents set group_rank='$ARIG_ranked',group_weight='$ARIG_ranked' where user='$ARIG_user[$o]' and group_id='$group_id';"; + $rslt=mysql_query($stmtC, $link); + if ($DB > 0) {echo "|$stmtC|";} + $ARIG_updated++; + $ARIG_changenotes .= "changed rank from $ARIG_rank[$o] to $ARIG_ranked|"; + } + if ($ARIG_updated > 0) + { + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmtA|$stmtB|$stmtC|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERS', event_type='MODIFY', record_id='$ARIG_user[$o]', event_code='USER INGROUP SETTINGS', event_sql=\"$SQL_log\", event_notes='$ARIG_changenotes';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } + } + + $stmt="SELECT vu.user,viga.group_rank,calls_today,full_name,closer_campaigns from vicidial_inbound_group_agents viga, vicidial_users vu where group_id='$group_id' and active='Y' and vu.user=viga.user;"; + $rsltx=mysql_query($stmt, $link); + $users_to_print = mysql_num_rows($rsltx); + + $o=0; + while ($users_to_print > $o) + { + $rowx=mysql_fetch_row($rsltx); + $o++; + + $ARIG_user[$o] = $rowx[0]; + $ARIG_rank[$o] = $rowx[1]; + $ARIG_calls[$o] = $rowx[2]; + $ARIG_name[$o] = $rowx[3]; + $ARIG_close[$o] = $rowx[4]; + $ARIG_check[$o] = ''; + if (preg_match("/ $group_id /",$ARIG_close[$o])) + {$ARIG_check[$o] = ' CHECKED';} + } + } + + $checkbox_count=0; + $o=0; + while ($users_to_print > $o) + { + $o++; + if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} else {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; - } + $checkbox_field="CHECK_$ARIG_user[$o]$US$group_id"; + $rank_field="RANK_$ARIG_user[$o]$US$group_id"; + $checkbox_list .= "|$checkbox_field"; + $checkbox_count++; - echo "
USERSELECTED     RANK     CALLS TODAY
$rowx[0] - $rowx[3]$rowx[1]$rowx[2]

\n"; + $users_output .= "
$ARIG_user[$o] - $ARIG_name[$o]\n"; + $users_output .= "\n"; + $users_output .= "\n"; + + echo "
\n"; echo "
\n"; diff --git a/www/vicidial/admin_header.php b/www/vicidial/admin_header.php index 31d65fda..abd0e094 100644 --- a/www/vicidial/admin_header.php +++ b/www/vicidial/admin_header.php @@ -26,6 +26,7 @@ # 100802-2127 - Changed Admin to point to links page instead of Phones listings # 100831-2255 - Added password strength checking function # 100914-1311 - Removed other links for reports-only users +# 101022-1323 - Added IGU_selectall function # @@ -573,6 +574,31 @@ if ( ($ADD==131111111) or ($ADD==331111111) or ($ADD==431111111) ) } + + +### Javascript for shift end-time calculation and display +if ( ($ADD==3111) or ($ADD==4111) or ($ADD==5111) ) + { + ?> + function IGU_selectall(temp_count,temp_fields) + { + var fields_array=temp_fields.split('|'); + var inc=0; + while (temp_count >= inc) + { + if (fields_array[inc].length > 0) + { + document.getElementById(fields_array[inc]).checked=true; + // document.admin_form.fields_array[inc].checked=true; + } + inc++; + } + } + + 99) {$hopper_priority=99;} $StarTtime = date("U"); $NOW_DATE = date("Y-m-d"); diff --git a/www/vicidial/xml_rpc_audio_server_vicidial.php b/www/vicidial/xml_rpc_audio_server_vicidial.php index ed8397a4..f8f70649 100644 --- a/www/vicidial/xml_rpc_audio_server_vicidial.php +++ b/www/vicidial/xml_rpc_audio_server_vicidial.php @@ -106,7 +106,11 @@ function find_file( $ServerID, $AsteriskID, $QMUserID, $QMUserName ) $time_id = $row[0]; $time_id_end = ($time_id + 14400); - $lead_id = substr($AsteriskID, -10); + $lead_id_test = substr($AsteriskID, -10,1); + if ($lead_id_test=='0') + {$lead_id = substr($AsteriskID, -10);} + else + {$lead_id = substr($AsteriskID, -9);} $lead_id = ($lead_id + 0); $stmt = "SELECT start_epoch,length_in_sec,location from recording_log where start_epoch>=$time_id and start_epoch<=$time_id_end and lead_id='$lead_id' order by recording_id limit 1;"; $rslt=mysql_query($stmt, $link);