diff --git a/UPGRADE b/UPGRADE index 9b167778..6bd176f5 100644 --- a/UPGRADE +++ b/UPGRADE @@ -351,6 +351,20 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom webform or D1/D2-dial to happen at a specified number of seconds after the customer connects to the agent. Also, an API callw as added for this +85. Added three more transfer-conference number-to-dial presets as well as List + ID override options for all five number presets + +86. Added Dispo Call URL that allows a back-end call to a web page or URL, that + will not display to the agent, which can send information like the + selected disposition, talk time, phone number or most of the other + fields available in the web form into a formatted URL to post to a + remote web server. Available in Campaigns and In-Groups. + +87. Added log rolling archive script to automatically move logs into archive + tables monthly. The ADMIN_archive_log_tables.pl script needs to be added + to your crontab to run monthly(example: "30 1 1 * *") + + diff --git a/bin/ADMIN_archive_log_tables.pl b/bin/ADMIN_archive_log_tables.pl new file mode 100644 index 00000000..6be2d49d --- /dev/null +++ b/bin/ADMIN_archive_log_tables.pl @@ -0,0 +1,321 @@ +#!/usr/bin/perl +# +# ADMIN_archive_log_tables.pl +# +# This script is designed to put all records from call_log, vicidial_log and +# vicidial_agent_log in relevant _archive tables and delete records in original +# tables older than 2 months from current date. Also, deletes old +# server_performance table records without archiving them as well as optimizing +# all involved tables. +# +# Place in the crontab and run every month after one in the morning, or whenever +# your server is not busy with other tasks +# 30 1 1 * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl +# +# NOTE: On a high-load outbound dialing system, this script can take hours to +# run. While the script is running the system is unusable. Please schedule to +# run this script at a time when the system will not be used for several hours. +# +# original author: I. Taushanov(okli) +# Based on perl scripts in ViciDial from Matt Florell and post: +# http://www.eflo.net/VICIDIALforum/viewtopic.php?p=22506&sid=ca5347cffa6f6382f56ce3db9fb3d068#22506 +# +# Copyright (C) 2010 I. Taushanov, Matt Florell LICENSE: AGPLv2 +# +# CHANGES +# 90615-1701 - First version +# 100101-1722 - Added error safety checks +# 100103-2052 - Formatting fixes, name change, added initial table counts and added archive tables to official SQL files +# + +### begin parsing run-time options ### +if (length($ARGV[0])>1) + { + $i=0; + while ($#ARGV >= $i) + { + $args = "$args $ARGV[$i]"; + $i++; + } + + if ($args =~ /--help/i) + { + print "allowed run time options:\n [-q] = quiet\n [-t] = test\n\n"; + exit; + } + else + { + if ($args =~ /-q/i) + { + $q=1; $Q=1; + } + if ($args =~ /-t/i) + { + $T=1; $TEST=1; + print "\n-----TESTING-----\n\n"; + } + } + } +else + { + print "no command line options set\n"; + } +### end parsing run-time options ### + + +$secX = time(); +($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); +$year = ($year + 1900); +#change 2 to how many months old records to be moved and deleted +$mon = ($mon - 2); +if ($mon < 0) + { + $mon = ($mon + 12); + $year = ($year - 1); + } +$mon++; +if ($mon < 10) {$mon = "0$mon";} +if ($mday < 10) {$mday = "0$mday";} + +$del_time = "$year-$mon-$mday 01:00:00"; + + +if (!$Q) {print "\n\n\n\n-- ADMIN_archive_log_tables.pl --\n\n";} +if (!$Q) {print "This program is designed to put all records from call_log, vicidial_log, server_performance and vicidial_agent_log in relevant _archive tables \nand delete records in original tables older than 2 months ( $del_time ) from current date \n\n";} + + +# default path to astguiclient configuration file: +$PATHconf = '/etc/astguiclient.conf'; + +open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n"; +@conf = ; +close(conf); +$i=0; +foreach(@conf) + { + $line = $conf[$i]; + $line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi; + if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) ) + {$PATHhome = $line; $PATHhome =~ s/.*=//gi;} + if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) ) + {$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;} + if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) ) + {$PATHagi = $line; $PATHagi =~ s/.*=//gi;} + if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) ) + {$PATHweb = $line; $PATHweb =~ s/.*=//gi;} + if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) ) + {$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;} + if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) ) + {$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;} + if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) ) + {$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) ) + {$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) ) + {$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) ) + {$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) ) + {$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;} + if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) ) + {$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;} + $i++; + } + +# Customized Variables +$server_ip = $VARserver_ip; # Asterisk server IP + +use DBI; +$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass") + or die "Couldn't connect to database: " . DBI->errstr; + +if (!$T) + { + ##### call_log + $stmtA = "SELECT count(*) from call_log;"; + $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; + $call_log_count = $aryA[0]; + } + $sthA->finish(); + + $stmtA = "SELECT count(*) from call_log_archive;"; + $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; + $call_log_archive_count = $aryA[0]; + } + $sthA->finish(); + + if (!$Q) {print "\nProcessing call_log table... ($call_log_count|$call_log_archive_count)\n";} + $stmtA = "INSERT IGNORE INTO call_log_archive SELECT * from call_log;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows = $sthA->rows; + if (!$Q) {print "$sthArows rows inserted into call_log_archive table\n";} + + $rv = $sthA->err(); + if (!$rv) + { + $stmtA = "DELETE FROM call_log WHERE start_time < '$del_time';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows = $sthA->rows; + if (!$Q) {print "$sthArows rows deleted from call_log table \n";} + + $stmtA = "optimize table call_log;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + + $stmtA = "DELETE from call_log_archive where channel LIKE 'Local/9%' and extension not IN('8365','8366','8367','8368','8369','8370','8371','8372','8373','8374') and caller_code LIKE 'V%' and length_in_sec < 75 and start_time < '$del_time';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows = $sthA->rows; + if (!$Q) {print "$sthArows rows deleted from call_log_archive table \n";} + + $stmtA = "optimize table call_log_archive;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + } + + + ##### vicidial_log + $stmtA = "SELECT count(*) from vicidial_log;"; + $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; + $vicidial_log_count = $aryA[0]; + } + $sthA->finish(); + + $stmtA = "SELECT count(*) from vicidial_log_archive;"; + $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; + $vicidial_log_archive_count = $aryA[0]; + } + $sthA->finish(); + + if (!$Q) {print "\nProcessing vicidial_log table... ($vicidial_log_count|$vicidial_log_archive_count)\n";} + $stmtA = "INSERT IGNORE INTO vicidial_log_archive SELECT * from vicidial_log;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + + $sthArows = $sthA->rows; + if (!$Q) {print "$sthArows rows inserted into vicidial_log_archive table \n";} + + $rv = $sthA->err(); + if (!$rv) + { + $stmtA = "DELETE FROM vicidial_log WHERE call_date < '$del_time';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows = $sthA->rows; + if (!$Q) {print "$sthArows rows deleted from vicidial_log table \n";} + + $stmtA = "optimize table vicidial_log;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + + $stmtA = "optimize table vicidial_log_archive;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + } + + + ##### server_performance + $stmtA = "SELECT count(*) from server_performance;"; + $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; + $server_performance_count = $aryA[0]; + } + $sthA->finish(); + + if (!$Q) {print "\nProcessing server_performance table... ($server_performance_count)\n";} + $stmtA = "DELETE FROM server_performance WHERE start_time < '$del_time';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows = $sthA->rows; + if (!$Q) {print "$sthArows rows deleted from server_performance table \n";} + + $stmtA = "optimize table server_performance;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + + + ##### vicidial_agent_log + $stmtA = "SELECT count(*) from vicidial_agent_log;"; + $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; + $vicidial_agent_log_count = $aryA[0]; + } + $sthA->finish(); + + $stmtA = "SELECT count(*) from vicidial_agent_log_archive;"; + $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; + $vicidial_agent_log_archive_count = $aryA[0]; + } + $sthA->finish(); + + if (!$Q) {print "\nProcessing vicidial_agent table... ($vicidial_agent_log_count|$vicidial_agent_log_archive_count)\n";} + $stmtA = "INSERT IGNORE INTO vicidial_agent_log_archive SELECT * from vicidial_agent_log;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows = $sthA->rows; + if (!$Q) {print "$sthArows rows inserted into vicidial_agent_log_archive table \n";} + + $rv = $sthA->err(); + if (!$rv) + { + $stmtA = "DELETE FROM vicidial_agent_log WHERE event_time < '$del_time';"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows = $sthA->rows; + if (!$Q) {print "$sthArows rows deleted from vicidial_agent_log table \n";} + + $stmtA = "optimize table vicidial_agent_log;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + + $stmtA = "optimize table vicidial_agent_log_archive;"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + } + } +#$dbhA->disconnect(); +#print "$del_time\n\n"; + + +### calculate time to run script ### +$secY = time(); +$secZ = ($secY - $secX); +$secZm = ($secZ /60); +if (!$Q) {print "\nscript execution time in seconds: $secZ minutes: $secZm\n";} + +exit; diff --git a/docs/BASE_INSTALL.txt b/docs/BASE_INSTALL.txt index ffb0cc06..f015061a 100644 --- a/docs/BASE_INSTALL.txt +++ b/docs/BASE_INSTALL.txt @@ -458,6 +458,9 @@ PHASE 6: ADDING CRONTAB ENTRIES FOR ASTGUICLIENT/VICIDIAL SCRIPTS ### remove old recordings more than 7 days old #24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE -maxdepth 2 -type f -mtime +7 -print | xargs rm -f +### roll logs monthly on high-volume dialing systems +#30 1 1 * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl + ### remove old vicidial logs and asterisk logs more than 2 days old 28 0 * * * /usr/bin/find /var/log/astguiclient -maxdepth 1 -type f -mtime +2 -print | xargs rm -f 29 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +2 -print | xargs rm -f diff --git a/docs/LOAD_BALANCING.txt b/docs/LOAD_BALANCING.txt index 0f64cf37..fbff36d8 100644 --- a/docs/LOAD_BALANCING.txt +++ b/docs/LOAD_BALANCING.txt @@ -26,6 +26,14 @@ NOTE: as of SVN trunk 2009-05-19 the voicemail and prompt recording extensions a +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +AS OF RELEASE 2.2.0 YOU SHOULD NOT HAVE TO TAKE ANY STEPS BEYOND STEP 2 IN THIS DOCUMENT TO GET MULTI-SERVER VICIDIAL TO WORK IF YOU ARE USING THE DEFAULT VICIDIAL CONF FILES. +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + + + + + 1. The VICIDIAL/Asterisk servers need to have all of the perl scripts and cron jobs installed on them, except these which only need to be on one of the servers: - AST_VDhopper.pl (crontab) - AST_cleanup_agent_log.pl (crontab) @@ -33,6 +41,7 @@ NOTE: as of SVN trunk 2009-05-19 the voicemail and prompt recording extensions a - AST_DB_optimize.pl (crontab) - AST_VDadapt.pl (defined in /etc/astguiclient.conf) - AST_VDauto_dial_FILL.pl (defined in /etc/astguiclient.conf) + - ADMIN_archive_log_tables.pl (crontab) 2. The VARactive_keepalives variable in /etc/astguiclient.conf should have "5" and "7" on only ONE SERVER in your entire dialer setup, the other servers should not have 5 or 7 in that field. # 1 - AST_update @@ -169,6 +178,7 @@ If you have any questions or problems please post to the astguiclient-users list - AST_DB_optimize.pl (crontab) - AST_VDadapt.pl (defined in /etc/astguiclient.conf) - AST_VDauto_dial_FILL.pl (defined in /etc/astguiclient.conf) + - ADMIN_archive_log_tables.pl (crontab) 8. On all servers but one you should DELETE the following line from your extensions.conf: ; prompt recording AGI script, ID is 4321 diff --git a/docs/SCRATCH_INSTALL.txt b/docs/SCRATCH_INSTALL.txt index e47893fc..2ff02884 100644 --- a/docs/SCRATCH_INSTALL.txt +++ b/docs/SCRATCH_INSTALL.txt @@ -2384,6 +2384,8 @@ SUBPHASE 6.5: setting up astguiclient scripts for continuous running 50 0 * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl --last-24hours ## uncomment below if using QueueMetrics #*/5 * * * * /usr/share/astguiclient/AST_cleanup_agent_log.pl --only-qm-live-call-check + +## uncomment below if using Vtiger #1 1 * * * /usr/share/astguiclient/Vtiger_optimize_all_tables.pl --quiet ### updater for VICIDIAL hopper @@ -2412,6 +2414,9 @@ SUBPHASE 6.5: setting up astguiclient scripts for continuous running ### remove old recordings more than 7 days old #24 0 * * * /usr/bin/find /var/spool/asterisk/monitorDONE -maxdepth 2 -type f -mtime +7 -print | xargs rm -f +### roll logs monthly on high-volume dialing systems +#30 1 1 * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl + ### remove old vicidial logs and asterisk logs more than 2 days old 28 0 * * * /usr/bin/find /var/log/astguiclient -maxdepth 1 -type f -mtime +2 -print | xargs rm -f 29 0 * * * /usr/bin/find /var/log/asterisk -maxdepth 3 -type f -mtime +2 -print | xargs rm -f diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 8507b83c..6f0cf61a 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -685,8 +685,8 @@ survey_fourth_audio_file VARCHAR(50) default 'US_thanks_no_contact', survey_fourth_status VARCHAR(6) default 'NI', survey_fourth_exten VARCHAR(20) default '8300', drop_lockout_time VARCHAR(6) default '0', -quick_transfer_button ENUM('N','IN_GROUP','PRESET_1','PRESET_2') default 'N', -prepopulate_transfer_preset ENUM('N','PRESET_1','PRESET_2') default 'N', +quick_transfer_button ENUM('N','IN_GROUP','PRESET_1','PRESET_2','PRESET_3','PRESET_4','PRESET_5') default 'N', +prepopulate_transfer_preset ENUM('N','PRESET_1','PRESET_2','PRESET_3','PRESET_4','PRESET_5') default 'N', drop_rate_group VARCHAR(20) default 'DISABLED', view_calls_in_queue ENUM('NONE','ALL','1','2','3','4','5') default 'NONE', view_calls_in_queue_launch ENUM('AUTO','MANUAL') default 'MANUAL', @@ -702,9 +702,14 @@ agent_select_territories ENUM('Y','N') default 'N', campaign_calldate DATETIME, crm_popup_login ENUM('Y','N') default 'N', crm_login_address TEXT, -timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE', +timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE', timer_action_message VARCHAR(255) default '', -timer_action_seconds MEDIUMINT(7) default '-1' +timer_action_seconds MEDIUMINT(7) default '-1', +start_call_url TEXT, +dispo_call_url TEXT, +xferconf_c_number VARCHAR(50) default '', +xferconf_d_number VARCHAR(50) default '', +xferconf_e_number VARCHAR(50) default '' ); CREATE TABLE vicidial_lists ( @@ -719,7 +724,12 @@ reset_time VARCHAR(100) default '', agent_script_override VARCHAR(10) default '', campaign_cid_override VARCHAR(20) default '', am_message_exten_override VARCHAR(100) default '', -drop_inbound_group_override VARCHAR(20) default '' +drop_inbound_group_override VARCHAR(20) default '', +xferconf_a_number VARCHAR(50) default '', +xferconf_b_number VARCHAR(50) default '', +xferconf_c_number VARCHAR(50) default '', +xferconf_d_number VARCHAR(50) default '', +xferconf_e_number VARCHAR(50) default '' ); CREATE TABLE vicidial_statuses ( @@ -841,9 +851,14 @@ no_agent_no_queue ENUM('N','Y','NO_PAUSED') default 'N', no_agent_action ENUM('CALLMENU','INGROUP','DID','MESSAGE','EXTENSION','VOICEMAIL') default 'MESSAGE', no_agent_action_value VARCHAR(255) default 'nbdy-avail-to-take-call|vm-goodbye', web_form_address_two TEXT, -timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','MESSAGE_ONLY') default 'NONE', +timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE', timer_action_message VARCHAR(255) default '', -timer_action_seconds MEDIUMINT(7) default '-1' +timer_action_seconds MEDIUMINT(7) default '-1', +start_call_url TEXT, +dispo_call_url TEXT, +xferconf_c_number VARCHAR(50) default '', +xferconf_d_number VARCHAR(50) default '', +xferconf_e_number VARCHAR(50) default '' ); CREATE TABLE vicidial_stations ( @@ -2001,7 +2016,14 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number); CREATE INDEX date_user on vicidial_closer_log (call_date,user); CREATE INDEX comment_a on live_inbound_log (comment_a); -UPDATE system_settings SET db_schema_version='1189',db_schema_update_date=NOW(); +CREATE TABLE call_log_archive LIKE call_log; + +CREATE TABLE vicidial_log_archive LIKE vicidial_log; + +CREATE TABLE vicidial_agent_log_archive LIKE vicidial_agent_log; +ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT NULL; + +UPDATE system_settings SET db_schema_version='1191',db_schema_update_date=NOW(); GRANT RELOAD ON *.* TO cron@'%'; GRANT RELOAD ON *.* TO cron@localhost; diff --git a/extras/upgrade_2.2.0.sql b/extras/upgrade_2.2.0.sql index 6c212217..9613b01d 100644 --- a/extras/upgrade_2.2.0.sql +++ b/extras/upgrade_2.2.0.sql @@ -688,3 +688,36 @@ ALTER TABLE vicidial_inbound_groups ADD timer_action_message VARCHAR(255) defaul ALTER TABLE vicidial_inbound_groups ADD timer_action_seconds MEDIUMINT(7) default '-1'; UPDATE system_settings SET db_schema_version='1189',db_schema_update_date=NOW(); + +ALTER TABLE vicidial_campaigns ADD start_call_url TEXT; +ALTER TABLE vicidial_campaigns ADD dispo_call_url TEXT; +ALTER TABLE vicidial_campaigns ADD xferconf_c_number VARCHAR(50) default ''; +ALTER TABLE vicidial_campaigns ADD xferconf_d_number VARCHAR(50) default ''; +ALTER TABLE vicidial_campaigns ADD xferconf_e_number VARCHAR(50) default ''; +ALTER TABLE vicidial_campaigns MODIFY quick_transfer_button ENUM('N','IN_GROUP','PRESET_1','PRESET_2','PRESET_3','PRESET_4','PRESET_5') default 'N'; +ALTER TABLE vicidial_campaigns MODIFY prepopulate_transfer_preset ENUM('N','PRESET_1','PRESET_2','PRESET_3','PRESET_4','PRESET_5') default 'N'; +ALTER TABLE vicidial_campaigns MODIFY timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE'; + +ALTER TABLE vicidial_inbound_groups ADD start_call_url TEXT; +ALTER TABLE vicidial_inbound_groups ADD dispo_call_url TEXT; +ALTER TABLE vicidial_inbound_groups ADD xferconf_c_number VARCHAR(50) default ''; +ALTER TABLE vicidial_inbound_groups ADD xferconf_d_number VARCHAR(50) default ''; +ALTER TABLE vicidial_inbound_groups ADD xferconf_e_number VARCHAR(50) default ''; +ALTER TABLE vicidial_inbound_groups MODIFY timer_action ENUM('NONE','WEBFORM','WEBFORM2','D1_DIAL','D2_DIAL','D3_DIAL','D4_DIAL','D5_DIAL','MESSAGE_ONLY') default 'NONE'; + +ALTER TABLE vicidial_lists ADD xferconf_a_number VARCHAR(50) default ''; +ALTER TABLE vicidial_lists ADD xferconf_b_number VARCHAR(50) default ''; +ALTER TABLE vicidial_lists ADD xferconf_c_number VARCHAR(50) default ''; +ALTER TABLE vicidial_lists ADD xferconf_d_number VARCHAR(50) default ''; +ALTER TABLE vicidial_lists ADD xferconf_e_number VARCHAR(50) default ''; + +UPDATE system_settings SET db_schema_version='1190',db_schema_update_date=NOW(); + +CREATE TABLE call_log_archive LIKE call_log; + +CREATE TABLE vicidial_log_archive LIKE vicidial_log; + +CREATE TABLE vicidial_agent_log_archive LIKE vicidial_agent_log; +ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT NULL; + +UPDATE system_settings SET db_schema_version='1191',db_schema_update_date=NOW(); diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt index 61f4e50e..c6cb9456 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.2.0.txt @@ -365,6 +365,13 @@ This is the message that appears on the agent screen at the time the Timer Actio Timer Action Seconds|| This is the amount of time after the call is connected to the customer that the Timer Action is triggered. Default is -1 which is also inactive|| This setting will override the Campaign settings|| +Start Call URL|| +This web URL address is not seen by the agent, but it is called every time a call is sent to an agent if it is populated. Uses the same variables as the web form fields and scripts. This URL can NOT be a relative path. The Start URL does not work for Manual dial calls. Default is blank|| +Dispo Call URL|| +This web URL address is not seen by the agent, but it is called every time a call is dispositioned by an agent if it is populated. Uses the same variables as the web form fields and scripts. dispo and talk_time are the variables you can use to retrieve the agent-defined disposition for the call and the actual talk time in seconds of the call. This URL can NOT be a relative path. Default is blank|| +Xfer-Conf Number Override|| +These five fields allow for you to override the Transfer Conference number presets when the lead is from this list. Default is blank|| +These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. If you want to allow Consultative Transfers, a fronter to a closer, have the agent use the CONSULTATIVE checkbox, which does not work for third party non-ViciDial consultative calls. For those just have the agent click the Dial With Customer button. Then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER, for instance if you want to do a call to a special IVR you have set to extension 83900 you would put AXFER83900 in the number-to-dial field|| add-file: user_territories.php diff --git a/www/agc/vdc_call_url_test.php b/www/agc/vdc_call_url_test.php new file mode 100644 index 00000000..6b801be1 --- /dev/null +++ b/www/agc/vdc_call_url_test.php @@ -0,0 +1,292 @@ + LICENSE: AGPLv2 +# +# This script is designed display and log the start_call_url and dispo_call_url +# queries if activated +# +# CHANGELOG: +# 100103-1317 - First build of script +# + +$version = '2.2.0-1'; +$build = '100103-1317'; + +require("dbconnect.php"); + +$query_string = getenv("QUERY_STRING"); + +if (isset($_GET["lead_id"])) {$lead_id=$_GET["lead_id"];} + elseif (isset($_POST["lead_id"])) {$lead_id=$_POST["lead_id"];} +if (isset($_GET["vendor_id"])) {$vendor_id=$_GET["vendor_id"];} + elseif (isset($_POST["vendor_id"])) {$vendor_id=$_POST["vendor_id"];} + $vendor_lead_code = $vendor_id; +if (isset($_GET["list_id"])) {$list_id=$_GET["list_id"];} + elseif (isset($_POST["list_id"])) {$list_id=$_POST["list_id"];} +if (isset($_GET["gmt_offset_now"])) {$gmt_offset_now=$_GET["gmt_offset_now"];} + elseif (isset($_POST["gmt_offset_now"])) {$gmt_offset_now=$_POST["gmt_offset_now"];} +if (isset($_GET["phone_code"])) {$phone_code=$_GET["phone_code"];} + elseif (isset($_POST["phone_code"])) {$phone_code=$_POST["phone_code"];} +if (isset($_GET["phone_number"])) {$phone_number=$_GET["phone_number"];} + elseif (isset($_POST["phone_number"])) {$phone_number=$_POST["phone_number"];} +if (isset($_GET["title"])) {$title=$_GET["title"];} + elseif (isset($_POST["title"])) {$title=$_POST["title"];} +if (isset($_GET["first_name"])) {$first_name=$_GET["first_name"];} + elseif (isset($_POST["first_name"])) {$first_name=$_POST["first_name"];} +if (isset($_GET["middle_initial"])) {$middle_initial=$_GET["middle_initial"];} + elseif (isset($_POST["middle_initial"])) {$middle_initial=$_POST["middle_initial"];} +if (isset($_GET["last_name"])) {$last_name=$_GET["last_name"];} + elseif (isset($_POST["last_name"])) {$last_name=$_POST["last_name"];} +if (isset($_GET["address1"])) {$address1=$_GET["address1"];} + elseif (isset($_POST["address1"])) {$address1=$_POST["address1"];} +if (isset($_GET["address2"])) {$address2=$_GET["address2"];} + elseif (isset($_POST["address2"])) {$address2=$_POST["address2"];} +if (isset($_GET["address3"])) {$address3=$_GET["address3"];} + elseif (isset($_POST["address3"])) {$address3=$_POST["address3"];} +if (isset($_GET["city"])) {$city=$_GET["city"];} + elseif (isset($_POST["city"])) {$city=$_POST["city"];} +if (isset($_GET["state"])) {$state=$_GET["state"];} + elseif (isset($_POST["state"])) {$state=$_POST["state"];} +if (isset($_GET["province"])) {$province=$_GET["province"];} + elseif (isset($_POST["province"])) {$province=$_POST["province"];} +if (isset($_GET["postal_code"])) {$postal_code=$_GET["postal_code"];} + elseif (isset($_POST["postal_code"])) {$postal_code=$_POST["postal_code"];} +if (isset($_GET["country_code"])) {$country_code=$_GET["country_code"];} + elseif (isset($_POST["country_code"])) {$country_code=$_POST["country_code"];} +if (isset($_GET["gender"])) {$gender=$_GET["gender"];} + elseif (isset($_POST["gender"])) {$gender=$_POST["gender"];} +if (isset($_GET["date_of_birth"])) {$date_of_birth=$_GET["date_of_birth"];} + elseif (isset($_POST["date_of_birth"])) {$date_of_birth=$_POST["date_of_birth"];} +if (isset($_GET["alt_phone"])) {$alt_phone=$_GET["alt_phone"];} + elseif (isset($_POST["alt_phone"])) {$alt_phone=$_POST["alt_phone"];} +if (isset($_GET["email"])) {$email=$_GET["email"];} + elseif (isset($_POST["email"])) {$email=$_POST["email"];} +if (isset($_GET["security_phrase"])) {$security_phrase=$_GET["security_phrase"];} + elseif (isset($_POST["security_phrase"])) {$security_phrase=$_POST["security_phrase"];} +if (isset($_GET["comments"])) {$comments=$_GET["comments"];} + elseif (isset($_POST["comments"])) {$comments=$_POST["comments"];} +if (isset($_GET["user"])) {$user=$_GET["user"];} + elseif (isset($_POST["user"])) {$user=$_POST["user"];} +if (isset($_GET["pass"])) {$pass=$_GET["pass"];} + elseif (isset($_POST["pass"])) {$pass=$_POST["pass"];} +if (isset($_GET["campaign"])) {$campaign=$_GET["campaign"];} + elseif (isset($_POST["campaign"])) {$campaign=$_POST["campaign"];} +if (isset($_GET["phone_login"])) {$phone_login=$_GET["phone_login"];} + elseif (isset($_POST["phone_login"])) {$phone_login=$_POST["phone_login"];} +if (isset($_GET["original_phone_login"])) {$original_phone_login=$_GET["original_phone_login"];} + elseif (isset($_POST["original_phone_login"])) {$original_phone_login=$_POST["original_phone_login"];} +if (isset($_GET["phone_pass"])) {$phone_pass=$_GET["phone_pass"];} + elseif (isset($_POST["phone_pass"])) {$phone_pass=$_POST["phone_pass"];} +if (isset($_GET["fronter"])) {$fronter=$_GET["fronter"];} + elseif (isset($_POST["fronter"])) {$fronter=$_POST["fronter"];} +if (isset($_GET["closer"])) {$closer=$_GET["closer"];} + elseif (isset($_POST["closer"])) {$closer=$_POST["closer"];} +if (isset($_GET["group"])) {$group=$_GET["group"];} + elseif (isset($_POST["group"])) {$group=$_POST["group"];} +if (isset($_GET["channel_group"])) {$channel_group=$_GET["channel_group"];} + elseif (isset($_POST["channel_group"])) {$channel_group=$_POST["channel_group"];} +if (isset($_GET["SQLdate"])) {$SQLdate=$_GET["SQLdate"];} + elseif (isset($_POST["SQLdate"])) {$SQLdate=$_POST["SQLdate"];} +if (isset($_GET["epoch"])) {$epoch=$_GET["epoch"];} + elseif (isset($_POST["epoch"])) {$epoch=$_POST["epoch"];} +if (isset($_GET["uniqueid"])) {$uniqueid=$_GET["uniqueid"];} + elseif (isset($_POST["uniqueid"])) {$uniqueid=$_POST["uniqueid"];} +if (isset($_GET["customer_zap_channel"])) {$customer_zap_channel=$_GET["customer_zap_channel"];} + elseif (isset($_POST["customer_zap_channel"])) {$customer_zap_channel=$_POST["customer_zap_channel"];} +if (isset($_GET["customer_server_ip"])) {$customer_server_ip=$_GET["customer_server_ip"];} + elseif (isset($_POST["customer_server_ip"])) {$customer_server_ip=$_POST["customer_server_ip"];} +if (isset($_GET["server_ip"])) {$server_ip=$_GET["server_ip"];} + elseif (isset($_POST["server_ip"])) {$server_ip=$_POST["server_ip"];} +if (isset($_GET["SIPexten"])) {$SIPexten=$_GET["SIPexten"];} + elseif (isset($_POST["SIPexten"])) {$SIPexten=$_POST["SIPexten"];} +if (isset($_GET["session_id"])) {$session_id=$_GET["session_id"];} + elseif (isset($_POST["session_id"])) {$session_id=$_POST["session_id"];} +if (isset($_GET["phone"])) {$phone=$_GET["phone"];} + elseif (isset($_POST["phone"])) {$phone=$_POST["phone"];} +if (isset($_GET["parked_by"])) {$parked_by=$_GET["parked_by"];} + elseif (isset($_POST["parked_by"])) {$parked_by=$_POST["parked_by"];} +if (isset($_GET["dispo"])) {$dispo=$_GET["dispo"];} + elseif (isset($_POST["dispo"])) {$dispo=$_POST["dispo"];} +if (isset($_GET["dialed_number"])) {$dialed_number=$_GET["dialed_number"];} + elseif (isset($_POST["dialed_number"])) {$dialed_number=$_POST["dialed_number"];} +if (isset($_GET["dialed_label"])) {$dialed_label=$_GET["dialed_label"];} + elseif (isset($_POST["dialed_label"])) {$dialed_label=$_POST["dialed_label"];} +if (isset($_GET["source_id"])) {$source_id=$_GET["source_id"];} + elseif (isset($_POST["source_id"])) {$source_id=$_POST["source_id"];} +if (isset($_GET["rank"])) {$rank=$_GET["rank"];} + elseif (isset($_POST["rank"])) {$rank=$_POST["rank"];} +if (isset($_GET["owner"])) {$owner=$_GET["owner"];} + elseif (isset($_POST["owner"])) {$owner=$_POST["owner"];} +if (isset($_GET["camp_script"])) {$camp_script=$_GET["camp_script"];} + elseif (isset($_POST["camp_script"])) {$camp_script=$_POST["camp_script"];} +if (isset($_GET["in_script"])) {$in_script=$_GET["in_script"];} + elseif (isset($_POST["in_script"])) {$in_script=$_POST["in_script"];} +if (isset($_GET["script_width"])) {$script_width=$_GET["script_width"];} + elseif (isset($_POST["script_width"])) {$script_width=$_POST["script_width"];} +if (isset($_GET["script_height"])) {$script_height=$_GET["script_height"];} + elseif (isset($_POST["script_height"])) {$script_height=$_POST["script_height"];} +if (isset($_GET["fullname"])) {$fullname=$_GET["fullname"];} + elseif (isset($_POST["fullname"])) {$fullname=$_POST["fullname"];} +if (isset($_GET["recording_filename"])) {$recording_filename=$_GET["recording_filename"];} + elseif (isset($_POST["recording_filename"])) {$recording_filename=$_POST["recording_filename"];} +if (isset($_GET["recording_id"])) {$recording_id=$_GET["recording_id"];} + elseif (isset($_POST["recording_id"])) {$recording_id=$_POST["recording_id"];} +if (isset($_GET["user_custom_one"])) {$user_custom_one=$_GET["user_custom_one"];} + elseif (isset($_POST["user_custom_one"])) {$user_custom_one=$_POST["user_custom_one"];} +if (isset($_GET["user_custom_two"])) {$user_custom_two=$_GET["user_custom_two"];} + elseif (isset($_POST["user_custom_two"])) {$user_custom_two=$_POST["user_custom_two"];} +if (isset($_GET["user_custom_three"])) {$user_custom_three=$_GET["user_custom_three"];} + elseif (isset($_POST["user_custom_three"])) {$user_custom_three=$_POST["user_custom_three"];} +if (isset($_GET["user_custom_four"])) {$user_custom_four=$_GET["user_custom_four"];} + elseif (isset($_POST["user_custom_four"])) {$user_custom_four=$_POST["user_custom_four"];} +if (isset($_GET["user_custom_five"])) {$user_custom_five=$_GET["user_custom_five"];} + elseif (isset($_POST["user_custom_five"])) {$user_custom_five=$_POST["user_custom_five"];} +if (isset($_GET["talk_time"])) {$talk_time=$_GET["talk_time"];} + elseif (isset($_POST["talk_time"])) {$talk_time=$_POST["talk_time"];} +if (isset($_GET["talk_time_min"])) {$talk_time_min=$_GET["talk_time_min"];} + elseif (isset($_POST["talk_time_min"])) {$talk_time_min=$_POST["talk_time_min"];} +if (isset($_GET["agent_log_id"])) {$agent_log_id=$_GET["agent_log_id"];} + elseif (isset($_POST["agent_log_id"])) {$agent_log_id=$_POST["agent_log_id"];} + + +header ("Content-type: text/html; charset=utf-8"); +header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 +header ("Pragma: no-cache"); // HTTP/1.0 + +$txt = '.txt'; +$StarTtime = date("U"); +$NOW_DATE = date("Y-m-d"); +$NOW_TIME = date("Y-m-d H:i:s"); +$CIDdate = date("mdHis"); +$ENTRYdate = date("YmdHis"); +$MT[0]=''; +$agents='@agents'; + +$IFRAME=0; + +############################################# +##### START SYSTEM_SETTINGS LOOKUP ##### +$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock FROM system_settings;"; +$rslt=mysql_query($stmt, $link); +if ($DB) {echo "$stmt\n";} +$qm_conf_ct = mysql_num_rows($rslt); +if ($qm_conf_ct > 0) + { + $row=mysql_fetch_row($rslt); + $non_latin = $row[0]; + $timeclock_end_of_day = $row[1]; + $agentonly_callback_campaign_lock = $row[2]; + } +##### END SETTINGS LOOKUP ##### +########################################### + +if ($non_latin < 1) + { + $user=ereg_replace("[^-_0-9a-zA-Z]","",$user); + $pass=ereg_replace("[^-_0-9a-zA-Z]","",$pass); + $length_in_sec = ereg_replace("[^0-9]","",$length_in_sec); + $phone_code = ereg_replace("[^0-9]","",$phone_code); + $phone_number = ereg_replace("[^0-9]","",$phone_number); + } +else + { + $user = ereg_replace("'|\"|\\\\|;","",$user); + $pass = ereg_replace("'|\"|\\\\|;","",$pass); + } + + +# default optional vars if not set +if (!isset($format)) {$format="text";} + if ($format == 'debug') {$DB=1;} +if (!isset($ACTION)) {$ACTION="refresh";} +if (!isset($query_date)) {$query_date = $NOW_DATE;} + +if ($format=='debug') + { + echo "\n"; + echo "\n"; + echo "\n"; + echo "VICIDiaL Script Display Script"; + echo "\n"; + echo "\n"; + echo "\n"; + } + +$output = ''; +$output .= "$lead_id|"; +$output .= "$vendor_id|"; +$output .= "$vendor_lead_code|"; +$output .= "$list_id|"; +$output .= "$gmt_offset_now|"; +$output .= "$phone_code|"; +$output .= "$phone_number|"; +$output .= "$title|"; +$output .= "$first_name|"; +$output .= "$middle_initial|"; +$output .= "$last_name|"; +$output .= "$address1|"; +$output .= "$address2|"; +$output .= "$address3|"; +$output .= "$city|"; +$output .= "$state|"; +$output .= "$province|"; +$output .= "$postal_code|"; +$output .= "$country_code|"; +$output .= "$gender|"; +$output .= "$date_of_birth|"; +$output .= "$alt_phone|"; +$output .= "$email|"; +$output .= "$security_phrase|"; +$output .= "$comments|"; +$output .= "$user|"; +$output .= "$pass|"; +$output .= "$campaign|"; +$output .= "$phone_login|"; +$output .= "$original_phone_login|"; +$output .= "$phone_pass|"; +$output .= "$fronter|"; +$output .= "$closer|"; +$output .= "$group|"; +$output .= "$channel_group|"; +$output .= "$SQLdate|"; +$output .= "$epoch|"; +$output .= "$uniqueid|"; +$output .= "$customer_zap_channel|"; +$output .= "$customer_server_ip|"; +$output .= "$server_ip|"; +$output .= "$SIPexten|"; +$output .= "$session_id|"; +$output .= "$phone|"; +$output .= "$parked_by|"; +$output .= "$dispo|"; +$output .= "$dialed_number|"; +$output .= "$dialed_label|"; +$output .= "$source_id|"; +$output .= "$rank|"; +$output .= "$owner|"; +$output .= "$camp_script|"; +$output .= "$in_script|"; +$output .= "$script_width|"; +$output .= "$script_height|"; +$output .= "$fullname|"; +$output .= "$recording_filename|"; +$output .= "$recording_id|"; +$output .= "$user_custom_one|"; +$output .= "$user_custom_two|"; +$output .= "$user_custom_three|"; +$output .= "$user_custom_four|"; +$output .= "$user_custom_five|"; +$output .= "$talk_time|"; +$output .= "$talk_time_min|"; +$output .= "$agent_log_id|"; + +echo "$output\n$query_string\n"; + +$fp = fopen ("./call_url_log.txt", "a"); +fwrite ($fp, "$output|$query_string\n"); +fclose($fp); + +exit; + +?> diff --git a/www/agc/vdc_db_query.php b/www/agc/vdc_db_query.php index 259200e3..004a72ec 100644 --- a/www/agc/vdc_db_query.php +++ b/www/agc/vdc_db_query.php @@ -1,10 +1,9 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # -# This script is designed purely to send whether the meetme conference has live channels connected and which they are -# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table +# This script is designed to exchange information between vicidial.php and the database server for various actions # # required variables: # - $server_ip @@ -225,10 +224,11 @@ # 91204-1937 - Added logging of agent grab calls # 91213-0946 - Added queue_position to queue_log COMPLETE... records # 91228-1340 - Added API fields update functions +# 100103-1254 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs # -$version = '2.2.0-134'; -$build = '91228-1340'; +$version = '2.2.0-135'; +$build = '100103-1254'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=276; $one_mysql_log=0; @@ -1928,6 +1928,50 @@ if ($ACTION == 'manDiaLnextCaLL') } } + ### Check for List ID override settings + $VDCL_xferconf_a_number=''; + $VDCL_xferconf_b_number=''; + $VDCL_xferconf_c_number=''; + $VDCL_xferconf_d_number=''; + $VDCL_xferconf_e_number=''; + $stmt = "select xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$campaign';"; + 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);} + $VC_preset_ct = mysql_num_rows($rslt); + if ($VC_preset_ct > 0) + { + $row=mysql_fetch_row($rslt); + $VDCL_xferconf_a_number = $row[0]; + $VDCL_xferconf_b_number = $row[1]; + $VDCL_xferconf_c_number = $row[2]; + $VDCL_xferconf_d_number = $row[3]; + $VDCL_xferconf_e_number = $row[4]; + } + + if (strlen($list_id)>0) + { + $stmt = "select xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_lists where list_id='$list_id';"; + 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);} + $VDIG_preset_ct = mysql_num_rows($rslt); + if ($VDIG_preset_ct > 0) + { + $row=mysql_fetch_row($rslt); + if (strlen($row[0]) > 0) + {$VDCL_xferconf_a_number = $row[0];} + if (strlen($row[1]) > 0) + {$VDCL_xferconf_b_number = $row[1];} + if (strlen($row[2]) > 0) + {$VDCL_xferconf_c_number = $row[2];} + if (strlen($row[3]) > 0) + {$VDCL_xferconf_d_number = $row[3];} + if (strlen($row[4]) > 0) + {$VDCL_xferconf_e_number = $row[4];} + } + } + $comments = eregi_replace("\r",'',$comments); $comments = eregi_replace("\n",'!N',$comments); @@ -1971,6 +2015,11 @@ if ($ACTION == 'manDiaLnextCaLL') $LeaD_InfO .= $owner . "\n"; $LeaD_InfO .= "\n"; $LeaD_InfO .= $script_recording_delay . "\n"; + $LeaD_InfO .= $VDCL_xferconf_a_number . "\n"; + $LeaD_InfO .= $VDCL_xferconf_b_number . "\n"; + $LeaD_InfO .= $VDCL_xferconf_c_number . "\n"; + $LeaD_InfO .= $VDCL_xferconf_d_number . "\n"; + $LeaD_InfO .= $VDCL_xferconf_e_number . "\n"; echo $LeaD_InfO; } @@ -3733,7 +3782,7 @@ if ($ACTION == 'VDADcheckINCOMING') $script_recording_delay = $row[0]; } - $stmt = "SELECT campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group from vicidial_campaigns where campaign_id='$campaign';"; + $stmt = "SELECT campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$campaign';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00114',$user,$server_ip,$session_name,$one_mysql_log);} @@ -3741,16 +3790,46 @@ if ($ACTION == 'VDADcheckINCOMING') if ($VDIG_cid_ct > 0) { $row=mysql_fetch_row($rslt); - $VDCL_campaign_script = $row[0]; - $VDCL_get_call_launch = $row[1]; - $VDCL_xferconf_a_dtmf = $row[2]; - $VDCL_xferconf_a_number = $row[3]; - $VDCL_xferconf_b_dtmf = $row[4]; - $VDCL_xferconf_b_number = $row[5]; + $VDCL_campaign_script = $row[0]; + $VDCL_get_call_launch = $row[1]; + $VDCL_xferconf_a_dtmf = $row[2]; + $VDCL_xferconf_a_number = $row[3]; + $VDCL_xferconf_b_dtmf = $row[4]; + $VDCL_xferconf_b_number = $row[5]; $VDCL_default_xfer_group = $row[6]; if (strlen($VDCL_default_xfer_group)<2) {$VDCL_default_xfer_group='X';} + $VDCL_start_call_url = $row[7]; + $VDCL_dispo_call_url = $row[8]; + $VDCL_xferconf_c_number = $row[9]; + $VDCL_xferconf_d_number = $row[10]; + $VDCL_xferconf_e_number = $row[11]; } - echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|X|X||||\n|\n"; + + ### Check for List ID override settings + if (strlen($list_id)>0) + { + $stmt = "select xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_lists where list_id='$list_id';"; + 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);} + $VDIG_xferOR_ct = mysql_num_rows($rslt); + if ($VDIG_xferOR_ct > 0) + { + $row=mysql_fetch_row($rslt); + if (strlen($row[0]) > 0) + {$VDCL_xferconf_a_number = $row[0];} + if (strlen($row[1]) > 0) + {$VDCL_xferconf_b_number = $row[1];} + if (strlen($row[2]) > 0) + {$VDCL_xferconf_c_number = $row[2];} + if (strlen($row[3]) > 0) + {$VDCL_xferconf_d_number = $row[3];} + if (strlen($row[4]) > 0) + {$VDCL_xferconf_e_number = $row[4];} + } + } + + echo "|||||$VDCL_campaign_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|X|X|||||$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number\n|\n"; if (ereg('X',$dialed_label)) { @@ -3811,7 +3890,7 @@ if ($ACTION == 'VDADcheckINCOMING') $script_recording_delay = $row[0]; } - $stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds from vicidial_inbound_groups where group_id='$VDADchannel_group';"; + $stmt = "select group_name,group_color,web_form_address,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_xfer_group,ingroup_recording_override,ingroup_rec_filename,default_group_alias,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_inbound_groups where group_id='$VDADchannel_group';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00119',$user,$server_ip,$session_name,$one_mysql_log);} @@ -3837,8 +3916,13 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_timer_action = $row[15]; $VDCL_timer_action_message = $row[16]; $VDCL_timer_action_seconds = $row[17]; + $VDCL_start_call_url = $row[18]; + $VDCL_dispo_call_url = $row[19]; + $VDCL_xferconf_c_number = $row[20]; + $VDCL_xferconf_d_number = $row[21]; + $VDCL_xferconf_e_number = $row[22]; - $stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$campaign';"; + $stmt = "select campaign_script,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$campaign';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00181',$user,$server_ip,$session_name,$one_mysql_log);} @@ -3862,6 +3946,17 @@ if ($ACTION == 'VDADcheckINCOMING') {$VDCL_timer_action_message = $row[7];} if (strlen($VDCL_timer_action_seconds) < 1) {$VDCL_timer_action_seconds = $row[8];} + if (strlen($VDCL_start_call_url) < 1) + {$VDCL_start_call_url = $row[9];} + if (strlen($VDCL_dispo_call_url) < 1) + {$VDCL_dispo_call_url = $row[10];} + if (strlen($VDCL_xferconf_c_number) < 1) + {$VDCL_xferconf_c_number = $row[11];} + if (strlen($VDCL_xferconf_d_number) < 1) + {$VDCL_xferconf_d_number = $row[12];} + if (strlen($VDCL_xferconf_e_number) < 1) + {$VDCL_xferconf_e_number = $row[13];} + if ( ( (ereg('NONE',$VDCL_ingroup_script)) and (strlen($VDCL_ingroup_script) < 5) ) or (strlen($VDCL_ingroup_script) < 1) ) { $VDCL_ingroup_script = $row[0]; @@ -3915,7 +4010,7 @@ if ($ACTION == 'VDADcheckINCOMING') } else { - $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds from vicidial_campaigns where campaign_id='$VDADchannel_group';"; + $stmt = "select campaign_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,default_group_alias,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_campaigns where campaign_id='$VDADchannel_group';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00121',$user,$server_ip,$session_name,$one_mysql_log);} @@ -3933,6 +4028,11 @@ if ($ACTION == 'VDADcheckINCOMING') $VDCL_timer_action = $row[7]; $VDCL_timer_action_message = $row[8]; $VDCL_timer_action_seconds = $row[9]; + $VDCL_start_call_url = $row[10]; + $VDCL_dispo_call_url = $row[11]; + $VDCL_xferconf_c_number = $row[12]; + $VDCL_xferconf_d_number = $row[13]; + $VDCL_xferconf_e_number = $row[14]; } $script_recording_delay=0; @@ -3975,9 +4075,33 @@ if ($ACTION == 'VDADcheckINCOMING') } } + ### Check for List ID override settings + if (strlen($list_id)>0) + { + $stmt = "select xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_lists where list_id='$list_id';"; + 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);} + $VDIG_cidOR_ct = mysql_num_rows($rslt); + if ($VDIG_cidOR_ct > 0) + { + $row=mysql_fetch_row($rslt); + if (strlen($row[0]) > 0) + {$VDCL_xferconf_a_number = $row[0];} + if (strlen($row[1]) > 0) + {$VDCL_xferconf_b_number = $row[1];} + if (strlen($row[2]) > 0) + {$VDCL_xferconf_c_number = $row[2];} + if (strlen($row[3]) > 0) + {$VDCL_xferconf_d_number = $row[3];} + if (strlen($row[4]) > 0) + {$VDCL_xferconf_e_number = $row[4];} + } + } + ### if web form is set then send on to vicidial.php for override of WEB_FORM address - if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|\n";} - else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|\n";} + if ( (strlen($VDCL_group_web)>5) or (strlen($VDCL_group_name)>0) ) {echo "$VDCL_group_web|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|\n";} + else {echo "X|$VDCL_group_name|$VDCL_group_color|$VDCL_fronter_display|$VDADchannel_group|$VDCL_ingroup_script|$VDCL_get_call_launch|$VDCL_xferconf_a_dtmf|$VDCL_xferconf_a_number|$VDCL_xferconf_b_dtmf|$VDCL_xferconf_b_number|$VDCL_default_xfer_group|$VDCL_ingroup_recording_override|$VDCL_ingroup_rec_filename|$VDCL_default_group_alias|$VDCL_caller_id_number|$VDCL_group_web_vars|$VDCL_group_web_two|$VDCL_timer_action|$VDCL_timer_action_message|$VDCL_timer_action_seconds|$VDCL_xferconf_c_number|$VDCL_xferconf_d_number|$VDCL_xferconf_e_number|\n";} $stmt = "SELECT full_name from vicidial_users where user='$tsr';"; if ($DB) {echo "$stmt\n";} @@ -4117,6 +4241,92 @@ if ($ACTION == 'VDADcheckINCOMING') fclose($fp); } + ### Issue Start Call URL if defined + if (strlen($VDCL_start_call_url) > 7) + { + if (eregi('--A--user_custom_',$VDCL_start_call_url)) + { + $stmt = "select custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_users where user='$user';"; + 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);} + $VUC_ct = mysql_num_rows($rslt); + if ($VUC_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_custom_one = $row[0]; + $user_custom_two = $row[1]; + $user_custom_three = $row[2]; + $user_custom_four = $row[3]; + $user_custom_five = $row[4]; + } + } + $VDCL_start_call_url = preg_replace('/^VAR/','',$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--lead_id--B--',"$lead_id",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--vendor_id--B--',"$vendor_id",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--list_id--B--',"$list_id",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--phone_code--B--',"$phone_code",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--phone_number--B--',"$phone_number",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--title--B--',"$title",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--first_name--B--',"$first_name",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--middle_initial--B--',"$middle_initial",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--last_name--B--',"$last_name",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--address1--B--',"$address1",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--address2--B--',"$address2",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--address3--B--',"$address3",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--city--B--',"$city",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--state--B--',"$state",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--province--B--',"$province",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--postal_code--B--',"$postal_code",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--country_code--B--',"$country_code",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--gender--B--',"$gender",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--alt_phone--B--',"$alt_phone",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--email--B--',"$email",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--security_phrase--B--',"$security_phrase",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--comments--B--',"$comments",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--user--B--',"$user",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--pass--B--',"$pass",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--campaign--B--',"$campaign",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--phone_login--B--',"$phone_login",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--original_phone_login--B--',"$original_phone_login",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--phone_pass--B--',"$phone_pass",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--fronter--B--',"$fronter",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--closer--B--',"$closer",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--group--B--',"$group",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--channel_group--B--',"$channel_group",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--SQLdate--B--',"$SQLdate",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--epoch--B--',"$epoch",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--uniqueid--B--',"$uniqueid",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--customer_zap_channel--B--',"$customer_zap_channel",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--customer_server_ip--B--',"$customer_server_ip",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--server_ip--B--',"$server_ip",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--SIPexten--B--',"$SIPexten",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--session_id--B--',"$session_id",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--phone--B--',"$phone",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--parked_by--B--',"$parked_by",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--dispo--B--',"$dispo",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--dialed_number--B--',"$dialed_number",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--dialed_label--B--',"$dialed_label",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--source_id--B--',"$source_id",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--rank--B--',"$rank",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--owner--B--',"$owner",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--camp_script--B--',"$camp_script",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--in_script--B--',"$in_script",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--fullname--B--',"$fullname",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$VDCL_start_call_url); + $VDCL_start_call_url = eregi_replace('--A--user_custom_five--B--',"$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); + if ($DB > 0) {echo "$VDCL_start_call_url
\n";} + $SCUfile = file("$VDCL_start_call_url"); + if ($DB > 0) {echo "$SCUfile[0]
\n";} + } } else { @@ -4172,29 +4382,6 @@ if ($ACTION == 'userLOGout') $vc_remove = mysql_affected_rows($link); } - ##### Delete the vicidial_live_agents record for this session - $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00130',$user,$server_ip,$session_name,$one_mysql_log);} - $retry_count=0; - while ( ($errno > 0) and ($retry_count < 9) ) - { - $rslt=mysql_query($stmt, $link); - $one_mysql_log=1; - $errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,"9130$retry_count",$user,$server_ip,$session_name,$one_mysql_log); - $one_mysql_log=0; - $retry_count++; - } - $vla_delete = mysql_affected_rows($link); - - ##### Delete the vicidial_live_inbound_agents records for this session - $stmt="DELETE from vicidial_live_inbound_agents where user ='$user';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00131',$user,$server_ip,$session_name,$one_mysql_log);} - $vlia_delete = mysql_affected_rows($link); - ##### Delete the web_client_sessions $stmt="DELETE from web_client_sessions where server_ip='$server_ip' and session_name ='$session_name';"; if ($DB) {echo "$stmt\n";} @@ -4231,14 +4418,40 @@ if ($ACTION == 'userLOGout') if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00135',$user,$server_ip,$session_name,$one_mysql_log);} } + sleep(1); + + ##### Delete the vicidial_live_agents record for this session + $stmt="DELETE from vicidial_live_agents where server_ip='$server_ip' and user ='$user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00130',$user,$server_ip,$session_name,$one_mysql_log);} + $retry_count=0; + while ( ($errno > 0) and ($retry_count < 9) ) + { + $rslt=mysql_query($stmt, $link); + $one_mysql_log=1; + $errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,"9130$retry_count",$user,$server_ip,$session_name,$one_mysql_log); + $one_mysql_log=0; + $retry_count++; + } + $vla_delete = mysql_affected_rows($link); + + ##### Delete the vicidial_live_inbound_agents records for this session + $stmt="DELETE from vicidial_live_inbound_agents where user ='$user';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00131',$user,$server_ip,$session_name,$one_mysql_log);} + $vlia_delete = mysql_affected_rows($link); + $pause_sec=0; - $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch from vicidial_agent_log where agent_log_id='$agent_log_id';"; + $stmt = "select pause_epoch,pause_sec,wait_epoch,talk_epoch,dispo_epoch,agent_log_id from vicidial_agent_log where agent_log_id >= '$agent_log_id' and user='$user' order by agent_log_id desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00136',$user,$server_ip,$session_name,$one_mysql_log);} $VDpr_ct = mysql_num_rows($rslt); if ( ($VDpr_ct > 0) and (strlen($row[3]<5)) and (strlen($row[4]<5)) ) { + $agent_log_id = $row[5]; $row=mysql_fetch_row($rslt); $pause_sec = (($StarTtime - $row[0]) + $row[1]); @@ -4337,6 +4550,17 @@ if ($ACTION == 'updateDISPO') } else { + $stmt = "SELECT dispo_call_url from vicidial_campaigns where campaign_id='$campaign';"; + 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);} + $VC_dcu_ct = mysql_num_rows($rslt); + if ($VC_dcu_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dispo_call_url =$row[0]; + } + ### reset the API fields in vicidial_live_agents record $stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='',external_update_fields='0',external_update_fields_data='',external_timer_action_seconds='-1',last_state_change='$NOW_TIME' where user='$user' and server_ip='$server_ip';"; if ($DB) {echo "$stmt\n";} @@ -4376,6 +4600,13 @@ if ($ACTION == 'updateDISPO') if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00144',$user,$server_ip,$session_name,$one_mysql_log);} + + $stmt = "SELECT dispo_call_url from vicidial_inbound_groups where group_id='$stage';"; + if ($format=='debug') {echo "\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);} + $row=mysql_fetch_row($rslt); + $dispo_call_url = $row[0]; } else { @@ -4569,7 +4800,7 @@ if ($ACTION == 'updateDISPO') $dispo_epochSQL=''; $lead_id_commentsSQL=''; $StarTtime = date("U"); - $stmt = "select dispo_epoch,dispo_sec,talk_epoch,wait_epoch,lead_id,comments from vicidial_agent_log where agent_log_id='$agent_log_id';"; + $stmt = "select dispo_epoch,dispo_sec,talk_epoch,wait_epoch,lead_id,comments,agent_log_id from vicidial_agent_log where agent_log_id <='$agent_log_id' and lead_id='$lead_id' order by agent_log_id desc limit 1;"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00150',$user,$server_ip,$session_name,$one_mysql_log);} @@ -4577,6 +4808,7 @@ if ($ACTION == 'updateDISPO') if ($VDpr_ct > 0) { $row=mysql_fetch_row($rslt); + $agent_log_id = $row[6]; if ( (eregi("NULL",$row[2])) or ($row[2] < 1000) ) { $row[2]=$StarTtime; @@ -4611,17 +4843,18 @@ if ($ACTION == 'updateDISPO') $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00272',$user,$server_ip,$session_name,$one_mysql_log);} - $user_group=''; - $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; - $rslt=mysql_query($stmt, $link); - if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00152',$user,$server_ip,$session_name,$one_mysql_log);} - if ($DB) {echo "$stmt\n";} - $ug_record_ct = mysql_num_rows($rslt); - if ($ug_record_ct > 0) - { - $row=mysql_fetch_row($rslt); - $user_group = trim("$row[0]"); - } + $user_group=''; + $stmt="SELECT user_group FROM vicidial_users where user='$user' LIMIT 1;"; + $rslt=mysql_query($stmt, $link); + if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00152',$user,$server_ip,$session_name,$one_mysql_log);} + if ($DB) {echo "$stmt\n";} + $ug_record_ct = mysql_num_rows($rslt); + if ($ug_record_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_group = trim("$row[0]"); + } + $CALL_agent_log_id = $agent_log_id; if ($auto_dial_level < 1) { @@ -5180,6 +5413,160 @@ if ($ACTION == 'updateDISPO') mysql_close($linkB); } + + ### Issue Dispo Call URL if defined + if (strlen($dispo_call_url) > 7) + { + $talk_time=0; + $talk_time_min=0; + if (eregi('--A--user_custom_',$dispo_call_url)) + { + $stmt = "select custom_one,custom_two,custom_three,custom_four,custom_five from vicidial_users where user='$user';"; + 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);} + $VUC_ct = mysql_num_rows($rslt); + if ($VUC_ct > 0) + { + $row=mysql_fetch_row($rslt); + $user_custom_one = $row[0]; + $user_custom_two = $row[1]; + $user_custom_three = $row[2]; + $user_custom_four = $row[3]; + $user_custom_five = $row[4]; + } + } + + if (eregi('--A--talk_time',$dispo_call_url)) + { + $stmt = "select talk_sec,dead_sec from vicidial_agent_log where lead_id='$lead_id' and agent_log_id='$CALL_agent_log_id';"; + 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);} + $VAL_talk_ct = mysql_num_rows($rslt); + if ($VAL_talk_ct > 0) + { + $row=mysql_fetch_row($rslt); + $talk_sec = $row[0]; + $dead_sec = $row[1]; + $talk_time = ($talk_sec - $dead_sec); + if ($talk_time < 1) + {$talk_time = 0;} + else + { + $talk_time_min = ceil($talk_time / 60); + } + } + } + + ##### 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 FROM vicidial_list where lead_id='$lead_id' LIMIT 1;"; + $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);} + if ($DB) {echo "$stmt\n";} + $list_lead_ct = mysql_num_rows($rslt); + if ($list_lead_ct > 0) + { + $row=mysql_fetch_row($rslt); + $dispo = trim("$row[3]"); + $tsr = trim("$row[4]"); + $vendor_id = trim("$row[5]"); + $vendor_lead_code = trim("$row[5]"); + $source_id = trim("$row[6]"); + $list_id = trim("$row[7]"); + $gmt_offset_now = trim("$row[8]"); + $phone_code = trim("$row[10]"); + $phone_number = trim("$row[11]"); + $title = trim("$row[12]"); + $first_name = trim("$row[13]"); + $middle_initial = trim("$row[14]"); + $last_name = trim("$row[15]"); + $address1 = trim("$row[16]"); + $address2 = trim("$row[17]"); + $address3 = trim("$row[18]"); + $city = trim("$row[19]"); + $state = trim("$row[20]"); + $province = trim("$row[21]"); + $postal_code = trim("$row[22]"); + $country_code = trim("$row[23]"); + $gender = trim("$row[24]"); + $date_of_birth = trim("$row[25]"); + $alt_phone = trim("$row[26]"); + $email = trim("$row[27]"); + $security = trim("$row[28]"); + $comments = stripslashes(trim("$row[29]")); + $called_count = trim("$row[30]"); + $rank = trim("$row[32]"); + $owner = trim("$row[33]"); + } + + $dispo_call_url = preg_replace('/^VAR/','',$dispo_call_url); + $dispo_call_url = eregi_replace('--A--lead_id--B--',"$lead_id",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--vendor_id--B--',"$vendor_id",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--list_id--B--',"$list_id",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--gmt_offset_now--B--',"$gmt_offset_now",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--phone_code--B--',"$phone_code",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--phone_number--B--',"$phone_number",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--title--B--',"$title",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--first_name--B--',"$first_name",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--middle_initial--B--',"$middle_initial",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--last_name--B--',"$last_name",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--address1--B--',"$address1",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--address2--B--',"$address2",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--address3--B--',"$address3",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--city--B--',"$city",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--state--B--',"$state",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--province--B--',"$province",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--postal_code--B--',"$postal_code",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--country_code--B--',"$country_code",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--gender--B--',"$gender",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--date_of_birth--B--',"$date_of_birth",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--alt_phone--B--',"$alt_phone",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--email--B--',"$email",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--security_phrase--B--',"$security_phrase",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--comments--B--',"$comments",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--user--B--',"$user",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--pass--B--',"$pass",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--campaign--B--',"$campaign",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--phone_login--B--',"$phone_login",$dispo_call_url); + $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--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); + $dispo_call_url = eregi_replace('--A--customer_zap_channel--B--',"$customer_zap_channel",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--customer_server_ip--B--',"$customer_server_ip",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--server_ip--B--',"$server_ip",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--SIPexten--B--',"$SIPexten",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--session_id--B--',"$session_id",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--phone--B--',"$phone",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--parked_by--B--',"$parked_by",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--dispo--B--',"$dispo",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--dialed_number--B--',"$dialed_number",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--dialed_label--B--',"$dialed_label",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--source_id--B--',"$source_id",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--rank--B--',"$rank",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--owner--B--',"$owner",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--camp_script--B--',"$camp_script",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--in_script--B--',"$in_script",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--fullname--B--',"$fullname",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--user_custom_one--B--',"$user_custom_one",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--user_custom_two--B--',"$user_custom_two",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--user_custom_three--B--',"$user_custom_three",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--user_custom_four--B--',"$user_custom_four",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--user_custom_five--B--',"$user_custom_five",$dispo_call_url); + $dispo_call_url = eregi_replace('--A--talk_time--B--',"$talk_time",$dispo_call_url); + $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); + if ($DB > 0) {echo "$dispo_call_url
\n";} + $SCUfile = file("$dispo_call_url"); + if ($DB > 0) {echo "$SCUfile[0]
\n";} + } echo 'Lead ' . $lead_id . ' has been changed to ' . $dispo_choice . " Status\nNext agent_log_id:\n" . $agent_log_id . "\n"; } diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 7d0906fd..249e5c44 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -1,7 +1,7 @@ LICENSE: AGPLv2 +# Copyright (C) 2010 Matt Florell LICENSE: AGPLv2 # # Other scripts that this application depends on: # - vdc_db_query.php: Updates information in the database @@ -267,10 +267,11 @@ # 91211-1412 - Added User custom variables and CRM login popup # 91219-0657 - Set pause code automatically on ReQueue and INBOUND_MAN Dial-Next-Number # 91228-1339 - Added API "fields update" functions and "timer action" functions +# 100103-1250 - Added 3 more conf-presets, list ID override presets and call start/dispo URLs # -$version = '2.2.0-245'; -$build = '91228-1339'; +$version = '2.2.0-246'; +$build = '100103-1250'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=64; $one_mysql_log=0; @@ -1099,7 +1100,7 @@ $VDloginDISPLAY=0; $HKstatusnames = substr("$HKstatusnames", 0, -1); ##### grab the campaign settings - $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,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,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,agent_select_territories,crm_popup_login,crm_login_address,timer_action,timer_action_message,timer_action_seconds FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; + $stmt="SELECT park_ext,park_file_name,web_form_address,allow_closers,auto_dial_level,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,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,alt_number_dialing,scheduled_callbacks,wrapup_seconds,wrapup_message,closer_campaigns,use_internal_dnc,allcalls_delay,omit_phone_code,agent_pause_codes_active,no_hopper_leads_logins,campaign_allow_inbound,manual_dial_list_id,default_xfer_group,xfer_groups,disable_alter_custphone,display_queue_count,manual_dial_filter,agent_clipboard_copy,use_campaign_dnc,three_way_call_cid,dial_method,three_way_dial_prefix,web_form_target,vtiger_screen_login,agent_allow_group_alias,default_group_alias,quick_transfer_button,prepopulate_transfer_preset,view_calls_in_queue,view_calls_in_queue_launch,call_requeue_button,pause_after_each_call,no_hopper_dialing,agent_dial_owner_only,agent_display_dialable_leads,web_form_address_two,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 FROM vicidial_campaigns where campaign_id = '$VD_campaign';"; $rslt=mysql_query($stmt, $link); if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01013',$VD_login,$server_ip,$session_name,$one_mysql_log);} if ($DB) {echo "$stmt\n";} @@ -1165,6 +1166,11 @@ $VDloginDISPLAY=0; $timer_action = $row[58]; $timer_action_message = $row[59]; $timer_action_seconds = $row[60]; + $start_call_url = $row[61]; + $dispo_call_url = $row[62]; + $xferconf_c_number = $row[63]; + $xferconf_d_number = $row[64]; + $xferconf_e_number = $row[65]; if ($user_territories_active < 1) {$agent_select_territories = 0;} @@ -1202,18 +1208,24 @@ $VDloginDISPLAY=0; {$dispo_check_all_pause=1;} $quick_transfer_button_enabled=0; - if (preg_match("/IN_GROUP|PRESET_1|PRESET_2/",$quick_transfer_button)) + if (preg_match("/IN_GROUP|PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$quick_transfer_button)) {$quick_transfer_button_enabled=1;} $preset_populate=''; $prepopulate_transfer_preset_enabled=0; - if (preg_match("/PRESET_1|PRESET_2/",$prepopulate_transfer_preset)) + if (preg_match("/PRESET_1|PRESET_2|PRESET_3|PRESET_4|PRESET_5/",$prepopulate_transfer_preset)) { $prepopulate_transfer_preset_enabled=1; if (preg_match("/PRESET_1/",$prepopulate_transfer_preset)) {$preset_populate = $xferconf_a_number;} if (preg_match("/PRESET_2/",$prepopulate_transfer_preset)) {$preset_populate = $xferconf_b_number;} + if (preg_match("/PRESET_3/",$prepopulate_transfer_preset)) + {$preset_populate = $xferconf_c_number;} + if (preg_match("/PRESET_4/",$prepopulate_transfer_preset)) + {$preset_populate = $xferconf_d_number;} + if (preg_match("/PRESET_5/",$prepopulate_transfer_preset)) + {$preset_populate = $xferconf_e_number;} } $default_group_alias_cid=''; @@ -2293,6 +2305,9 @@ $CCAL_OUT .= ""; var CalL_XC_a_NuMber = ''; var CalL_XC_b_Dtmf = ''; var CalL_XC_b_NuMber = ''; + var CalL_XC_c_NuMber = ''; + var CalL_XC_d_NuMber = ''; + var CalL_XC_e_NuMber = ''; var VU_hotkeys_active = ''; var VU_agent_choose_ingroups = ''; var VU_agent_choose_ingroups_DV = ''; @@ -4562,7 +4577,20 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("QuickXfer").innerHTML = "\"QUICK"; } - if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') ) + if (prepopulate_transfer_preset_enabled > 0) + { + if (prepopulate_transfer_preset == 'PRESET_1') + {document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;} + if (prepopulate_transfer_preset == 'PRESET_2') + {document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;} + if (prepopulate_transfer_preset == 'PRESET_3') + {document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;} + if (prepopulate_transfer_preset == 'PRESET_4') + {document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;} + if (prepopulate_transfer_preset == 'PRESET_5') + {document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;} + } + if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') ) { document.getElementById("QuickXfer").innerHTML = "\"QUICK"; @@ -4570,6 +4598,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;} if (quick_transfer_button == 'PRESET_2') {document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;} + if (quick_transfer_button == 'PRESET_3') + {document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;} + if (quick_transfer_button == 'PRESET_4') + {document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;} + if (quick_transfer_button == 'PRESET_5') + {document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;} } if (call_requeue_button > 0) @@ -5135,6 +5169,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.owner.value = MDnextResponse_array[36]; // CalL_ScripT_id = MDnextResponse_array[37]; script_recording_delay = MDnextResponse_array[38]; + CalL_XC_a_NuMber = MDnextResponse_array[39]; + CalL_XC_b_NuMber = MDnextResponse_array[40]; + CalL_XC_c_NuMber = MDnextResponse_array[41]; + CalL_XC_d_NuMber = MDnextResponse_array[42]; + CalL_XC_e_NuMber = MDnextResponse_array[43]; timer_action = campaign_timer_action; timer_action_message = campaign_timer_action_message; @@ -6205,6 +6244,27 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (VDIC_data_VDIG[17].length > 5) {VDIC_web_form_address_two = VDIC_data_VDIG[17];} + var call_timer_action = VDIC_data_VDIG[18]; + + if ( (call_timer_action == 'NONE') || (call_timer_action.length < 2) ) + { + timer_action = campaign_timer_action; + timer_action_message = campaign_timer_action_message; + timer_action_seconds = campaign_timer_action_seconds; + } + else + { + var call_timer_action_message = VDIC_data_VDIG[19]; + var call_timer_action_seconds = VDIC_data_VDIG[20]; + timer_action = call_timer_action; + timer_action_message = call_timer_action_message; + timer_action_seconds = call_timer_action_seconds; + } + + CalL_XC_c_NuMber = VDIC_data_VDIG[21]; + CalL_XC_d_NuMber = VDIC_data_VDIG[22]; + CalL_XC_e_NuMber = VDIC_data_VDIG[23]; + var VDIC_data_VDFR=check_VDIC_array[3].split("|"); if ( (VDIC_data_VDFR[1].length > 1) && (VDCL_fronter_display == 'Y') ) {VDIC_fronter = " Fronter: " + VDIC_data_VDFR[0] + " - " + VDIC_data_VDFR[1];} @@ -6281,22 +6341,6 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.rank.value = check_VDIC_array[44]; document.vicidial_form.owner.value = check_VDIC_array[45]; script_recording_delay = check_VDIC_array[46]; - var call_timer_action = check_VDIC_array[47]; - - if ( (call_timer_action == 'NONE') || (call_timer_action.length < 2) ) - { - timer_action = campaign_timer_action; - timer_action_message = campaign_timer_action_message; - timer_action_seconds = campaign_timer_action_seconds; - } - else - { - var call_timer_action_message = check_VDIC_array[48]; - var call_timer_action_seconds = check_VDIC_array[49]; - timer_action = call_timer_action; - timer_action_message = call_timer_action_message; - timer_action_seconds = call_timer_action_seconds; - } var gIndex = 0; if (document.vicidial_form.gender.value == 'M') {var gIndex = 1;} @@ -6374,7 +6418,20 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { document.getElementById("QuickXfer").innerHTML = "\"QUICK"; } - if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') ) + if (prepopulate_transfer_preset_enabled > 0) + { + if (prepopulate_transfer_preset == 'PRESET_1') + {document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;} + if (prepopulate_transfer_preset == 'PRESET_2') + {document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;} + if (prepopulate_transfer_preset == 'PRESET_3') + {document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;} + if (prepopulate_transfer_preset == 'PRESET_4') + {document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;} + if (prepopulate_transfer_preset == 'PRESET_5') + {document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;} + } + if ( (quick_transfer_button == 'PRESET_1') || (quick_transfer_button == 'PRESET_2') || (quick_transfer_button == 'PRESET_3') || (quick_transfer_button == 'PRESET_4') || (quick_transfer_button == 'PRESET_5') ) { document.getElementById("QuickXfer").innerHTML = "\"QUICK"; @@ -6382,6 +6439,12 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} {document.vicidial_form.xfernumber.value = CalL_XC_a_NuMber;} if (quick_transfer_button == 'PRESET_2') {document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber;} + if (quick_transfer_button == 'PRESET_3') + {document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber;} + if (quick_transfer_button == 'PRESET_4') + {document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber;} + if (quick_transfer_button == 'PRESET_5') + {document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber;} } if (call_requeue_button > 0) @@ -7910,6 +7973,18 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.conf_dtmf.value = CalL_XC_b_Dtmf; document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber; } + function DtMf_PreSet_c() + { + document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber; + } + function DtMf_PreSet_d() + { + document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber; + } + function DtMf_PreSet_e() + { + document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber; + } function DtMf_PreSet_a_DiaL() { @@ -7923,6 +7998,21 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.vicidial_form.xfernumber.value = CalL_XC_b_NuMber; basic_originate_call(CalL_XC_b_NuMber,'NO','YES',session_id,'YES','','1','0'); } + function DtMf_PreSet_c_DiaL() + { + document.vicidial_form.xfernumber.value = CalL_XC_c_NuMber; + basic_originate_call(CalL_XC_c_NuMber,'NO','YES',session_id,'YES','','1','0'); + } + function DtMf_PreSet_d_DiaL() + { + document.vicidial_form.xfernumber.value = CalL_XC_d_NuMber; + basic_originate_call(CalL_XC_d_NuMber,'NO','YES',session_id,'YES','','1','0'); + } + function DtMf_PreSet_e_DiaL() + { + document.vicidial_form.xfernumber.value = CalL_XC_e_NuMber; + basic_originate_call(CalL_XC_e_NuMber,'NO','YES',session_id,'YES','','1','0'); + } // ################################################################################ // Show message that customer has hungup the call before agent has @@ -9372,22 +9462,31 @@ else WebFormRefresH('NO','YES'); window.open(TEMP_VDIC_web_form_address, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450'); } - if (timer_action == 'WEBFORM2') { WebFormTwoRefresH('NO','YES'); window.open(TEMP_VDIC_web_form_address_two, web_form_target, 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=640,height=450'); } - if (timer_action == 'D1_DIAL') { DtMf_PreSet_a_DiaL(); } - if (timer_action == 'D2_DIAL') { DtMf_PreSet_b_DiaL(); } + if (timer_action == 'D3_DIAL') + { + DtMf_PreSet_c_DiaL(); + } + if (timer_action == 'D4_DIAL') + { + DtMf_PreSet_d_DiaL(); + } + if (timer_action == 'D5_DIAL') + { + DtMf_PreSet_e_DiaL(); + } timer_action = 'NONE'; } @@ -9650,7 +9749,7 @@ else { UpdateFieldsData(); } - if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) ) + if ( (timer_action != 'NONE') && (timer_action.length > 3) && (timer_action_seconds <= VD_live_call_secondS) && (timer_action_seconds >= 0) ) { TimerActionRun(); } @@ -10406,14 +10505,17 @@ Your Status:
Calls Dialing: " id="DialBlindTransfer">Dial Blind Transfer -   +   Dial With Customer -   +   Park Customer Dial   D1 D2 + D3 + D4 + D5   Blind Transfer VMail Message diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 5d627f2e..2b0a7dcd 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -1155,6 +1155,16 @@ if (isset($_GET["timer_action_message"])) {$timer_action_message=$_GET["timer_ elseif (isset($_POST["timer_action_message"])) {$timer_action_message=$_POST["timer_action_message"];} if (isset($_GET["timer_action_seconds"])) {$timer_action_seconds=$_GET["timer_action_seconds"];} elseif (isset($_POST["timer_action_seconds"])) {$timer_action_seconds=$_POST["timer_action_seconds"];} +if (isset($_GET["start_call_url"])) {$start_call_url=$_GET["start_call_url"];} + elseif (isset($_POST["start_call_url"])) {$start_call_url=$_POST["start_call_url"];} +if (isset($_GET["dispo_call_url"])) {$dispo_call_url=$_GET["dispo_call_url"];} + elseif (isset($_POST["dispo_call_url"])) {$dispo_call_url=$_POST["dispo_call_url"];} +if (isset($_GET["xferconf_c_number"])) {$xferconf_c_number=$_GET["xferconf_c_number"];} + elseif (isset($_POST["xferconf_c_number"])) {$xferconf_c_number=$_POST["xferconf_c_number"];} +if (isset($_GET["xferconf_d_number"])) {$xferconf_d_number=$_GET["xferconf_d_number"];} + elseif (isset($_POST["xferconf_d_number"])) {$xferconf_d_number=$_POST["xferconf_d_number"];} +if (isset($_GET["xferconf_e_number"])) {$xferconf_e_number=$_GET["xferconf_e_number"];} + elseif (isset($_POST["xferconf_e_number"])) {$xferconf_e_number=$_POST["xferconf_e_number"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} if (isset($lead_filter_id)) {$lead_filter_id = strtoupper($lead_filter_id);} @@ -1485,6 +1495,9 @@ if ($non_latin < 1) ### ALPHA-NUMERIC and spaces and hash and star and comma $xferconf_a_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_a_dtmf); $xferconf_b_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_b_dtmf); + $xferconf_c_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_c_dtmf); + $xferconf_d_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_d_dtmf); + $xferconf_e_dtmf = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$xferconf_e_dtmf); $survey_third_digit = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$survey_third_digit); $survey_fourth_digit = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$survey_fourth_digit); $survey_third_exten = ereg_replace("[^ \,\*\#0-9a-zA-Z]","",$survey_third_exten); @@ -1766,6 +1779,8 @@ if ($non_latin < 1) # $vtiger_url # $web_form_address_two # $crm_login_address + # $start_call_url + # $dispo_call_url ### VARIABLES not filtered at all ### # $script_text @@ -2026,11 +2041,12 @@ else # 91219-0719 - Changed some field backgrounds in the Campaign Modification screens # 91223-1031 - Added VIDPROMPT options for in-group routing in DIDs # 91228-1837 - Added timer action settings to in-groups and campaigns +# 100103-0727 - Added Start/Dispo call url, 3/4/5 conf number presets, Lists conf-number overrides # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.2.0-231'; -$build = '91228-1837'; +$admin_version = '2.2.0-232'; +$build = '100103-0727'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -3789,7 +3805,7 @@ if ($ADD==99999)

- Xfer-Conf DTMF - These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dial string will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field. + Xfer-Conf DTMF - These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. If you want to allow Consultative Transfers, a fronter to a closer, have the agent use the CONSULTATIVE checkbox, which does not work for third party non-ViciDial consultative calls. For those just have the agent click the Dial With Customer button. Then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER, for instance if you want to do a call to a special IVR you have set to extension 83900 you would put AXFER83900 in the number-to-dial field.
@@ -3973,6 +3989,16 @@ if ($ADD==99999)
CRM Popup Address - The web address of a CRM login page, it can have variables populated just like the web form address, with the VAR in the front and using --A--user_custom_one--B-- to define variables. +
+
+
+ Start Call URL - This web URL address is not seen by the agent, but it is called every time a call is sent to an agent if it is populated. Uses the same variables as the web form fields and scripts. This URL can NOT be a relative path. The Start URL does not work for Manual dial calls. Default is blank. + +
+
+
+ Dispo Call URL - This web URL address is not seen by the agent, but it is called every time a call is dispositioned by an agent if it is populated. Uses the same variables as the web form fields and scripts. dispo and talk_time are the variables you can use to retrieve the agent-defined disposition for the call and the actual talk time in seconds of the call. This URL can NOT be a relative path. Default is blank. +

@@ -4078,6 +4104,11 @@ if ($ADD==99999)
Drop Inbound Group Override - If this field is set, this in-group will be used for outbound calls within this list that drop from the outbound campaign instead of the drop in-group set in the campaign detail screen. Default is not set. +
+
+
+ Xfer-Conf Number Override - These five fields allow for you to override the Transfer Conference number presets when the lead is from this list. Default is blank. +
@@ -4150,7 +4181,7 @@ if ($ADD==99999)

- Xfer-Conf DTMF - These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. If you want to allow Consultative Transfers, a fronter to a closer, you can place CXFER as one of the number-to-dial presets and the proper dial string will be sent to do a Local Consultative Transfer, then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER or CXFER, for instance if you want to do Internal Consultative transfers instead of Local you would put CXFER90009 in the number-to-dial field. + Xfer-Conf DTMF - These four fields allow for you to have two sets of Transfer Conference and DTMF presets. When the call or campaign is loaded, the vicidial.php script will show two buttons on the transfer-conference frame and auto-populate the number-to-dial and the send-dtmf fields when pressed. If you want to allow Consultative Transfers, a fronter to a closer, have the agent use the CONSULTATIVE checkbox, which does not work for third party non-ViciDial consultative calls. For those just have the agent click the Dial With Customer button. Then the agent can just LEAVE-3WAY-CALL and move on to their next call. If you want to allow Blind transfers of customers to a VICIDIAL AGI script for logging or an IVR, then place AXFER in the number-to-dial field. You can also specify an custom extension after the AXFER, for instance if you want to do a call to a special IVR you have set to extension 83900 you would put AXFER83900 in the number-to-dial field.
@@ -4389,6 +4420,16 @@ if ($ADD==99999)
Stats Percent of Calls Answered Within X seconds - This field allows you to set the number of hold seconds that the realtime stats display will use to calculate the percentage of answered calls that were answered within X number of seconds on hold. +
+
+
+ Start Call URL - This web URL address is not seen by the agent, but it is called every time a call is sent to an agent if it is populated. Uses the same variables as the web form fields and scripts. Default is blank. + +
+
+
+ Dispo Call URL - This web URL address is not seen by the agent, but it is called every time a call is dispositioned by an agent if it is populated. Uses the same variables as the web form fields and scripts. dispo and talk_time are the variables you can use to retrieve the agent-defined disposition for the call and the actual talk time in seconds of the call. Default is blank. +

@@ -8518,7 +8559,7 @@ if ($ADD==21) { echo "
CAMPAIGN ADDED: $campaign_id\n"; - $stmt="INSERT INTO vicidial_campaigns (campaign_id,campaign_name,campaign_description,active,dial_status_a,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,campaign_script,get_call_launch,campaign_changedate,campaign_stats_refresh,list_order_mix) values('$campaign_id','$campaign_name','$campaign_description','$active','NEW','DOWN','$park_ext','$park_file_name','" . mysql_real_escape_string($web_form_address) . "','$allow_closers','$hopper_level','$auto_dial_level','$next_agent_call','$local_call_time','$voicemail_ext','$script_id','$get_call_launch','$SQLdate','Y','DISABLED');"; + $stmt="INSERT INTO vicidial_campaigns (campaign_id,campaign_name,campaign_description,active,dial_status_a,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,campaign_script,get_call_launch,campaign_changedate,campaign_stats_refresh,list_order_mix,web_form_address_two,start_call_url,dispo_call_url) values('$campaign_id','$campaign_name','$campaign_description','$active','NEW','DOWN','$park_ext','$park_file_name','" . mysql_real_escape_string($web_form_address) . "','$allow_closers','$hopper_level','$auto_dial_level','$next_agent_call','$local_call_time','$voicemail_ext','$script_id','$get_call_launch','$SQLdate','Y','DISABLED','','','');"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$campaign_id');"; @@ -8575,7 +8616,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) 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 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) 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 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');"; @@ -8976,7 +9017,7 @@ if ($ADD==2111) } else { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch) values('$group_id','$group_name','$group_color','$active','" . mysql_real_escape_string($web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','$get_call_launch');"; + $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,web_form_address_two,start_call_url,dispo_call_url) values('$group_id','$group_name','$group_color','$active','" . mysql_real_escape_string($web_form_address) . "','$voicemail_ext','$next_agent_call','$fronter_display','$script_id','$get_call_launch','','','');"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$group_id');"; @@ -9034,7 +9075,7 @@ if ($ADD==2011) } else { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds from vicidial_inbound_groups where group_id=\"$source_group_id\";"; + $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_inbound_groups where group_id=\"$source_group_id\";"; $rslt=mysql_query($stmt, $link); echo "
GROUP ADDED: $group_id\n"; @@ -11167,7 +11208,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' 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' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmtA, $link); if ($reset_hopper == 'Y') @@ -11921,7 +11962,7 @@ if ($ADD==411) echo "
LIST MODIFIED: $list_id\n"; - $stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active',list_description='$list_description',list_changedate='$SQLdate',reset_time='$reset_time',agent_script_override='$agent_script_override',campaign_cid_override='$campaign_cid_override',am_message_exten_override='$am_message_exten_override',drop_inbound_group_override='$drop_inbound_group_override' where list_id='$list_id';"; + $stmt="UPDATE vicidial_lists set list_name='$list_name',campaign_id='$campaign_id',active='$active',list_description='$list_description',list_changedate='$SQLdate',reset_time='$reset_time',agent_script_override='$agent_script_override',campaign_cid_override='$campaign_cid_override',am_message_exten_override='$am_message_exten_override',drop_inbound_group_override='$drop_inbound_group_override',xferconf_a_number='$xferconf_a_number',xferconf_b_number='$xferconf_b_number',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number' where list_id='$list_id';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -12031,7 +12072,7 @@ if ($ADD==4111) echo "
GROUP MODIFIED: $group_id\n"; - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds' where group_id='$group_id';"; + $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',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' where group_id='$group_id';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -15821,7 +15862,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 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 from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $campaign_name = $row[1]; @@ -15957,6 +15998,11 @@ if ($ADD==31) $timer_action = $row[134]; $timer_action_message = $row[135]; $timer_action_seconds = $row[136]; + $start_call_url = $row[137]; + $dispo_call_url = $row[138]; + $xferconf_c_number = $row[139]; + $xferconf_d_number = $row[140]; + $xferconf_e_number = $row[141]; if (ereg("DISABLED",$list_order_mix)) {$DEFlistDISABLE = ''; $DEFstatusDISABLED=0;} @@ -16602,11 +16648,17 @@ if ($ADD==31) echo "Transfer-Conf Number 2: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE\n"; - echo "Quick Transfer Button: $NWB#vicidial_campaigns-quick_transfer_button$NWE\n"; + echo "Transfer-Conf Number 3: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE\n"; - echo "PrePopulate Transfer Preset: $NWB#vicidial_campaigns-prepopulate_transfer_preset$NWE\n"; + echo "Transfer-Conf Number 4: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE\n"; - echo "Timer Action: $NWB#vicidial_campaigns-timer_action$NWE\n"; + echo "Transfer-Conf Number 5: $NWB#vicidial_campaigns-xferconf_a_dtmf$NWE\n"; + + echo "Quick Transfer Button: $NWB#vicidial_campaigns-quick_transfer_button$NWE\n"; + + echo "PrePopulate Transfer Preset: $NWB#vicidial_campaigns-prepopulate_transfer_preset$NWE\n"; + + echo "Timer Action: $NWB#vicidial_campaigns-timer_action$NWE\n"; echo "Timer Action Message: $NWB#vicidial_campaigns-timer_action_message$NWE\n"; @@ -16752,6 +16804,10 @@ if ($ADD==31) echo "CRM Popup Address: $NWB#vicidial_campaigns-crm_login_address$NWE\n"; + echo "Start Call URL: $NWB#vicidial_campaigns-start_call_url$NWE\n"; + + echo "Dispo Call URL: $NWB#vicidial_campaigns-dispo_call_url$NWE\n"; + if ($campaign_allow_inbound == 'Y') { echo "Allowed Inbound Groups:
"; @@ -18583,7 +18639,7 @@ if ($ADD==311) echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; - echo "\n"; + echo "\n"; - echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; echo "
\n"; echo ""; - $stmt="SELECT list_id,list_name,campaign_id,active,list_description,list_changedate,list_lastcalldate,reset_time,agent_script_override,campaign_cid_override,am_message_exten_override,drop_inbound_group_override from vicidial_lists where list_id='$list_id';"; + $stmt="SELECT list_id,list_name,campaign_id,active,list_description,list_changedate,list_lastcalldate,reset_time,agent_script_override,campaign_cid_override,am_message_exten_override,drop_inbound_group_override,xferconf_a_number,xferconf_b_number,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_lists where list_id='$list_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $list_name = $row[1]; @@ -18597,6 +18653,11 @@ if ($ADD==311) $campaign_cid_override = $row[9]; $am_message_exten_override = $row[10]; $drop_inbound_group_override = $row[11]; + $xferconf_a_number = $row[12]; + $xferconf_b_number = $row[13]; + $xferconf_c_number = $row[14]; + $xferconf_d_number = $row[15]; + $xferconf_e_number = $row[16]; # grab names of global statuses and statuses in the selected campaign $stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses order by status"; @@ -18693,19 +18754,30 @@ if ($ADD==311) echo "
List Change Date: $list_changedate   $NWB#vicidial_lists-list_changedate$NWE
List Last Call Date: $list_lastcalldate   $NWB#vicidial_lists-list_lastcalldate$NWE
Agent Script Override:
Agent Script Override: $NWB#vicidial_lists-agent_script_override$NWE
Campaign CID Override: $NWB#vicidial_lists-campaign_cid_override$NWE
Campaign CID Override: $NWB#vicidial_lists-campaign_cid_override$NWE
Answering Machine Message Override: audio chooser $NWB#vicidial_lists-am_message_exten_override$NWE
Answering Machine Message Override: audio chooser $NWB#vicidial_lists-am_message_exten_override$NWE
Drop Inbound Group Override:
Drop Inbound Group Override: $NWB#vicidial_lists-drop_inbound_group_override$NWE
Transfer-Conf Number 1 Override: $NWB#vicidial_lists-xferconf_a_dtmf$NWE
Transfer-Conf Number 2 Override: $NWB#vicidial_lists-xferconf_a_dtmf$NWE
Transfer-Conf Number 3 Override: $NWB#vicidial_lists-xferconf_a_dtmf$NWE
Transfer-Conf Number 4 Override: $NWB#vicidial_lists-xferconf_a_dtmf$NWE
Transfer-Conf Number 5 Override: $NWB#vicidial_lists-xferconf_a_dtmf$NWE
\n"; @@ -19134,7 +19206,7 @@ if ($ADD==3111) echo "\n"; - echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; echo "\n"; @@ -19515,6 +19598,11 @@ if ($ADD==3111) echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; if ($SSqc_features_active > 0) diff --git a/www/vicidial/vtiger_search.php b/www/vicidial/vtiger_search.php index 854875bc..6636a431 100644 --- a/www/vicidial/vtiger_search.php +++ b/www/vicidial/vtiger_search.php @@ -6,7 +6,7 @@ # This page does a search against a standard vtiger CRM system. If the record # is not present, it will create a new one and send the agent's screen to that new page. # -# This code is tested against vtiger 5.0.4 +# This code is tested against vtiger 5.0.4 and 5.1.0 # # CHANGES # 60719-1615 - First version
\n"; echo ""; - $stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds from vicidial_inbound_groups where group_id='$group_id';"; + $stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $group_name = $row[1]; @@ -19199,6 +19271,11 @@ if ($ADD==3111) $timer_action = $row[60]; $timer_action_message = $row[61]; $timer_action_seconds = $row[62]; + $start_call_url = $row[63]; + $dispo_call_url = $row[64]; + $xferconf_c_number = $row[65]; + $xferconf_d_number = $row[66]; + $xferconf_e_number = $row[67]; ##### get in-groups listings for dynamic pulldown $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id"; @@ -19329,7 +19406,13 @@ if ($ADD==3111) echo "
Transfer-Conf Number 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Timer Action: $NWB#vicidial_inbound_groups-timer_action$NWE
Transfer-Conf Number 3: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Transfer-Conf Number 4: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Transfer-Conf Number 5: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Timer Action: $NWB#vicidial_inbound_groups-timer_action$NWE
Timer Action Message: $NWB#vicidial_inbound_groups-timer_action_message$NWE
Stats Percent of Calls Answered Within X seconds 2: $NWB#vicidial_inbound_groups-answer_sec_pct_rt_stat_one$NWE
Start Call URL: $NWB#vicidial_inbound_groups-start_call_url$NWE
Dispo Call URL: $NWB#vicidial_inbound_groups-dispo_call_url$NWE