diff --git a/UPGRADE b/UPGRADE index 01e27e3b..036ebf56 100644 --- a/UPGRADE +++ b/UPGRADE @@ -236,6 +236,14 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom exten => 8320,2,Hangup # the VD_amd_post.agi script is now depricated +60. Added additional Voicemail configuration through admin.php. Voicemail boxes + can now be created without being tied to a phone. These voicemail boxes + are added to the active voicemail server and there must be an active + voicemail server defined in the system settings for these to work. + +61. Changed WEBFORM links to work as window.open instead of traditional links + with 'target' tags which IE7 apparently has problems with + diff --git a/bin/ADMIN_keepalive_ALL.pl b/bin/ADMIN_keepalive_ALL.pl index 279375ce..5e94880f 100644 --- a/bin/ADMIN_keepalive_ALL.pl +++ b/bin/ADMIN_keepalive_ALL.pl @@ -41,6 +41,7 @@ # 90812-0053 - Added clear out non-used vicidial_conferences sessions # 90821-1246 - Fixed central voicemail server conf file, changed voicemail to use phone password # 90903-1626 - Added musiconhold and meetme conf file generation +# 90919-1516 - Added generation of standalone voicemail boxes in voicemail conf file # $DB=0; # Debug flag @@ -62,40 +63,40 @@ $reset_test = "$hour$min"; ### begin parsing run-time options ### if (length($ARGV[0])>1) -{ + { $i=0; while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } + { + $args = "$args $ARGV[$i]"; + $i++; + } if ($args =~ /--help/i) - { - print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[-debugX] = Extra-verbose debug messages\n\n"; - } + { + print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n[-debugX] = Extra-verbose debug messages\n\n"; + } else - { + { if ($args =~ /-debug/i) - { - $DB=1; # Debug flag - } + { + $DB=1; # Debug flag + } if ($args =~ /--debugX/i) - { - $DBX=1; - print "\n----- SUPER-DUPER DEBUGGING -----\n\n"; - } + { + $DBX=1; + print "\n----- SUPER-DUPER DEBUGGING -----\n\n"; + } if ($args =~ /-t/i) - { - $TEST=1; - $T=1; + { + $TEST=1; + $T=1; + } } } -} else -{ -# print "no command line options set\n"; -} + { + # print "no command line options set\n"; + } ### end parsing run-time options ### @@ -128,6 +129,7 @@ foreach(@conf) # 7 - AST_VDauto_dial_FILL\n"; # 8 - ip_relay for blind monitoring\n"; # 9 - Timeclock auto logout\n"; +# - Other setting are set by configuring them in the database if ($VARactive_keepalives =~ /X/) { @@ -1456,6 +1458,32 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r $i++; } + + ##### Get the other voicemail box entries ##### + $stmtA = "SELECT voicemail_id,fullname,pass,email FROM vicidial_voicemail where active='Y';"; + # print "$stmtA\n"; + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + if ($sthArows > 0) + { + $vm .= "\n"; + $vm .= "; Other Voicemail Entries:\n"; + } + $i=0; + while ($sthArows > $i) + { + @aryA = $sthA->fetchrow_array; + $voicemail_id[$i] = $aryA[0]; + $fullname[$i] = $aryA[1]; + $pass[$i] = $aryA[2]; + $email[$i] = $aryA[3]; + + $vm .= "$voicemail_id[$i] => $pass[$i],$fullname[$i],$email[$i]\n"; + + $i++; + } + $sthA->finish(); } ##### END generate voicemail accounts for all distinct phones on dedicated voicemail server diff --git a/bin/AST_vm_update.pl b/bin/AST_vm_update.pl index 6e96cfe7..54897b25 100644 --- a/bin/AST_vm_update.pl +++ b/bin/AST_vm_update.pl @@ -1,36 +1,24 @@ #!/usr/bin/perl # -# AST_vm_update.pl version 2.0.5 *DBI-version* +# AST_vm_update.pl version 2.2.0 *DBI-version* # # DESCRIPTION: -# uses the Asterisk Manager interface and Net::MySQL to update the count of -# voicemail messages for each mailbox (in the phone table) in the voicemail +# uses the Asterisk Manager interface to update the count of voicemail messages +# for each mailbox (in the phone and vicidial_voicemail tables) in the voicemail # table list is used by client apps for voicemail notification # -# SUMMARY: -# This program was designed for people using the Asterisk PBX with voicemail -# -# For the client program to notify of new messaged, this program must be in the -# cron running every minute -# -# For this program to work you need to have the "asterisk" MySQL database -# created and create the tables listed in the CONF_MySQL.txt file, also make sure -# that the machine running this program has read/write/update/delete access -# to that database -# -# It is recommended that you run this program on the local Asterisk machine -# # If this script is run ever minute there is a theoretical limit of -# 600 mailboxes that it can check due to the wait interval. If you have +# 1200 mailboxes that it can check due to the wait interval. If you have # more than this either change the cron when this script is run or change the # wait interval below # -# Copyright (C) 2006 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2009 Matt Florell LICENSE: AGPLv2 # # 50823-1422 - Added database server variable definitions lookup # 50823-1452 - Added commandline arguments for debug at runtime -# 60717-1204 - changed to DBI by Marin Blu -# 60715-2301 - changed to use /etc/astguiclient.conf for configs +# 60717-1204 - Changed to DBI by Marin Blu +# 60715-2301 - Changed to use /etc/astguiclient.conf for configs +# 90919-1739 - Added other voicemail checking from vicidial_voicemail table # # constants @@ -40,35 +28,35 @@ $MT[0]=''; ### begin parsing run-time options ### if (length($ARGV[0])>1) -{ + { $i=0; while ($#ARGV >= $i) - { - $args = "$args $ARGV[$i]"; - $i++; - } + { + $args = "$args $ARGV[$i]"; + $i++; + } if ($args =~ /--help/i) - { - print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n\n"; - } + { + print "allowed run time options:\n [-t] = test\n [-debug] = verbose debug messages\n\n"; + } else - { + { if ($args =~ /-debug/i) - { - $DB=1; # Debug flag - } + { + $DB=1; # Debug flag + } if ($args =~ /-t/i) - { - $TEST=1; - $T=1; + { + $TEST=1; + $T=1; + } } } -} else -{ -# print "no command line options set\n"; -} + { + # print "no command line options set\n"; + } ### end parsing run-time options ### # default path to astguiclient configuration file: @@ -118,45 +106,43 @@ use Time::HiRes ('gettimeofday','usleep','sleep'); # necessary to have perl sle use DBI; use Net::Telnet (); - $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass") +$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass") or die "Couldn't connect to database: " . DBI->errstr; ### Grab Server values from the database $stmtA = "SELECT telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,max_vicidial_trunks,answer_transfer_agent,local_gmt,ext_context FROM servers where server_ip = '$server_ip';"; - $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; if ($DB) {print "|$stmtA|\n";} $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; $sthArows=$sthA->rows; $rec_count=0; if ($sthArows > 0) - { - @aryA = $sthA->fetchrow_array; - $DBtelnet_host = "$aryA[0]"; - $DBtelnet_port = "$aryA[1]"; - $DBASTmgrUSERNAME = "$aryA[2]"; - $DBASTmgrSECRET = "$aryA[3]"; - $DBASTmgrUSERNAMEupdate = "$aryA[4]"; - $DBASTmgrUSERNAMElisten = "$aryA[5]"; - $DBASTmgrUSERNAMEsend = "$aryA[6]"; - $DBmax_vicidial_trunks = "$aryA[7]"; - $DBanswer_transfer_agent= "$aryA[8]"; - $DBSERVER_GMT = "$aryA[9]"; - $DBext_context = "$aryA[10]"; - if ($DBtelnet_host) {$telnet_host = $DBtelnet_host;} - if ($DBtelnet_port) {$telnet_port = $DBtelnet_port;} - if ($DBASTmgrUSERNAME) {$ASTmgrUSERNAME = $DBASTmgrUSERNAME;} - if ($DBASTmgrSECRET) {$ASTmgrSECRET = $DBASTmgrSECRET;} - if ($DBASTmgrUSERNAMEupdate) {$ASTmgrUSERNAMEupdate = $DBASTmgrUSERNAMEupdate;} - if ($DBASTmgrUSERNAMElisten) {$ASTmgrUSERNAMElisten = $DBASTmgrUSERNAMElisten;} - if ($DBASTmgrUSERNAMEsend) {$ASTmgrUSERNAMEsend = $DBASTmgrUSERNAMEsend;} - if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;} - if ($DBanswer_transfer_agent) {$answer_transfer_agent = $DBanswer_transfer_agent;} - if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} - if ($DBext_context) {$ext_context = $DBext_context;} + { + @aryA = $sthA->fetchrow_array; + $DBtelnet_host = "$aryA[0]"; + $DBtelnet_port = "$aryA[1]"; + $DBASTmgrUSERNAME = "$aryA[2]"; + $DBASTmgrSECRET = "$aryA[3]"; + $DBASTmgrUSERNAMEupdate = "$aryA[4]"; + $DBASTmgrUSERNAMElisten = "$aryA[5]"; + $DBASTmgrUSERNAMEsend = "$aryA[6]"; + $DBmax_vicidial_trunks = "$aryA[7]"; + $DBanswer_transfer_agent= "$aryA[8]"; + $DBSERVER_GMT = "$aryA[9]"; + $DBext_context = "$aryA[10]"; + if ($DBtelnet_host) {$telnet_host = $DBtelnet_host;} + if ($DBtelnet_port) {$telnet_port = $DBtelnet_port;} + if ($DBASTmgrUSERNAME) {$ASTmgrUSERNAME = $DBASTmgrUSERNAME;} + if ($DBASTmgrSECRET) {$ASTmgrSECRET = $DBASTmgrSECRET;} + if ($DBASTmgrUSERNAMEupdate) {$ASTmgrUSERNAMEupdate = $DBASTmgrUSERNAMEupdate;} + if ($DBASTmgrUSERNAMElisten) {$ASTmgrUSERNAMElisten = $DBASTmgrUSERNAMElisten;} + if ($DBASTmgrUSERNAMEsend) {$ASTmgrUSERNAMEsend = $DBASTmgrUSERNAMEsend;} + if ($DBmax_vicidial_trunks) {$max_vicidial_trunks = $DBmax_vicidial_trunks;} + if ($DBanswer_transfer_agent) {$answer_transfer_agent = $DBanswer_transfer_agent;} + if ($DBSERVER_GMT) {$SERVER_GMT = $DBSERVER_GMT;} + if ($DBext_context) {$ext_context = $DBext_context;} } - $sthA->finish(); - +$sthA->finish(); @PTextensions=@MT; @PTvoicemail_ids=@MT; @PTmessages=@MT; @PTold_messages=@MT; @NEW_messages=@MT; @OLD_messages=@MT; $stmtA = "SELECT extension,voicemail_id,messages,old_messages from phones where server_ip='$server_ip'"; @@ -167,14 +153,14 @@ $sthArows=$sthA->rows; $rec_count=0; while ($sthArows > $rec_count) { - @aryA = $sthA->fetchrow_array; - $PTextensions[$rec_count] = "$aryA[0]"; - $PTvoicemail_ids[$rec_count] = "$aryA[1]"; - $PTmessages[$rec_count] = "$aryA[2]"; - $PTold_messages[$rec_count] = "$aryA[3]"; - $rec_count++; + @aryA = $sthA->fetchrow_array; + $PTextensions[$rec_count] = "$aryA[0]"; + $PTvoicemail_ids[$rec_count] = "$aryA[1]"; + $PTmessages[$rec_count] = "$aryA[2]"; + $PTold_messages[$rec_count] = "$aryA[3]"; + $rec_count++; } - $sthA->finish(); +$sthA->finish(); ### connect to asterisk manager through telnet @@ -225,11 +211,91 @@ foreach(@PTextensions) } $i++; - ### sleep for 10 hundredths of a second - usleep(1*100*1000); + ### sleep for 5 hundredths of a second + usleep(1*50*1000); } +##### BEGIN check vicidial_voicemail entries ##### + +### find out if this server is the active_voicemail_server +$stmtA = "SELECT count(*) from system_settings where active_voicemail_server='$server_ip';"; +$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; +if ($DB) {print "|$stmtA|\n";} +$sthA->execute or die "executing: $stmtA ", $dbhA->errstr; +$sthArows=$sthA->rows; +$rec_count=0; +if ($sthArows > 0) + { + @aryA = $sthA->fetchrow_array; + $active_voicemail_server = $aryA[0]; + } +$sthA->finish(); + +if ($active_voicemail_server > 0) + { + if($DB){print "Active Voicemail Server, checking vicidial_voicemail boxes...\n";} + @PTvoicemail_ids=@MT; @PTmessages=@MT; @PTold_messages=@MT; @NEW_messages=@MT; @OLD_messages=@MT; + $stmtA = "SELECT voicemail_id,messages,old_messages from vicidial_voicemail where active='Y';"; + if ($DB) {print "|$stmtA|\n";} + $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr; + $sthA->execute or die "executing: $stmtA ", $dbhA->errstr; + $sthArows=$sthA->rows; + $rec_count=0; + while ($sthArows > $rec_count) + { + @aryA = $sthA->fetchrow_array; + $PTvoicemail_ids[$rec_count] = $aryA[0]; + $PTmessages[$rec_count] = $aryA[1]; + $PTold_messages[$rec_count] = $aryA[2]; + $rec_count++; + } + $sthA->finish(); + + $i=0; + foreach(@PTvoicemail_ids) + { + @list_channels=@MT; + $t->buffer_empty; + @list_channels = $t->cmd(String => "Action: MailboxCount\nMailbox: $PTvoicemail_ids[$i]\n\nAction: Ping\n\n", Prompt => '/Response: Pong.*/'); + + $j=0; + foreach(@list_channels) + { + if ($list_channels[$j] =~ /Mailbox: $PTvoicemail_ids[$i]/) + { + $NEW_messages[$i] = "$list_channels[$j+1]"; + $NEW_messages[$i] =~ s/NewMessages: |\n//gi; + $OLD_messages[$i] = "$list_channels[$j+2]"; + $OLD_messages[$i] =~ s/OldMessages: |\n//gi; + } + + $j++; + } + + if($DB){print "MailboxCount- $PTvoicemail_ids[$i] NEW:|$NEW_messages[$i]| OLD:|$OLD_messages[$i]| ";} + if ( ($NEW_messages[$i] eq $PTmessages[$i]) && ($OLD_messages[$i] eq $PTold_messages[$i]) ) + { + if($DB){print "MESSAGE COUNT UNCHANGED, DOING NOTHING FOR THIS MAILBOX\n";} + } + else + { + $stmtA = "UPDATE vicidial_voicemail set messages='$NEW_messages[$i]',old_messages='$OLD_messages[$i]' where voicemail_id='$voicemail_id';"; + if($DB){print STDERR "\n|$stmtA|\n";} + $affected_rows = $dbhA->do($stmtA); # or die "Couldn't execute query:|$stmtA|\n"; + } + + $i++; + ### sleep for 5 hundredths of a second + usleep(1*50*1000); + } + + + } +##### END check vicidial_voicemail entries ##### + + + $t->buffer_empty; @hangup = $t->cmd(String => "Action: Logoff\n\n", Prompt => "/.*/"); $t->buffer_empty; @@ -241,7 +307,3 @@ $dbhA->disconnect(); if($DB){print "DONE... Exiting... Goodbye... See you later... \n";} exit; - - - - diff --git a/docs/NON-AGENT_API.txt b/docs/NON-AGENT_API.txt index 5d3617f3..cc5908b4 100644 --- a/docs/NON-AGENT_API.txt +++ b/docs/NON-AGENT_API.txt @@ -20,7 +20,8 @@ Changes: 90428-0208 - Added blind_monitor function 90513-1720 - Added sounds_list function 90721-1432 - Added rank and owner -90904-1535 - Added moh_list function +90904-1535 - Added moh_list musiconhold function +90916-2342 - Added vm_list voicemail list @@ -93,6 +94,30 @@ ERROR: moh_list CENTRAL SOUND CONTROL IS NOT ACTIVE +-------------------------------------------------------------------------------- +vm_list - outputs a list of voicemail boxes in the system + +NOTE: api user for this function must have user_level set to 7 or higher + +OPTIONAL FIELDS- +format - format of the output(tab, link, selectframe) +comments - name of the field to populate + + +Example URL strings for API calls: +http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=vm_list&format=selectframe&comments=fieldname&stage=date + +Example responses: + + +ERROR: vm_list USER DOES NOT HAVE PERMISSION TO VIEW VOICEMAIL BOXES LIST + +ERROR: vm_list CENTRAL SOUND CONTROL IS NOT ACTIVE + + + + + -------------------------------------------------------------------------------- blind_monitor - calls user-defined phone and places them in session as blind monitor diff --git a/docs/SCRATCH_INSTALL.txt b/docs/SCRATCH_INSTALL.txt index d3436906..9e2fd33c 100644 --- a/docs/SCRATCH_INSTALL.txt +++ b/docs/SCRATCH_INSTALL.txt @@ -2123,11 +2123,8 @@ exten => 8310,3,Wait,3600 exten => 8310,4,Hangup ; this is used for playing a message to an answering machine forwarded from AMD in VICIDIAL -; replace conf with the message file you want to leave -exten => 8320,1,WaitForSilence(2000,2) ; AMD got machine. leave message after recording -exten => 8320,2,Playback(conf) -exten => 8320,3,AGI(VD_amd_post.agi,${EXTEN}) -exten => 8320,4,Hangup +exten => 8320,1,AGI(VD_amd.agi,${EXTEN}-----YES) +exten => 8320,2,Hangup ; this is used to allow the GUI to send you directly into voicemail ; don't forget to set GUI variable $voicemail_exten to this extension diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index 190c0dbb..c9c99a0d 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -1404,8 +1404,8 @@ agent_search_method ENUM('LO','LB','SO') default 'LB', list_id BIGINT(14) UNSIGNED default '999', campaign_id VARCHAR(8), phone_code VARCHAR(10) default '1', -unique index (did_pattern), menu_id VARCHAR(50) default '', +unique index (did_pattern), index (group_id) ); @@ -1797,6 +1797,16 @@ rank SMALLINT(5), unique index mohfile (filename, moh_id) ); +CREATE TABLE vicidial_voicemail ( +voicemail_id VARCHAR(10) NOT NULL UNIQUE PRIMARY KEY, +active ENUM('Y','N') default 'Y', +pass VARCHAR(10) NOT NULL, +fullname VARCHAR(100) NOT NULL, +messages INT(4) default '0', +old_messages INT(4) default '0', +email VARCHAR(100) +); + ALTER TABLE vicidial_campaign_server_stats ENGINE=HEAP; @@ -1921,7 +1931,7 @@ CREATE INDEX phone_number on vicidial_closer_log (phone_number); CREATE INDEX date_user on vicidial_closer_log (call_date,user); CREATE INDEX comment_a on live_inbound_log (comment_a); -UPDATE system_settings SET db_schema_version='1173',db_schema_update_date=NOW(); +UPDATE system_settings SET db_schema_version='1174',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 066e1c65..f299b712 100644 --- a/extras/upgrade_2.2.0.sql +++ b/extras/upgrade_2.2.0.sql @@ -548,3 +548,15 @@ ALTER TABLE system_settings ADD db_schema_update_date DATETIME; ALTER TABLE system_settings ADD enable_second_webform ENUM('0','1') default '0'; UPDATE system_settings SET db_schema_version='1173',db_schema_update_date=NOW(); + +CREATE TABLE vicidial_voicemail ( +voicemail_id VARCHAR(10) NOT NULL UNIQUE PRIMARY KEY, +active ENUM('Y','N') default 'Y', +pass VARCHAR(10) NOT NULL, +fullname VARCHAR(100) NOT NULL, +messages INT(4) default '0', +old_messages INT(4) default '0', +email VARCHAR(100) +); + +UPDATE system_settings SET db_schema_version='1174',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 bbb7368d..fc2bb933 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 @@ -302,6 +302,34 @@ Enable Second Webform|| WaitForSilence Options|| If Wait For Silence is desired on calls that are detected as Answering Machines then this field has those options. There are two settings separated by a comma, the first option is how long to detect silence in milliseconds and the second option is for how many times to detect that before playing the message. Default is EMPTY for disabled. A standard value for this would be wait for 2 seconds of silence twice|| This field is for entering the prompt to play when the agent gets an answering machine and clicks on the Answering Machine Message button in the transfer conference frame. You must set this to either an audio file in the audio store or a TTS prompt if TTS is enabled on your system|| +EXTENDED ALTERNATE PHONE NUMBERS FOR THIS LEAD|| +ADD NEW VOICEMAIL BOX|| +ADDING NEW VOICEMAIL BOX|| +MODIFY VOICEMAIL BOX|| +MODIFY A VOICEMAIL BOX|| +DELETE VOICEMAIL BOX|| +VOICEMAIL BOXES LIST|| +VOICEMAIL BOXES|| +ADD NEW VOICEMAIL BOX|| +Voicemail ID|| +This is the all numbers identifier of this mailbox. This must not be a duplicate of an existing voicemail ID or the voicemail ID of a phone on the system, minimum of 2 characters|| +This is name associated with this voicemail box. max 100 characters, minimum of 2 characters|| +This is the password that is used to gain access to the voicemail box when dialing in to check messages max 10 characters, minimum of 2 characters|| +This option allows you to set the voicemail box to active or inactive. If the box is inactive you cannot leave messages on it and you cannot check messages in it|| +This optional setting allows you to have the voicemail messages sent to an email account, if your system is set up to send out email. If this field is empty then no emails will be sent out|| +VOICEMAIL BOX NOT ADDED|| +there is already a voicemail box in the system with this ID|| +there is already a phone in the system with this voicemail ID|| +VOICEMAIL BOX ADDED|| +VOICEMAIL BOX NOT MODIFIED|| +VOICEMAIL BOX MODIFIED|| +VOICEMAIL BOX NOT DELETED|| +VOICEMAIL BOX DELETION COMPLETED|| +VOICEMAIL BOX DELETION CONFIRMATION|| +Click here to delete voicemail box|| +DELETE THIS VOICEMAIL BOX|| +Click here to see Admin chages to this voicemail box|| +The following fields must have data|| add-file: user_territories.php diff --git a/www/agc/vicidial.php b/www/agc/vicidial.php index 2c3104cb..23044eec 100644 --- a/www/agc/vicidial.php +++ b/www/agc/vicidial.php @@ -254,10 +254,11 @@ # 90909-0921 - Fixed park issues # 90916-1144 - Added Second web form button, Answering Machine Message change # 90917-1325 - Fixed script loading bug with customer webform at the same time +# 90920-2108 - Changed web forms to use window.open instead of traditional links(IE7 compatibility issue) # -$version = '2.2.0-231'; -$build = '90917-1325'; +$version = '2.2.0-232'; +$build = '90920-2108'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=61; $one_mysql_log=0; @@ -4805,10 +4806,14 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} TEMP_VDIC_web_form_address_two = VDIC_web_form_address_two + "" + web_form_vars_two; } - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + + // document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; if (enable_second_webform > 0) { - document.getElementById("WebFormSpanTwo").innerHTML = "\"Web\n"; + document.getElementById("WebFormSpanTwo").innerHTML = "\"Web\n"; + + // document.getElementById("WebFormSpanTwo").innerHTML = "\"Web\n"; } if (LeaDPreVDispO == 'CALLBK') @@ -6016,12 +6021,15 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} TEMP_VDIC_web_form_address_two = VDIC_web_form_address_two + "" + web_form_vars_two; } + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + // document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; if (enable_second_webform > 0) { - document.getElementById("WebFormSpanTwo").innerHTML = "\"Web\n"; + document.getElementById("WebFormSpanTwo").innerHTML = "\"Web\n"; + + // document.getElementById("WebFormSpanTwo").innerHTML = "\"Web\n"; } if ( (LIVE_campaign_recording == 'ALLCALLS') || (LIVE_campaign_recording == 'ALLFORCE') ) @@ -6137,7 +6145,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // refresh the content of the web form URL - function WebFormRefresH(taskrefresh,submittask) + function WebFormRefresH(taskrefresh,submittask,taskopen) { if (VDCL_group_id.length > 1) {var group = VDCL_group_id;} @@ -6234,21 +6242,19 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} TEMP_VDIC_web_form_address = VDIC_web_form_address + "" + web_form_vars; } + document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; - if (taskrefresh == 'OUT') + if (taskopen == 'YES') { - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; - } - else - { - document.getElementById("WebFormSpan").innerHTML = "\"Web\n"; + 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'); } + } // ################################################################################ // refresh the content of the second web form URL - function WebFormTwoRefresH(taskrefresh,submittask) + function WebFormTwoRefresH(taskrefresh,submittask,taskopen) { if (VDCL_group_id.length > 1) {var group = VDCL_group_id;} @@ -6348,13 +6354,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} if (enable_second_webform > 0) { - if (taskrefresh == 'OUT') + document.getElementById("WebFormSpanTwo").innerHTML = "\"Web\n"; + + if (taskopen == 'YES') { - document.getElementById("WebFormSpanTwo").innerHTML = "\"Web\n"; - } - else - { - document.getElementById("WebFormSpanTwo").innerHTML = "\"Web\n"; + 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'); } } } diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 2e79e9ce..fe241612 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -39,6 +39,7 @@ $reports_color = '#99FF33'; $settings_color = '#FF33FF'; $status_color = '#FF33FF'; $moh_color = '#FF33FF'; + $vm_color = '#FF33FF'; $tts_color = '#FF33FF'; $subcamp_color = '#FF9933'; $users_font = 'BLACK'; @@ -58,6 +59,7 @@ $reports_font = 'BLACK'; $settings_font = 'BLACK'; $status_font = 'BLACK'; $moh_font = 'BLACK'; + $vm_font = 'BLACK'; $tts_font = 'BLACK'; $subcamp_font = 'BLACK'; @@ -82,6 +84,7 @@ $reports_color = '#E6E6E6'; $settings_color = '#C6C6C6'; $status_color = '#C6C6C6'; $moh_color = '#C6C6C6'; + $vm_color = '#C6C6C6'; $tts_color = '#C6C6C6'; $subcamp_color = '#C6C6C6'; ### @@ -1955,11 +1958,13 @@ else # 90904-1536 - Added moh chooser option, timezone list ordering # 90908-1207 - Added cross-listing linking for DIDs, CallMenus and In-groups # 90916-1105 - Added second web form to ingroups and campaigns and added audio choose for answering machine message and waitforsilence_options +# 90917-1108 - Added Extra Voicemail boxes config in Admin section +# 90919-2251 - Removed all "SELECT *" instances in the code, code cleanup to conform to standard # # 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-216'; -$build = '90916-1105'; +$admin_version = '2.2.0-218'; +$build = '90919-2251'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -2047,12 +2052,11 @@ $browser = getenv("HTTP_USER_AGENT"); } else { - if($auth>0) { $office_no=strtoupper($PHP_AUTH_USER); $password=strtoupper($PHP_AUTH_PW); - $stmt="SELECT * from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW';"; + $stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts from vicidial_users where user='$PHP_AUTH_USER' and pass='$PHP_AUTH_PW';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $LOGfull_name =$row[3]; @@ -2152,6 +2156,7 @@ if ($ADD==131111111111) {$hh='admin'; $sh='templates'; echo "ADD NEW CONF TEMPLA if ($ADD==141111111111) {$hh='admin'; $sh='carriers'; echo "ADD NEW CARRIER";} if ($ADD==151111111111) {$hh='admin'; $sh='tts'; echo "ADD NEW TTS ENTRY";} if ($ADD==161111111111) {$hh='admin'; $sh='moh'; echo "ADD NEW MUSIC ON HOLD ENTRY";} +if ($ADD==171111111111) {$hh='admin'; $sh='vm'; echo "ADD NEW VOICEMAIL BOX";} if ($ADD==1111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW CONFERENCE";} if ($ADD==11111111111111) {$hh='admin'; $sh='conference'; echo "ADD NEW VICIDIAL CONFERENCE";} if ($ADD=='2') {$hh='users'; echo "New User Addition";} @@ -2188,6 +2193,7 @@ if ($ADD==231111111111) {$hh='admin'; $sh='templates'; echo "ADDING NEW CONF TEM if ($ADD==241111111111) {$hh='admin'; $sh='carriers'; echo "ADDING NEW CARRIER";} if ($ADD==251111111111) {$hh='admin'; $sh='tts'; echo "ADDING NEW TTS ENTRY";} if ($ADD==261111111111) {$hh='admin'; $sh='moh'; echo "ADDING NEW MUSIC ON HOLD ENTRY";} +if ($ADD==271111111111) {$hh='admin'; $sh='vm'; echo "ADDING NEW VOICEMAIL BOX";} if ($ADD==2111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW CONFERENCE";} if ($ADD==21111111111111) {$hh='admin'; $sh='conference'; echo "ADDING NEW VICIDIAL CONFERENCE";} if ($ADD==221111111111111) {$hh='admin'; $sh='status'; echo "ADDING VICIDIAL SYSTEM STATUSES";} @@ -2196,29 +2202,29 @@ if ($ADD==241111111111111) {$hh='admin'; $sh='status'; echo "ADDING VICIDIAL QC if ($ADD==3) {$hh='users'; echo "Modify User";} if ($ADD==30) {$hh='campaigns'; echo "Campaign Not Allowed";} if ($ADD==31) - { - $hh='campaigns'; $sh='detail'; echo "Modify Campaign - Detail - $campaign_id"; - if ($SUB==22) {echo " - Statuses";} - if ($SUB==23) {echo " - HotKeys";} - if ($SUB==25) {echo " - Lead Recycle Entries";} - if ($SUB==26) {echo " - Auto Alt Dial Statuses";} - if ($SUB==27) {echo " - Agent Pause Codes";} - if ($SUB==28) {echo " - QC";} - if ($SUB==29) {echo " - List Mixes";} - if ($SUB=='20A') {echo " - Survey";} - } + { + $hh='campaigns'; $sh='detail'; echo "Modify Campaign - Detail - $campaign_id"; + if ($SUB==22) {echo " - Statuses";} + if ($SUB==23) {echo " - HotKeys";} + if ($SUB==25) {echo " - Lead Recycle Entries";} + if ($SUB==26) {echo " - Auto Alt Dial Statuses";} + if ($SUB==27) {echo " - Agent Pause Codes";} + if ($SUB==28) {echo " - QC";} + if ($SUB==29) {echo " - List Mixes";} + if ($SUB=='20A') {echo " - Survey";} + } if ($ADD==34) - { - $hh='campaigns'; $sh='basic'; echo "Modify Campaign - Basic View - $campaign_id"; - if ($SUB==22) {echo " - Statuses";} - if ($SUB==23) {echo " - HotKeys";} - if ($SUB==25) {echo " - Lead Recycle Entries";} - if ($SUB==26) {echo " - Auto Alt Dial Statuses";} - if ($SUB==27) {echo " - Agent Pause Codes";} - if ($SUB==28) {echo " - QC";} - if ($SUB==29) {echo " - List Mixes";} - if ($SUB=='20A') {echo " - Survey";} - } + { + $hh='campaigns'; $sh='basic'; echo "Modify Campaign - Basic View - $campaign_id"; + if ($SUB==22) {echo " - Statuses";} + if ($SUB==23) {echo " - HotKeys";} + if ($SUB==25) {echo " - Lead Recycle Entries";} + if ($SUB==26) {echo " - Auto Alt Dial Statuses";} + if ($SUB==27) {echo " - Agent Pause Codes";} + if ($SUB==28) {echo " - QC";} + if ($SUB==29) {echo " - List Mixes";} + if ($SUB=='20A') {echo " - Survey";} + } if ($ADD==32) {$hh='campaigns'; $sh='status'; echo "Campaign Statuses";} if ($ADD==33) {$hh='campaigns'; $sh='hotkey'; echo "Campaign HotKeys";} if ($ADD==35) {$hh='campaigns'; $sh='recycle'; echo "Campaign Lead Recycle Entries";} @@ -2246,6 +2252,7 @@ if ($ADD==331111111111) {$hh='admin'; $sh='templates'; echo "MODIFY CONF TEMPLAT if ($ADD==341111111111) {$hh='admin'; $sh='carriers'; echo "MODIFY CARRIER";} if ($ADD==351111111111) {$hh='admin'; $sh='tts'; echo "MODIFY TTS ENTRY";} if ($ADD==361111111111) {$hh='admin'; $sh='moh'; echo "MODIFY MUSIC ON HOLD ENTRY";} +if ($ADD==371111111111) {$hh='admin'; $sh='vm'; echo "MODIFY VOICEMAIL BOX";} if ($ADD==3111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY CONFERENCE";} if ($ADD==31111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} if ($ADD==311111111111111) {$hh='admin'; $sh='settings'; echo "MODIFY VICIDIAL SYSTEM SETTINGS";} @@ -2284,6 +2291,7 @@ if ($ADD==431111111111) {$hh='admin'; $sh='templates'; echo "MODIFY CONF TEMPLAT if ($ADD==441111111111) {$hh='admin'; $sh='carriers'; echo "MODIFY CARRIER";} if ($ADD==451111111111) {$hh='admin'; $sh='tts'; echo "MODIFY TTS ENTRY";} if ($ADD==461111111111) {$hh='admin'; $sh='moh'; echo "MODIFY MUSIC ON HOLD ENTRY";} +if ($ADD==471111111111) {$hh='admin'; $sh='vm'; echo "MODIFY VOICEMAIL BOX";} if ($ADD==4111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY CONFERENCE";} if ($ADD==41111111111111) {$hh='admin'; $sh='conference'; echo "MODIFY VICIDIAL CONFERENCE";} if ($ADD==411111111111111) {$hh='admin'; $sh='settings'; echo "MODIFY VICIDIAL SYSTEM SETTINGS";} @@ -2313,6 +2321,7 @@ if ($ADD==531111111111) {$hh='admin'; $sh='templates'; echo "DELETE CONF TEMPLAT if ($ADD==541111111111) {$hh='admin'; $sh='carriers'; echo "DELETE CARRIER";} if ($ADD==551111111111) {$hh='admin'; $sh='tts'; echo "DELETE TTS ENTRY";} if ($ADD==561111111111) {$hh='admin'; $sh='moh'; echo "DELETE MUSIC ON HOLD ENTRY";} +if ($ADD==571111111111) {$hh='admin'; $sh='vm'; echo "DELETE VOICEMAIL BOX";} if ($ADD==5111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} if ($ADD==51111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} if ($ADD==6) {$hh='users'; echo "Delete User";} @@ -2344,6 +2353,7 @@ if ($ADD==631111111111) {$hh='admin'; $sh='templates'; echo "DELETE CONF TEMPLAT if ($ADD==641111111111) {$hh='admin'; $sh='carriers'; echo "DELETE CARRIER";} if ($ADD==651111111111) {$hh='admin'; $sh='tts'; echo "DELETE TTS ENTRY";} if ($ADD==661111111111) {$hh='admin'; $sh='moh'; echo "DELETE MUSIC ON HOLD ENTRY";} +if ($ADD==671111111111) {$hh='admin'; $sh='vm'; echo "DELETE VOICEMAIL BOX";} if ($ADD==6111111111111) {$hh='admin'; $sh='conference'; echo "DELETE CONFERENCE";} if ($ADD==61111111111111) {$hh='admin'; $sh='conference'; echo "DELETE VICIDIAL CONFERENCE";} if ($ADD==73) {$hh='campaigns'; echo "Dialable Lead Count";} @@ -2377,6 +2387,7 @@ if ($ADD==130000000000) {$hh='admin'; $sh='templates'; echo "CONF TEMPLATE LIST" if ($ADD==140000000000) {$hh='admin'; $sh='carriers'; echo "CARRIER LIST";} if ($ADD==150000000000) {$hh='admin'; $sh='tts'; echo "TTS ENTRY LIST";} if ($ADD==160000000000) {$hh='admin'; $sh='moh'; echo "MUSIC ON HOLD ENTRY LIST";} +if ($ADD==170000000000) {$hh='admin'; $sh='vm'; echo "VOICEMAIL BOXES LIST";} if ($ADD==1000000000000) {$hh='admin'; $sh='conference'; echo "CONFERENCE LIST";} if ($ADD==10000000000000) {$hh='admin'; $sh='conference'; echo "VICIDIAL CONFERENCE LIST";} if ($ADD==550) {$hh='users'; echo "Search Form";} @@ -2573,53 +2584,53 @@ if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($ADD ##### BEGIN get inbound groups listing for checkboxes ##### $xfer_groupsSQL=''; if ( (($ADD>20) and ($ADD<70)) and ($ADD!=41) or ( ($ADD==41) and (eregi('list_activation', $stage))) ) - { - $stmt="SELECT closer_campaigns,xfer_groups from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - $xfer_groups = $row[1]; - $xfer_groups = preg_replace("/ -$/","",$xfer_groups); - $XFERgroups = explode(" ", $xfer_groups); - $xfer_groupsSQL = preg_replace("/^ | -$/","",$xfer_groups); - $xfer_groupsSQL = preg_replace("/ /","','",$xfer_groupsSQL); - $xfer_groupsSQL = "WHERE group_id IN('$xfer_groupsSQL')"; - } - if ($ADD==41) - { - $p=0; - $XFERgroup_ct = count($XFERgroups); - while ($p < $XFERgroup_ct) { - $xfer_groups .= " $XFERgroups[$p]"; - $p++; + $stmt="SELECT closer_campaigns,xfer_groups from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $closer_campaigns = $row[0]; + $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); + $groups = explode(" ", $closer_campaigns); + $xfer_groups = $row[1]; + $xfer_groups = preg_replace("/ -$/","",$xfer_groups); + $XFERgroups = explode(" ", $xfer_groups); + $xfer_groupsSQL = preg_replace("/^ | -$/","",$xfer_groups); + $xfer_groupsSQL = preg_replace("/ /","','",$xfer_groupsSQL); + $xfer_groupsSQL = "WHERE group_id IN('$xfer_groupsSQL')"; + } + if ($ADD==41) + { + $p=0; + $XFERgroup_ct = count($XFERgroups); + while ($p < $XFERgroup_ct) + { + $xfer_groups .= " $XFERgroups[$p]"; + $p++; + } + $xfer_groupsSQL = preg_replace("/^ | -$/","",$xfer_groups); + $xfer_groupsSQL = preg_replace("/ /","','",$xfer_groupsSQL); + $xfer_groupsSQL = "WHERE group_id IN('$xfer_groupsSQL')"; } - $xfer_groupsSQL = preg_replace("/^ | -$/","",$xfer_groups); - $xfer_groupsSQL = preg_replace("/ /","','",$xfer_groupsSQL); - $xfer_groupsSQL = "WHERE group_id IN('$xfer_groupsSQL')"; - } if ( (($ADD==31111) or ($ADD==31111)) and (count($groups)<1) ) - { - $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } + { + $stmt="SELECT closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $closer_campaigns = $row[0]; + $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); + $groups = explode(" ", $closer_campaigns); + } if ($ADD==3) - { - $stmt="SELECT closer_campaigns from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $closer_campaigns = $row[0]; - $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); - $groups = explode(" ", $closer_campaigns); - } + { + $stmt="SELECT closer_campaigns from vicidial_users where user='$user';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $closer_campaigns = $row[0]; + $closer_campaigns = preg_replace("/ -$/","",$closer_campaigns); + $groups = explode(" ", $closer_campaigns); + } $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; # $stmt="SELECT group_id,group_name from vicidial_inbound_groups where group_id NOT IN('AGENTDIRECT') order by group_id"; @@ -2747,10 +2758,10 @@ if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($ADD ##### END get inbound groups listing for checkboxes ##### - ##### BEGIN get campaigns listing for checkboxes ##### - if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) ) +##### BEGIN get campaigns listing for checkboxes ##### +if ( ($ADD==211111) or ($ADD==311111) or ($ADD==411111) or ($ADD==511111) or ($ADD==611111) ) { - if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) ) + if ( ($ADD==211111) or ($ADD==311111) or ($ADD==511111) or ($ADD==611111) ) { $stmt="SELECT allowed_campaigns,qc_allowed_campaigns,qc_allowed_inbound_groups from vicidial_user_groups where user_group='$user_group';"; $rslt=mysql_query($stmt, $link); @@ -2772,26 +2783,26 @@ if ( ( (strlen($ADD)>4) && ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($ADD $qc_campaigns_list='4) && ($ADD < 99998) ) or ($ADD==3) or (($ADD>20) and ($ADD ##### END get campaigns listing for checkboxes ##### - if ( (strlen($ADD)==11) or (strlen($ADD)>12) or ( ($ADD > 1299) and ($ADD < 9999) ) ) +if ( (strlen($ADD)==11) or (strlen($ADD)>12) or ( ($ADD > 1299) and ($ADD < 9999) ) ) { ##### get server listing for dynamic pulldown $stmt="SELECT server_ip,server_description from servers order by server_ip"; @@ -2897,1608 +2908,1346 @@ $NWE = "')\">\"HELP\"\n"; -echo "\n"; -echo "\n"; -echo "
\n"; -echo "
ADMINISTRATION: HELP


\n"; - -?> -VICIDIAL_USERS TABLE

- -
-User ID - This field is where you put the VICIDIAL users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. - -
-
-
-Password - This field is where you put the VICIDIAL users password. Must be at least 2 characters in length. - -
-
-
-Full Name - This field is where you put the VICIDIAL users full name. Must be at least 2 characters in length. - -
-
-
-User Level - This menu is where you select the VICIDIAL users user level. Must be a level of 1 to log into VICIDIAL, Must be level greater than 2 to log in as a closer, Must be user level 8 or greater to get into admin web section. - -
-
-
-User Group - This menu is where you select the VICIDIAL users group that this user will belong to. This does not have any restrictions at this time, this is just to subdivide users and allow for future features based upon it. - -
-
-
-Phone Login - Here is where you can set a default phone login value for when the user logs into vicidial.php. This value will populate the phone_login automatically when the user logs in with their user-pass-campaign in the vicidial.php login screen. - -
-
-
-Phone Pass - Here is where you can set a default phone pass value for when the user logs into vicidial.php. This value will populate the phone_pass automatically when the user logs in with their user-pass-campaign in the vicidial.php login screen. - -
-
-
-Active - This field defines whether the user is active in the system and can use VICIDIAL resources. Default is Y - -
-
-
-Email, User Code and Territory - These are optional fields. - -
-
-
-Hot Keys Active - This option if set to 1 allows the user to use the Hot Keys quick-dispositioning function in vicidial.php. - -
-
-
-Agent Choose Ingroups - This option if set to 1 allows the user to choose the ingroups that they will receive calls from when they login to a CLOSER or INBOUND campaign. Otherwise the Manager will need to set this in their user detail screen of the admin page. - -
-
-
-Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the date and time at which the lead will be re-activated. - -
-
-
-Agent-Only Callbacks - This option allows an agent to set a callback so that they are the only Agent that can call the customer back. This also allows the agent to see their callback listings and call them back any time they want to. - -
-
-
-Agent Call Manual - This option allows an agent to manually enter a new lead into the system and call them. This also allows the calling of any phone number from their vicidial screen and puts that call into their session. Use this option with caution. - -
-
-
-Vicidial Recording - This option can prevent an agent from doing any recordings after they log in to vicidial. This option must be on for vicidial to follow the campaign recording session. - -
-
-
-Vicidial Transfers - This option can prevent an agent from opening the transfer - conference session of vicidial. If this is disabled, the agent cannot third party call or blind transfer any calls. - - 0) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "
ADMINISTRATION: HELP


\n"; + ?> + VICIDIAL_USERS TABLE

+
-
+ User ID - This field is where you put the VICIDIAL users ID number, can be up to 8 digits in length, Must be at least 2 characters in length. +
- Closer Default Blended - This option simply defaults the Blended checkbox on a CLOSER login screen. +
+
+ Password - This field is where you put the VICIDIAL users password. Must be at least 2 characters in length. + +
+
+
+ Full Name - This field is where you put the VICIDIAL users full name. Must be at least 2 characters in length. + +
+
+
+ User Level - This menu is where you select the VICIDIAL users user level. Must be a level of 1 to log into VICIDIAL, Must be level greater than 2 to log in as a closer, Must be user level 8 or greater to get into admin web section. + +
+
+
+ User Group - This menu is where you select the VICIDIAL users group that this user will belong to. This does not have any restrictions at this time, this is just to subdivide users and allow for future features based upon it. + +
+
+
+ Phone Login - Here is where you can set a default phone login value for when the user logs into vicidial.php. This value will populate the phone_login automatically when the user logs in with their user-pass-campaign in the vicidial.php login screen. + +
+
+
+ Phone Pass - Here is where you can set a default phone pass value for when the user logs into vicidial.php. This value will populate the phone_pass automatically when the user logs in with their user-pass-campaign in the vicidial.php login screen. + +
+
+
+ Active - This field defines whether the user is active in the system and can use VICIDIAL resources. Default is Y + +
+
+
+ Email, User Code and Territory - These are optional fields. + +
+
+
+ Hot Keys Active - This option if set to 1 allows the user to use the Hot Keys quick-dispositioning function in vicidial.php. + +
+
+
+ Agent Choose Ingroups - This option if set to 1 allows the user to choose the ingroups that they will receive calls from when they login to a CLOSER or INBOUND campaign. Otherwise the Manager will need to set this in their user detail screen of the admin page. + +
+
+
+ Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the date and time at which the lead will be re-activated. + +
+
+
+ Agent-Only Callbacks - This option allows an agent to set a callback so that they are the only Agent that can call the customer back. This also allows the agent to see their callback listings and call them back any time they want to. + +
+
+
+ Agent Call Manual - This option allows an agent to manually enter a new lead into the system and call them. This also allows the calling of any phone number from their vicidial screen and puts that call into their session. Use this option with caution. + +
+
+
+ Vicidial Recording - This option can prevent an agent from doing any recordings after they log in to vicidial. This option must be on for vicidial to follow the campaign recording session. + +
+
+
+ Vicidial Transfers - This option can prevent an agent from opening the transfer - conference session of vicidial. If this is disabled, the agent cannot third party call or blind transfer any calls. + - -
-
-
-VICIDIAL Recording Override - This option will override whatever the option is in the campaign for recording. DISABLED will not override the campaign recording setting. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and recude system load. - -
-
-
-Agent Shift Enforcement Override - This setting will override whatever the users user group has set for Shift Enforcement. DISABLED will use the user group setting. OFF will not enforce shifts at all. START will only enforce the login time but will not affect an agent that is running over their shift time if they are already logged in. ALL will enforce shift start time and will log an agent out after they run over the end of their shift time. Default is DISABLED. - -
-
-
-Alert Enabled - This field shows whether the agent has web browser alerts enabled for when calls come into their vicidial.php session. Default is 0 for NO. - -
-
-
-Allow Alerts - This field gives you the ability to allow agent browser alerts to be enabled by the agent for when calls come into their vicidial.php session. Default is 0 for NO. - -
-
-
-Campaign Ranks - In this section you can define the rank an agent will have for each campaign. These ranks can be used to allow for preferred call routing when Next Agent Call is set to campaign_rank. Also in this section are the WEB VARs for each campaign. These allow each agent to have a different variable string that can be added to the WEB FORM or SCRIPT tab URLs by simply putting --A--web_vars--B-- as you would put any other field. - -
-
-
-Inbound Groups - Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. You will also be able to set the rank, or skill level, in this section for each of the inbound groups as well as being able to see the number of calls received from each inbound group for this specific agent. Also in this section is the ability to give the agent a rank for each inbound group. These ranks can be used for preferred call routing when that option is selected in the in-group screen. Also in this section are the WEB VARs for each campaign. These allow each agent to have a different variable string that can be added to the WEB FORM or SCRIPT tab URLs by simply putting --A--web_vars--B-- as you would put any other field. - -
-
-
-Agent Alter Customer Data Override - This option will override whatever the option is in the campaign for altering of customer data. NOT_ACTIVE will use whatever setting is present for the campaign. ALLOW_ALTER will always allow for the agent to alter the customer data, no matter what the campaign setting is. Default is NOT_ACTIVE. - -
-
-
-Agent Alter Customer Phone Override - This option will override whatever the option is in the campaign for altering of customer phone number. NOT_ACTIVE will use whatever setting is present for the campaign. ALLOW_ALTER will always allow for the agent to alter the customer phone number, no matter what the campaign setting is. Default is NOT_ACTIVE. - -
-
-
-Alter Agent Interface Options - This option if set to 1 allows the administrative user to modify the Agents interface options in admin.php. - -
-
-
-Delete Users - This option if set to 1 allows the user to delete other users of equal or lesser user level from the system. - -
-
-
-Delete User Groups - This option if set to 1 allows the user to delete user groups from the system. - -
-
-
-Delete Lists - This option if set to 1 allows the user to delete vicidial lists from the system. - -
-
-
-Delete Campaigns - This option if set to 1 allows the user to delete vicidial campaigns from the system. - -
-
-
-Delete In-Groups - This option if set to 1 allows the user to delete vicidial In-Groups from the system. - -
-
-
-Delete Remote Agents - This option if set to 1 allows the user to delete vicidial remote agents from the system. - - 0) - { + if ($SSoutbound_autodial_active > 0) + { + ?> +
+
+
+ Closer Default Blended - This option simply defaults the Blended checkbox on a CLOSER login screen. + +
-
+
- Load Leads - This option if set to 1 allows the user to load vicidial leads into the vicidial_list table by way of the web based lead loader. + VICIDIAL Recording Override - This option will override whatever the option is in the campaign for recording. DISABLED will not override the campaign recording setting. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and recude system load. + +
+
+
+ Agent Shift Enforcement Override - This setting will override whatever the users user group has set for Shift Enforcement. DISABLED will use the user group setting. OFF will not enforce shifts at all. START will only enforce the login time but will not affect an agent that is running over their shift time if they are already logged in. ALL will enforce shift start time and will log an agent out after they run over the end of their shift time. Default is DISABLED. + +
+
+
+ Alert Enabled - This field shows whether the agent has web browser alerts enabled for when calls come into their vicidial.php session. Default is 0 for NO. + +
+
+
+ Allow Alerts - This field gives you the ability to allow agent browser alerts to be enabled by the agent for when calls come into their vicidial.php session. Default is 0 for NO. + +
+
+
+ Campaign Ranks - In this section you can define the rank an agent will have for each campaign. These ranks can be used to allow for preferred call routing when Next Agent Call is set to campaign_rank. Also in this section are the WEB VARs for each campaign. These allow each agent to have a different variable string that can be added to the WEB FORM or SCRIPT tab URLs by simply putting --A--web_vars--B-- as you would put any other field. + +
+
+
+ Inbound Groups - Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. You will also be able to set the rank, or skill level, in this section for each of the inbound groups as well as being able to see the number of calls received from each inbound group for this specific agent. Also in this section is the ability to give the agent a rank for each inbound group. These ranks can be used for preferred call routing when that option is selected in the in-group screen. Also in this section are the WEB VARs for each campaign. These allow each agent to have a different variable string that can be added to the WEB FORM or SCRIPT tab URLs by simply putting --A--web_vars--B-- as you would put any other field. + +
+
+
+ Agent Alter Customer Data Override - This option will override whatever the option is in the campaign for altering of customer data. NOT_ACTIVE will use whatever setting is present for the campaign. ALLOW_ALTER will always allow for the agent to alter the customer data, no matter what the campaign setting is. Default is NOT_ACTIVE. + +
+
+
+ Agent Alter Customer Phone Override - This option will override whatever the option is in the campaign for altering of customer phone number. NOT_ACTIVE will use whatever setting is present for the campaign. ALLOW_ALTER will always allow for the agent to alter the customer phone number, no matter what the campaign setting is. Default is NOT_ACTIVE. + +
+
+
+ Alter Agent Interface Options - This option if set to 1 allows the administrative user to modify the Agents interface options in admin.php. + +
+
+
+ Delete Users - This option if set to 1 allows the user to delete other users of equal or lesser user level from the system. + +
+
+
+ Delete User Groups - This option if set to 1 allows the user to delete user groups from the system. + +
+
+
+ Delete Lists - This option if set to 1 allows the user to delete vicidial lists from the system. + +
+
+
+ Delete Campaigns - This option if set to 1 allows the user to delete vicidial campaigns from the system. + +
+
+
+ Delete In-Groups - This option if set to 1 allows the user to delete vicidial In-Groups from the system. + +
+
+
+ Delete Remote Agents - This option if set to 1 allows the user to delete vicidial remote agents from the system. + - -
-
-
-Campaign Detail - This option if set to 1 allows the user to view and modify the campaign detail screen elements. - -
-
-
-AGC Admin Access - This option if set to 1 allows the user to login to the astGUIclient admin pages. - -
-
-
-AGC Delete Phones - This option if set to 1 allows the user to delete phone entries in the astGUIclient admin pages. - -
-
-
-Delete Scripts - This option if set to 1 allows the user to delete Campaign scripts in the script modification screen. - -
-
-
-Modify Leads - This option if set to 1 allows the user to modify leads in the admin section lead search results page. - -
-
-
-Change Agent Campaign - This option if set to 1 allows the user to alter the campaign that an agent is logged into while they are logged into it. - - 0) - { + if ($SSoutbound_autodial_active > 0) + { + ?> +
+
+
+ Load Leads - This option if set to 1 allows the user to load vicidial leads into the vicidial_list table by way of the web based lead loader. + +
-
+
- Delete Filters - This option allows the user to be able to delete vicidial lead filters from the system. + Campaign Detail - This option if set to 1 allows the user to view and modify the campaign detail screen elements. + +
+
+
+ AGC Admin Access - This option if set to 1 allows the user to login to the astGUIclient admin pages. + +
+
+
+ AGC Delete Phones - This option if set to 1 allows the user to delete phone entries in the astGUIclient admin pages. + +
+
+
+ Delete Scripts - This option if set to 1 allows the user to delete Campaign scripts in the script modification screen. + +
+
+
+ Modify Leads - This option if set to 1 allows the user to modify leads in the admin section lead search results page. + +
+
+
+ Change Agent Campaign - This option if set to 1 allows the user to alter the campaign that an agent is logged into while they are logged into it. + - -
-
-
-Delete Call Times - This option allows the user to be able to delete vicidial call times records and vicidial state call times records from the system. - -
-
-
-Modify Call Times - This option allows the user to view and modify the call times and state call times records. A user doesn't need this option enabled if they only need to change the call times option on the campaigns screen. - -
-
-
-Modify Sections - These options allow the user to view and modify each sections records. If set to 0, the user will be able to see the section list, but not the detail or modification screen of a record in that section. - -
-
-
-View Reports - This option allows the user to view the VICIDIAL reports. - - 0) - { + if ($SSoutbound_autodial_active > 0) + { + ?> +
+
+
+ Delete Filters - This option allows the user to be able to delete vicidial lead filters from the system. + -
-
-
- QC Enabled - This option allows the user to log in to the Quality Control agent screen.
-
+
- QC User Level - This setting defines what the agent Quality Control user level is. This will dictate the level of functionality for the agent in the QC section:
- 1 - Modify Nothing
- 2 - Modify Nothing Except Status
- 3 - Modify All Fields
- 4 - Verify First Round of QC
- 5 - View QC Statistics
- 6 - Ability to Modify FINISHed records
- 7 - Manager Level
+ Delete Call Times - This option allows the user to be able to delete vicidial call times records and vicidial state call times records from the system.
-
+
- QC Record Pass - This option allows the agent to specify that a record has passed the first round of QC after reviewing the record. + Modify Call Times - This option allows the user to view and modify the call times and state call times records. A user doesn't need this option enabled if they only need to change the call times option on the campaigns screen.
-
+
- QC Record Finish - This option allows the agent to specify that a record has finished the second round of QC after reviewing the passed record. + Modify Sections - These options allow the user to view and modify each sections records. If set to 0, the user will be able to see the section list, but not the detail or modification screen of a record in that section.
-
+
- QC Record Commit - This option allows the agent to specify that a record has been committed in QC. It can no longer be modified by anyone. + View Reports - This option allows the user to view the VICIDIAL reports. + + if ($SSqc_features_active > 0) + { + ?> +
+
+
+ QC Enabled - This option allows the user to log in to the Quality Control agent screen. -
-
-
-Add Timeclock Log Record - This option allows the user to add records to the timeclock log. +
+
+
+ QC User Level - This setting defines what the agent Quality Control user level is. This will dictate the level of functionality for the agent in the QC section:
+ 1 - Modify Nothing
+ 2 - Modify Nothing Except Status
+ 3 - Modify All Fields
+ 4 - Verify First Round of QC
+ 5 - View QC Statistics
+ 6 - Ability to Modify FINISHed records
+ 7 - Manager Level
-
-
-
-Modify Timeclock Log Record - This option allows the user to modify records in the timeclock log. +
+
+
+ QC Record Pass - This option allows the agent to specify that a record has passed the first round of QC after reviewing the record. -
-
-
-Delete Timeclock Log Record - This option allows the user to delete records in the timeclock log. +
+
+
+ QC Record Finish - This option allows the agent to specify that a record has finished the second round of QC after reviewing the passed record. -
-
-
-Agent API Access - This option allows the account to be used with the vicidial agent API commands. - -
-
-
-Manager Shift Enforcement Override - This setting if set to 1 will allow a manager to enter their user and password on an agent screen to override the shift restrictions on an agent session if the agent is trying to log in outside of their shift. Default is 0. - -
-
-
-Download Lists - This setting if set to 1 will allow a manager to click on the download list link at the bottom of a list modification screen to export the entire contents of a list to a flat data file. Default is 0. - -
-
-
-Export Reports - This setting if set to 1 will allow a manager to access the export call reports on the REPORTS screen. Default is 0. For the Export Calls Report, the following field order is used for exports:
call_date, phone_number, status, user, full_name, campaign_id/in-group, vendor_lead_code, source_id, list_id, gmt_offset_now, 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, length_in_sec, user_group, alt_dial/queue_seconds, rank, owner - -
-
-
-Delete From DNC Lists - This setting if set to 1 will allow a manager to remove phone numbers from the DNC lists in the VICIDIAL system. - - - - - - -



- -VICIDIAL_CAMPAIGNS TABLE

-
-
-Campaign ID - This is the short name of the campaign, it is not editable after initial submission, cannot contain spaces and must be between 2 and 8 characters in length. - -
-
-
-Campaign Name - This is the description of the campaign, it must be between 6 and 40 characters in length. - -
-
-
-Campaign Description - This is a memo field for the campaign, it is optional and can be a maximum of 255 characters in length. - -
-
-
-Campaign Change Date - This is the last time that the settings for this campaign were modified in any way. - -
-
-
-Last Campaign Login Date - This is the last time that an agent was logged into this campaign. - -
-
-
-Campaign Stats Refresh - This checkbox will allow you to force a vicidial stats refresh, even if the campaign is not active. - -
-
-
-Active - This is where you set the campaign to Active or Inactive. If Inactive, noone can log into it. - -
-
-
-Park Extension - This is where you can customize the on-hold music for VICIDIAL. Make sure the extension is in place in the extensions.conf and that it points to the filename below. - -
-
-
-Park File Name - This is where you can customize the on-hold music for VICIDIAL. Make sure the filename is 10 characters in length or less and that the file is in place in the /var/lib/asterisk/sounds directory. - -
-
-
-Web Form - This is where you can set the custom web page that will be opened when the user clicks on the WEB FORM button. To customize the query string after the web form, simply begin the web form with VAR and then the URL that you want to use, replacing the variables with the variable names that you want to use --A--phone_number--B-- just like in the SCRIPTS tab section. - -
-
-
-Web Form Target- This is where you can set the custom web page frame that the web form will be opened in when the user clicks on the WEB FORM button. Default is _blank. - -
-
-
-Allow Closers - This is where you can set whether the users of this campaign will have the option to send the call to a closer. - -
-
-
-Default Transfer Group - This field is the default In-Group that will be automatically selected when the agent goes to the transfer-conference frame in their agent interface. - -
-
-
-Allowed Transfer Groups - With these checkbox listings you can select the groups that agents in this campaign can transfer calls to. Allow Closers must be enabled for this option to show up. - - 0) - { +
+
+
+ QC Record Commit - This option allows the agent to specify that a record has been committed in QC. It can no longer be modified by anyone. + -
-
-
- Allow Inbound and Blended - This is where you can set whether the users of this campaign will have the option to take inbound calls with this campaign. If you want to do blended inbound and outbound then this must be set to Y. If you only want to do outbound dialing on this campaign set this to N. Default is N.
-
+
- Dial Status - This is where you set the statuses that you are wanting to dial on within the lists that are active for the campaign below. To add another status to dial, select it from the drop-down list and click ADD. To remove one of the dial statuses, click on the REMOVE link next to the status you want to remove. + Add Timeclock Log Record - This option allows the user to add records to the timeclock log.
-
+
- List Order - This menu is where you select how the leads that match the statuses selected above will be put in the lead hopper: -
  - DOWN: select the first leads loaded into the vicidial_list table -
  - UP: select the last leads loaded into the vicidial_list table -
  - UP PHONE: select the highest phone number and works its way down -
  - DOWN PHONE: select the lowest phone number and works its way up -
  - UP LAST NAME: starts with last names starting with Z and works its way down -
  - DOWN LAST NAME: starts with last names starting with A and works its way up -
  - UP COUNT: starts with most called leads and works its way down -
  - DOWN COUNT: starts with least called leads and works its way up -
  - DOWN COUNT 2nd NEW: starts with least called leads and works its way up inserting a NEW lead in every other lead - Must NOT have NEW selected in the dial statuses -
  - DOWN COUNT 3nd NEW: starts with least called leads and works its way up inserting a NEW lead in every third lead - Must NOT have NEW selected in the dial statuses -
  - DOWN COUNT 4th NEW: starts with least called leads and works its way up inserting a NEW lead in every forth lead - Must NOT have NEW selected in the dial statuses -
  - RANDOM: Randomly grabs lead within the statuses and lists defined -
  - UP LAST CALL TIME: Sorts by the newest local call time for the leads -
  - DOWN LAST CALL TIME: Sorts by the oldest local call time for the leads -
  - UP RANK: Starts with the highest rank and works its way down -
  - DOWN RANK: Starts with the lowest rank and works its way up -
  - UP OWNER: Starts with owners beginning with Z and works its way down -
  - DOWN OWNER: Starts with owners beginning with A and works its way up -
  - UP TIMEZONE: Starts with Eastern timezones and works West -
  - DOWN TIMEZONE: Starts with Western timezones and works East + Modify Timeclock Log Record - This option allows the user to modify records in the timeclock log.
-
+
- Hopper Level - This is how many leads the VDhopper script tries to keep in the vicidial_hopper table for this campaign. If running VDhopper script every minute, make this slightly greater than the number of leads you go through in a minute. + Delete Timeclock Log Record - This option allows the user to delete records in the timeclock log.
-
+
- Lead Filter - This is a method of filtering your leads using a fragment of a SQL query. Use this feature with caution, it is easy to stop dialing accidentally with the slightest alteration to the SQL statement. Default is NONE. + Agent API Access - This option allows the account to be used with the vicidial agent API commands.
-
+
- Drop Lockout Time - This is a number of hours that DROP abandon calls will be prevented from being dialed, to disable set to 0. This setting is very useful in countries like the UK where there are regulations preventing the attempted calling of customers within 72 hours of an Abandon, or DROP. Default is 0. + Manager Shift Enforcement Override - This setting if set to 1 will allow a manager to enter their user and password on an agent screen to override the shift restrictions on an agent session if the agent is trying to log in outside of their shift. Default is 0.
-
+
- Force Reset of Hopper - This allows you to wipe out the hopper contents upon form submission. It should be filled again when the VDhopper script runs. + Download Lists - This setting if set to 1 will allow a manager to click on the download list link at the bottom of a list modification screen to export the entire contents of a list to a flat data file. Default is 0.
-
+
- Dial Method - This field is the way to define how dialing is to take place. If MANUAL then the auto_dial_level will be locked at 0 unless Dial Method is changed. If RATIO then the normal dialing a number of lines for Active agents. ADAPT_HARD_LIMIT will dial predictively up to the dropped percentage and then not allow aggressive dialing once the drop limit is reached until the percentage goes down again. ADAPT_TAPERED allows for running over the dropped percentage in the first half of the shift -as defined by call_time selected for campaign- and gets more strict as the shift goes on. ADAPT_AVERAGE tries to maintain an average or the dropped percentage not imposing hard limits as aggressively as the other two methods. You cannot change the Auto Dial Level if you are in any of the ADAPT dial methods. Only the Dialer can change the dial level when in predictive dialing mode. INBOUND_MAN allows the agent to place manual dial calls from a campaign list while being able to take inbound calls between manual dial calls. + Export Reports - This setting if set to 1 will allow a manager to access the export call reports on the REPORTS screen. Default is 0. For the Export Calls Report, the following field order is used for exports:
call_date, phone_number, status, user, full_name, campaign_id/in-group, vendor_lead_code, source_id, list_id, gmt_offset_now, 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, length_in_sec, user_group, alt_dial/queue_seconds, rank, owner
-
+
- Auto Dial Level - This is where you set how many lines VICIDIAL should use per active agent. zero 0 means auto dialing is off and the agents will click to dial each number. Otherwise VICIDIAL will keep dialing lines equal to active agents multiplied by the dial level to arrive at how many lines this campaign on each server should allow. The ADAPT OVERRIDE checkbox allows you to force a new dial level even though the dial method is in an ADAPT mode. This is useful if there is a dramatic shift in the quality of leads and you want to drastically change the dial_level manually. + Delete From DNC Lists - This setting if set to 1 will allow a manager to remove phone numbers from the DNC lists in the VICIDIAL system. + + + + + + +



+ + VICIDIAL_CAMPAIGNS TABLE

+
+
+ Campaign ID - This is the short name of the campaign, it is not editable after initial submission, cannot contain spaces and must be between 2 and 8 characters in length.
-
+
- Available Only Tally - This field if set to Y will leave out INCALL and QUEUE status agents when calculating the number of calls to dial when not in MANUAL dial mode. Default is N. + Campaign Name - This is the description of the campaign, it must be between 6 and 40 characters in length.
-
+
- Drop Percentage Limit - This field is where you set the limit of the percentage of dropped calls you would like while using an adaptive-predictive dial method, not MANUAL or RATIO. + Campaign Description - This is a memo field for the campaign, it is optional and can be a maximum of 255 characters in length.
-
+
- Maximum Adapt Dial Level - This field is where you set the limit of the limit to the numbr of lines you would like dialed per agent while using an adaptive-predictive dial method, not MANUAL or RATIO. This number can be higher than the Auto Dial Level if your hardware will support it. Value must be a positive number greater than one and can have decimal places Default 3.0. + Campaign Change Date - This is the last time that the settings for this campaign were modified in any way.
-
+
- Latest Server Time - This field is only used by the ADAPT_TAPERED dial method. You should enter in the hour and minute that you will stop calling on this campaign, 2100 would mean that you will stop dialing this campaign at 9PM server time. This allows the Tapered algorithm to decide how aggressively to dial by how long you have until you will be finished calling. + Last Campaign Login Date - This is the last time that an agent was logged into this campaign.
-
+
- Adapt Intensity Modifier - This field is used to adjust the predictive intensity either higher or lower. The higher a positive number you select, the greater the dialer will increase the call pacing when it goes up and the slower the dialer will decrease the call pacing when it goes down. The lower the negative number you select here, the slower the dialer will increase the call pacing and the faster the dialer will lower the call pacing when it goes down. Default is 0. This field is not used by the MANUAL or RATIO dial methods. + Campaign Stats Refresh - This checkbox will allow you to force a vicidial stats refresh, even if the campaign is not active.
-
+
- Dial Level Difference Target - This field is used to define whether you want to target having a specific number of agents waiting for calls or calls waiting for agents. For example if you would always like to have on average one agent free to take calls immediately you would set this to -1, if you would like to target always having one call on hold waiting for an agent you would set this to 1. Default is 0. This field is not used by the MANUAL or RATIO dial methods. + Active - This is where you set the campaign to Active or Inactive. If Inactive, noone can log into it.
-
+
- Concurrent Transfers - This setting is used to define the number of calls that can be sent to agents at the same time. It is recommended that this setting is left at AUTO. This field is not used by the MANUAL dial method. + Park Extension - This is where you can customize the on-hold music for VICIDIAL. Make sure the extension is in place in the extensions.conf and that it points to the filename below.
-
+
- Queue Priority - This setting is used to define the order in which the calls from this outbound campaign should be answered in relation to the inbound calls if this campaign is in blended mode. + Park File Name - This is where you can customize the on-hold music for VICIDIAL. Make sure the filename is 10 characters in length or less and that the file is in place in the /var/lib/asterisk/sounds directory.
-
+
- Multiple Campaign Drop Rate Group - This feature allows you to set a campaign as a member of a Campaign Drop Rate Group, or a group of campaigns whose Human Answered calls and Drop calls for all campaigns in the group will be combined into a shared drop percentage, or abandon rate. This allows you to to run multiple campaigns at once and more easily control your drop rate. This is particularly useful in the UK where regulations permit this drop rate calculation method with campaign grouping for the same company even if there are several campaigns that company is running during the same day. To enable this for a campaign, just select a group from the list. There are 10 groups defined in the system by default, you can contact your system administrator to add more. Default is DISABLED. + Web Form - This is where you can set the custom web page that will be opened when the user clicks on the WEB FORM button. To customize the query string after the web form, simply begin the web form with VAR and then the URL that you want to use, replacing the variables with the variable names that you want to use --A--phone_number--B-- just like in the SCRIPTS tab section.
-
+
- Auto Alt-Number Dialing - This setting is used to automatically dial alternate number fields while dialing in the RATIO and ADAPT dial methods when there is no contact at the main phone number for a lead, the NA, B, DC and N statuses. This setting is not used by the MANUAL dial method. EXTENDED alternate numbers are numbers loaded into the system outside of the standard lead information screen. Using EXTENDED you can have hundreds of phone numbers for a single customer record. + Web Form Target- This is where you can set the custom web page frame that the web form will be opened in when the user clicks on the WEB FORM button. Default is _blank.
-
+
- Dial Timeout - If defined, calls that would normally hang up after the timeout defined in extensions.conf would instead timeout at this amount of seconds if it is less than the extensions.conf timeout. This allows for quickly changing dial timeouts from server to server and limiting the effects to a single campaign. If you are having a lot of Answering Machine or Voicemail calls you may want to try changing this value to between 21-26 and see if results improve. + Allow Closers - This is where you can set whether the users of this campaign will have the option to send the call to a closer.
-
+
- Campaign VDAD extension - This field allows for a custom VDAD transfer extension. This allows you to use different call handling methods depending upon your campaign. - - 8364 - same as 8368 - - 8365 - Will send the call only to an agent on the same server as the call is on - - 8366 - Used for press-1 and survey campaigns - - 8367 - Will try to first send the call to an agent on the local server, then it will look on other servers - - 8368 - DEFAULT – Will send the call to the next available agent no matter what server they are on - - 8369 - Used for Answering Machine Detection after that, same behavior as 8368 - - 8373 - Used for Answering Machine Detection after that same behavior as 8366 + Default Transfer Group - This field is the default In-Group that will be automatically selected when the agent goes to the transfer-conference frame in their agent interface.
-
+
- Answering Machine Message - This field is for entering the prompt to play when the agent gets an answering machine and clicks on the Answering Machine Message button in the transfer conference frame. You must set this to either an audio file in the audio store or a TTS prompt if TTS is enabled on your system. + Allowed Transfer Groups - With these checkbox listings you can select the groups that agents in this campaign can transfer calls to. Allow Closers must be enabled for this option to show up. + + 0) + { + ?> +
+
+
+ Allow Inbound and Blended - This is where you can set whether the users of this campaign will have the option to take inbound calls with this campaign. If you want to do blended inbound and outbound then this must be set to Y. If you only want to do outbound dialing on this campaign set this to N. Default is N. + +
+
+
+ Dial Status - This is where you set the statuses that you are wanting to dial on within the lists that are active for the campaign below. To add another status to dial, select it from the drop-down list and click ADD. To remove one of the dial statuses, click on the REMOVE link next to the status you want to remove. + +
+
+
+ List Order - This menu is where you select how the leads that match the statuses selected above will be put in the lead hopper: +
  - DOWN: select the first leads loaded into the vicidial_list table +
  - UP: select the last leads loaded into the vicidial_list table +
  - UP PHONE: select the highest phone number and works its way down +
  - DOWN PHONE: select the lowest phone number and works its way up +
  - UP LAST NAME: starts with last names starting with Z and works its way down +
  - DOWN LAST NAME: starts with last names starting with A and works its way up +
  - UP COUNT: starts with most called leads and works its way down +
  - DOWN COUNT: starts with least called leads and works its way up +
  - DOWN COUNT 2nd NEW: starts with least called leads and works its way up inserting a NEW lead in every other lead - Must NOT have NEW selected in the dial statuses +
  - DOWN COUNT 3nd NEW: starts with least called leads and works its way up inserting a NEW lead in every third lead - Must NOT have NEW selected in the dial statuses +
  - DOWN COUNT 4th NEW: starts with least called leads and works its way up inserting a NEW lead in every forth lead - Must NOT have NEW selected in the dial statuses +
  - RANDOM: Randomly grabs lead within the statuses and lists defined +
  - UP LAST CALL TIME: Sorts by the newest local call time for the leads +
  - DOWN LAST CALL TIME: Sorts by the oldest local call time for the leads +
  - UP RANK: Starts with the highest rank and works its way down +
  - DOWN RANK: Starts with the lowest rank and works its way up +
  - UP OWNER: Starts with owners beginning with Z and works its way down +
  - DOWN OWNER: Starts with owners beginning with A and works its way up +
  - UP TIMEZONE: Starts with Eastern timezones and works West +
  - DOWN TIMEZONE: Starts with Western timezones and works East + +
+
+
+ Hopper Level - This is how many leads the VDhopper script tries to keep in the vicidial_hopper table for this campaign. If running VDhopper script every minute, make this slightly greater than the number of leads you go through in a minute. + +
+
+
+ Lead Filter - This is a method of filtering your leads using a fragment of a SQL query. Use this feature with caution, it is easy to stop dialing accidentally with the slightest alteration to the SQL statement. Default is NONE. + +
+
+
+ Drop Lockout Time - This is a number of hours that DROP abandon calls will be prevented from being dialed, to disable set to 0. This setting is very useful in countries like the UK where there are regulations preventing the attempted calling of customers within 72 hours of an Abandon, or DROP. Default is 0. + +
+
+
+ Force Reset of Hopper - This allows you to wipe out the hopper contents upon form submission. It should be filled again when the VDhopper script runs. + +
+
+
+ Dial Method - This field is the way to define how dialing is to take place. If MANUAL then the auto_dial_level will be locked at 0 unless Dial Method is changed. If RATIO then the normal dialing a number of lines for Active agents. ADAPT_HARD_LIMIT will dial predictively up to the dropped percentage and then not allow aggressive dialing once the drop limit is reached until the percentage goes down again. ADAPT_TAPERED allows for running over the dropped percentage in the first half of the shift -as defined by call_time selected for campaign- and gets more strict as the shift goes on. ADAPT_AVERAGE tries to maintain an average or the dropped percentage not imposing hard limits as aggressively as the other two methods. You cannot change the Auto Dial Level if you are in any of the ADAPT dial methods. Only the Dialer can change the dial level when in predictive dialing mode. INBOUND_MAN allows the agent to place manual dial calls from a campaign list while being able to take inbound calls between manual dial calls. + +
+
+
+ Auto Dial Level - This is where you set how many lines VICIDIAL should use per active agent. zero 0 means auto dialing is off and the agents will click to dial each number. Otherwise VICIDIAL will keep dialing lines equal to active agents multiplied by the dial level to arrive at how many lines this campaign on each server should allow. The ADAPT OVERRIDE checkbox allows you to force a new dial level even though the dial method is in an ADAPT mode. This is useful if there is a dramatic shift in the quality of leads and you want to drastically change the dial_level manually. + +
+
+
+ Available Only Tally - This field if set to Y will leave out INCALL and QUEUE status agents when calculating the number of calls to dial when not in MANUAL dial mode. Default is N. + +
+
+
+ Drop Percentage Limit - This field is where you set the limit of the percentage of dropped calls you would like while using an adaptive-predictive dial method, not MANUAL or RATIO. + +
+
+
+ Maximum Adapt Dial Level - This field is where you set the limit of the limit to the numbr of lines you would like dialed per agent while using an adaptive-predictive dial method, not MANUAL or RATIO. This number can be higher than the Auto Dial Level if your hardware will support it. Value must be a positive number greater than one and can have decimal places Default 3.0. + +
+
+
+ Latest Server Time - This field is only used by the ADAPT_TAPERED dial method. You should enter in the hour and minute that you will stop calling on this campaign, 2100 would mean that you will stop dialing this campaign at 9PM server time. This allows the Tapered algorithm to decide how aggressively to dial by how long you have until you will be finished calling. + +
+
+
+ Adapt Intensity Modifier - This field is used to adjust the predictive intensity either higher or lower. The higher a positive number you select, the greater the dialer will increase the call pacing when it goes up and the slower the dialer will decrease the call pacing when it goes down. The lower the negative number you select here, the slower the dialer will increase the call pacing and the faster the dialer will lower the call pacing when it goes down. Default is 0. This field is not used by the MANUAL or RATIO dial methods. + +
+
+
+ Dial Level Difference Target - This field is used to define whether you want to target having a specific number of agents waiting for calls or calls waiting for agents. For example if you would always like to have on average one agent free to take calls immediately you would set this to -1, if you would like to target always having one call on hold waiting for an agent you would set this to 1. Default is 0. This field is not used by the MANUAL or RATIO dial methods. + +
+
+
+ Concurrent Transfers - This setting is used to define the number of calls that can be sent to agents at the same time. It is recommended that this setting is left at AUTO. This field is not used by the MANUAL dial method. + +
+
+
+ Queue Priority - This setting is used to define the order in which the calls from this outbound campaign should be answered in relation to the inbound calls if this campaign is in blended mode. + +
+
+
+ Multiple Campaign Drop Rate Group - This feature allows you to set a campaign as a member of a Campaign Drop Rate Group, or a group of campaigns whose Human Answered calls and Drop calls for all campaigns in the group will be combined into a shared drop percentage, or abandon rate. This allows you to to run multiple campaigns at once and more easily control your drop rate. This is particularly useful in the UK where regulations permit this drop rate calculation method with campaign grouping for the same company even if there are several campaigns that company is running during the same day. To enable this for a campaign, just select a group from the list. There are 10 groups defined in the system by default, you can contact your system administrator to add more. Default is DISABLED. + +
+
+
+ Auto Alt-Number Dialing - This setting is used to automatically dial alternate number fields while dialing in the RATIO and ADAPT dial methods when there is no contact at the main phone number for a lead, the NA, B, DC and N statuses. This setting is not used by the MANUAL dial method. EXTENDED alternate numbers are numbers loaded into the system outside of the standard lead information screen. Using EXTENDED you can have hundreds of phone numbers for a single customer record. + +
+
+
+ Dial Timeout - If defined, calls that would normally hang up after the timeout defined in extensions.conf would instead timeout at this amount of seconds if it is less than the extensions.conf timeout. This allows for quickly changing dial timeouts from server to server and limiting the effects to a single campaign. If you are having a lot of Answering Machine or Voicemail calls you may want to try changing this value to between 21-26 and see if results improve. + +
+
+
+ Campaign VDAD extension - This field allows for a custom VDAD transfer extension. This allows you to use different call handling methods depending upon your campaign. + - 8364 - same as 8368 + - 8365 - Will send the call only to an agent on the same server as the call is on + - 8366 - Used for press-1 and survey campaigns + - 8367 - Will try to first send the call to an agent on the local server, then it will look on other servers + - 8368 - DEFAULT – Will send the call to the next available agent no matter what server they are on + - 8369 - Used for Answering Machine Detection after that, same behavior as 8368 + - 8373 - Used for Answering Machine Detection after that same behavior as 8366 + +
+
+
+ Answering Machine Message - This field is for entering the prompt to play when the agent gets an answering machine and clicks on the Answering Machine Message button in the transfer conference frame. You must set this to either an audio file in the audio store or a TTS prompt if TTS is enabled on your system. + +
+
+
+ WaitForSilence Options - If Wait For Silence is desired on calls that are detected as Answering Machines then this field has those options. There are two settings separated by a comma, the first option is how long to detect silence in milliseconds and the second option is for how many times to detect that before playing the message. Default is EMPTY for disabled. A standard value for this would be wait for 2 seconds of silence twice: 2000,2 + +
+
+
+ AMD send to vm exten - This menu allows you to define whether a message is left on an answering machine when it is detected. the call will be immediately forwarded to the Answering-Machine-Message extension if AMD is active and it is determined that the call is an answering machine. + +
+
+
+ CPD AMD Action - If you are using the Sangoma ParaXip Call Progress Detection software then you will want to enable this setting either setting it to DISPO which will disposition the call as AA and hang it up if the call is being processed and has not been sent to an agent yet or MESSAGE which will send the call to the defined Answering Machine Message for this campaign. Default is DISABLED. + +
+
+
+ Agent Alt Num Dialing - This option allows an agent to manually dial the alternate phone number or address3 field after the main number has been called. + +
+
+
+ Drop Call Seconds - The number of seconds from the time the customer line is picked up until the call is considered a DROP, only applies to outbound calls. + +
+
+
+ Drop Action - This menu allows you to choose what happens to a call when it has been waiting for longer than what is set in the Drop Call Seconds field. HANGUP will simply hang up the call, MESSAGE will send the call the Drop Exten that you have defined below, VOICEMAIL will send the call to the voicemail box that you have defined below and IN_GROUP will send the call to the Inbound Group that is defined below + +
+
+
+ Safe Harbor Exten - This is the dial plan extension that the desired Safe Harbor audio file is located at on your server. + +
+
+
+ Voicemail - If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message. + +
+
+
+ Drop Transfer Group - If Drop Action is set to IN_GROUP, the call will be sent to this inbound group if it reaches Drop Call Seconds. + +
+
+
+ Allow No-Hopper-Leads Logins - If set to Y, allows agents to login to the campaign even if there are no leads loaded into the hopper for that campaign. This function is not needed in CLOSER-type campaigns. Default is N. + +
+
+
+ No Hopper Dialing - If This is enabled, the hopper will not run for this campaign. This option is only available when the dial method is set to MANUAL or INBOUND_MAN. It is recommended that you do not enable this option if you have a very large lead database, over 100,000 leads. With No Hopper Dialing, the following features do not work: lead recycling, auto-alt-dialing, list mix, list ordering with Xth NEW. If you want to use Owner Only Dialing you must have No Hopper Dialing enabled. Default is N for disabled. + +
+
+
+ Owner Only Dialing - If This is enabled, the agent will only receive leads that they are within the ownership parameters for. If this is set to USER then the agent must be the user defined in the database as the owner of this lead. If this is set to TERRITORY then the owner of the lead must match the territory listed in the User Modification screen for this agent. If this is set to USER_GROUP then the owner of the lead must match the user group that the agent is a member of. For this feature to work the dial method must be set to MANUAL or INBOUND_MAN and No Hopper Dialing must be enabled. Default is NONE for disabled. + +
+
+
+ List Order Mix - Overrides the Lead Order and Dial Status fields. Will use the List and status parameters for the selected List Mix entry in the List Mix sub section instead. Default is DISABLED. + +
+
+
+ List Mix ID - ID of the list mix. Must be from 2-20 characters in length with no spaces or other special punctuation. + +
+
+
+ List Mix Name - Descriptive name of the list mix. Must be from 2-50 characters in length. + +
+
+
+ List Mix Detail - The composition of the List Mix entry. Contains the List ID, mix order, percentages and statuses that make up this List Mix. The percentages always have to add up to 100, and the lists all have to be active and set to the campaign for the order mix entry to be Activated. + +
+
+
+ List Mix Method - The method of mixing all of the parts of the List Mix Detail together. EVEN_MIX will mix leads from each part interleaved with the other parts, like this 1,2,3,1,2,3,1,2,3. IN_ORDER will put the leads in the order in which they are listed in the List Mix Detail screen 1,1,1,2,2,2,3,3,3. RANDOM will put them in RANDOM order 1,3,2,1,1,3,2,1,3. Default is IN_ORDER. + +
+
+
+ Agent Screen Extended Alt Dial - This feature allows for agents to access extended alternate phone numbers for leads beyond the standard Alt Phone and Address3 fields that can be used in VICIDIAL for phone numbers beyond the main phone number. The Extended phone numbers can be dialed automatically using the Auto-Alt-Dial feature in VICIDIAL Campaign settings, but enabling this Agent Screen feature will also allow for the agent to call these numbers from their agent screen as well as edit their information. + +
+
+
+ Survey First Audio File - This is the audio filename that is played as soon as the customer picks up the phone when running a survey campaign. + +
+
+
+ Survey DTMF Digits - This field is where you define the digits that a customer can press as an option on a survey campaign. valid dtmf digits are 0123456789*#. All options except for the Not Interested, Third and Fourth digit options will move on to the Survey Method call path. + +
+
+
+ Survey Not Interested Digit - This field is where you define the customer digit pressed that will show they are Not Interested. + +
+
+
+ Survey Not Interested Status - This field is where you select the status to be used for Not Interested. If DNC is used and the campaign is set to use DNC then the phone number will be automatically added to the VICIDIAL internal DNC list and possibly the campaign-specific DNC list. + +
+
+
+ Survey Opt-in Audio File - This is the audio filename that is played when the customer has opted-in to the survey, not opted-out or not responded if the no-response-action is set to OPTOUT. After this audio file is played, the Survey Method action is taken. + +
+
+
+ Survey Not Interested Audio File - This is the audio filename that is played when the customer has opted-out of the survey, not opted-in or not responded if the no-response-action is set to OPTIN. After this audio file is played, the call will be hung up. + +
+
+
+ Survey Method - This option defines what happens to a call after the customer has opted-in. AGENT_XFER will send the call to the next available agent. VOICEMAIL will send the call to the voicemail box that is specified in the Voicemail field. EXTENSION will send the customer to the extension defined in the Survey Xfer Extension field. HANGUP will hang up the customer. CAMPREC_60_WAV will send the customer to have a recording made with their response, this recording will be placed in a folder named as the campaign inside of the Survey Campaign Recording Directory. + +
+
+
+ Survey No-Response Action - This is where you define what will happen if there is no response to the survey question. OPTIN will only send the call on to the Survey Method if the customer presses a dtmf digit. OPTOUT will send the customer on to the Survey Method even if they do not press a dtmf digit. + +
+
+
+ Survey Response Digit Map - This is the section where you can define a description to go with each dtmf digit option that the customer may select. + +
+
+
+ Survey Xfer Extension - If the Survey Method of EXTENSION is selected then the customer call would be directed to this dialplan extension. + +
+
+
+ Survey Campaign Recording Directory - If the Survey Method of CAMPREC_60_WAV is selected then the customer response will be recorded and placed in a directory named after the campaign inside of this directory. + +
+
+
+ Survey Third Digit - This allows for a third call path if the Third digit as defined in this field is pressed by the customer. + +
+
+
+ Survey Fourth Digit - This allows for a fourth call path if the Fourth digit as defined in this field is pressed by the customer. + +
+
+
+ Survey Third Audio File - This is the third audio file to be played upon the selection by the customer of the Third Digit option. + +
+
+
+ Survey Third Status - This is the third status used for the call upon the selection by the customer of the Third Digit option. + +
+
+
+ Survey Third Extension - This is the third extension used for the call upon the selection by the customer of the Third Digit option. Default is 8300 which immediately hangs up the call after the Audio File message is played. + +
+
+
+ Agent Display Dialable Leads - This option if enabled will show the number of dialable leads available in the campaign in the agent screen. This number is updated in the system once a minute and will be refreshed on the agent screen every few seconds. + +
-
+
- WaitForSilence Options - If Wait For Silence is desired on calls that are detected as Answering Machines then this field has those options. There are two settings separated by a comma, the first option is how long to detect silence in milliseconds and the second option is for how many times to detect that before playing the message. Default is EMPTY for disabled. A standard value for this would be wait for 2 seconds of silence twice: 2000,2 + Next Agent Call - This determines which agent receives the next call that is available: +
  - random: orders by the random update value in the vicidial_live_agents table +
  - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. +
  - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. +
  - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls. +
  - campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest. +
  - fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first. +
  - longest_wait_time: orders by the amount of time agent has been actively waiting for a call.
-
+
- AMD send to vm exten - This menu allows you to define whether a message is left on an answering machine when it is detected. the call will be immediately forwarded to the Answering-Machine-Message extension if AMD is active and it is determined that the call is an answering machine. + Local Call Time - This is where you set during which hours you would like to dial, as determined by the local time in the are in which you are calling. This is controlled by area code and is adjusted for Daylight Savings time if applicable. General Guidelines in the USA for Business to Business is 9am to 5pm and Business to Consumer calls is 9am to 9pm.
-
+
- CPD AMD Action - If you are using the Sangoma ParaXip Call Progress Detection software then you will want to enable this setting either setting it to DISPO which will disposition the call as AA and hang it up if the call is being processed and has not been sent to an agent yet or MESSAGE which will send the call to the defined Answering Machine Message for this campaign. Default is DISABLED. + Dial Prefix - This field allows for more easily changing a path of dialing to go out through a different method without doing a reload in Asterisk. Default is 9 based upon a 91NXXNXXXXXX in the dial plan - extensions.conf.
-
+
- Agent Alt Num Dialing - This option allows an agent to manually dial the alternate phone number or address3 field after the main number has been called. + Omit Phone Code - This field allows you to leave out the phone_code field while dialing within VICIDIAL. For instance if you are dialing in the UK from the UK you would have 44 in as your phone_code field for all leads, but you just want to dial 10 digits in your dial plan extensions.conf to place calls instead of 44 then 10 digits. Default is N.
-
+
- Drop Call Seconds - The number of seconds from the time the customer line is picked up until the call is considered a DROP, only applies to outbound calls. + Campaign CallerID - This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service -RBS- circuits. This will also work through most VOIP -SIP or IAX trunks- providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the VICIDIAL campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID.
-
+
- Drop Action - This menu allows you to choose what happens to a call when it has been waiting for longer than what is set in the Drop Call Seconds field. HANGUP will simply hang up the call, MESSAGE will send the call the Drop Exten that you have defined below, VOICEMAIL will send the call to the voicemail box that you have defined below and IN_GROUP will send the call to the Inbound Group that is defined below + Campaign Rec extension - This field allows for a custom recording extension to be used with VICIDIAL. This allows you to use different extensions depending upon how long you want to allow a maximum recording and what type of codec you want to record in. The default exten is 8309 which if you follow the SCRATCH_INSTALL examples will record in the WAV format for upto one hour. Another option included in the examples is 8310 which will record in GSM format for upto one hour.
-
+
- Safe Harbor Exten - This is the dial plan extension that the desired Safe Harbor audio file is located at on your server. + Campaign Recording - This menu allows you to choose what level of recording is allowed on this campaign. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and recude system load.
-
+
- Voicemail - If defined, calls that would normally DROP would instead be directed to this voicemail box to hear and leave a message. + Campaign Rec Filename - This field allows you to customize the name of the recording when Campaign recording is ONDEMAND or ALLCALLS. The allowed variables are CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this TESTCAMP_51020103108_3125551212. 50 char max.
-
+ +
+ Recording Delay - For ALLCALLS and ALLFORCE recording only. This setting will delay the starting of the recording on all calls for the number of seconds specified in this field. Default is 0. + +
+
+
+ Campaign Script - This menu allows you to choose the script that will appear on the agents screen for this campaign. Select NONE to show no script for this campaign. + +
+
+
+ Get Call Launch - This menu allows you to choose whether you want to auto-launch the web-form page in a separate window, auto-switch to the SCRIPT tab or do nothing when a call is sent to the agent for this campaign. + +
+
+
+ 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. + +
+
+
+ Quick Transfer Button - This option will add a Quick Transfer button to the agent screen below the Transfer-Conf button that will allow one click blind transferring of calls to the selected In-Group or number. IN_GROUP will send calls to the Default Xfer Group for this Campaign, or In-Group if there was an inbound call. The PRESET options will send the calls to the preset selected. Default is N for disabled. + +
+
+
+ PrePopulate Transfer Preset - This option will fill in the Number to Dial field in the Transfer Conference frame of the agent screen if defined. Default is N for disabled. + +
+
+
+ Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the data and time at which the lead will be re-activated. + +
+
+
+ Wrap Up Seconds - The number of seconds to force an agent to wait before allowing them to receive or dial another call. The timer begins as soon as an agent hangs up on their customer - or in the case of alternate number dialing when the agent finishes the lead - Default is 0 seconds. If the timer runs out before the agent has dispositioned the call, the agent still will NOT move on to the next call until they select a disposition. + +
+
+
+ Wrap Up Message - This is a campaign-specific message to be displayed on the wrap up screen if wrap up seconds is set. + +
+
+
+ Use Internal DNC List - This defines whether this campaign is to filter leads against the Internal DNC list. If it is set to Y, the hopper will look for each phone number in the DNC list before placing it in the hopper. If it is in the DNC list then it will change that lead status to DNCL so it cannot be dialed. Default is N. + +
+
+
+ Use Campaign DNC List - This defines whether this campaign is to filter leads against a DNC list that is specific to that campaign only. If it is set to Y, the hopper will look for each phone number in the campaign-specific DNC list before placing it in the hopper. If it is in the campaign-specific DNC list then it will change that lead status to DNCC so it cannot be dialed. Default is N. + +
+
+
+ Allowed Inbound Groups - For CLOSER campaigns only. Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound-outbound campaigns only to select the inbound groups that are used for agents in this campaign. The calls coming into the inbound groups selected here will be counted as active calls for a blended campaign even if all agents in the campaign are not logged in to receive calls from all of those selected inbound groups. + +
+
+
+ Agent Pause Codes Active - Allows agents to select a pause code when they click on the PAUSE button in vicidial.php. Pause codes are definable per campaign at the bottom of the campaign view detail screen and they are stored in the vicidial_agent_log table. Default is N. FORCE will force the agents to choose a PAUSE code if they click on the PAUSE button. + +
+
+
+ Disable Alter Customer Data - If set to Y, does not change any of the customer data record when an agent dispositions the call. Default is N. + +
+
+
+ Disable Alter Customer Phone - If set to Y, does not change the customer phone number when an agent dispositions the call. Default is Y. Use the HIDE option to completely remove the customer phone number from the agent display. + +
+
+
+ Agent Display Queue Count - If set to Y, when a customer is waiting for an agent, the Queue Calls display at the top of the agent screen will turn red and show the number of waiting calls. Default is Y. + +
+
+
+ Manual Dial List ID - The default list_id to be used when an agent placces a manual call and a new lead record is created in vicidial_list. Default is 999. This field can contain digits only. + +
+
+
+ Manual Dial Filter - This allows you to filter the calls that agents make in manual dial mode for this campaign by any combination of the following: DNC - to kick out, CAMPAIGNLISTS - the number must be within the lists for the campaign, NONE - no filter on manual dial or fast dial lists. + +
+
+
+ Agent Screen Clipboard Copy - THIS FEATURE IS CURRENTLY ONLY ENABLED FOR INTERNET EXPLORER. This feature allows you to select a field that will be copied to the computer clipboard of the agent computer upon a call being sent to an agent. Common uses for this are to allow for easy pasting of account numbers or phone numbers into legacy client applications on the agent computer. + +
+
+
+ 3-Way Call Outbound CallerID - This defines what is sent out as the outbound callerID number from 3-way calls placed by the agent, CAMPAIGN uses the custom campaign callerID, CUSTOMER uses the number of the customer that is active on the agents screen and AGENT_PHONE uses the callerID for the phone that the agent is logged into. AGENT_CHOOSE allows the agent to choose which callerID to use for 3-way calls from a list of choices. + +
+
+
+ 3-Way Call Dial Prefix - This defines what is used as the dial prefix for 3-way calls, default is empty so the campaign dial prefix is used, passthru so you can hear ringing is 88. + + 0) + { + ?> +
+
+
+ QC Enabled - Setting this field to Y allows for the agent Quality Control features to work. Default is N. + +
+
+
+ QC Statuses - This area is where you select which statuses of leads should be gone over by the QC system. Place a check next to the status that you want QC to review. + +
+
+
+ QC Shift - This is the shift timeframe used to pull QC records for a campaign. The days of the week are ignored for these functions. + +
+
+
+ QC Get Record Launch- This allows one of the following actions to be triggered upon a QC agent receiving a new record. + +
+
+
+ QC Show Recording - This allows for a recording that may be linked with the QC record to be display in the QC agent screen. + +
+
+
+ QC WebForm Address - This is the website address that a QC agent can go to when clicking on the WEBFORM link in the QC screen. + +
+
+
+ QC Script - This is the script that can be used by QC agents in the SCRIPT tab in the QC screen. + + +
+
+
+ Vtiger Search Category - If Vtiger integration is enabled in the system settings then this setting will define where the vtiger_search.php page will search for the phone number that was entered. There are 4 options that can be used in this field: LEAD- This option will search through the Vtiger leads only, ACCOUNT- This option will search through the Vtiger accounts and all contacts and sub-contacts for the phone number, VENDOR- This option will only search through the Vtiger vendors, ACCTID- This option works only for accounts and it will take the vicidial vendor_lead_code field and try to search for the Vtiger account ID. If unsuccessful it will try any other methods listed that you have selected. Multiple options can be used for each search, but on large databases this is not recommended. Default is LEAD. + +
+
+
+ Vtiger Search Dead Accounts - If Vtiger integration is enabled in the system settings then this setting will define whether deleted accounts will be searched when the agent clicks WEB FORM to search in the Vtiger system. DISABLED- deleted leads will not be searched, ASK- deleted leads will be searched and the vtiger search web page will ask the agent if they want to make the Vtiger account active, RESURRECT- will automatically make the deleted account active again and will take the agent to the account screen without delay upon clicking on WEB FORM. Default is DISABLED. + +
+
+
+ Vtiger Create Call Record - If Vtiger integration is enabled in the system settings then this setting will define whether a new Vtiger activity record is created for the call when the agent goes to the vtiger_search page. Default is Y. The DISPO option will create a call record for the Vtiger account without the agent needing to go to the vtiger search page through the WEB FORM. + +
+
+
+ Vtiger Create Lead Record - If Vtiger integration is enabled in the system settings and Vtiger Search Category includes LEAD then this setting will define whether a new Vtiger lead record is created when the agent goes to the vtiger_search page and no record is found to have the call phone number. Default is Y. + +
+
+
+ Vtiger Screen Login - If Vtiger integration is enabled in the system settings then this setting will define whether the user is logged into the Vtiger interface automatically when they login to VICIDIAL. Default is Y. The NEW_WINDOW option will open a new window upon login to the VICIDIAL agent screen. + +
+
+
+ Vtiger Status Call - If Vtiger integration is enabled in the system settings then this setting will define whether the status of the Vtiger Account will be updated with the status of the VICIDIAL call after it has been dispositioned. Default is N. + +
+
+
+ Group Alias Allowed - If you want to allow your agents to use group aliases then you need to set this to Y. Group Aliases are explained more in the Admin section, they allow agents to select different callerIDs for outbound manual calls that they may place. Default is N. + +
+
+
+ Default Group Alias - If you have allowed Group Aliases then this is the group alias that is selected first by default when the agent chooses to use a Group Alias for an outbound manual call. Default is NONE or empty. + +
+
+
+ Agent View Calls in Queue - If set to anything but NONE, agents will be able to see details about the calls that are waiting in queue in their agent screen. If set to a number value, the calls displayed will be limited to the number selected. Default is NONE. + +
+
+
+ View Calls in Queue Launch - This setting if set to AUTO will have the Calls in Queue frame show up upon login by the agent into the agent screen. Default is MANUAL. + +
+
+
+ Agent Grab Calls in Queue - This option if set to Y will allow the agent to select the call that they want to take from the Calls in Queue display by clicking on it while paused. Agents will only be able to grab inbound calls or transferred calls, not outbound calls. Default is N. + +
+
+
+ Agent Call Re-Queue Button - This option if set to Y will add a Re-Queue Customer button to the agent screen, allowing the agent to send the call into an AGENTDIRECT queue that is reserved for the agent only. Default is N. + +
+
+
+ Agent Pause After Each Call - This option if set to Y will pause the agent after every call automatically. Default is N. + + + + + +



+ + VICIDIAL_LISTS TABLE

+
+
+ List ID - This is the numerical name of the list, it is not editable after initial submission, must contain only numbers and must be between 2 and 8 characters in length. Must be a number greater than 100. + +
+
+
+ List Name - This is the description of the list, it must be between 2 and 20 characters in length. + +
+
+
+ List Description - This is the memo field for the list, it is optional. + +
+
+
+ List Change Date - This is the last time that the settings for this list were modified in any way. + +
+
+
+ List Last Call Date - This is the last time that lead was dialed from this list. + +
+
+
+ Campaign - This is the campaign that this list belongs to. A list can only be dialed on a single campaign at one time. + +
+
+
+ Active - This defines whether the list is to be dialed on or not. + +
+
+
+ Reset Lead-Called-Status for this list - This resets all leads in this list to N for "not called since last reset" and means that any lead can now be called if it is the right status as defined in the campaign screen. + +
+
+
+ Reset Times - This field allows you to put times in, separated by a dash-, that this list will be automatically reset by the system. The times must be in 24 hour format with no punctuation, for example 0800-1700 would reset the list at 8AM and 5PM every day. Default is empty. + +
+
+
+ Agent Script Override - If this field is set, this will be the script that the agent sees on their screen instead of the campaign script when the lead is from this list. Default is not set. + + +
+
+
+ VICIDIAL DNC List - This Do Not Call list contains every lead that has been set to a status of DNC in the system. Through the LISTS - ADD NUMBER TO DNC page you are able to manually add numbers to this list so that they will not be called by campaigns that use the internal DNC list. There is also the option to add leads to the campaign-specific DNC lists for those campaigns that have them. + + + +



+ + VICIDIAL_INBOUND_GROUPS TABLE

+
+
+ Group ID - This is the short name of the inbound group, it is not editable after initial submission, must not contain any spaces and must be between 2 and 20 characters in length. + +
+
+
+ Group Name - This is the description of the group, it must be between 2 and 30 characters in length. Cannot include dashes, plusses or spaces . + +
+
+
+ Group Color - This is the color that displays in the VICIDIAL client app when a call comes in on this group. It must be between 2 and 7 characters long. If this is a hex color definition you must remember to put a # at the beginning of the string or VICIDIAL will not work properly. + +
+
+
+ Active - This determines whether this group show up in the selection box when a VICIDIAL agent logs in. + +
+
+
+ Web Form - This is the custom address that clicking on the WEB FORM button in VICIDIAL will take you to for calls that come in on this group. + +
+
+
+ Next Agent Call - This determines which agent receives the next call that is available: +
  - random: orders by the random update value in the vicidial_live_agents table +
  - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. +
  - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. +
  - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls. +
  - inbound_group_rank: orders by the rank given to the agent for the specific inbound group. Highest to Lowest. +
  - fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first. +
  - campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest. +
  - fewest_calls_campaign: orders by the number of calls received by an agent for the campaign. Least calls first. +
  - longest_wait_time: orders by the amount of time agent has been actively waiting for a call. +
+ +
+
+
+ Queue Priority - This setting is used to define the order in which the calls from this inbound group should be answered in relation to calls from other inbound groups. + +
+
+ Fronter Display - This field determines whether the inbound VICIDIAL agent would have the fronter name - if there is one - displayed in the Status field when the call comes to the agent. + +
+
+
+ Campaign Script - This menu allows you to choose the script that will appear on the agents screen for this campaign. Select NONE to show no script for this campaign. + +
+
+
+ Get Call Launch - This menu allows you to choose whether you want to auto-launch the web-form page in a separate window, auto-switch to the SCRIPT tab or do nothing when a call is sent to the agent for this campaign. + +
+
+
+ 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. + +
+
+
+ Drop Call Seconds - The number of seconds a call will stay in queue before being considered a DROP. + +
+
+
+ Drop Action - This menu allows you to choose what happens to a call when it has been waiting for longer than what is set in the Drop Call Seconds field. HANGUP will simply hang up the call, MESSAGE will send the call the Drop Exten that you have defined below, VOICEMAIL will send the call to the voicemail box that you have defined below and IN_GROUP will send the call to the Inbound Group that is defined below. + +
+
+
+ Drop Exten - If Drop Action is set to MESSAGE, this is the dial plan extension that the call will be sent to if it reaches Drop Call Seconds. + +
+
+
+ Voicemail - If Drop Action is set to VOICEMAIL, the call DROP would instead be directed to this voicemail box to hear and leave a message. + +
+

Drop Transfer Group - If Drop Action is set to IN_GROUP, the call will be sent to this inbound group if it reaches Drop Call Seconds.
-
+
- Allow No-Hopper-Leads Logins - If set to Y, allows agents to login to the campaign even if there are no leads loaded into the hopper for that campaign. This function is not needed in CLOSER-type campaigns. Default is N. + Call Time - This is the call time scheme to use for this inbound group. Keep in mind that the time is based on the server time. Default is 24hours.
-
+
- No Hopper Dialing - If This is enabled, the hopper will not run for this campaign. This option is only available when the dial method is set to MANUAL or INBOUND_MAN. It is recommended that you do not enable this option if you have a very large lead database, over 100,000 leads. With No Hopper Dialing, the following features do not work: lead recycling, auto-alt-dialing, list mix, list ordering with Xth NEW. If you want to use Owner Only Dialing you must have No Hopper Dialing enabled. Default is N for disabled. + After Hours Action - The action to perform if it is after hours as defined in the call time for this inbound group. HANGUP will immediately hangup the call, MESSASGE will play the file in the After Hours Message Filenam field, EXTENSION will send the call to the After Hours Extension in the dialplan and VOICEMAIL will send the call to the voicemail box listed in the After Hours Voicemail field, IN_GROUP will send the call to the inbound group selected in the After Hours Transfer Group select list. Default is MESSAGE.
-
+
- Owner Only Dialing - If This is enabled, the agent will only receive leads that they are within the ownership parameters for. If this is set to USER then the agent must be the user defined in the database as the owner of this lead. If this is set to TERRITORY then the owner of the lead must match the territory listed in the User Modification screen for this agent. If this is set to USER_GROUP then the owner of the lead must match the user group that the agent is a member of. For this feature to work the dial method must be set to MANUAL or INBOUND_MAN and No Hopper Dialing must be enabled. Default is NONE for disabled. + After Hours Message Filename - The audio file located on the server to be played if the Action is set to MESSAGE. Default is vm-goodbye
-
+
- List Order Mix - Overrides the Lead Order and Dial Status fields. Will use the List and status parameters for the selected List Mix entry in the List Mix sub section instead. Default is DISABLED. + After Hours Extension - The dialplan extension to send the call to if the Action is set to EXTENSION. Default is 8300.
-
+
- List Mix ID - ID of the list mix. Must be from 2-20 characters in length with no spaces or other special punctuation. + After Hours Voicemail - The voicemail box to send the call to if the Action is set to VOICEMAIL.
-
+
- List Mix Name - Descriptive name of the list mix. Must be from 2-50 characters in length. + After Hours Transfer Group - If After Hours Action is set to IN_GROUP, the call will be sent to this inbound group if it enters the in-group outside of the call time scheme defined for the in-group.
-
+
- List Mix Detail - The composition of the List Mix entry. Contains the List ID, mix order, percentages and statuses that make up this List Mix. The percentages always have to add up to 100, and the lists all have to be active and set to the campaign for the order mix entry to be Activated. + No Agents No Queueing - If this field is set to Y or NO_PAUSED then no calls will be put into the queue for this in-group if there are no agents logged in and the calls will go to the No Agent No Queue Action. The NO_PAUSED option will also not send the callers into the queue if there are only paused agents in the in-group. Default is N.
-
+
- List Mix Method - The method of mixing all of the parts of the List Mix Detail together. EVEN_MIX will mix leads from each part interleaved with the other parts, like this 1,2,3,1,2,3,1,2,3. IN_ORDER will put the leads in the order in which they are listed in the List Mix Detail screen 1,1,1,2,2,2,3,3,3. RANDOM will put them in RANDOM order 1,3,2,1,1,3,2,1,3. Default is IN_ORDER. + No Agent No Queue Action - If No Agent No Queue is enabled, then this field defines where the call will go if there are no agents in the In-Group. Default is MESSAGE, this plays the sound files in the Action Value field and then hangs up.
-
+
- Agent Screen Extended Alt Dial - This feature allows for agents to access extended alternate phone numbers for leads beyond the standard Alt Phone and Address3 fields that can be used in VICIDIAL for phone numbers beyond the main phone number. The Extended phone numbers can be dialed automatically using the Auto-Alt-Dial feature in VICIDIAL Campaign settings, but enabling this Agent Screen feature will also allow for the agent to call these numbers from their agent screen as well as edit their information. + No Agent No Queue Action Value - This is the value for the Action above. Default is nbdy-avail-to-take-call|vm-goodbye.
-
+
- Survey First Audio File - This is the audio filename that is played as soon as the customer picks up the phone when running a survey campaign. + Welcome Message Filename - The audio file located on the server to be played when the call comes in. If set to ---NONE--- then no message will be played. Default is ---NONE---. This field as with the other audio fields in In-Groups, with the exception of the Agent Alert Filename, can have multiple audio files played if you put a pipe-separated list of audio files into the field.
-
+
- Survey DTMF Digits - This field is where you define the digits that a customer can press as an option on a survey campaign. valid dtmf digits are 0123456789*#. All options except for the Not Interested, Third and Fourth digit options will move on to the Survey Method call path. + Play Welcome Message - These settings select when to play the defined welcome message, ALWAYS will play it every time, NEVER will never play it, IF_WAIT_ONLY will only play the welcome message if the call does not immediately go to an agent, and YES_UNLESS_NODELAY will always play the welcome message unless the NO_DELAY setting is enabled. Default is ALWAYS.
-
+
- Survey Not Interested Digit - This field is where you define the customer digit pressed that will show they are Not Interested. + Music On Hold Context - The music on hold context to use when the customer is placed on hold. Default is default.
-
+
- Survey Not Interested Status - This field is where you select the status to be used for Not Interested. If DNC is used and the campaign is set to use DNC then the phone number will be automatically added to the VICIDIAL internal DNC list and possibly the campaign-specific DNC list. + On Hold Prompt Filename - The audio file located on the server to be played at a regular interval when the customer is on hold. Default is generic_hold. This audio file MUST be 9 seconds or less in length.
-
+
- Survey Opt-in Audio File - This is the audio filename that is played when the customer has opted-in to the survey, not opted-out or not responded if the no-response-action is set to OPTOUT. After this audio file is played, the Survey Method action is taken. + On Hold Prompt Interval - The length of time in seconds to wait before playing the on hold prompt. Default is 60. To disable the On Hold Prompt, set the interval to 0.
-
+
- Survey Not Interested Audio File - This is the audio filename that is played when the customer has opted-out of the survey, not opted-in or not responded if the no-response-action is set to OPTIN. After this audio file is played, the call will be hung up. + Play Place in Line - This defines whether the caller will hear their place in line when they enter the queue as well as when they hear the announcemend. Default is N.
-
+
- Survey Method - This option defines what happens to a call after the customer has opted-in. AGENT_XFER will send the call to the next available agent. VOICEMAIL will send the call to the voicemail box that is specified in the Voicemail field. EXTENSION will send the customer to the extension defined in the Survey Xfer Extension field. HANGUP will hang up the customer. CAMPREC_60_WAV will send the customer to have a recording made with their response, this recording will be placed in a folder named as the campaign inside of the Survey Campaign Recording Directory. + Play Estimated Hold Time - This defines whether the caller will hear the estimated hold time before they are transferred to an agent. Default is N. If the customer is on hold and hears this estimated hold time message, the minimum time that will be played is 15 seconds.
-
+
- Survey No-Response Action - This is where you define what will happen if there is no response to the survey question. OPTIN will only send the call on to the Survey Method if the customer presses a dtmf digit. OPTOUT will send the customer on to the Survey Method even if they do not press a dtmf digit. + Hold Time Option - This allows you to specify the routing of the call if the estimated hold time is over the amount of seconds specified below. Default is NONE.
-
+
- Survey Response Digit Map - This is the section where you can define a description to go with each dtmf digit option that the customer may select. + Hold Time Option Seconds - If Hold Time Option is set to anything but NONE, this is the number of seconds of estimated hold time that will trigger the hold time option. Default is 360 seconds.
-
+
- Survey Xfer Extension - If the Survey Method of EXTENSION is selected then the customer call would be directed to this dialplan extension. + Hold Time Option Extension - If Hold Time Option is set to EXTENSION, this is the dialplan extension that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds.
-
+
- Survey Campaign Recording Directory - If the Survey Method of CAMPREC_60_WAV is selected then the customer response will be recorded and placed in a directory named after the campaign inside of this directory. + Hold Time Option Voicemail - If Hold Time Option is set to VOICEMAIL, this is the voicemail box that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds.
-
+
- Survey Third Digit - This allows for a third call path if the Third digit as defined in this field is pressed by the customer. + Hold Time Option Transfer In-Group - If Hold Time Option is set to IN_GROUP, this is the inbound group that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds.
-
+
- Survey Fourth Digit - This allows for a fourth call path if the Fourth digit as defined in this field is pressed by the customer. + Hold Time Option Callback Filename - If Hold Time Option is set to CALLERID_CALLBACK, this is the filename prompt that is played before the call is logged as a new lead to the list ID specified below if the estimated hold time exceeds the Hold Time Option Seconds.
-
+
- Survey Third Audio File - This is the third audio file to be played upon the selection by the customer of the Third Digit option. + Hold Time Option Callback List ID - If Hold Time Option is set to CALLERID_CALLBACK, this is the List ID the call is added to as a new lead if the estimated hold time exceeds the Hold Time Option Seconds.
-
+
- Survey Third Status - This is the third status used for the call upon the selection by the customer of the Third Digit option. + Agent Alert Filename - The audio file to play to an agent to announce that a call is coming to the agent. To not use this function set this to X. Default is ding.
-
+
- Survey Third Extension - This is the third extension used for the call upon the selection by the customer of the Third Digit option. Default is 8300 which immediately hangs up the call after the Audio File message is played. + Agent Alert Delay - The length of time in milliseconds to wait before sending the call to the agent after playing the on Agent Alert Extension. Default is 1000.
-
+
- Agent Display Dialable Leads - This option if enabled will show the number of dialable leads available in the campaign in the agent screen. This number is updated in the system once a minute and will be refreshed on the agent screen every few seconds. + Default Transfer Group - This field is the default In-Group that will be automatically selected when the agent goes to the transfer-conference frame in their agent interface. + +
+
+
+ In-Group Recording Override - This field allows for the overriding of the campaign call recording setting. This setting can be overridden by the vicidial_user recording override setting. DISABLED will not override the campaign recording setting. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. + +
+
+
+ In-Group Recording Filename - This field will override the Campaign Recording Filenaming Scheme unless it is set to NONE. The allowed variables are CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this TESTCAMP_51020103108_3125551212. 50 char max. Default is NONE. + if ($SSqc_features_active > 0) + { + ?> +
+
+
+ QC Enabled - Setting this field to Y allows for the agent Quality Control features to work. Default is N. -
-
-
-Next Agent Call - This determines which agent receives the next call that is available: -
  - random: orders by the random update value in the vicidial_live_agents table -
  - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. -
  - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. -
  - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls. -
  - campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest. -
  - fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first. -
  - longest_wait_time: orders by the amount of time agent has been actively waiting for a call. +
+
+
+ QC Statuses - This area is where you select which statuses of leads should be gone over by the QC system. Place a check next to the status that you want QC to review. -
-
-
-Local Call Time - This is where you set during which hours you would like to dial, as determined by the local time in the are in which you are calling. This is controlled by area code and is adjusted for Daylight Savings time if applicable. General Guidelines in the USA for Business to Business is 9am to 5pm and Business to Consumer calls is 9am to 9pm. +
+
+
+ QC Shift - This is the shift timeframe used to pull QC records for an inbound_group. The days of the week are ignored for these functions. -
-
-
-Dial Prefix - This field allows for more easily changing a path of dialing to go out through a different method without doing a reload in Asterisk. Default is 9 based upon a 91NXXNXXXXXX in the dial plan - extensions.conf. +
+
+
+ QC Get Record Launch- This allows one of the following actions to be triggered upon a QC agent receiving a new record. -
-
-
-Omit Phone Code - This field allows you to leave out the phone_code field while dialing within VICIDIAL. For instance if you are dialing in the UK from the UK you would have 44 in as your phone_code field for all leads, but you just want to dial 10 digits in your dial plan extensions.conf to place calls instead of 44 then 10 digits. Default is N. +
+
+
+ QC Show Recording - This allows for a recording that may be linked with the QC record to be display in the QC agent screen. -
-
-
-Campaign CallerID - This field allows for the sending of a custom callerid number on the outbound calls. This is the number that would show up on the callerid of the person you are calling. The default is UNKNOWN. If you are using T1 or E1s to dial out this option is only available if you are using PRIs - ISDN T1s or E1s - that have the custom callerid feature turned on, this will not work with Robbed-bit service -RBS- circuits. This will also work through most VOIP -SIP or IAX trunks- providers that allow dynamic outbound callerID. The custom callerID only applies to calls placed for the VICIDIAL campaign directly, any 3rd party calls or transfers will not send the custom callerID. NOTE: Sometimes putting UNKNOWN or PRIVATE in the field will yield the sending of your default callerID number by your carrier with the calls. You may want to test this and put 0000000000 in the callerid field instead if you do not want to send you CallerID. +
+
+
+ QC WebForm Address - This is the website address that a QC agent can go to when clicking on the WEBFORM link in the QC screen. -
-
-
-Campaign Rec extension - This field allows for a custom recording extension to be used with VICIDIAL. This allows you to use different extensions depending upon how long you want to allow a maximum recording and what type of codec you want to record in. The default exten is 8309 which if you follow the SCRATCH_INSTALL examples will record in the WAV format for upto one hour. Another option included in the examples is 8310 which will record in GSM format for upto one hour. - -
-
-
-Campaign Recording - This menu allows you to choose what level of recording is allowed on this campaign. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. For ALLCALLS and ALLFORCE there is an option to use the Recording Delay to cut down on very short recordings and recude system load. - -
-
-
-Campaign Rec Filename - This field allows you to customize the name of the recording when Campaign recording is ONDEMAND or ALLCALLS. The allowed variables are CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this TESTCAMP_51020103108_3125551212. 50 char max. - -
-
-
-Recording Delay - For ALLCALLS and ALLFORCE recording only. This setting will delay the starting of the recording on all calls for the number of seconds specified in this field. Default is 0. - -
-
-
-Campaign Script - This menu allows you to choose the script that will appear on the agents screen for this campaign. Select NONE to show no script for this campaign. - -
-
-
-Get Call Launch - This menu allows you to choose whether you want to auto-launch the web-form page in a separate window, auto-switch to the SCRIPT tab or do nothing when a call is sent to the agent for this campaign. - -
-
-
-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. - -
-
-
-Quick Transfer Button - This option will add a Quick Transfer button to the agent screen below the Transfer-Conf button that will allow one click blind transferring of calls to the selected In-Group or number. IN_GROUP will send calls to the Default Xfer Group for this Campaign, or In-Group if there was an inbound call. The PRESET options will send the calls to the preset selected. Default is N for disabled. - -
-
-
-PrePopulate Transfer Preset - This option will fill in the Number to Dial field in the Transfer Conference frame of the agent screen if defined. Default is N for disabled. - -
-
-
-Scheduled Callbacks - This option allows an agent to disposition a call as CALLBK and choose the data and time at which the lead will be re-activated. - -
-
-
-Wrap Up Seconds - The number of seconds to force an agent to wait before allowing them to receive or dial another call. The timer begins as soon as an agent hangs up on their customer - or in the case of alternate number dialing when the agent finishes the lead - Default is 0 seconds. If the timer runs out before the agent has dispositioned the call, the agent still will NOT move on to the next call until they select a disposition. - -
-
-
-Wrap Up Message - This is a campaign-specific message to be displayed on the wrap up screen if wrap up seconds is set. - -
-
-
-Use Internal DNC List - This defines whether this campaign is to filter leads against the Internal DNC list. If it is set to Y, the hopper will look for each phone number in the DNC list before placing it in the hopper. If it is in the DNC list then it will change that lead status to DNCL so it cannot be dialed. Default is N. - -
-
-
-Use Campaign DNC List - This defines whether this campaign is to filter leads against a DNC list that is specific to that campaign only. If it is set to Y, the hopper will look for each phone number in the campaign-specific DNC list before placing it in the hopper. If it is in the campaign-specific DNC list then it will change that lead status to DNCC so it cannot be dialed. Default is N. - -
-
-
-Allowed Inbound Groups - For CLOSER campaigns only. Here is where you select the inbound groups you want agents in this CLOSER campaign to be able to take calls from. It is important for BLENDED inbound-outbound campaigns only to select the inbound groups that are used for agents in this campaign. The calls coming into the inbound groups selected here will be counted as active calls for a blended campaign even if all agents in the campaign are not logged in to receive calls from all of those selected inbound groups. - -
-
-
-Agent Pause Codes Active - Allows agents to select a pause code when they click on the PAUSE button in vicidial.php. Pause codes are definable per campaign at the bottom of the campaign view detail screen and they are stored in the vicidial_agent_log table. Default is N. FORCE will force the agents to choose a PAUSE code if they click on the PAUSE button. - -
-
-
-Disable Alter Customer Data - If set to Y, does not change any of the customer data record when an agent dispositions the call. Default is N. - -
-
-
-Disable Alter Customer Phone - If set to Y, does not change the customer phone number when an agent dispositions the call. Default is Y. Use the HIDE option to completely remove the customer phone number from the agent display. - -
-
-
-Agent Display Queue Count - If set to Y, when a customer is waiting for an agent, the Queue Calls display at the top of the agent screen will turn red and show the number of waiting calls. Default is Y. - -
-
-
-Manual Dial List ID - The default list_id to be used when an agent placces a manual call and a new lead record is created in vicidial_list. Default is 999. This field can contain digits only. - -
-
-
-Manual Dial Filter - This allows you to filter the calls that agents make in manual dial mode for this campaign by any combination of the following: DNC - to kick out, CAMPAIGNLISTS - the number must be within the lists for the campaign, NONE - no filter on manual dial or fast dial lists. - -
-
-
-Agent Screen Clipboard Copy - THIS FEATURE IS CURRENTLY ONLY ENABLED FOR INTERNET EXPLORER. This feature allows you to select a field that will be copied to the computer clipboard of the agent computer upon a call being sent to an agent. Common uses for this are to allow for easy pasting of account numbers or phone numbers into legacy client applications on the agent computer. - -
-
-
-3-Way Call Outbound CallerID - This defines what is sent out as the outbound callerID number from 3-way calls placed by the agent, CAMPAIGN uses the custom campaign callerID, CUSTOMER uses the number of the customer that is active on the agents screen and AGENT_PHONE uses the callerID for the phone that the agent is logged into. AGENT_CHOOSE allows the agent to choose which callerID to use for 3-way calls from a list of choices. - -
-
-
-3-Way Call Dial Prefix - This defines what is used as the dial prefix for 3-way calls, default is empty so the campaign dial prefix is used, passthru so you can hear ringing is 88. - - 0) - { +
+
+
+ QC Script - This is the script that can be used by QC agents in the SCRIPT tab in the QC screen. + -
-
-
- QC Enabled - Setting this field to Y allows for the agent Quality Control features to work. Default is N.
-
+
- QC Statuses - This area is where you select which statuses of leads should be gone over by the QC system. Place a check next to the status that you want QC to review. + Hold Recall Transfer In-Group - If a customer calls back to this in-group more than once and this is not set to NONE, then the call will automatically be sent on to the In-Group selected in this field. Default is NONE.
-
+
- QC Shift - This is the shift timeframe used to pull QC records for a campaign. The days of the week are ignored for these functions. + No Delay Call Route - Setting this to Y will remove all wait times and audio prompts and attempt to send the call right to an agent. Does not override welcome message or on hold prompt settings. Default is N.
-
+
- QC Get Record Launch- This allows one of the following actions to be triggered upon a QC agent receiving a new record. + 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.
-
+
- QC Show Recording - This allows for a recording that may be linked with the QC record to be display in the QC agent screen. - -
-
-
- QC WebForm Address - This is the website address that a QC agent can go to when clicking on the WEBFORM link in the QC screen. - -
-
-
- QC Script - This is the script that can be used by QC agents in the SCRIPT tab in the QC screen. - - -
-
-
-Vtiger Search Category - If Vtiger integration is enabled in the system settings then this setting will define where the vtiger_search.php page will search for the phone number that was entered. There are 4 options that can be used in this field: LEAD- This option will search through the Vtiger leads only, ACCOUNT- This option will search through the Vtiger accounts and all contacts and sub-contacts for the phone number, VENDOR- This option will only search through the Vtiger vendors, ACCTID- This option works only for accounts and it will take the vicidial vendor_lead_code field and try to search for the Vtiger account ID. If unsuccessful it will try any other methods listed that you have selected. Multiple options can be used for each search, but on large databases this is not recommended. Default is LEAD. - -
-
-
-Vtiger Search Dead Accounts - If Vtiger integration is enabled in the system settings then this setting will define whether deleted accounts will be searched when the agent clicks WEB FORM to search in the Vtiger system. DISABLED- deleted leads will not be searched, ASK- deleted leads will be searched and the vtiger search web page will ask the agent if they want to make the Vtiger account active, RESURRECT- will automatically make the deleted account active again and will take the agent to the account screen without delay upon clicking on WEB FORM. Default is DISABLED. - -
-
-
-Vtiger Create Call Record - If Vtiger integration is enabled in the system settings then this setting will define whether a new Vtiger activity record is created for the call when the agent goes to the vtiger_search page. Default is Y. The DISPO option will create a call record for the Vtiger account without the agent needing to go to the vtiger search page through the WEB FORM. - -
-
-
-Vtiger Create Lead Record - If Vtiger integration is enabled in the system settings and Vtiger Search Category includes LEAD then this setting will define whether a new Vtiger lead record is created when the agent goes to the vtiger_search page and no record is found to have the call phone number. Default is Y. - -
-
-
-Vtiger Screen Login - If Vtiger integration is enabled in the system settings then this setting will define whether the user is logged into the Vtiger interface automatically when they login to VICIDIAL. Default is Y. The NEW_WINDOW option will open a new window upon login to the VICIDIAL agent screen. - -
-
-
-Vtiger Status Call - If Vtiger integration is enabled in the system settings then this setting will define whether the status of the Vtiger Account will be updated with the status of the VICIDIAL call after it has been dispositioned. Default is N. - -
-
-
-Group Alias Allowed - If you want to allow your agents to use group aliases then you need to set this to Y. Group Aliases are explained more in the Admin section, they allow agents to select different callerIDs for outbound manual calls that they may place. Default is N. - -
-
-
-Default Group Alias - If you have allowed Group Aliases then this is the group alias that is selected first by default when the agent chooses to use a Group Alias for an outbound manual call. Default is NONE or empty. - -
-
-
-Agent View Calls in Queue - If set to anything but NONE, agents will be able to see details about the calls that are waiting in queue in their agent screen. If set to a number value, the calls displayed will be limited to the number selected. Default is NONE. - -
-
-
-View Calls in Queue Launch - This setting if set to AUTO will have the Calls in Queue frame show up upon login by the agent into the agent screen. Default is MANUAL. - -
-
-
-Agent Grab Calls in Queue - This option if set to Y will allow the agent to select the call that they want to take from the Calls in Queue display by clicking on it while paused. Agents will only be able to grab inbound calls or transferred calls, not outbound calls. Default is N. - -
-
-
-Agent Call Re-Queue Button - This option if set to Y will add a Re-Queue Customer button to the agent screen, allowing the agent to send the call into an AGENTDIRECT queue that is reserved for the agent only. Default is N. - -
-
-
-Agent Pause After Each Call - This option if set to Y will pause the agent after every call automatically. Default is N. - - - - - -



- -VICIDIAL_LISTS TABLE

-
-
-List ID - This is the numerical name of the list, it is not editable after initial submission, must contain only numbers and must be between 2 and 8 characters in length. Must be a number greater than 100. - -
-
-
-List Name - This is the description of the list, it must be between 2 and 20 characters in length. - -
-
-
-List Description - This is the memo field for the list, it is optional. - -
-
-
-List Change Date - This is the last time that the settings for this list were modified in any way. - -
-
-
-List Last Call Date - This is the last time that lead was dialed from this list. - -
-
-
-Campaign - This is the campaign that this list belongs to. A list can only be dialed on a single campaign at one time. - -
-
-
-Active - This defines whether the list is to be dialed on or not. - -
-
-
-Reset Lead-Called-Status for this list - This resets all leads in this list to N for "not called since last reset" and means that any lead can now be called if it is the right status as defined in the campaign screen. - -
-
-
-Reset Times - This field allows you to put times in, separated by a dash-, that this list will be automatically reset by the system. The times must be in 24 hour format with no punctuation, for example 0800-1700 would reset the list at 8AM and 5PM every day. Default is empty. - -
-
-
-Agent Script Override - If this field is set, this will be the script that the agent sees on their screen instead of the campaign script when the lead is from this list. Default is not set. - - -
-
-
-VICIDIAL DNC List - This Do Not Call list contains every lead that has been set to a status of DNC in the system. Through the LISTS - ADD NUMBER TO DNC page you are able to manually add numbers to this list so that they will not be called by campaigns that use the internal DNC list. There is also the option to add leads to the campaign-specific DNC lists for those campaigns that have them. - - - -



- -VICIDIAL_INBOUND_GROUPS TABLE

-
-
-Group ID - This is the short name of the inbound group, it is not editable after initial submission, must not contain any spaces and must be between 2 and 20 characters in length. - -
-
-
-Group Name - This is the description of the group, it must be between 2 and 30 characters in length. Cannot include dashes, plusses or spaces . - -
-
-
-Group Color - This is the color that displays in the VICIDIAL client app when a call comes in on this group. It must be between 2 and 7 characters long. If this is a hex color definition you must remember to put a # at the beginning of the string or VICIDIAL will not work properly. - -
-
-
-Active - This determines whether this group show up in the selection box when a VICIDIAL agent logs in. - -
-
-
-Web Form - This is the custom address that clicking on the WEB FORM button in VICIDIAL will take you to for calls that come in on this group. - -
-
-
-Next Agent Call - This determines which agent receives the next call that is available: -
  - random: orders by the random update value in the vicidial_live_agents table -
  - oldest_call_start: orders by the last time an agent was sent a call. Results in agents receiving about the same number of calls overall. -
  - oldest_call_finish: orders by the last time an agent finished a call. AKA agent waiting longest receives first call. -
  - overall_user_level: orders by the user_level of the agent as defined in the vicidial_users table a higher user_level will receive more calls. -
  - inbound_group_rank: orders by the rank given to the agent for the specific inbound group. Highest to Lowest. -
  - fewest_calls: orders by the number of calls received by an agent for that specific inbound group. Least calls first. -
  - campaign_rank: orders by the rank given to the agent for the campaign. Highest to Lowest. -
  - fewest_calls_campaign: orders by the number of calls received by an agent for the campaign. Least calls first. -
  - longest_wait_time: orders by the amount of time agent has been actively waiting for a call. -
- -
-
-
-Queue Priority - This setting is used to define the order in which the calls from this inbound group should be answered in relation to calls from other inbound groups. - -
-
-Fronter Display - This field determines whether the inbound VICIDIAL agent would have the fronter name - if there is one - displayed in the Status field when the call comes to the agent. - -
-
-
-Campaign Script - This menu allows you to choose the script that will appear on the agents screen for this campaign. Select NONE to show no script for this campaign. - -
-
-
-Get Call Launch - This menu allows you to choose whether you want to auto-launch the web-form page in a separate window, auto-switch to the SCRIPT tab or do nothing when a call is sent to the agent for this campaign. - -
-
-
-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. - -
-
-
-Drop Call Seconds - The number of seconds a call will stay in queue before being considered a DROP. - -
-
-
-Drop Action - This menu allows you to choose what happens to a call when it has been waiting for longer than what is set in the Drop Call Seconds field. HANGUP will simply hang up the call, MESSAGE will send the call the Drop Exten that you have defined below, VOICEMAIL will send the call to the voicemail box that you have defined below and IN_GROUP will send the call to the Inbound Group that is defined below. - -
-
-
-Drop Exten - If Drop Action is set to MESSAGE, this is the dial plan extension that the call will be sent to if it reaches Drop Call Seconds. - -
-
-
-Voicemail - If Drop Action is set to VOICEMAIL, the call DROP would instead be directed to this voicemail box to hear and leave a message. - -
-
-
-Drop Transfer Group - If Drop Action is set to IN_GROUP, the call will be sent to this inbound group if it reaches Drop Call Seconds. - -
-
-
-Call Time - This is the call time scheme to use for this inbound group. Keep in mind that the time is based on the server time. Default is 24hours. - -
-
-
-After Hours Action - The action to perform if it is after hours as defined in the call time for this inbound group. HANGUP will immediately hangup the call, MESSASGE will play the file in the After Hours Message Filenam field, EXTENSION will send the call to the After Hours Extension in the dialplan and VOICEMAIL will send the call to the voicemail box listed in the After Hours Voicemail field, IN_GROUP will send the call to the inbound group selected in the After Hours Transfer Group select list. Default is MESSAGE. - -
-
-
-After Hours Message Filename - The audio file located on the server to be played if the Action is set to MESSAGE. Default is vm-goodbye - -
-
-
-After Hours Extension - The dialplan extension to send the call to if the Action is set to EXTENSION. Default is 8300. - -
-
-
-After Hours Voicemail - The voicemail box to send the call to if the Action is set to VOICEMAIL. - -
-
-
-After Hours Transfer Group - If After Hours Action is set to IN_GROUP, the call will be sent to this inbound group if it enters the in-group outside of the call time scheme defined for the in-group. - -
-
-
-No Agents No Queueing - If this field is set to Y or NO_PAUSED then no calls will be put into the queue for this in-group if there are no agents logged in and the calls will go to the No Agent No Queue Action. The NO_PAUSED option will also not send the callers into the queue if there are only paused agents in the in-group. Default is N. - -
-
-
-No Agent No Queue Action - If No Agent No Queue is enabled, then this field defines where the call will go if there are no agents in the In-Group. Default is MESSAGE, this plays the sound files in the Action Value field and then hangs up. - -
-
-
-No Agent No Queue Action Value - This is the value for the Action above. Default is nbdy-avail-to-take-call|vm-goodbye. - -
-
-
-Welcome Message Filename - The audio file located on the server to be played when the call comes in. If set to ---NONE--- then no message will be played. Default is ---NONE---. This field as with the other audio fields in In-Groups, with the exception of the Agent Alert Filename, can have multiple audio files played if you put a pipe-separated list of audio files into the field. - -
-
-
-Play Welcome Message - These settings select when to play the defined welcome message, ALWAYS will play it every time, NEVER will never play it, IF_WAIT_ONLY will only play the welcome message if the call does not immediately go to an agent, and YES_UNLESS_NODELAY will always play the welcome message unless the NO_DELAY setting is enabled. Default is ALWAYS. - -
-
-
-Music On Hold Context - The music on hold context to use when the customer is placed on hold. Default is default. - -
-
-
-On Hold Prompt Filename - The audio file located on the server to be played at a regular interval when the customer is on hold. Default is generic_hold. This audio file MUST be 9 seconds or less in length. - -
-
-
-On Hold Prompt Interval - The length of time in seconds to wait before playing the on hold prompt. Default is 60. To disable the On Hold Prompt, set the interval to 0. - -
-
-
-Play Place in Line - This defines whether the caller will hear their place in line when they enter the queue as well as when they hear the announcemend. Default is N. - -
-
-
-Play Estimated Hold Time - This defines whether the caller will hear the estimated hold time before they are transferred to an agent. Default is N. If the customer is on hold and hears this estimated hold time message, the minimum time that will be played is 15 seconds. - -
-
-
-Hold Time Option - This allows you to specify the routing of the call if the estimated hold time is over the amount of seconds specified below. Default is NONE. - -
-
-
-Hold Time Option Seconds - If Hold Time Option is set to anything but NONE, this is the number of seconds of estimated hold time that will trigger the hold time option. Default is 360 seconds. - -
-
-
-Hold Time Option Extension - If Hold Time Option is set to EXTENSION, this is the dialplan extension that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds. - -
-
-
-Hold Time Option Voicemail - If Hold Time Option is set to VOICEMAIL, this is the voicemail box that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds. - -
-
-
-Hold Time Option Transfer In-Group - If Hold Time Option is set to IN_GROUP, this is the inbound group that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds. - -
-
-
-Hold Time Option Callback Filename - If Hold Time Option is set to CALLERID_CALLBACK, this is the filename prompt that is played before the call is logged as a new lead to the list ID specified below if the estimated hold time exceeds the Hold Time Option Seconds. - -
-
-
-Hold Time Option Callback List ID - If Hold Time Option is set to CALLERID_CALLBACK, this is the List ID the call is added to as a new lead if the estimated hold time exceeds the Hold Time Option Seconds. - -
-
-
-Agent Alert Filename - The audio file to play to an agent to announce that a call is coming to the agent. To not use this function set this to X. Default is ding. - -
-
-
-Agent Alert Delay - The length of time in milliseconds to wait before sending the call to the agent after playing the on Agent Alert Extension. Default is 1000. - -
-
-
-Default Transfer Group - This field is the default In-Group that will be automatically selected when the agent goes to the transfer-conference frame in their agent interface. - -
-
-
-In-Group Recording Override - This field allows for the overriding of the campaign call recording setting. This setting can be overridden by the vicidial_user recording override setting. DISABLED will not override the campaign recording setting. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording. - -
-
-
-In-Group Recording Filename - This field will override the Campaign Recording Filenaming Scheme unless it is set to NONE. The allowed variables are CAMPAIGN CUSTPHONE FULLDATE TINYDATE EPOCH AGENT. The default is FULLDATE_AGENT and would look like this 20051020-103108_6666. Another example is CAMPAIGN_TINYDATE_CUSTPHONE which would look like this TESTCAMP_51020103108_3125551212. 50 char max. Default is NONE. - - 0) - { - ?> -
-
-
- QC Enabled - Setting this field to Y allows for the agent Quality Control features to work. Default is N. - -
-
-
- QC Statuses - This area is where you select which statuses of leads should be gone over by the QC system. Place a check next to the status that you want QC to review. - -
-
-
- QC Shift - This is the shift timeframe used to pull QC records for an inbound_group. The days of the week are ignored for these functions. - -
-
-
- QC Get Record Launch- This allows one of the following actions to be triggered upon a QC agent receiving a new record. - -
-
-
- QC Show Recording - This allows for a recording that may be linked with the QC record to be display in the QC agent screen. - -
-
-
- QC WebForm Address - This is the website address that a QC agent can go to when clicking on the WEBFORM link in the QC screen. - -
-
-
- QC Script - This is the script that can be used by QC agents in the SCRIPT tab in the QC screen. - - -
-
-
-Hold Recall Transfer In-Group - If a customer calls back to this in-group more than once and this is not set to NONE, then the call will automatically be sent on to the In-Group selected in this field. Default is NONE. - -
-
-
-No Delay Call Route - Setting this to Y will remove all wait times and audio prompts and attempt to send the call right to an agent. Does not override welcome message or on hold prompt settings. Default is N. - -
-
-
-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. - -
-
-
-Default Group Alias - If you have allowed Group Aliases for the campaign that the agent is logged into then this is the group alias that is selected first by default on a call coming in from this inbound group when the agent chooses to use a Group Alias for an outbound manual call. Default is NONE or empty. - - - - - -



- -VICIDIAL_INBOUND_DIDS TABLE

-
-
-
-DID Extension - This is the number, extension or DID that will trigger this entry and that you will route within the system using this function. There is a reserved default DID that you can use which is just the word -default- without the dashes, that will allos you to send any call that does not match any other existing patterns to the default DID. - -
-
-
-DID Description - This is the description of the DID routing entry. - -
-
-
-DID Active - This the field where you set the DID entry to active or not. Default is Y. - -
-
-
-DID Route - This the type of route that you set the DID to use. EXTEN will send calls to the extension entered below, VOICEMAIL will send calls directly to the voicemail box entered below, AGENT will send calls to a VICIDIAL agent if they are logged in, PHONE will send the call to a phones entry selected below, IN_GROUP will send calls directly to the specified inbound group. Default is EXTEN. CALLMENU will send the call to the defined Call Menu. - -
-
-
-Extension - If EXTEN is selected as the DID Route, then this is the dialplan extension that calls will be sent to. Default is 9998811112, no-service. - -
-
-
-Extension Context - If EXTEN is selected as the DID Route, then this is the dialplan context that calls will be sent to. Default is default. - -
-
-
-Voicemail Box - If VOICEMAIL is selected as the DID Route, then this is the voicemail box that calls will be sent to. Default is empty. - -
-
-
-Phone Extension - If PHONE is selected as the DID Route, then this is the phone extension that calls will be sent to. - -
-
-
-Phone Server IP - If PHONE is selected as the DID Route, then this is the server IP for the phone extension that calls will be sent to. - -
-
-
-Call Menu - If CALLMENU is selected as the DID Route, then this is the Call Menu that calls will be sent to. - -
-
-
-User Agent - If AGENT is selected as the DID Route, then this is the VICIDIAL Agent that calls will be sent to. - -
-
-
-User Unavailable Action - If AGENT is selected as the DID Route, and the user is not logged in or available, then this is the route that the calls will take. - -
-
-
-User Route Settings In-Group - If AGENT is selected as the DID Route, then this is the In-Group that will be used for the queue settings as the caller is waiting to be sent to the agent. Default is AGENTDIRECT. - -
-
-
-In-Group ID - If IN_GROUP is selected as the DID Route, then this is the In-Group that calls will be sent to. - -
-
-
-In-Group Call Handle Method - If IN_GROUP is selected as the DID Route, then this is the call handling method used for these calls. CID will add a new lead record with every call using the CallerID as the phone number, CIDLOOKUP will attempt to lookup the phone number by the CallerID in the entire system, CIDLOOKUPRL will attampt to lookup the phone number by the CallerID in only one specified list, CIDLOOKUPRC will attampt to lookup the phone number by the CallerID in all of the lists that belong to the specified campaign, CLOSER is specified for VICIDIAL Closer calls, ANI will add a new lead record with every call using the ANI as the phone number, ANILOOKUP will attempt to lookup the phone number by the ANI in the entire system, ANILOOKUPRL will attampt to lookup the phone number by the ANI in only one specified list, XDIGITID will prompt the caller for an X digit code before the call will be put into the queue. Default is CID. - -
-
-
-In-Group Agent Search Method - If IN_GROUP is selected as the DID Route, then this is the agent search method to be used by the inbound group, LO is Load-Balanced-Overflow and will try to send the call to an agent on the local server before trying to send it to an agent on another server, LB is Load-Balanced and will try to send the call to the next agent no matter what server they are on, SO is Server-Only and will only try to send the calls to agents on the server that the call came in on. Default is LB. - -
-
-
-In-Group List ID - If IN_GROUP is selected as the DID Route, then this is the List ID that leads may be searched through and that leads will be inserted into if necessary. - -
-
-
-In-Group Campaign ID - If IN_GROUP is selected as the DID Route, then this is the Campaign ID that leads may be searched for in if the call handle method is CIDLOOKUPRC. - -
-
-
-In-Group Phone Code - If IN_GROUP is selected as the DID Route, then this is the Phone Code used if a new lead is created. - - - - -



- -VICIDIAL_CALL MENU TABLE

-
-
-Menu ID - This is the ID for this step of the call menu. This will also show up as the context that is used in the dialplan for this call menu. - -
-
-
-Menu Name - This field is the descriptive name for the call menu. - -
-
-
-Menu Prompt - This field contains the file name of the audio prompt to play at the beginning of this menu. You can enter multiple propmts in this field and the other prompt fields by separating them with a pipe character. - -
-
-
-Menu Timeout - This field is where you set the timeout in seconds that the menu will wait for the caller to enter in a DTMF choice. Setting this field to zero 0 will mean that there will be no wait time after the prompt is played. - -
-
-
-Menu Timeout Prompt - This field contains the file name of the audio prompt to play when the timeout has been reached. Default is NONE to play no audio at timeout. - -
-
-
-Menu Invalid Prompt - This field contains the file name of the audio prompt to play when the caller has selected an invalid option. Default is NONE to play no audio at invalid. - -
-
-
-Menu Repeat - This field is where you define the number of times that the menu will play after the first time if no valid choice is made by the caller. Default is 1 to repeat the menu once. - -
-
-
-Menu Time Check - This field is where you can select whether to restrict the Call Menu access to the specific hours set up in the selected Call Time. If the Call Time is blank, this setting will be ignored. Default is 0 for disabled. - -
-
-
-Call Time ID - This is the Call Time ID that will be used to restrict calling times if the Menu Time Check option is enabled. - -
-
-
-Track Calls in Real-Time Report - This field is where you can select whether you want the call to be tracked in the Real-time screen as an incoming IVR type call. Default is 1 for active. - -
-
-
-Tracking Group - This is the ID that you can use to track calls to this Call Menu when looking at the IVR Report. The list includes CALLMENU as the default as well as all of the In-Groups. - -
-
-
-Option Value - This field is where you define the menu option, possible choices are: 0,1,2,3,4,5,6,7,8,9,*,#,A,B,C,D,TIMECHECK. The special option TIMECHECK can be used only if you have Menu Time Check enabled and there is a Call Time defined for the Menu. To delete an Option, just set the Route to REMOVE and the option will be deleted when you click the SUBMIT button. - -
-
-
-Option Description - This field is where you can describe the option, this description will be put into the dialplan as a comment above the option. - -
-
-
-Option Route - This menu contains the options for where to send the call if this option is selected: CALLMENU,INGROUP,DID,HANGUP,EXTENSION,PHONE. For CALLMENU, the Route Value should be the Menu ID of the Call Menu that you want the call sent to. For INGROUP, the In-Group that you want the call to be sent to needs to be selected as well as the other 5 options that need to be set to properly route a call to an Inbound Group. For DID, the Route Value needs to be the DID pattern that you want to send the call to. For HANGUP, the Route Value can be the name of an audio file to play before hanging up the call. For EXTENSION, the Route Value needs to be the dialplan extension you want to send the call to, and the Route Value Context is the context that extension is located in, if left blank the context will default to default. For PHONE, the Route Value needs to be the phone login value for the phones entry that you want to send the call to. For VOICEMAIL, the Route Value needs to be the voicemail box number, the unavailable mesage will be played. For AGI, the Route Value needs to be the agi script and any values taht need to be passed to it. - -
-
-
-Option Route Value - This field is where you enter the value that defines where in the selected Option Route that the call is to be directed to. - -
-
-
-Option Route Value Context - This field is optional and only used for EXTENSION Option Routes. - -
-
-
-Custom Dilplan Entry - This field allows you to enter in any dialplan elements that you want for the Call Menu. - - - - - -



- -VICIDIAL_REMOTE_AGENTS TABLE

-
-
-User ID Start - This is the starting User ID that is used when the remote agent entries are inserted into the system. If the Number of Lines is set higher than 1, this number is incremented by one until each line has an entry. Make sure you create a new VICIDIAL user account with a user level of 4 or great if you want them to be able to use the vdremote.php page for remote web access of this account. - -
-
-
-Number of Lines - This defines how many remote agent entries the system creates, and determines how many lines it thinks it can safely send to the number below. - -
-
-
-Server IP - A remote agent entry is only good for one specific server, here is where you select which server you want. - -
-
-
-External Extension - This is the number that you want the calls forwarded to. Make sure that it is a full dial plan number and that if you need a 9 at the beginning you put it in here. Test by dialing this number from a phone on the system. - -
-
-
-Status - Here is where you turn the remote agent on and off. As soon as the agent is Active the system assumes that it can send calls to it. It may take up to 30 seconds once you change the status to Inactive to stop receiving calls. - -
-
-
-Campaign - Here is where you select the campaign that these remote agents will be logged into. Inbound needs to use the CLOSER campaign and select the inbound campaigns below that you want to receive calls from. - -
-
-
-Inbound Groups - Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. - - -



- -VICIDIAL_CAMPAIGN_LISTS

-
-
-The lists within this campaign are listed here, whether they are active is denoted by the Y or N and you can go to the list screen by clicking on the list ID in the first column. - - -



- -VICIDIAL_CAMPAIGN_STATUSES TABLE

-
-
-Through the use of custom campaign statuses, you can have statuses that only exist for a specific campaign. The Status must be 1-8 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as a disposition. The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls. The Category option allows you to group several statuses into a catogy that can be used for statistical analysis. - - - - 0) - { - ?> -



- - VICIDIAL_CAMPAIGN_HOTKEYS TABLE

-
-
- Through the use of custom campaign hot keys, agents that use the vicidial web-client can hang up and disposition calls just by pressing a single key on their keyboard. There are two special HotKey options that you can use in conjunction with Alternate Phone number dialing, ALTPH2 - Alternate Phone Hot Dial and ADDR3-----Address3 Hot Dial allow an agent to use a hotkey to hang up their call, stay on the same lead, and dial another contact number from that lead. + Default Group Alias - If you have allowed Group Aliases for the campaign that the agent is logged into then this is the group alias that is selected first by default on a call coming in from this inbound group when the agent chooses to use a Group Alias for an outbound manual call. Default is NONE or empty. @@ -4506,10 +4255,191 @@ if ($SSoutbound_autodial_active > 0)



- VICIDIAL_LEAD_RECYCLE TABLE

-
+ VICIDIAL_INBOUND_DIDS TABLE


- Through the use of lead recycling, you can call specific statuses of leads again at a specified interval without resetting the entire list. Lead recycling is campaign-specific and does not have to be a selected dialable status in your campaign. The attempt delay field is the number of seconds until the lead can be placed back in the hopper, this number must be at least 120 seconds. The attempt maximum field is the maximum number of times that a lead of this status can be attempted before the list needs to be reset, this number can be from 1 to 10. You can activate and deactivate a lead recycle entry with the provided links. +
+
+ DID Extension - This is the number, extension or DID that will trigger this entry and that you will route within the system using this function. There is a reserved default DID that you can use which is just the word -default- without the dashes, that will allos you to send any call that does not match any other existing patterns to the default DID. + +
+
+
+ DID Description - This is the description of the DID routing entry. + +
+
+
+ DID Active - This the field where you set the DID entry to active or not. Default is Y. + +
+
+
+ DID Route - This the type of route that you set the DID to use. EXTEN will send calls to the extension entered below, VOICEMAIL will send calls directly to the voicemail box entered below, AGENT will send calls to a VICIDIAL agent if they are logged in, PHONE will send the call to a phones entry selected below, IN_GROUP will send calls directly to the specified inbound group. Default is EXTEN. CALLMENU will send the call to the defined Call Menu. + +
+
+
+ Extension - If EXTEN is selected as the DID Route, then this is the dialplan extension that calls will be sent to. Default is 9998811112, no-service. + +
+
+
+ Extension Context - If EXTEN is selected as the DID Route, then this is the dialplan context that calls will be sent to. Default is default. + +
+
+
+ Voicemail Box - If VOICEMAIL is selected as the DID Route, then this is the voicemail box that calls will be sent to. Default is empty. + +
+
+
+ Phone Extension - If PHONE is selected as the DID Route, then this is the phone extension that calls will be sent to. + +
+
+
+ Phone Server IP - If PHONE is selected as the DID Route, then this is the server IP for the phone extension that calls will be sent to. + +
+
+
+ Call Menu - If CALLMENU is selected as the DID Route, then this is the Call Menu that calls will be sent to. + +
+
+
+ User Agent - If AGENT is selected as the DID Route, then this is the VICIDIAL Agent that calls will be sent to. + +
+
+
+ User Unavailable Action - If AGENT is selected as the DID Route, and the user is not logged in or available, then this is the route that the calls will take. + +
+
+
+ User Route Settings In-Group - If AGENT is selected as the DID Route, then this is the In-Group that will be used for the queue settings as the caller is waiting to be sent to the agent. Default is AGENTDIRECT. + +
+
+
+ In-Group ID - If IN_GROUP is selected as the DID Route, then this is the In-Group that calls will be sent to. + +
+
+
+ In-Group Call Handle Method - If IN_GROUP is selected as the DID Route, then this is the call handling method used for these calls. CID will add a new lead record with every call using the CallerID as the phone number, CIDLOOKUP will attempt to lookup the phone number by the CallerID in the entire system, CIDLOOKUPRL will attampt to lookup the phone number by the CallerID in only one specified list, CIDLOOKUPRC will attampt to lookup the phone number by the CallerID in all of the lists that belong to the specified campaign, CLOSER is specified for VICIDIAL Closer calls, ANI will add a new lead record with every call using the ANI as the phone number, ANILOOKUP will attempt to lookup the phone number by the ANI in the entire system, ANILOOKUPRL will attampt to lookup the phone number by the ANI in only one specified list, XDIGITID will prompt the caller for an X digit code before the call will be put into the queue. Default is CID. + +
+
+
+ In-Group Agent Search Method - If IN_GROUP is selected as the DID Route, then this is the agent search method to be used by the inbound group, LO is Load-Balanced-Overflow and will try to send the call to an agent on the local server before trying to send it to an agent on another server, LB is Load-Balanced and will try to send the call to the next agent no matter what server they are on, SO is Server-Only and will only try to send the calls to agents on the server that the call came in on. Default is LB. + +
+
+
+ In-Group List ID - If IN_GROUP is selected as the DID Route, then this is the List ID that leads may be searched through and that leads will be inserted into if necessary. + +
+
+
+ In-Group Campaign ID - If IN_GROUP is selected as the DID Route, then this is the Campaign ID that leads may be searched for in if the call handle method is CIDLOOKUPRC. + +
+
+
+ In-Group Phone Code - If IN_GROUP is selected as the DID Route, then this is the Phone Code used if a new lead is created. + + + + +



+ + VICIDIAL_CALL MENU TABLE

+
+
+ Menu ID - This is the ID for this step of the call menu. This will also show up as the context that is used in the dialplan for this call menu. + +
+
+
+ Menu Name - This field is the descriptive name for the call menu. + +
+
+
+ Menu Prompt - This field contains the file name of the audio prompt to play at the beginning of this menu. You can enter multiple propmts in this field and the other prompt fields by separating them with a pipe character. + +
+
+
+ Menu Timeout - This field is where you set the timeout in seconds that the menu will wait for the caller to enter in a DTMF choice. Setting this field to zero 0 will mean that there will be no wait time after the prompt is played. + +
+
+
+ Menu Timeout Prompt - This field contains the file name of the audio prompt to play when the timeout has been reached. Default is NONE to play no audio at timeout. + +
+
+
+ Menu Invalid Prompt - This field contains the file name of the audio prompt to play when the caller has selected an invalid option. Default is NONE to play no audio at invalid. + +
+
+
+ Menu Repeat - This field is where you define the number of times that the menu will play after the first time if no valid choice is made by the caller. Default is 1 to repeat the menu once. + +
+
+
+ Menu Time Check - This field is where you can select whether to restrict the Call Menu access to the specific hours set up in the selected Call Time. If the Call Time is blank, this setting will be ignored. Default is 0 for disabled. + +
+
+
+ Call Time ID - This is the Call Time ID that will be used to restrict calling times if the Menu Time Check option is enabled. + +
+
+
+ Track Calls in Real-Time Report - This field is where you can select whether you want the call to be tracked in the Real-time screen as an incoming IVR type call. Default is 1 for active. + +
+
+
+ Tracking Group - This is the ID that you can use to track calls to this Call Menu when looking at the IVR Report. The list includes CALLMENU as the default as well as all of the In-Groups. + +
+
+
+ Option Value - This field is where you define the menu option, possible choices are: 0,1,2,3,4,5,6,7,8,9,*,#,A,B,C,D,TIMECHECK. The special option TIMECHECK can be used only if you have Menu Time Check enabled and there is a Call Time defined for the Menu. To delete an Option, just set the Route to REMOVE and the option will be deleted when you click the SUBMIT button. + +
+
+
+ Option Description - This field is where you can describe the option, this description will be put into the dialplan as a comment above the option. + +
+
+
+ Option Route - This menu contains the options for where to send the call if this option is selected: CALLMENU,INGROUP,DID,HANGUP,EXTENSION,PHONE. For CALLMENU, the Route Value should be the Menu ID of the Call Menu that you want the call sent to. For INGROUP, the In-Group that you want the call to be sent to needs to be selected as well as the other 5 options that need to be set to properly route a call to an Inbound Group. For DID, the Route Value needs to be the DID pattern that you want to send the call to. For HANGUP, the Route Value can be the name of an audio file to play before hanging up the call. For EXTENSION, the Route Value needs to be the dialplan extension you want to send the call to, and the Route Value Context is the context that extension is located in, if left blank the context will default to default. For PHONE, the Route Value needs to be the phone login value for the phones entry that you want to send the call to. For VOICEMAIL, the Route Value needs to be the voicemail box number, the unavailable mesage will be played. For AGI, the Route Value needs to be the agi script and any values taht need to be passed to it. + +
+
+
+ Option Route Value - This field is where you enter the value that defines where in the selected Option Route that the call is to be directed to. + +
+
+
+ Option Route Value Context - This field is optional and only used for EXTENSION Option Routes. + +
+
+
+ Custom Dilplan Entry - This field allows you to enter in any dialplan elements that you want for the Call Menu. @@ -4517,1290 +4447,1397 @@ if ($SSoutbound_autodial_active > 0)



- VICIDIAL AUTO ALT DIAL STATUSES

-
+ VICIDIAL_REMOTE_AGENTS TABLE

+

- If the Auto Alt-Number Dialing field is set, then the leads that are dispositioned under these auto alt dial statuses will have their alt_phone and-or address3 fields dialed after any of these no-answer statuses are set. - - - - - -



- -VICIDIAL AGENT PAUSE CODES

-
-
-If the Agent Pause Codes Active field is set to active then the agents will be able to select from these pause codes when they click on the PAUSE button on their screens. This data is then stored in the vicidial agent log. The Pause code must contain only letters and numbers and be less than 7 characters long. The pause code name can be no longer than 30 characters. - - - - - -



- -VICIDIAL_USER_GROUPS TABLE

-
-
-User Group - This is the short name of a Vicidial User group, try not to use any spaces or punctuation for this field. max 20 characters, minimum of 2 characters. - -
-
-
-Group Name - This is the description of the vicidial user group max of 40 characters. - -
-
-
-Force Timeclock Login - This option allows you to not let an agent log in to the VICIDIAL agent interface if they have not logged into the timeclock. Default is N. There is an option to exempt admin users, levels 8 and 9. - -
-
-
-Shift Enforcement - This setting allows you to restrict agent logins based upon the shifts that are selected below. OFF will not enforce shifts at all. START will only enforce the login time but will not affect an agent that is running over their shift time if they are already logged in. ALL will enforce shift start time and will log an agent out after they run over the end of their shift time. Default is OFF. - -
-
-
-Group Shifts - This is a selectable list of shifts that can restrict the agents login time on the system. - -
-
-
-Allowed Campaigns - This is a selectable list of Campaigns to which members of this user group can log in to. The ALL-CAMPAIGNS option allows the users in this group to see and log in to any campaign on the system. - -
-
-
-Agent Status Viewable Groups - This is a selectable list of User Groups and user functions to which members of this user group can view the status of as well as transfer calls to inside of the agent screen. The ALL-GROUPS option allows the users in this group to see and transfer calls to any user on the system. The CAMPAIGN-AGENTS option allows users in this group to see and transfer calls to any user in the campaign that they are logged into. - -
-
-
-Agent Status View Time - This option defines whether the agent will see the amount of time that users in their agent sidebar have been in their current status. Default is N for no or disabled. - - 0) - { - ?> -
-
-
- QC Allowed Campaigns - This is a selectable list of Campaigns which members of this user group will be able to QC. The ALL-CAMPAIGNS option allows the users in this group to QC any campaign on the system. + User ID Start - This is the starting User ID that is used when the remote agent entries are inserted into the system. If the Number of Lines is set higher than 1, this number is incremented by one until each line has an entry. Make sure you create a new VICIDIAL user account with a user level of 4 or great if you want them to be able to use the vdremote.php page for remote web access of this account.
-
+
- QC Allowed Inbound Groups - This is a selectable list of Inbound Groups which members of this user group will be able to QC. The ALL-GROUPS option allows the users in this user group to QC any inbound group on the system. - + Number of Lines - This defines how many remote agent entries the system creates, and determines how many lines it thinks it can safely send to the number below. + +
+
+
+ Server IP - A remote agent entry is only good for one specific server, here is where you select which server you want. + +
+
+
+ External Extension - This is the number that you want the calls forwarded to. Make sure that it is a full dial plan number and that if you need a 9 at the beginning you put it in here. Test by dialing this number from a phone on the system. + +
+
+
+ Status - Here is where you turn the remote agent on and off. As soon as the agent is Active the system assumes that it can send calls to it. It may take up to 30 seconds once you change the status to Inactive to stop receiving calls. + +
+
+
+ Campaign - Here is where you select the campaign that these remote agents will be logged into. Inbound needs to use the CLOSER campaign and select the inbound campaigns below that you want to receive calls from. + +
+
+
+ Inbound Groups - Here is where you select the inbound groups you want to receive calls from if you have selected the CLOSER campaign. - - -



- -VICIDIAL_SCRIPTS TABLE

-
-
-Script ID - This is the short name of a Vicidial Script. This needs to be a unique identifier. Try not to use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. - -
-
-Script Name - This is the title of a Vicidial Script. This is a short summary of the script. max 50 characters, minimum of 2 characters. There should be no spaces or punctuation of any kind in theis field. - -
-
-Script Comments - This is where you can place comments for a Vicidial Script such as -changed to free upgrade on Sept 23-. max 255 characters, minimum of 2 characters. - -
-
-Script Text - This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: 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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id, dialed_number, dialed_label, rank, owner. For example, this sentence would print the persons name in it----

Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?

This would read----

Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: - -
-<iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&dialed_number=--A--dialed_number--B--&dialed_label=--A--dialed_label--B--&rank=--A--rank--B--&owner=--A--owner--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290" STYLE="z-index:17"> -</iframe> -
- -
-
-
-Active - This determines whether this script can be selected to be used by a campaign. - - - - - - 0) - { - ?>



- VICIDIAL_LEAD_FILTERS TABLE

-
+ VICIDIAL_CAMPAIGN_LISTS

+

- Filter ID - This is the short name of a Vicidial Lead Filter. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. + The lists within this campaign are listed here, whether they are active is denoted by the Y or N and you can go to the list screen by clicking on the list ID in the first column. -
-
- Filter Name - This is a more descriptive name of the Filter. This is a short summary of the filter. max 30 characters, minimum of 2 characters. -
-
- Filter Comments - This is where you can place comments for a Vicidial Filter such as -calls all California leads-. max 255 characters, minimum of 2 characters. +



+ VICIDIAL_CAMPAIGN_STATUSES TABLE

+

-
- Filter SQL - This is where you place the SQL query fragment that you want to filter by. do not begin or end with an AND, that will be added by the hopper cron script automatically. an example SQL query that would work here is- called_count > 4 and called_count < 8 -. + Through the use of custom campaign statuses, you can have statuses that only exist for a specific campaign. The Status must be 1-8 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as a disposition. The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls. The Category option allows you to group several statuses into a catogy that can be used for statistical analysis. + + + + if ($SSoutbound_autodial_active > 0) + { + ?> +



- - - -



- -VICIDIAL_CALL TIMES TABLE

-
-
-Call Time ID - This is the short name of a Vicidial Call Time Definition. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. - -
-
-Call Time Name - This is a more descriptive name of the Call Time Definition. This is a short summary of the Call Time definition. max 30 characters, minimum of 2 characters. - -
-
-Call Time Comments - This is where you can place comments for a Vicidial Call Time Definition such as -10am to 4pm with extra call state restrictions-. max 255 characters. - -
-
-Default Start and Stop Times - This is the default time that calling will be allowed to be started or stopped within this call time definition if the day-of-the-week start time is not defined. 0 is midnight. To prevent calling completely set this field to 2400 and set the Default Stop time to 2400. To allow calling 24 hours a day set the start time to 0 and the stop time to 2400. - -
-
-Weekday Start and Stop Times - These are the custom times per day that can be set for the call time definition. same rules apply as with the Default start and stop times. - -
-
-State Call Time Definitions - This is the list of State specific call time definitions that are followed in this Call Time Definition. - -
-
-State Call Time State - This is the two letter code for the state that this calling time definition is for. For this to be in effect the local call time that is set in the campaign must have this state call time record in it as well as all of the leads having two letter state codes in them. - - - - -



- -VICIDIAL_SHIFTS TABLE

-
-
-Shift ID - This is the short name of a Vicidial Shift Definition. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 20 characters, minimum of 2 characters. - -
-
-Shift Name - This is a more descriptive name of the Shift Definition. This is a short summary of the Shift definition. max 50 characters, minimum of 2 characters. - -
-
-Shift Start Time - This is the time that the campaign shift begins. Must only be numbers, 9:30 AM would be 0930 and 5:00 PM would be 1700. - -
-
-Shift Length - This is the time in Hours and Minutes that the campaign shift lasts. 8 hours would be 08:00 and 7 hours and 30 minutes would be 07:30. - -
-
-Shift Weekdays - In this section you should choose the days of the week that this shift is active. + VICIDIAL_CAMPAIGN_HOTKEYS TABLE

+
+
+ Through the use of custom campaign hot keys, agents that use the vicidial web-client can hang up and disposition calls just by pressing a single key on their keyboard. There are two special HotKey options that you can use in conjunction with Alternate Phone number dialing, ALTPH2 - Alternate Phone Hot Dial and ADDR3-----Address3 Hot Dial allow an agent to use a hotkey to hang up their call, stay on the same lead, and dial another contact number from that lead. -



-
-Audio Store - This utility allows you to upload audio files to the web server so that they can be distributed to all of the ViciDial servers in a multi-server cluster. An important note, only two audio file types will work, .wav files that are PCM 16bit 8k and .gsm files that are 8bit 8k. Please verify that your files are properly formatted before uploading them here. +



- - -



- -VICIDIAL_MUSIC_ON_HOLD TABLE

-
-
-Music On Hold ID - This is the short name of a Music On Hold entry. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 100 characters, minimum of 2 characters. - -
-
-Music On Hold Name - This is a more descriptive name of the Music On Hold entry. This is a short summary of the Music On Hold context and will show as a comment in the musiconhold-vicidial.conf file. max 255 characters, minimum of 2 characters. - -
-
-Active - This option allows you to set the Music On Hold entry to active or inactive. Inactive will remove the entry from the conf files. - -
-
-Random Order - This option allows you to define the playback of the audio files in a random order. If set to N then the defined order will be used. - -
-
-Filename - To add a new audio file to a Music On Hold entry the file must first be in the audio store, then you can select the file and click submit to add it to the file list. Music on hold is updated once per minute if there have been changes made. Any files not listed in a music on hold entry that are present in the music on hold folder will be deleted. + VICIDIAL_LEAD_RECYCLE TABLE

+
+
+ Through the use of lead recycling, you can call specific statuses of leads again at a specified interval without resetting the entire list. Lead recycling is campaign-specific and does not have to be a selected dialable status in your campaign. The attempt delay field is the number of seconds until the lead can be placed back in the hopper, this number must be at least 120 seconds. The attempt maximum field is the maximum number of times that a lead of this status can be attempted before the list needs to be reset, this number can be from 1 to 10. You can activate and deactivate a lead recycle entry with the provided links. -



-VICIDIAL_TTS_PROMPTS TABLE

-
-
-TTS ID - This is the short name of a TTS entry. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 50 characters, minimum of 2 characters. +



-
-
-TTS Name - This is a more descriptive name of the TTS entry. This is a short summary of the TTS definition. max 100 characters, minimum of 2 characters. + VICIDIAL AUTO ALT DIAL STATUSES

+
+
+ If the Auto Alt-Number Dialing field is set, then the leads that are dispositioned under these auto alt dial statuses will have their alt_phone and-or address3 fields dialed after any of these no-answer statuses are set. -
-
-Active - This option allows you to set the TTS entry to active or inactive. - -
-
-TTS Text - This is the actual Text To Speech data field that is sent to Cepstral for creation of the audio file to be played to the customer. you can use Speech Synthesis Markup Language -SSML- in this field, for example, <break time='1000ms'/> for a 1 second break. You can also use several variables such as first name, last name and title as ViciDial variables just like you do in a Script: --A--first_name--B--. Here is a list of the available variables: lead_id, entry_date, modify_date, status, user, vendor_lead_code, source_id, list_id, 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 - - - - - 0) - { + + +



- VICIDIAL LIST LOADER FUNCTIONALITY

-
+ VICIDIAL AGENT PAUSE CODES

+

- The VICIDIAL basic web-based lead loader is designed simply to take a lead file - up to 8MB in size - that is either tab or pipe delimited and load it into the vicidial_list table. The lead loader allows for field choosing and TXT- Plain Text, CSV- Comma Separated Values and XLS- Excel file formats. The lead loader does not do data validation, but it does allow you to check for duplicates in itself, within the campaign or within the entire system. Also, make sure that you have created the list that these leads are to be under so that you can use them. Here is a list of the fields in their proper order for the lead files: -
    -
  1. Vendor Lead Code - shows up in the Vendor ID field of the GUI -
  2. Source Code - internal use only for admins and DBAs -
  3. List ID - the list number that these leads will show up under -
  4. Phone Code - the prefix for the phone number - 1 for US, 01144 for UK, 01161 for AUS, etc -
  5. Phone Number - must be at least 8 digits long -
  6. Title - title of the customer - Mr. Ms. Mrs, etc... -
  7. First Name -
  8. Middle Initial -
  9. Last Name -
  10. Address Line 1 -
  11. Address Line 2 -
  12. Address Line 3 -
  13. City -
  14. State - limited to 2 characters -
  15. Province -
  16. Postal Code -
  17. Country -
  18. Gender -
  19. Date of Birth -
  20. Alternate Phone Number -
  21. Email Address -
  22. Security Phrase -
  23. Comments -
+ If the Agent Pause Codes Active field is set to active then the agents will be able to select from these pause codes when they click on the PAUSE button on their screens. This data is then stored in the vicidial agent log. The Pause code must contain only letters and numbers and be less than 7 characters long. The pause code name can be no longer than 30 characters. -
NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file. Also, for duplication checks against gampaign lists, the list that has new leads going into it does need to be created in the system before you start to load the leads.



+ + VICIDIAL_USER_GROUPS TABLE

+
+
+ User Group - This is the short name of a Vicidial User group, try not to use any spaces or punctuation for this field. max 20 characters, minimum of 2 characters. + +
+
+
+ Group Name - This is the description of the vicidial user group max of 40 characters. + +
+
+
+ Force Timeclock Login - This option allows you to not let an agent log in to the VICIDIAL agent interface if they have not logged into the timeclock. Default is N. There is an option to exempt admin users, levels 8 and 9. + +
+
+
+ Shift Enforcement - This setting allows you to restrict agent logins based upon the shifts that are selected below. OFF will not enforce shifts at all. START will only enforce the login time but will not affect an agent that is running over their shift time if they are already logged in. ALL will enforce shift start time and will log an agent out after they run over the end of their shift time. Default is OFF. + +
+
+
+ Group Shifts - This is a selectable list of shifts that can restrict the agents login time on the system. + +
+
+
+ Allowed Campaigns - This is a selectable list of Campaigns to which members of this user group can log in to. The ALL-CAMPAIGNS option allows the users in this group to see and log in to any campaign on the system. + +
+
+
+ Agent Status Viewable Groups - This is a selectable list of User Groups and user functions to which members of this user group can view the status of as well as transfer calls to inside of the agent screen. The ALL-GROUPS option allows the users in this group to see and transfer calls to any user on the system. The CAMPAIGN-AGENTS option allows users in this group to see and transfer calls to any user in the campaign that they are logged into. + +
+
+
+ Agent Status View Time - This option defines whether the agent will see the amount of time that users in their agent sidebar have been in their current status. Default is N for no or disabled. + - - - - - -PHONES TABLE

-
-
-Phone extension - This field is where you put the phones name as it appears to Asterisk not including the protocol or slash at the beginning. For Example: for the SIP phone SIP/test101 the Phone extension would be test101. Also, for IAX2 phones make sure you use the full phones name: IAX2/IAXphone1@IAXphone1 would be IAXphone1@IAXphone1. For Zap phones make sure you put the full channel: Zap/25-1 would be 25-1. Another note, make sure you set the Protocol below correctly for your type of phone. - -
-
-
-Dial Plan Number - This field is for the number you dial to have the phone ring. This number is defined in the extensions.conf file of your Asterisk server - -
-
-
-Voicemail Box - This field is for the voicemail box that the messages go to for the user of this phone. We use this to check for voicemail messages and for the user to be able to use the VOICEMAIL button on astGUIclient app. - -
-
-
-Outbound CallerID - This field is where you would enter the callerID number that you would like to appear on outbound calls placed form the astguiclient web-client. This does not work on RBS, non-PRI, T1/E1s. - -
-
-
-Phone IP address - This field is for the phone's IP address if it is a VOIP phone. This is an optional field - -
-
-
-Computer IP address - This field is for the user's computer IP address. This is an optional field - -
-
-
-Server IP - This menu is where you select which server the phone is active on. - -
-
-
-Login - The login used for the phone user to login to the client applications. - -
-
-
-Password - The password used for the phone user to login to the client applications. IMPORTANT, this is the password only for the agent web interface phone login, to change the sip.conf or iax.conf password, or secret, for this phone device you need to modify the Conf File Secret field further down on this page. - -
-
-
-Status - The status of the phone in the system, ACTIVE and ADMIN allow for GUI clients to work. ADMIN allows access to this administrative web site. All other statuses do not allow GUI or Admin web access. - -
-
-
-Active Account - Whether the phone is active to put it in the list in the GUI client. - -
-
-
-Phone Type - Purely for administrative notes. - -
-
-
-Full Name - Used by the GUIclient in the list of active phones. - -
-
-
-Company - Purely for administrative notes. - -
-
-
-Picture - Not yet Implemented. - -
-
-
-New Messages - Number of new voicemail messages for this phone on the Asterisk server. - -
-
-
-Old Messages - Number of old voicemail messages for this phone on the Asterisk server. - -
-
-
-Client Protocol - The protocol that the phone uses to connect to the Asterisk server: SIP, IAX2, Zap . Also, there is EXTERNAL for remote dial numbers or speed dial numbers that you want to list as phones. - -
-
-
-Local GMT - The difference from Greenwich Mean time, or ZULU time where the phone is located. DO NOT ADJUST FOR DAYLIGHT SAVINGS TIME. This is used by the VICIDIAL campaign to accurately display the time and customer time. - -
-
-
-Phone Ring Timeout - This is the amount of time, in seconds, that the phone will ring in the dialplan before sending the call to voicemail. Default is 60 seconds. - -
-
-
-Manager Login - This is the login that the GUI clients for this phone will use to access the Database where the server data resides. - -
-
-
-Manager Secret - This is the password that the GUI clients for this phone will use to access the Database where the server data resides. - -
-
-
-VICIDIAL Default User - This is to place a default value in the VICIDIAL user field whenever this phone user opens the astVICIDIAL client app. Leave blank for no user. - -
-
-
-VICIDIAL Default Pass - This is to place a default value in the VICIDIAL password field whenever this phone user opens the astVICIDIAL client app. Leave blank for no pass. - -
-
-
-VICIDIAL Default Campaign - This is to place a default value in the VICIDIAL campaign field whenever this phone user opens the astVICIDIAL client app. Leave blank for no campaign. - -
-
-
-Park Exten - This is the default Parking extension for the client apps. Verify that a different one works before you change this. - -
-
-
-Conf Exten - This is the default Conference park extension for the client apps. Verify that a different one works before you change this. - -
-
-
-VICIDIAL Park Exten - This is the default Parking extension for VICIDIAL client app. Verify that a different one works before you change this. - -
-
-
-VICIDIAL Park File - This is the default VICIDIAL park extension file name for the client apps. Verify that a different one works before you change this. limited to 10 characters. - -
-
-
-Monitor Prefix - This is the dial plan prefix for monitoring of Zap channels automatically within the astGUIclient app. Only change according to the extensions.conf ZapBarge extensions records. - -
-
-
-Recording Exten - This is the dial plan extension for the recording extension that is used to drop into meetme conferences to record them. It usually lasts upto one hour if not stopped. verify with extensions.conf file before changing. - -
-
-
-VMAIL Main Exten - This is the dial plan extension going to check your voicemail. verify with extensions.conf file before changing. - -
-
-
-VMAIL Dump Exten - This is the dial plan prefix used to send calls directly to a user's voicemail from a live call in the astGUIclient app. verify with extensions.conf file before changing. - -
-
-
-Exten Context - This is the dial plan context that the agent applications, like ViciDial, primarily use. It is assumed that all numbers dialed by the client apps are using this context so it is a good idea to make sure this is the most wide context possible. verify with extensions.conf file before changing. default is default. - -
-
-
-Phone Context - This is the dial plan context that this phone will use to dial out. If you are running a call center and you do not want your agents to be able to dial out outside of the ViciDial applicaiton for example, then you would set this field to a dialplan context that does not exist, something like agent-nodial. default is default. - -
-
-
-Conf File Secret - This is the secret, or password, for the phone in the iax or sip auto-generated conf file for this phone. Limit is 20 characters alphanumeric dash and underscore accepted. Default is test. - -
-
-
-DTMF send Channel - This is the channel string used to send DTMF sounds into meetme conferences from the client apps. Verify the exten and context with the extensions.conf file. - -
-
-
-Outbound Call Group - This is the channel group that outbound calls from this phone are placed out of. There are a couple routines in the client apps that use this. For Zap channels you want to use something like Zap/g2 , for IAX2 trunks you would want to use the full IAX prefix like IAX2/VICItest1:secret@10.10.10.15:4569. Verify the trunks with the extensions.conf file, it is usually what you have defined as the TRUNK global variable at the top of the file. - -
-
-
-Browser Location - This is applicable to only UNIX/LINUX clients, the absolute path to Mozilla or Firefox browser on the machine. verify this by launching it manually. - -
-
-
-Install Directory - This is the place where the astGUIclient and astVICIDIAL scripts are located on your machine. For Win32 it should be something like C:\AST_VICI and for UNIX it should be something like /usr/local/perl_TK. verify this manually. - -
-
-
-CallerID URL - This is the web address of the page used to do custom callerID lookups. default testing address is: http://astguiclient.sf.net/test_callerid_output.php - -
-
-
-VICIDIAL Default URL - This is the web address of the page used to do custom VICIDIAL Web Form queries. default testing address is: http://astguiclient.sf.net/test_VICIDIAL_output.php - -
-
-
-Call Logging - This is set to true if the call_log.agi file is in place in the extensions.conf file for all outbound and hang up 'h' extensions to log all calls. This should always be 1 because it is manditory for many astGUIclient and VICIDIAL features to work properly. - -
-
-
-User Switching - Set to true to allow user to switch to another user account. NOTE: If user switches they can initiate recording on the new user's phone conversation - -
-
-
-Conferencing - Set to true to allow user to start conference calls with upto six external lines. - -
-
-
-Admin Hang Up - Set to true to allow user to be able to hang up any line at will through astGUIclient. Good idea only to enable this for Admin users. - -
-
-
-Admin Hijack - Set to true to allow user to be able to grab and redirect to their extension any line at will through astGUIclient. Good idea only to enable this for Admin users. But is very useful for Managers. - -
-
-
-Admin Monitor - Set to true to allow user to be able to grab and redirect to their extension any line at will through astGUIclient. Good idea only to enable this for Admin users. But is very useful for Managers and as a training tool. - -
-
-
-Call Park - Set to true to allow user to be able to park calls on astGUIclient hold to be picked up by any other astGUIclient user on the system. Calls stay on hold for upto a half hour then hang up. Usually enabled for all. - -
-
-
-Updater Check - Set to true to display a popup warning that the updater time has not changed in 20 seconds. Useful for Admin users. - -
-
-
-AF Logging - Set to true to log many actions of astGUIclient usage to a text file on the user's computer. - -
-
-
-Queue Enabled - Set to true to have client apps use the Asterisk Central Queue system. Required for VICIDIAL and recommended for all users. - -
-
-
-CallerID Popup - Set to true to allow for numbers defined in the extensions.conf file to send CallerID popup screens to astGUIclient users. - -
-
-
-VMail Button - Set to true to display the VOICEMAIL button and the messages count display on astGUIclient. - -
-
-
-Fast Refresh - Set to true to enable a new rate of refresh of call information for the astGUIclient. Default disabled rate is 1000 ms ,1 second. Can increase system load if you lower this number. - -
-
-
-Fast Refresh Rate - in milliseconds. Only used if Fast Refresh is enabled. Default disabled rate is 1000 ms ,1 second. Can increase system load if you lower this number. - -
-
-
-Persistant MySQL - If enabled the astGUIclient connection will remain connected instead of connecting every second. Useful if you have a fast refresh rate set. It will increase the number of connections on your MySQL machine. - -
-
-
-Auto Dial Next Number - If enabled the VICIDIAL client will dial the next number on the list automatically upon disposition of a call unless they selected to "Stop Dialing" on the disposition screen. - -
-
-
-Stop Rec after each call - If enabled the VICIDIAL client will stop whatever recording is going on after each call has been dispositioned. Useful if you are doing a lot of recording or you are using a web form to trigger recording. - -
-
-
-Enable SIPSAK Messages - If enabled the server will send messages to the SIP phone to display on the phone LCD display when logged into VICIDIAL. Feature only works with SIP phones and requires sipsak application to be installed on the web server. Default is 0. - -
-
-
-DBX Server - The MySQL database server that this user should be connecting to. - -
-
-
-DBX Database - The MySQL database that this user should be connecting to. Default is asterisk. - -
-
-
-DBX User - The MySQL user login that this user should be using when connecting. Default is cron. - -
-
-
-DBX Pass - The MySQL user password that this user should be using when connecting. Default is 1234. - -
-
-
-DBX Port - The MySQL TCP port that this user should be using when connecting. Default is 3306. - -
-
-
-DBY Server - The MySQL database server that this user should be connecting to. Secondary server, not used currently. - -
-
-
-DBY Database - The MySQL database that this user should be connecting to. Default is asterisk. Secondary server, not used currently. - -
-
-
-DBY User - The MySQL user login that this user should be using when connecting. Default is cron. Secondary server, not used currently. - -
-
-
-DBY Pass - The MySQL user password that this user should be using when connecting. Default is 1234. Secondary server, not used currently. - -
-
-
-DBY Port - The MySQL TCP port that this user should be using when connecting. Default is 3306. Secondary server, not used currently. - -
-
-
-Alias ID - The ID of the alias used to allow for phone load balanced logins. no spaces or other special characters allowed. Must be between 2 and 20 characters in length. - -
-
-
-Alias Name - The name used to describe a phones alias, Must be between 2 and 50 characters in length. - -
-
-
-Phones Logins List - The comma separated list of phone logins used when an agent logs in using phone load balanced logins. The Agent application will find the active server with the fewest agents logged into it and place a call from that server to the agent upon login. - -
-
-
-Phones Email - The email address associated with this phone entry. This is used for voicemail settings. - -
-
-
-Template ID - This is the conf file template ID that this phone entry will use for its Asterisk settings. Default is --NONE--. - -
-
-
-Conf Override Settings - If populated, and the Template ID is set to --NONE-- then the contents of this field are used as the conf file entries for this phone. generate_vicidial_conf for this phones server must be set to Y for this to work. This field should NOT contain the [extension] line, that will be automatically generated. - -
-
-
-Group Alias ID - The ID of the group alias used by agents to dial out calls from the VICIDIAL agent interface with different Caller IDs. no spaces or other special characters allowed. Must be between 2 and 20 characters in length. - -
-
-
-Group Alias Name - The name used to describe a group alias, Must be between 2 and 50 characters in length. - -
-
-
-Caller ID Number - The Caller ID number used in this Group Alias. Must be digits only. - -
-
-
-Caller ID Name - The Caller ID name that can be sent out with this Group Alias. As far as we know this will only work in Canada on PRI circuits and using an IAX loop trunk through Asterisk. - - - - -



- -SERVERS TABLE

-
-
-Server ID - This field is where you put the Asterisk servers name, doesnt have to be an official domain sub, just a nickname to identify the server to Admin users. - -
-
-
-Server Description - The field where you use a small phrase to describe the Asterisk server. - -
-
-
-Server IP Address - The field where you put the Network IP address of the Asterisk server. - -
-
-
-Active - Set whether the Asterisk server is active or inactive. - -
-
-
-System Load - These two statistics show the loadavg of a system times 100 and the CPU usage percentage of the server and is updated every minute. The loadavg should on average be below 100 multiplied by the number of CPU cores your system has, for optimal performance. The CPU usage percentage should stay below 50 for optimal performance. - -
-
-
-Live Channels - This field shows the current number of Asterisk channels that are live on the system right now. It is important to note that the number of Asterisk channels is usually much higher than the number of actual calls on a system. This field is updated once every minute. - -
-
-
-Disk Usage - This field will show the disk usage for every partition on this server. This field is updated once every minute. - -
-
-
-Asterisk Version - Set the version of Asterisk that you have installed on this server. Examples: '1.2', '1.0.8', '1.0.7', 'CVS_HEAD', 'REALLY OLD', etc... This is used because versions 1.0.8 and 1.0.9 have a different method of dealing with Local/ channels, a bug that has been fixed in CVS v1.0, and need to be treated differently when handling their Local/ channels. Also, current CVS_HEAD and the 1.2 release tree uses different manager and command output so it must be treated differently as well. - -
-
-
-Max VICIDIAL Trunks - This field will determine the maximum number of lines that the VICIDIAL auto-dialer will attempt to call on this server. If you want to dedicate two full PRI T1s to VICIDIALing on a server then you would set this to 46. Default is 96. - -
-
-
-Max Calls per Second - This setting determines the maximum number of calls that can be placed by the outbound auto-dialing script on this server per second. Must be from 1 to 100. Default is 20. - -
-
-
-Telnet Host - This is the address or name of the Asterisk server and is how the manager applications connect to it from where they are running. If they are running on the Asterisk server, then the default of 'localhost' is fine. - -
-
-
-Telnet Port - This is the port of the Asterisk server Manager connection and is how the manager applications connect to it from where they are running. The default of '5038' is fine for a standard install. - -
-
-
-Manager User - The username or login used to connect genericly to the Asterisk server manager. Default is 'cron' - -
-
-
-Manager Secret - The secret or password used to connect genericly to the Asterisk server manager. Default is '1234' - -
-
-
-Manager Update User - The username or login used to connect to the Asterisk server manager optimized for the Update scripts. Default is 'updatecron' and assumes the same secret as the generic user. - -
-
-
-Manager Listen User - The username or login used to connect to the Asterisk server manager optimized for scripts that only listen for output. Default is 'listencron' and assumes the same secret as the generic user. - -
-
-
-Manager Send User - The username or login used to connect to the Asterisk server manager optimized for scripts that only send Actions to the manager. Default is 'sendcron' and assumes the same secret as the generic user. - -
-
-
-Server GMT offset - The difference in hours from GMT time not adjusted for Daylight-Savings-Time of the server. Default is '-5' - -
-
-
-VMail Dump Exten - The extension prefix used on this server to send calls directly through agc to a specific voicemail box. Default is '85026666666666' - -
-
-
-VICIDIAL AD extension - The default extension if none is present in the campaign to send calls to for VICIDIAL auto dialing. Default is '8365' - -
-
-
-Default Context - The default dial plan context used for scripts that operate for this server. Default is 'default' - -
-
-
-System Performance - Setting this option to Y will enable logging of system performance stats for the server machine including system load, system processes and Asterisk channels in use. Default is N. - -
-
-
-Server Logs - Setting this option to Y will enable logging of all VICIDIAL related scripts to their text log files. Setting this to N will stop writing logs to files for these processes, also the screen logging of asterisk will be disabled if this is set to N when Asterisk is started. Default is Y. - -
-
-
-AGI Output - Setting this option to NONE will disable output from all VICIDIAL related AGI scripts. Setting this to STDERR will send the AGI output to the Asterisk CLI. Setting this to FILE will send the output to a file in the logs directory. Setting this to BOTH will send output to both the Asterisk CLI and a log file. Default is FILE. - -
-
-
-VICIDIAL Balance Dialing - Setting this field to Y will allow the server to place balance calls for campaigns in VICIDIAL so that the defined dial level can be met even if there are no agents logged into that campaign on this server. Default is N. - -
-
-
-VICIDIAL Balance Rank - This field allows you to set the order in which this server is to be used for balance dialing, if balance dialing is enabled. The server with the highest rank will be used first in placing Balance fill calls. Default is 0. - -
-
-
-VICIDIAL Balance Offlimits - This setting defines the number of trunks to not allow VICIDIAL balance dialing to use. For example if you have 40 max vicidial trunks and balance offlimits is set to 10 you will only be able to use 30 trunk lines for VICIDIAL balance dialing. Default is 0. - -
-
-
-Recording Web Link - This setting allows you to override the default of the display of the recording link in the admin web pages. Default is SERVER_IP. - -
-
-
-Alternate Recording Server IP - This setting is where you can put a server IP or other machine name that can be used in place of the server_ip in the links to recordings within the admin web pages. Default is empty. - -
-
-
-Active Asterisk Server - If Asterisk is not running on this server, or if VICIDIAL should not be using this server, or if are only using this server for other scripts like the hopper loading script you would want to set this to N. Default is Y. - -
-
-
-Active Agent Server - Setting this option to N will prevent agents from being able to login to this server through the vicidial agent screen. This is very useful when using a phone login load balanced setup. Default is Y. - -
-
-
-Generate conf files - If you would like the system to auto-generate asterisk conf files based upon the phones entries, carrier entries and load balancing setup within VICIDIAL then set this to Y. Default is Y. - -
-
-
-Rebuild conf files - If you want to force a rebuilding of the Asterisk conf files or if any of the phones or carrier entries have changed then this should be set to Y. After the conf files have been generated and Asterisk has been reloaded then this will be changed to N. Default is Y. - -
-
-
-Rebuild Music On Hold - If you want to force a rebuilding of the music on hold files or if the music on hold entries or server entries have changed then this should be set to Y. After the music on hold files have been synchronized and reloaded then this will be changed to N. Default is Y. - -
-
-
-Sounds Update - If you want to force a check of the sound files on this server, and the central audio store is enabled as a system setting, then this field will allow the sounds updater to run at the next top of the minute. Any time an audio file is uploaded from the web interface this is automatically set to Y for all servers that have Asterisk active. Default is N. - -
-
-
-ViciDial Recording Limit - This field is where you set the maximum number of minutes that a call recording initiated by ViciDial can be. Default is 60 minutes. - -
-
-
-Carrier Logging Active - This setting allows you to log all hangup return codes for any outbound list dialing calls that you are placing. Default is N. - - - - - - -



- -vicidial_conf_templates TABLE

-
-
-Template ID - This field needs to be at least 2 characters in length and no more than 15 characters in length, no spaces. This is the ID that will be used to identify the conf template throughout the system. - -
-
-
-Template Name - This is the descriptive name of the conf file template entry. - -
-
-
-Template Contents - This field is where you can enter in the specific settings to be used by all phones and-or carriers that are set to use this conf template. Fields that should NOT be included in this box are: secret, accountcode, account, username and mailbox. - - - - - -



- -vicidial_server_carriers TABLE

-
-
-Carrier ID - This field needs to be at least 2 characters in length and no more than 15 characters in length, no spaces. This is the ID that will be used to identify the carrier for this specific entry throughout the system. - -
-
-
-Carrier Name - This is the descriptive name of the carrier entry. - -
-
-
-Registration String - This field is where you can enter in the exact string needed in the IAX or SIP configuration file to register to the provider. Optional but highly recommended if your carrier allows registration. - -
-
-
-Template ID - This optional field allows you to choose a conf file template for this carrier entry. - -
-
-
-Account Entry - This field is used if you have not selected a template to use, and it is where you can enter in the specific account settings to be used for this carrier. If you will be taking in inbound calls from this carrier trunk you might want to set the context=trunkinbound within this field so that you can use the DID handling process within VICIDIAL. - -
-
-
-Protocol - This field allows you to define the protocol to use for the carrier entry. Currently only IAX and SIP are supported. - -
-
-
-Globals String - This optional field allows you to define a global variable to use for the carrier in the dialplan. - -
-
-
-Dialplan Entry - This optional field allows you to define a set of dialplan entries to use for this carrier. - -
-
-
-Server IP - This is the server that this specific carrier record is associated with. - -
-
-
-Active - This defines whether the carrier will be included in the auto-generated conf files or not. - - - - - -



- -CONFERENCES TABLE

-
-
-Conference Number - This field is where you put the meetme conference dialpna number. It is also recommended that the meetme number in meetme.conf matches this number for each entry. This is for the conferences in astGUIclient and is used for leave-3way-call functionality in VICIDIAL. - -
-
-
-Server IP - The menu where you select the Asterisk server that this conference will be on. - - - - - 0) - { + if ($SSqc_features_active > 0) + { + ?> +
+
+
+ QC Allowed Campaigns - This is a selectable list of Campaigns which members of this user group will be able to QC. The ALL-CAMPAIGNS option allows the users in this group to QC any campaign on the system. + +
+
+
+ QC Allowed Inbound Groups - This is a selectable list of Inbound Groups which members of this user group will be able to QC. The ALL-GROUPS option allows the users in this user group to QC any inbound group on the system. + + + + +



- VICIDIAL_SERVER_TRUNKS TABLE

-
+ VICIDIAL_SCRIPTS TABLE

+

- VICIDIAL Server Trunks allows you to restrict the outgoing lines that are used on this server for campaign dialing on a per-campaign basis. You have the option to reserve a specific number of lines to be used by only one campaign as well as allowing that campaign to run over its reserved lines into whatever lines remain open, as long at the total lines used by vicidial on this server is less than the Max VICIDIAL Trunks setting. Not having any of these records will allow the campaign that dials the line first to have as many lines as it can get under the Max VICIDIAL Trunks setting. + Script ID - This is the short name of a Vicidial Script. This needs to be a unique identifier. Try not to use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. + +
+
+ Script Name - This is the title of a Vicidial Script. This is a short summary of the script. max 50 characters, minimum of 2 characters. There should be no spaces or punctuation of any kind in theis field. + +
+
+ Script Comments - This is where you can place comments for a Vicidial Script such as -changed to free upgrade on Sept 23-. max 255 characters, minimum of 2 characters. + +
+
+ Script Text - This is where you place the content of a Vicidial Script. Minimum of 2 characters. You can have customer information be auto-populated in this script using "--A--field--B--" where field is one of the following fieldnames: 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, lead_id, campaign, phone_login, group, channel_group, SQLdate, epoch, uniqueid, customer_zap_channel, server_ip, SIPexten, session_id, dialed_number, dialed_label, rank, owner. For example, this sentence would print the persons name in it----

Hello, can I speak with --A--first_name--B-- --A--last_name--B-- please? Well hello --A--title--B-- --A--last_name--B-- how are you today?

This would read----

Hello, can I speak with John Doe please? Well hello Mr. Doe how are you today?

You can also use an iframe to load a separate window within the SCRIPT tab, here is an example with prepopulated variables: + +
+ <iframe src="http://astguiclient.sf.net/test_VICIDIAL_output.php?lead_id=--A--lead_id--B--&vendor_id=--A--vendor_lead_code--B--&list_id=--A--list_id--B--&gmt_offset_now=--A--gmt_offset_now--B--&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&middle_initial=--A--middle_initial--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--&address3=--A--address3--B--&city=--A--city--B--&state=--A--state--B--&province=--A--province--B--&postal_code=--A--postal_code--B--&country_code=--A--country_code--B--&gender=--A--gender--B--&date_of_birth=--A--date_of_birth--B--&alt_phone=--A--alt_phone--B--&email=--A--email--B--&security_phrase=--A--security_phrase--B--&comments=--A--comments--B--&user=--A--user--B--&campaign=--A--campaign--B--&phone_login=--A--phone_login--B--&fronter=--A--fronter--B--&closer=--A--user--B--&group=--A--group--B--&channel_group=--A--group--B--&SQLdate=--A--SQLdate--B--&epoch=--A--epoch--B--&uniqueid=--A--uniqueid--B--&customer_zap_channel=--A--customer_zap_channel--B--&server_ip=--A--server_ip--B--&SIPexten=--A--SIPexten--B--&session_id=--A--session_id--B--&dialed_number=--A--dialed_number--B--&dialed_label=--A--dialed_label--B--&rank=--A--rank--B--&owner=--A--owner--B--&phone=--A--phone--B--" style="width:580;height:290;background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="460" height="290" STYLE="z-index:17"> + </iframe> +
+ +
+
+
+ Active - This determines whether this script can be selected to be used by a campaign. + + + + + + if ($SSoutbound_autodial_active > 0) + { + ?> +



+ VICIDIAL_LEAD_FILTERS TABLE

+
+
+ Filter ID - This is the short name of a Vicidial Lead Filter. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. +
+
+ Filter Name - This is a more descriptive name of the Filter. This is a short summary of the filter. max 30 characters, minimum of 2 characters. +
+
+ Filter Comments - This is where you can place comments for a Vicidial Filter such as -calls all California leads-. max 255 characters, minimum of 2 characters. -



- -SYSTEM_SETTINGS TABLE

-
-
-Use Non-Latin - This option allows you to default the web display script to use UTF8 characters and not do any latin-character-family regular expression filtering or display formatting. Default is 0. - -
-
-
-Webroot Writable - This setting allows you to define whether temp files and authentication files should be placed in the webroot on your web server. Default is 1. - -
-
-
-VICIDIAL Agent Disable Display - This field is used to select when to show an agent when their session has been disabled by the system, a manager action or by an external measure. The NOT_ACTIVE setting will disable the message on the agents screen. The LIVE_AGENT setting will only display the disabled message when the agents vicidial_auto_calls record has been removed, such as during a force logout or emergency logout. - -
-
-
-Allow SIPSAK Messages - If set to 1, this will allow the phones table setting to work properly, the server will send messages to the SIP phone to display on the phone LCD display when logged into VICIDIAL. This feature only works with SIP phones and requires sipsak application to be installed on the web server. Default is 0. - -
-
-
-Agent API Active - If set to 1, this will allow the Agent API interface to function. Default is 0. - -
-
-
-Admin Home URL - This is the URL or web site address that you will go to if you click on the HOME link at the top of the admin.php page. - -
-
-
-Enable Agent Transfer Logfile - This option will log to a text logfile on the webserver every time a call is transferred to an agent. Default is 0, disabled. - -
-
-
-Timeclock End Of Day - This setting defines when all users are to be auto logged out of the timeclock system. Only runs once a day. must be only 4 digits 2 digit hour and 2 digit minutes in 24 hour time. Default is 0000. - -
-
-
-Timeclock Last Auto Logout - This field displays the date of the last auto-logout. - -
-
-
-Agent Screen Header Date Format - This menu allows you to choose the format of the date that shows up at the top of the VICIDIAL agent screen. The options for this setting are: default is MS_DASH_24HR
-MS_DASH_24HR 2008-06-24 23:59:59 - Default date format with year month day followed by 24 hour time
-US_SLASH_24HR 06/24/2008 23:59:59 - USA date format with month day year followed by 24 hour time
-EU_SLASH_24HR 24/06/2008 23:59:59 - European date format with day month year followed by 24 hour time
-AL_TEXT_24HR JUN 24 23:59:59 - Text date format with abbreviated month day followed by 24 hour time
-MS_DASH_AMPM 2008-06-24 11:59:59 PM - Default date format with year month day followed by 12 hour time
-US_SLASH_AMPM 06/24/2008 11:59:59 PM - USA date format with month day year followed by 12 hour time
-EU_SLASH_AMPM 24/06/2008 11:59:59 PM - European date format with day month year followed by 12 hour time
-AL_TEXT_AMPM JUN 24 11:59:59 PM - Text date format with abbreviated month day followed by 12 hour time
- -
-
-
-Agent Screen Customer Date Format - This menu allows you to choose the format of the customer time zone date that shows up at the top of the Customer Information section of the VICIDIAL agent screen. The options for this setting are: default is AL_TEXT_AMPM
-MS_DASH_24HR 2008-06-24 23:59:59 - Default date format with year month day followed by 24 hour time
-US_SLASH_24HR 06/24/2008 23:59:59 - USA date format with month day year followed by 24 hour time
-EU_SLASH_24HR 24/06/2008 23:59:59 - European date format with day month year followed by 24 hour time
-AL_TEXT_24HR JUN 24 23:59:59 - Text date format with abbreviated month day followed by 24 hour time
-MS_DASH_AMPM 2008-06-24 11:59:59 PM - Default date format with year month day followed by 12 hour time
-US_SLASH_AMPM 06/24/2008 11:59:59 PM - USA date format with month day year followed by 12 hour time
-EU_SLASH_AMPM 24/06/2008 11:59:59 PM - European date format with day month year followed by 12 hour time
-AL_TEXT_AMPM JUN 24 11:59:59 PM - Text date format with abbreviated month day followed by 12 hour time
- -
-
-
-Agent Screen Customer Phone Format - This menu allows you to choose the format of the customer phone number that shows up in the status section of the VICIDIAL agent screen. The options for this setting are: default is US_PARN
-US_DASH 000-000-0000 - USA dash separated phone number
-US_PARN (000)000-0000 - USA dash separated number with area code in parenthesis
-MS_NODS 0000000000 - No formatting
-UK_DASH 00 0000-0000 - UK dash separated phone number with space after city code
-AU_SPAC 000 000 000 - Australia space separated phone number
-IT_DASH 0000-000-000 - Italy dash separated phone number
-FR_SPAC 00 00 00 00 00 - France space separated phone number
- -
-
-
-Agent interface API Access Active - This option allows you to enable or disable the agent interface API. Default is 0. - -
-
-
-Agent Only Callback Campaign Lock - This option defines whether AGENTONLY callbacks are locked to the campaign that the agent originally created them under. Setting this to 1 means that the agent can only dial them from the campaign they were set under, 0 means that the agent can access them no matter what campaign they are logged into. Default is 1. - -
-
-
-Central Sound Control Active - This option defines whether the sound synchronization system is active across all servers. Default is 0 for inactive. - -
-
-
-Sounds Web Server - This is the server name or IP address of the web server that will be handling the sound files on this system, this must match the server name or IP of the machine you are trying to access the audio_store.php webpage on or it will not work. Default is 127.0.0.1. - -
-
-
-Sounds Web Directory - This auto-generated directory name is created at random by the system as the place that the audio store will be kept. All audio files will reside in this directory. - -
-
-
-Active Voicemail Server - In multi-server systems, this is the server that will handle all voicemail boxes. This server is also where the dial-in generated prompts will be uploaded from, the 8168 recordings. - -
-
-
-Outbound Auto-Dial Active - This option allows you to enable or disable outbound auto-dialing within VICIDIAL, setting this field to 0 will remove the LISTS and FILTERS sections and many fields from the Campaign Modification screens. Manual entry dialing will still be allowable from within the agent screen, but no list dialing will be possible. Default is 1 for active. - -
-
-
-Ratio Dial Limit - This is the maximum limit of the auto dial level in the campaign screen. - -
-
-
-Max FILL Calls per Second - This setting determines the maximum number of calls that can be placed by the auto-FILL outbound auto-dialing script on for all servers, per second. Must be from 1 to 200. Default is 40. - -
-
-
-Allow Custom Dialplan Entries - This option allows you to enter custom dialplan lines into Call Menus. Default is 0 for inactive. - -
-
-
-User Territories Active - This setting allows you to enable the User Territories setttings from the user modification screen. This feature was added to allow for more integration with a customized Vtiger installation but can have applications in a pure ViciDial system as well. Default is 0 for disabled. - -
-
-
-Enable Second Webform - This setting allows you to have a second web form for campaigns and in-groups in the agent interface. Default is 0 for disabled. - -
-
-
-Enable TTS Integration - This setting allows you to enable Text To Speech integration with Cepstral. This is currently only available for outbound Survey type campaigns. Default is 0 for disabled. - -
-
-
-QC Features Active - This option allows you to enable or disable the QC or Quality Control features. Default is 0 for inactive. - -
-
-
-Enable QueueMetrics Logging - This setting allows you to define whether VICIDIAL will insert log entries into the queue_log database table as Asterisk Queues activity does. QueueMetrics is a standalone, closed-source statistical analysis program. You must have QueueMetrics already installed and configured before enabling this feature. Default is 0. - -
-
-
-QueueMetrics Server IP - This is the IP address of the database for your QueueMetrics installation. - -
-
-
-QueueMetrics Database Name - This is the database name for your QueueMetrics database. - -
-
-
-QueueMetrics Database Login - This is the user name used to log in to your QueueMetrics database. - -
-
-
-QueueMetrics Database Password - This is the password used to log in to your QueueMetrics database. - -
-
-
-QueueMetrics URL - This is the URL or web site address used to get to your QueueMetrics installation. - -
-
-
-QueueMetrics Log ID - This is the server ID that all VICIDIAL logs going into the QueueMetrics database will use as an identifier for each record. - -
-
-
-QueueMetrics EnterQueue Prepend - This field is used to allow for prepending of one of the vicidial_list data fields in front of the phone number of the customer for customized QueueMetrics reports. Default is NONE to not populate anything. - -
-
-
-Enable Vtiger Integration - This setting allows you to enable Vtiger integration with VICIDIAL. Currently links to Vtiger admin and search as well as user replication are the only integration features available. Default is 0. - -
-
-
-Vtiger DB Server IP - This is the IP address of the database for your Vtiger installation. - -
-
-
-Vtiger Database Name - This is the database name for your Vtiger database. - -
-
-
-Vtiger Database Login - This is the user name used to log in to your Vtiger database. - -
-
-
-Vtiger Database Password - This is the password used to log in to your Vtiger database. - -
-
-
-Vtiger URL - This is the URL or web site address used to get to your Vtiger installation. - - -



- -VICIDIAL_STATUSES TABLE

-
-
-Through the use of system statuses, you can have statuses that exist for campaign and in-group. The Status must be 1-6 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as an agent disposition. The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls. The Category option allows you to group several statuses into a catogy that can be used for statistical analysis. There are also 5 additional settings that will define the kind of status: sale, dnc, customer contact, not interested, unworkable. - - - -



- -VICIDIAL_STATUS_CATEGORIES TABLE

-
-
-Through the use of system status categories, you can group together statuses to allow for statistical analysis on a group of statuses. The Category ID must be 2-20 characters in length with no spaces, the name must be 2-50 characters in length, the description is optional and TimeonVDAD Display defines whether that status will be one of the upto 4 statuses that can be calculated and displayed on the Time On VDAD Real-Time report. The Sale Category and Dead Lead Category are both used by the List Suggestion system when analyzing list statistics. - - - 0) - { +
+
+ Filter SQL - This is where you place the SQL query fragment that you want to filter by. do not begin or end with an AND, that will be added by the hopper cron script automatically. an example SQL query that would work here is- called_count > 4 and called_count < 8 -. + + + + +



- VICIDIAL QC STATUS CODES

-
+ VICIDIAL_CALL TIMES TABLE

+

- The Quality Control-QC system within VICIDIAL has its own set of status codes separate from those within the call handling functions of VICIDIAL. QC statuse codes must be between 2 and 8 characters in length and contain no special characters like a space or colon. The QC status code description must be between 2 and 30 characters in length. + Call Time ID - This is the short name of a Vicidial Call Time Definition. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 10 characters, minimum of 2 characters. + +
+
+ Call Time Name - This is a more descriptive name of the Call Time Definition. This is a short summary of the Call Time definition. max 30 characters, minimum of 2 characters. + +
+
+ Call Time Comments - This is where you can place comments for a Vicidial Call Time Definition such as -10am to 4pm with extra call state restrictions-. max 255 characters. + +
+
+ Default Start and Stop Times - This is the default time that calling will be allowed to be started or stopped within this call time definition if the day-of-the-week start time is not defined. 0 is midnight. To prevent calling completely set this field to 2400 and set the Default Stop time to 2400. To allow calling 24 hours a day set the start time to 0 and the stop time to 2400. + +
+
+ Weekday Start and Stop Times - These are the custom times per day that can be set for the call time definition. same rules apply as with the Default start and stop times. + +
+
+ State Call Time Definitions - This is the list of State specific call time definitions that are followed in this Call Time Definition. + +
+
+ State Call Time State - This is the two letter code for the state that this calling time definition is for. For this to be in effect the local call time that is set in the campaign must have this state call time record in it as well as all of the leads having two letter state codes in them. + + + + +



+ + VICIDIAL_SHIFTS TABLE

+
+
+ Shift ID - This is the short name of a Vicidial Shift Definition. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 20 characters, minimum of 2 characters. + +
+
+ Shift Name - This is a more descriptive name of the Shift Definition. This is a short summary of the Shift definition. max 50 characters, minimum of 2 characters. + +
+
+ Shift Start Time - This is the time that the campaign shift begins. Must only be numbers, 9:30 AM would be 0930 and 5:00 PM would be 1700. + +
+
+ Shift Length - This is the time in Hours and Minutes that the campaign shift lasts. 8 hours would be 08:00 and 7 hours and 30 minutes would be 07:30. + +
+
+ Shift Weekdays - In this section you should choose the days of the week that this shift is active. + + + + + +



+
+ Audio Store - This utility allows you to upload audio files to the web server so that they can be distributed to all of the ViciDial servers in a multi-server cluster. An important note, only two audio file types will work, .wav files that are PCM 16bit 8k and .gsm files that are 8bit 8k. Please verify that your files are properly formatted before uploading them here. + + + +



+ + VICIDIAL_MUSIC_ON_HOLD TABLE

+
+
+ Music On Hold ID - This is the short name of a Music On Hold entry. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 100 characters, minimum of 2 characters. + +
+
+ Music On Hold Name - This is a more descriptive name of the Music On Hold entry. This is a short summary of the Music On Hold context and will show as a comment in the musiconhold-vicidial.conf file. max 255 characters, minimum of 2 characters. + +
+
+ Active - This option allows you to set the Music On Hold entry to active or inactive. Inactive will remove the entry from the conf files. + +
+
+ Random Order - This option allows you to define the playback of the audio files in a random order. If set to N then the defined order will be used. + +
+
+ Filename - To add a new audio file to a Music On Hold entry the file must first be in the audio store, then you can select the file and click submit to add it to the file list. Music on hold is updated once per minute if there have been changes made. Any files not listed in a music on hold entry that are present in the music on hold folder will be deleted. + + + + +



+ + VICIDIAL_TTS_PROMPTS TABLE

+
+
+ TTS ID - This is the short name of a TTS entry. This needs to be a unique identifier. Do not use any spaces or punctuation for this field. max 50 characters, minimum of 2 characters. + +
+
+ TTS Name - This is a more descriptive name of the TTS entry. This is a short summary of the TTS definition. max 100 characters, minimum of 2 characters. + +
+
+ Active - This option allows you to set the TTS entry to active or inactive. + +
+
+ TTS Text - This is the actual Text To Speech data field that is sent to Cepstral for creation of the audio file to be played to the customer. you can use Speech Synthesis Markup Language -SSML- in this field, for example, <break time='1000ms'/> for a 1 second break. You can also use several variables such as first name, last name and title as ViciDial variables just like you do in a Script: --A--first_name--B--. Here is a list of the available variables: lead_id, entry_date, modify_date, status, user, vendor_lead_code, source_id, list_id, 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 + + + + +



+ + VICIDIAL_VOICEMAIL TABLE

+
+
+ Voicemail ID - This is the all numbers identifier of this mailbox. This must not be a duplicate of an existing voicemail ID or the voicemail ID of a phone on the system, minimum of 2 characters. + +
+
+ Name - This is name associated with this voicemail box. max 100 characters, minimum of 2 characters. + +
+
+ Password - This is the password that is used to gain access to the voicemail box when dialing in to check messages max 10 characters, minimum of 2 characters. + +
+
+ Active - This option allows you to set the voicemail box to active or inactive. If the box is inactive you cannot leave messages on it and you cannot check messages in it. + +
+
+ Email - This optional setting allows you to have the voicemail messages sent to an email account, if your system is set up to send out email. If this field is empty then no emails will be sent out. + + + + 0) + { + ?> + +



+ + VICIDIAL LIST LOADER FUNCTIONALITY

+
+
+ The VICIDIAL basic web-based lead loader is designed simply to take a lead file - up to 8MB in size - that is either tab or pipe delimited and load it into the vicidial_list table. The lead loader allows for field choosing and TXT- Plain Text, CSV- Comma Separated Values and XLS- Excel file formats. The lead loader does not do data validation, but it does allow you to check for duplicates in itself, within the campaign or within the entire system. Also, make sure that you have created the list that these leads are to be under so that you can use them. Here is a list of the fields in their proper order for the lead files: +
    +
  1. Vendor Lead Code - shows up in the Vendor ID field of the GUI +
  2. Source Code - internal use only for admins and DBAs +
  3. List ID - the list number that these leads will show up under +
  4. Phone Code - the prefix for the phone number - 1 for US, 01144 for UK, 01161 for AUS, etc +
  5. Phone Number - must be at least 8 digits long +
  6. Title - title of the customer - Mr. Ms. Mrs, etc... +
  7. First Name +
  8. Middle Initial +
  9. Last Name +
  10. Address Line 1 +
  11. Address Line 2 +
  12. Address Line 3 +
  13. City +
  14. State - limited to 2 characters +
  15. Province +
  16. Postal Code +
  17. Country +
  18. Gender +
  19. Date of Birth +
  20. Alternate Phone Number +
  21. Email Address +
  22. Security Phrase +
  23. Comments +
+ +
NOTES: The Excel Lead loader functionality is enabled by a series of perl scripts and needs to have a properly configured /etc/astguiclient.conf file in place on the web server. Also, a couple perl modules must be loaded for it to work as well - OLE-Storage_Lite and Spreadsheet-ParseExcel. You can check for runtime errors in these by looking at your apache error_log file. Also, for duplication checks against gampaign lists, the list that has new leads going into it does need to be created in the system before you start to load the leads. + + + + +



+ + + + + + + PHONES TABLE

+
+
+ Phone extension - This field is where you put the phones name as it appears to Asterisk not including the protocol or slash at the beginning. For Example: for the SIP phone SIP/test101 the Phone extension would be test101. Also, for IAX2 phones make sure you use the full phones name: IAX2/IAXphone1@IAXphone1 would be IAXphone1@IAXphone1. For Zap phones make sure you put the full channel: Zap/25-1 would be 25-1. Another note, make sure you set the Protocol below correctly for your type of phone. + +
+
+
+ Dial Plan Number - This field is for the number you dial to have the phone ring. This number is defined in the extensions.conf file of your Asterisk server + +
+
+
+ Voicemail Box - This field is for the voicemail box that the messages go to for the user of this phone. We use this to check for voicemail messages and for the user to be able to use the VOICEMAIL button on astGUIclient app. + +
+
+
+ Outbound CallerID - This field is where you would enter the callerID number that you would like to appear on outbound calls placed form the astguiclient web-client. This does not work on RBS, non-PRI, T1/E1s. + +
+
+
+ Phone IP address - This field is for the phone's IP address if it is a VOIP phone. This is an optional field + +
+
+
+ Computer IP address - This field is for the user's computer IP address. This is an optional field + +
+
+
+ Server IP - This menu is where you select which server the phone is active on. + +
+
+
+ Login - The login used for the phone user to login to the client applications. + +
+
+
+ Password - The password used for the phone user to login to the client applications. IMPORTANT, this is the password only for the agent web interface phone login, to change the sip.conf or iax.conf password, or secret, for this phone device you need to modify the Conf File Secret field further down on this page. + +
+
+
+ Status - The status of the phone in the system, ACTIVE and ADMIN allow for GUI clients to work. ADMIN allows access to this administrative web site. All other statuses do not allow GUI or Admin web access. + +
+
+
+ Active Account - Whether the phone is active to put it in the list in the GUI client. + +
+
+
+ Phone Type - Purely for administrative notes. + +
+
+
+ Full Name - Used by the GUIclient in the list of active phones. + +
+
+
+ Company - Purely for administrative notes. + +
+
+
+ Picture - Not yet Implemented. + +
+
+
+ New Messages - Number of new voicemail messages for this phone on the Asterisk server. + +
+
+
+ Old Messages - Number of old voicemail messages for this phone on the Asterisk server. + +
+
+
+ Client Protocol - The protocol that the phone uses to connect to the Asterisk server: SIP, IAX2, Zap . Also, there is EXTERNAL for remote dial numbers or speed dial numbers that you want to list as phones. + +
+
+
+ Local GMT - The difference from Greenwich Mean time, or ZULU time where the phone is located. DO NOT ADJUST FOR DAYLIGHT SAVINGS TIME. This is used by the VICIDIAL campaign to accurately display the time and customer time. + +
+
+
+ Phone Ring Timeout - This is the amount of time, in seconds, that the phone will ring in the dialplan before sending the call to voicemail. Default is 60 seconds. + +
+
+
+ Manager Login - This is the login that the GUI clients for this phone will use to access the Database where the server data resides. + +
+
+
+ Manager Secret - This is the password that the GUI clients for this phone will use to access the Database where the server data resides. + +
+
+
+ VICIDIAL Default User - This is to place a default value in the VICIDIAL user field whenever this phone user opens the astVICIDIAL client app. Leave blank for no user. + +
+
+
+ VICIDIAL Default Pass - This is to place a default value in the VICIDIAL password field whenever this phone user opens the astVICIDIAL client app. Leave blank for no pass. + +
+
+
+ VICIDIAL Default Campaign - This is to place a default value in the VICIDIAL campaign field whenever this phone user opens the astVICIDIAL client app. Leave blank for no campaign. + +
+
+
+ Park Exten - This is the default Parking extension for the client apps. Verify that a different one works before you change this. + +
+
+
+ Conf Exten - This is the default Conference park extension for the client apps. Verify that a different one works before you change this. + +
+
+
+ VICIDIAL Park Exten - This is the default Parking extension for VICIDIAL client app. Verify that a different one works before you change this. + +
+
+
+ VICIDIAL Park File - This is the default VICIDIAL park extension file name for the client apps. Verify that a different one works before you change this. limited to 10 characters. + +
+
+
+ Monitor Prefix - This is the dial plan prefix for monitoring of Zap channels automatically within the astGUIclient app. Only change according to the extensions.conf ZapBarge extensions records. + +
+
+
+ Recording Exten - This is the dial plan extension for the recording extension that is used to drop into meetme conferences to record them. It usually lasts upto one hour if not stopped. verify with extensions.conf file before changing. + +
+
+
+ VMAIL Main Exten - This is the dial plan extension going to check your voicemail. verify with extensions.conf file before changing. + +
+
+
+ VMAIL Dump Exten - This is the dial plan prefix used to send calls directly to a user's voicemail from a live call in the astGUIclient app. verify with extensions.conf file before changing. + +
+
+
+ Exten Context - This is the dial plan context that the agent applications, like ViciDial, primarily use. It is assumed that all numbers dialed by the client apps are using this context so it is a good idea to make sure this is the most wide context possible. verify with extensions.conf file before changing. default is default. + +
+
+
+ Phone Context - This is the dial plan context that this phone will use to dial out. If you are running a call center and you do not want your agents to be able to dial out outside of the ViciDial applicaiton for example, then you would set this field to a dialplan context that does not exist, something like agent-nodial. default is default. + +
+
+
+ Conf File Secret - This is the secret, or password, for the phone in the iax or sip auto-generated conf file for this phone. Limit is 20 characters alphanumeric dash and underscore accepted. Default is test. + +
+
+
+ DTMF send Channel - This is the channel string used to send DTMF sounds into meetme conferences from the client apps. Verify the exten and context with the extensions.conf file. + +
+
+
+ Outbound Call Group - This is the channel group that outbound calls from this phone are placed out of. There are a couple routines in the client apps that use this. For Zap channels you want to use something like Zap/g2 , for IAX2 trunks you would want to use the full IAX prefix like IAX2/VICItest1:secret@10.10.10.15:4569. Verify the trunks with the extensions.conf file, it is usually what you have defined as the TRUNK global variable at the top of the file. + +
+
+
+ Browser Location - This is applicable to only UNIX/LINUX clients, the absolute path to Mozilla or Firefox browser on the machine. verify this by launching it manually. + +
+
+
+ Install Directory - This is the place where the astGUIclient and astVICIDIAL scripts are located on your machine. For Win32 it should be something like C:\AST_VICI and for UNIX it should be something like /usr/local/perl_TK. verify this manually. + +
+
+
+ CallerID URL - This is the web address of the page used to do custom callerID lookups. default testing address is: http://astguiclient.sf.net/test_callerid_output.php + +
+
+
+ VICIDIAL Default URL - This is the web address of the page used to do custom VICIDIAL Web Form queries. default testing address is: http://astguiclient.sf.net/test_VICIDIAL_output.php + +
+
+
+ Call Logging - This is set to true if the call_log.agi file is in place in the extensions.conf file for all outbound and hang up 'h' extensions to log all calls. This should always be 1 because it is manditory for many astGUIclient and VICIDIAL features to work properly. + +
+
+
+ User Switching - Set to true to allow user to switch to another user account. NOTE: If user switches they can initiate recording on the new user's phone conversation + +
+
+
+ Conferencing - Set to true to allow user to start conference calls with upto six external lines. + +
+
+
+ Admin Hang Up - Set to true to allow user to be able to hang up any line at will through astGUIclient. Good idea only to enable this for Admin users. + +
+
+
+ Admin Hijack - Set to true to allow user to be able to grab and redirect to their extension any line at will through astGUIclient. Good idea only to enable this for Admin users. But is very useful for Managers. + +
+
+
+ Admin Monitor - Set to true to allow user to be able to grab and redirect to their extension any line at will through astGUIclient. Good idea only to enable this for Admin users. But is very useful for Managers and as a training tool. + +
+
+
+ Call Park - Set to true to allow user to be able to park calls on astGUIclient hold to be picked up by any other astGUIclient user on the system. Calls stay on hold for upto a half hour then hang up. Usually enabled for all. + +
+
+
+ Updater Check - Set to true to display a popup warning that the updater time has not changed in 20 seconds. Useful for Admin users. + +
+
+
+ AF Logging - Set to true to log many actions of astGUIclient usage to a text file on the user's computer. + +
+
+
+ Queue Enabled - Set to true to have client apps use the Asterisk Central Queue system. Required for VICIDIAL and recommended for all users. + +
+
+
+ CallerID Popup - Set to true to allow for numbers defined in the extensions.conf file to send CallerID popup screens to astGUIclient users. + +
+
+
+ VMail Button - Set to true to display the VOICEMAIL button and the messages count display on astGUIclient. + +
+
+
+ Fast Refresh - Set to true to enable a new rate of refresh of call information for the astGUIclient. Default disabled rate is 1000 ms ,1 second. Can increase system load if you lower this number. + +
+
+
+ Fast Refresh Rate - in milliseconds. Only used if Fast Refresh is enabled. Default disabled rate is 1000 ms ,1 second. Can increase system load if you lower this number. + +
+
+
+ Persistant MySQL - If enabled the astGUIclient connection will remain connected instead of connecting every second. Useful if you have a fast refresh rate set. It will increase the number of connections on your MySQL machine. + +
+
+
+ Auto Dial Next Number - If enabled the VICIDIAL client will dial the next number on the list automatically upon disposition of a call unless they selected to "Stop Dialing" on the disposition screen. + +
+
+
+ Stop Rec after each call - If enabled the VICIDIAL client will stop whatever recording is going on after each call has been dispositioned. Useful if you are doing a lot of recording or you are using a web form to trigger recording. + +
+
+
+ Enable SIPSAK Messages - If enabled the server will send messages to the SIP phone to display on the phone LCD display when logged into VICIDIAL. Feature only works with SIP phones and requires sipsak application to be installed on the web server. Default is 0. + +
+
+
+ DBX Server - The MySQL database server that this user should be connecting to. + +
+
+
+ DBX Database - The MySQL database that this user should be connecting to. Default is asterisk. + +
+
+
+ DBX User - The MySQL user login that this user should be using when connecting. Default is cron. + +
+
+
+ DBX Pass - The MySQL user password that this user should be using when connecting. Default is 1234. + +
+
+
+ DBX Port - The MySQL TCP port that this user should be using when connecting. Default is 3306. + +
+
+
+ DBY Server - The MySQL database server that this user should be connecting to. Secondary server, not used currently. + +
+
+
+ DBY Database - The MySQL database that this user should be connecting to. Default is asterisk. Secondary server, not used currently. + +
+
+
+ DBY User - The MySQL user login that this user should be using when connecting. Default is cron. Secondary server, not used currently. + +
+
+
+ DBY Pass - The MySQL user password that this user should be using when connecting. Default is 1234. Secondary server, not used currently. + +
+
+
+ DBY Port - The MySQL TCP port that this user should be using when connecting. Default is 3306. Secondary server, not used currently. + +
+
+
+ Alias ID - The ID of the alias used to allow for phone load balanced logins. no spaces or other special characters allowed. Must be between 2 and 20 characters in length. + +
+
+
+ Alias Name - The name used to describe a phones alias, Must be between 2 and 50 characters in length. + +
+
+
+ Phones Logins List - The comma separated list of phone logins used when an agent logs in using phone load balanced logins. The Agent application will find the active server with the fewest agents logged into it and place a call from that server to the agent upon login. + +
+
+
+ Phones Email - The email address associated with this phone entry. This is used for voicemail settings. + +
+
+
+ Template ID - This is the conf file template ID that this phone entry will use for its Asterisk settings. Default is --NONE--. + +
+
+
+ Conf Override Settings - If populated, and the Template ID is set to --NONE-- then the contents of this field are used as the conf file entries for this phone. generate_vicidial_conf for this phones server must be set to Y for this to work. This field should NOT contain the [extension] line, that will be automatically generated. + +
+
+
+ Group Alias ID - The ID of the group alias used by agents to dial out calls from the VICIDIAL agent interface with different Caller IDs. no spaces or other special characters allowed. Must be between 2 and 20 characters in length. + +
+
+
+ Group Alias Name - The name used to describe a group alias, Must be between 2 and 50 characters in length. + +
+
+
+ Caller ID Number - The Caller ID number used in this Group Alias. Must be digits only. + +
+
+
+ Caller ID Name - The Caller ID name that can be sent out with this Group Alias. As far as we know this will only work in Canada on PRI circuits and using an IAX loop trunk through Asterisk. + + + + +



+ + SERVERS TABLE

+
+
+ Server ID - This field is where you put the Asterisk servers name, doesnt have to be an official domain sub, just a nickname to identify the server to Admin users. + +
+
+
+ Server Description - The field where you use a small phrase to describe the Asterisk server. + +
+
+
+ Server IP Address - The field where you put the Network IP address of the Asterisk server. + +
+
+
+ Active - Set whether the Asterisk server is active or inactive. + +
+
+
+ System Load - These two statistics show the loadavg of a system times 100 and the CPU usage percentage of the server and is updated every minute. The loadavg should on average be below 100 multiplied by the number of CPU cores your system has, for optimal performance. The CPU usage percentage should stay below 50 for optimal performance. + +
+
+
+ Live Channels - This field shows the current number of Asterisk channels that are live on the system right now. It is important to note that the number of Asterisk channels is usually much higher than the number of actual calls on a system. This field is updated once every minute. + +
+
+
+ Disk Usage - This field will show the disk usage for every partition on this server. This field is updated once every minute. + +
+
+
+ Asterisk Version - Set the version of Asterisk that you have installed on this server. Examples: '1.2', '1.0.8', '1.0.7', 'CVS_HEAD', 'REALLY OLD', etc... This is used because versions 1.0.8 and 1.0.9 have a different method of dealing with Local/ channels, a bug that has been fixed in CVS v1.0, and need to be treated differently when handling their Local/ channels. Also, current CVS_HEAD and the 1.2 release tree uses different manager and command output so it must be treated differently as well. + +
+
+
+ Max VICIDIAL Trunks - This field will determine the maximum number of lines that the VICIDIAL auto-dialer will attempt to call on this server. If you want to dedicate two full PRI T1s to VICIDIALing on a server then you would set this to 46. Default is 96. + +
+
+
+ Max Calls per Second - This setting determines the maximum number of calls that can be placed by the outbound auto-dialing script on this server per second. Must be from 1 to 100. Default is 20. + +
+
+
+ Telnet Host - This is the address or name of the Asterisk server and is how the manager applications connect to it from where they are running. If they are running on the Asterisk server, then the default of 'localhost' is fine. + +
+
+
+ Telnet Port - This is the port of the Asterisk server Manager connection and is how the manager applications connect to it from where they are running. The default of '5038' is fine for a standard install. + +
+
+
+ Manager User - The username or login used to connect genericly to the Asterisk server manager. Default is 'cron' + +
+
+
+ Manager Secret - The secret or password used to connect genericly to the Asterisk server manager. Default is '1234' + +
+
+
+ Manager Update User - The username or login used to connect to the Asterisk server manager optimized for the Update scripts. Default is 'updatecron' and assumes the same secret as the generic user. + +
+
+
+ Manager Listen User - The username or login used to connect to the Asterisk server manager optimized for scripts that only listen for output. Default is 'listencron' and assumes the same secret as the generic user. + +
+
+
+ Manager Send User - The username or login used to connect to the Asterisk server manager optimized for scripts that only send Actions to the manager. Default is 'sendcron' and assumes the same secret as the generic user. + +
+
+
+ Server GMT offset - The difference in hours from GMT time not adjusted for Daylight-Savings-Time of the server. Default is '-5' + +
+
+
+ VMail Dump Exten - The extension prefix used on this server to send calls directly through agc to a specific voicemail box. Default is '85026666666666' + +
+
+
+ VICIDIAL AD extension - The default extension if none is present in the campaign to send calls to for VICIDIAL auto dialing. Default is '8365' + +
+
+
+ Default Context - The default dial plan context used for scripts that operate for this server. Default is 'default' + +
+
+
+ System Performance - Setting this option to Y will enable logging of system performance stats for the server machine including system load, system processes and Asterisk channels in use. Default is N. + +
+
+
+ Server Logs - Setting this option to Y will enable logging of all VICIDIAL related scripts to their text log files. Setting this to N will stop writing logs to files for these processes, also the screen logging of asterisk will be disabled if this is set to N when Asterisk is started. Default is Y. + +
+
+
+ AGI Output - Setting this option to NONE will disable output from all VICIDIAL related AGI scripts. Setting this to STDERR will send the AGI output to the Asterisk CLI. Setting this to FILE will send the output to a file in the logs directory. Setting this to BOTH will send output to both the Asterisk CLI and a log file. Default is FILE. + +
+
+
+ VICIDIAL Balance Dialing - Setting this field to Y will allow the server to place balance calls for campaigns in VICIDIAL so that the defined dial level can be met even if there are no agents logged into that campaign on this server. Default is N. + +
+
+
+ VICIDIAL Balance Rank - This field allows you to set the order in which this server is to be used for balance dialing, if balance dialing is enabled. The server with the highest rank will be used first in placing Balance fill calls. Default is 0. + +
+
+
+ VICIDIAL Balance Offlimits - This setting defines the number of trunks to not allow VICIDIAL balance dialing to use. For example if you have 40 max vicidial trunks and balance offlimits is set to 10 you will only be able to use 30 trunk lines for VICIDIAL balance dialing. Default is 0. + +
+
+
+ Recording Web Link - This setting allows you to override the default of the display of the recording link in the admin web pages. Default is SERVER_IP. + +
+
+
+ Alternate Recording Server IP - This setting is where you can put a server IP or other machine name that can be used in place of the server_ip in the links to recordings within the admin web pages. Default is empty. + +
+
+
+ Active Asterisk Server - If Asterisk is not running on this server, or if VICIDIAL should not be using this server, or if are only using this server for other scripts like the hopper loading script you would want to set this to N. Default is Y. + +
+
+
+ Active Agent Server - Setting this option to N will prevent agents from being able to login to this server through the vicidial agent screen. This is very useful when using a phone login load balanced setup. Default is Y. + +
+
+
+ Generate conf files - If you would like the system to auto-generate asterisk conf files based upon the phones entries, carrier entries and load balancing setup within VICIDIAL then set this to Y. Default is Y. + +
+
+
+ Rebuild conf files - If you want to force a rebuilding of the Asterisk conf files or if any of the phones or carrier entries have changed then this should be set to Y. After the conf files have been generated and Asterisk has been reloaded then this will be changed to N. Default is Y. + +
+
+
+ Rebuild Music On Hold - If you want to force a rebuilding of the music on hold files or if the music on hold entries or server entries have changed then this should be set to Y. After the music on hold files have been synchronized and reloaded then this will be changed to N. Default is Y. + +
+
+
+ Sounds Update - If you want to force a check of the sound files on this server, and the central audio store is enabled as a system setting, then this field will allow the sounds updater to run at the next top of the minute. Any time an audio file is uploaded from the web interface this is automatically set to Y for all servers that have Asterisk active. Default is N. + +
+
+
+ ViciDial Recording Limit - This field is where you set the maximum number of minutes that a call recording initiated by ViciDial can be. Default is 60 minutes. + +
+
+
+ Carrier Logging Active - This setting allows you to log all hangup return codes for any outbound list dialing calls that you are placing. Default is N. + + + + + + +



+ + vicidial_conf_templates TABLE

+
+
+ Template ID - This field needs to be at least 2 characters in length and no more than 15 characters in length, no spaces. This is the ID that will be used to identify the conf template throughout the system. + +
+
+
+ Template Name - This is the descriptive name of the conf file template entry. + +
+
+
+ Template Contents - This field is where you can enter in the specific settings to be used by all phones and-or carriers that are set to use this conf template. Fields that should NOT be included in this box are: secret, accountcode, account, username and mailbox. + + + + + +



+ + vicidial_server_carriers TABLE

+
+
+ Carrier ID - This field needs to be at least 2 characters in length and no more than 15 characters in length, no spaces. This is the ID that will be used to identify the carrier for this specific entry throughout the system. + +
+
+
+ Carrier Name - This is the descriptive name of the carrier entry. + +
+
+
+ Registration String - This field is where you can enter in the exact string needed in the IAX or SIP configuration file to register to the provider. Optional but highly recommended if your carrier allows registration. + +
+
+
+ Template ID - This optional field allows you to choose a conf file template for this carrier entry. + +
+
+
+ Account Entry - This field is used if you have not selected a template to use, and it is where you can enter in the specific account settings to be used for this carrier. If you will be taking in inbound calls from this carrier trunk you might want to set the context=trunkinbound within this field so that you can use the DID handling process within VICIDIAL. + +
+
+
+ Protocol - This field allows you to define the protocol to use for the carrier entry. Currently only IAX and SIP are supported. + +
+
+
+ Globals String - This optional field allows you to define a global variable to use for the carrier in the dialplan. + +
+
+
+ Dialplan Entry - This optional field allows you to define a set of dialplan entries to use for this carrier. + +
+
+
+ Server IP - This is the server that this specific carrier record is associated with. + +
+
+
+ Active - This defines whether the carrier will be included in the auto-generated conf files or not. + + + + + +



+ + CONFERENCES TABLE

+
+
+ Conference Number - This field is where you put the meetme conference dialpna number. It is also recommended that the meetme number in meetme.conf matches this number for each entry. This is for the conferences in astGUIclient and is used for leave-3way-call functionality in VICIDIAL. + +
+
+
+ Server IP - The menu where you select the Asterisk server that this conference will be on. + + + + + 0) + { + ?> +



+ + VICIDIAL_SERVER_TRUNKS TABLE

+
+
+ VICIDIAL Server Trunks allows you to restrict the outgoing lines that are used on this server for campaign dialing on a per-campaign basis. You have the option to reserve a specific number of lines to be used by only one campaign as well as allowing that campaign to run over its reserved lines into whatever lines remain open, as long at the total lines used by vicidial on this server is less than the Max VICIDIAL Trunks setting. Not having any of these records will allow the campaign that dials the line first to have as many lines as it can get under the Max VICIDIAL Trunks setting. + + + + + +



+ + SYSTEM_SETTINGS TABLE

+
+
+ Use Non-Latin - This option allows you to default the web display script to use UTF8 characters and not do any latin-character-family regular expression filtering or display formatting. Default is 0. + +
+
+
+ Webroot Writable - This setting allows you to define whether temp files and authentication files should be placed in the webroot on your web server. Default is 1. + +
+
+
+ VICIDIAL Agent Disable Display - This field is used to select when to show an agent when their session has been disabled by the system, a manager action or by an external measure. The NOT_ACTIVE setting will disable the message on the agents screen. The LIVE_AGENT setting will only display the disabled message when the agents vicidial_auto_calls record has been removed, such as during a force logout or emergency logout. + +
+
+
+ Allow SIPSAK Messages - If set to 1, this will allow the phones table setting to work properly, the server will send messages to the SIP phone to display on the phone LCD display when logged into VICIDIAL. This feature only works with SIP phones and requires sipsak application to be installed on the web server. Default is 0. + +
+
+
+ Agent API Active - If set to 1, this will allow the Agent API interface to function. Default is 0. + +
+
+
+ Admin Home URL - This is the URL or web site address that you will go to if you click on the HOME link at the top of the admin.php page. + +
+
+
+ Enable Agent Transfer Logfile - This option will log to a text logfile on the webserver every time a call is transferred to an agent. Default is 0, disabled. + +
+
+
+ Timeclock End Of Day - This setting defines when all users are to be auto logged out of the timeclock system. Only runs once a day. must be only 4 digits 2 digit hour and 2 digit minutes in 24 hour time. Default is 0000. + +
+
+
+ Timeclock Last Auto Logout - This field displays the date of the last auto-logout. + +
+
+
+ Agent Screen Header Date Format - This menu allows you to choose the format of the date that shows up at the top of the VICIDIAL agent screen. The options for this setting are: default is MS_DASH_24HR
+ MS_DASH_24HR 2008-06-24 23:59:59 - Default date format with year month day followed by 24 hour time
+ US_SLASH_24HR 06/24/2008 23:59:59 - USA date format with month day year followed by 24 hour time
+ EU_SLASH_24HR 24/06/2008 23:59:59 - European date format with day month year followed by 24 hour time
+ AL_TEXT_24HR JUN 24 23:59:59 - Text date format with abbreviated month day followed by 24 hour time
+ MS_DASH_AMPM 2008-06-24 11:59:59 PM - Default date format with year month day followed by 12 hour time
+ US_SLASH_AMPM 06/24/2008 11:59:59 PM - USA date format with month day year followed by 12 hour time
+ EU_SLASH_AMPM 24/06/2008 11:59:59 PM - European date format with day month year followed by 12 hour time
+ AL_TEXT_AMPM JUN 24 11:59:59 PM - Text date format with abbreviated month day followed by 12 hour time
+ +
+
+
+ Agent Screen Customer Date Format - This menu allows you to choose the format of the customer time zone date that shows up at the top of the Customer Information section of the VICIDIAL agent screen. The options for this setting are: default is AL_TEXT_AMPM
+ MS_DASH_24HR 2008-06-24 23:59:59 - Default date format with year month day followed by 24 hour time
+ US_SLASH_24HR 06/24/2008 23:59:59 - USA date format with month day year followed by 24 hour time
+ EU_SLASH_24HR 24/06/2008 23:59:59 - European date format with day month year followed by 24 hour time
+ AL_TEXT_24HR JUN 24 23:59:59 - Text date format with abbreviated month day followed by 24 hour time
+ MS_DASH_AMPM 2008-06-24 11:59:59 PM - Default date format with year month day followed by 12 hour time
+ US_SLASH_AMPM 06/24/2008 11:59:59 PM - USA date format with month day year followed by 12 hour time
+ EU_SLASH_AMPM 24/06/2008 11:59:59 PM - European date format with day month year followed by 12 hour time
+ AL_TEXT_AMPM JUN 24 11:59:59 PM - Text date format with abbreviated month day followed by 12 hour time
+ +
+
+
+ Agent Screen Customer Phone Format - This menu allows you to choose the format of the customer phone number that shows up in the status section of the VICIDIAL agent screen. The options for this setting are: default is US_PARN
+ US_DASH 000-000-0000 - USA dash separated phone number
+ US_PARN (000)000-0000 - USA dash separated number with area code in parenthesis
+ MS_NODS 0000000000 - No formatting
+ UK_DASH 00 0000-0000 - UK dash separated phone number with space after city code
+ AU_SPAC 000 000 000 - Australia space separated phone number
+ IT_DASH 0000-000-000 - Italy dash separated phone number
+ FR_SPAC 00 00 00 00 00 - France space separated phone number
+ +
+
+
+ Agent interface API Access Active - This option allows you to enable or disable the agent interface API. Default is 0. + +
+
+
+ Agent Only Callback Campaign Lock - This option defines whether AGENTONLY callbacks are locked to the campaign that the agent originally created them under. Setting this to 1 means that the agent can only dial them from the campaign they were set under, 0 means that the agent can access them no matter what campaign they are logged into. Default is 1. + +
+
+
+ Central Sound Control Active - This option defines whether the sound synchronization system is active across all servers. Default is 0 for inactive. + +
+
+
+ Sounds Web Server - This is the server name or IP address of the web server that will be handling the sound files on this system, this must match the server name or IP of the machine you are trying to access the audio_store.php webpage on or it will not work. Default is 127.0.0.1. + +
+
+
+ Sounds Web Directory - This auto-generated directory name is created at random by the system as the place that the audio store will be kept. All audio files will reside in this directory. + +
+
+
+ Active Voicemail Server - In multi-server systems, this is the server that will handle all voicemail boxes. This server is also where the dial-in generated prompts will be uploaded from, the 8168 recordings. + +
+
+
+ Outbound Auto-Dial Active - This option allows you to enable or disable outbound auto-dialing within VICIDIAL, setting this field to 0 will remove the LISTS and FILTERS sections and many fields from the Campaign Modification screens. Manual entry dialing will still be allowable from within the agent screen, but no list dialing will be possible. Default is 1 for active. + +
+
+
+ Ratio Dial Limit - This is the maximum limit of the auto dial level in the campaign screen. + +
+
+
+ Max FILL Calls per Second - This setting determines the maximum number of calls that can be placed by the auto-FILL outbound auto-dialing script on for all servers, per second. Must be from 1 to 200. Default is 40. + +
+
+
+ Allow Custom Dialplan Entries - This option allows you to enter custom dialplan lines into Call Menus. Default is 0 for inactive. + +
+
+
+ User Territories Active - This setting allows you to enable the User Territories setttings from the user modification screen. This feature was added to allow for more integration with a customized Vtiger installation but can have applications in a pure ViciDial system as well. Default is 0 for disabled. + +
+
+
+ Enable Second Webform - This setting allows you to have a second web form for campaigns and in-groups in the agent interface. Default is 0 for disabled. + +
+
+
+ Enable TTS Integration - This setting allows you to enable Text To Speech integration with Cepstral. This is currently only available for outbound Survey type campaigns. Default is 0 for disabled. + +
+
+
+ QC Features Active - This option allows you to enable or disable the QC or Quality Control features. Default is 0 for inactive. + +
+
+
+ Enable QueueMetrics Logging - This setting allows you to define whether VICIDIAL will insert log entries into the queue_log database table as Asterisk Queues activity does. QueueMetrics is a standalone, closed-source statistical analysis program. You must have QueueMetrics already installed and configured before enabling this feature. Default is 0. + +
+
+
+ QueueMetrics Server IP - This is the IP address of the database for your QueueMetrics installation. + +
+
+
+ QueueMetrics Database Name - This is the database name for your QueueMetrics database. + +
+
+
+ QueueMetrics Database Login - This is the user name used to log in to your QueueMetrics database. + +
+
+
+ QueueMetrics Database Password - This is the password used to log in to your QueueMetrics database. + +
+
+
+ QueueMetrics URL - This is the URL or web site address used to get to your QueueMetrics installation. + +
+
+
+ QueueMetrics Log ID - This is the server ID that all VICIDIAL logs going into the QueueMetrics database will use as an identifier for each record. + +
+
+
+ QueueMetrics EnterQueue Prepend - This field is used to allow for prepending of one of the vicidial_list data fields in front of the phone number of the customer for customized QueueMetrics reports. Default is NONE to not populate anything. + +
+
+
+ Enable Vtiger Integration - This setting allows you to enable Vtiger integration with VICIDIAL. Currently links to Vtiger admin and search as well as user replication are the only integration features available. Default is 0. + +
+
+
+ Vtiger DB Server IP - This is the IP address of the database for your Vtiger installation. + +
+
+
+ Vtiger Database Name - This is the database name for your Vtiger database. + +
+
+
+ Vtiger Database Login - This is the user name used to log in to your Vtiger database. + +
+
+
+ Vtiger Database Password - This is the password used to log in to your Vtiger database. + +
+
+
+ Vtiger URL - This is the URL or web site address used to get to your Vtiger installation. + + +



+ + VICIDIAL_STATUSES TABLE

+
+
+ Through the use of system statuses, you can have statuses that exist for campaign and in-group. The Status must be 1-6 characters in length, the description must be 2-30 characters in length and Selectable defines whether it shows up in VICIDIAL as an agent disposition. The human_answered field is used when calculating the drop percentage, or abandon rate. Setting human_answered to Y will use this status when counting the human-answered calls. The Category option allows you to group several statuses into a catogy that can be used for statistical analysis. There are also 5 additional settings that will define the kind of status: sale, dnc, customer contact, not interested, unworkable. + + + +



+ + VICIDIAL_STATUS_CATEGORIES TABLE

+
+
+ Through the use of system status categories, you can group together statuses to allow for statistical analysis on a group of statuses. The Category ID must be 2-20 characters in length with no spaces, the name must be 2-50 characters in length, the description is optional and TimeonVDAD Display defines whether that status will be one of the upto 4 statuses that can be calculated and displayed on the Time On VDAD Real-Time report. The Sale Category and Dead Lead Category are both used by the List Suggestion system when analyzing list statistics. + + + 0) + { + ?> +



+ + VICIDIAL QC STATUS CODES

+
+
+ The Quality Control-QC system within VICIDIAL has its own set of status codes separate from those within the call handling functions of VICIDIAL. QC statuse codes must be between 2 and 8 characters in length and contain no special characters like a space or colon. The QC status code description must be between 2 and 30 characters in length. + + + + +







+







+ THE END +
+ - - - -







-







-THE END -
-\n"; - echo "\n"; - echo "\n"; - echo ""; - - $stmt="SELECT dial_statuses,local_call_time,lead_filter_id,drop_lockout_time from vicidial_campaigns where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $dial_statuses = $row[0]; - $local_call_time = $row[1]; - $drop_lockout_time = $row[3]; - if ($lead_filter_id=='') { - $lead_filter_id = $row[2]; - if ($lead_filter_id=='') + echo "\n"; + echo "\n"; + echo "\n"; + echo ""; + + $stmt="SELECT dial_statuses,local_call_time,lead_filter_id,drop_lockout_time from vicidial_campaigns where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $dial_statuses = $row[0]; + $local_call_time = $row[1]; + $drop_lockout_time = $row[3]; + if ($lead_filter_id=='') { - $lead_filter_id='NONE'; + $lead_filter_id = $row[2]; + if ($lead_filter_id=='') + { + $lead_filter_id='NONE'; + } } + + $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; + $rslt=mysql_query($stmt, $link); + $lists_to_print = mysql_num_rows($rslt); + $camp_lists=''; + $o=0; + while ($lists_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $o++; + if (ereg("Y", $rowx[1])) {$camp_lists .= "'$rowx[0]',";} + } + $camp_lists = eregi_replace(".$","",$camp_lists); + + $filterSQL = $filtersql_list[$lead_filter_id]; + $filterSQL = preg_replace("/\\\\/","",$filterSQL); + $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); + if (strlen($filterSQL)>4) + {$fSQL = "and $filterSQL";} + else + {$fSQL = '';} + + + echo "

\n"; + echo "Show Dialable Leads Count -

\n"; + echo "CAMPAIGN: $campaign_id
\n"; + echo "LISTS: $camp_lists
\n"; + echo "STATUSES: $dial_statuses
\n"; + echo "FILTER: $lead_filter_id
\n"; + echo "CALL TIME: $local_call_time

\n"; + + ### call function to calculate and print dialable leads + dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$fSQL); + + echo "

\n"; + echo "\n"; + + exit; } - - $stmt="SELECT list_id,active,list_name from vicidial_lists where campaign_id='$campaign_id'"; - $rslt=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rslt); - $camp_lists=''; - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; - if (ereg("Y", $rowx[1])) {$camp_lists .= "'$rowx[0]',";} - } - $camp_lists = eregi_replace(".$","",$camp_lists); - - $filterSQL = $filtersql_list[$lead_filter_id]; - $filterSQL = preg_replace("/\\\\/","",$filterSQL); - $filterSQL = eregi_replace("^and|and$|^or|or$","",$filterSQL); - if (strlen($filterSQL)>4) - {$fSQL = "and $filterSQL";} else - {$fSQL = '';} - - - echo "

\n"; - echo "Show Dialable Leads Count -

\n"; - echo "CAMPAIGN: $campaign_id
\n"; - echo "LISTS: $camp_lists
\n"; - echo "STATUSES: $dial_statuses
\n"; - echo "FILTER: $lead_filter_id
\n"; - echo "CALL TIME: $local_call_time

\n"; - - ### call function to calculate and print dialable leads - dialable_leads($DB,$link,$local_call_time,$dial_statuses,$camp_lists,$drop_lockout_time,$fSQL); - - echo "

\n"; - echo "\n"; - - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } - else - { - echo "You do not have permission to view this page\n"; - exit; - } -} ###################### @@ -5943,7 +5981,7 @@ if ($ADD==7111111) echo "\n"; echo ""; - $stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; + $stmt="SELECT script_id,script_name,script_comments,script_text,active from vicidial_scripts where script_id='$script_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $script_name = $row[1]; @@ -7566,6 +7604,38 @@ if ($ADD==161111111111) } +###################### +# ADD=171111111111 display the ADD NEW VOICEMAIL BOX SCREEN +###################### + +if ($ADD==171111111111) + { + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; + + echo "
ADD NEW VOICEMAIL BOX
\n"; + echo "\n"; + echo "
\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
Voicemail ID: $NWB#vicidial_voicemail-voicemail_id$NWE
Pass: $NWB#vicidial_voicemail-pass$NWE
Name: $NWB#vicidial_voicemail-fullname$NWE
Active:
Email: $NWB#vicidial_voicemail-email$NWE
\n"; + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } + } + + ###################### # ADD=1111111111111 display the ADD NEW CONFERENCE SCREEN ###################### @@ -7668,14 +7738,14 @@ if ($ADD=="2") { $user = 'AUTOGENERA'; } - if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_group) < 2) or ( (strlen($user) > 10) and (!ereg('AUTOGENERA',$user)) ) ) + if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_group) < 2) or ( (strlen($user) > 10) and (!ereg('AUTOGENERA',$user)) ) ) { - echo "
USER NOT ADDED - Please go back and look at the data you entered\n"; - echo "
user id must be between 2 and 10 characters long\n"; - echo "
full name and password must be at least 2 characters long\n"; - echo "
you must select a user group\n"; + echo "
USER NOT ADDED - Please go back and look at the data you entered\n"; + echo "
user id must be between 2 and 10 characters long\n"; + echo "
full name and password must be at least 2 characters long\n"; + echo "
you must select a user group\n"; } - else + else { if (ereg('AUTOGENERA',$user)) { @@ -7946,14 +8016,14 @@ if ($ADD=="2A") {echo "
USER NOT ADDED - there is already a user in the system with this user number\n";} else { - if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 10) ) + if ( (strlen($user) < 2) or (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user) > 10) ) { - echo "
USER NOT ADDED - Please go back and look at the data you entered\n"; - echo "
user id must be between 2 and 10 characters long\n"; - echo "
full name and password must be at least 2 characters long\n"; - echo "\n"; + echo "
USER NOT ADDED - Please go back and look at the data you entered\n"; + echo "
user id must be between 2 and 10 characters long\n"; + echo "
full name and password must be at least 2 characters long\n"; + echo "\n"; } - else + else { if (ereg('AUTOGEN',$user)) { @@ -8240,13 +8310,13 @@ if ($ADD==21) {echo "
CAMPAIGN NOT ADDED - there is already an inbound group in the system with this ID\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 6) or (strlen($campaign_name) > 40) ) + if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 6) or (strlen($campaign_name) > 40) ) { - echo "
CAMPAIGN NOT ADDED - Please go back and look at the data you entered\n"; - echo "
campaign ID must be between 2 and 8 characters in length\n"; - echo "
campaign name must be between 6 and 40 characters in length\n"; + echo "
CAMPAIGN NOT ADDED - Please go back and look at the data you entered\n"; + echo "
campaign ID must be between 2 and 8 characters in length\n"; + echo "
campaign name must be between 6 and 40 characters in length\n"; } - else + else { echo "
CAMPAIGN ADDED: $campaign_id\n"; @@ -8297,13 +8367,13 @@ if ($ADD==20) {echo "
CAMPAIGN NOT ADDED - there is already a campaign in the system with this ID\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 2) or (strlen($source_campaign_id) < 2) or (strlen($source_campaign_id) > 8) ) + if ( (strlen($campaign_id) < 2) or (strlen($campaign_id) > 8) or (strlen($campaign_name) < 2) or (strlen($source_campaign_id) < 2) or (strlen($source_campaign_id) > 8) ) { - echo "
CAMPAIGN NOT ADDED - Please go back and look at the data you entered\n"; - echo "
campaign ID must be between 2 and 8 characters in length\n"; - echo "
source campaign ID must be between 2 and 8 characters in length\n"; + echo "
CAMPAIGN NOT ADDED - Please go back and look at the data you entered\n"; + echo "
campaign ID must be between 2 and 8 characters in length\n"; + echo "
source campaign ID must be between 2 and 8 characters in length\n"; } - else + else { echo "
CAMPAIGN COPIED: $campaign_id copied from $source_campaign_id\n"; @@ -8358,13 +8428,13 @@ if ($ADD==22) {echo "
CAMPAIGN STATUS NOT ADDED - there is already a global-status in the system with this name\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($status_name) < 2) ) + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($status_name) < 2) ) { - echo "
CAMPAIGN STATUS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
status must be between 1 and 8 characters in length\n"; - echo "
status name must be between 2 and 30 characters in length\n"; + echo "
CAMPAIGN STATUS NOT ADDED - Please go back and look at the data you entered\n"; + echo "
status must be between 1 and 8 characters in length\n"; + echo "
status name must be between 2 and 30 characters in length\n"; } - else + else { echo "
CAMPAIGN STATUS ADDED: $campaign_id - $status\n"; @@ -8404,13 +8474,13 @@ if ($ADD==23) {echo "
CAMPAIGN HOT KEY NOT ADDED - there is already a campaign-hotkey in the system with this hotkey\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) { - echo "
CAMPAIGN HOT KEY NOT ADDED - Please go back and look at the data you entered\n"; - echo "
hotkey must be a single character between 1 and 9 \n"; - echo "
status must be between 1 and 8 characters in length\n"; + echo "
CAMPAIGN HOT KEY NOT ADDED - Please go back and look at the data you entered\n"; + echo "
hotkey must be a single character between 1 and 9 \n"; + echo "
status must be between 1 and 8 characters in length\n"; } - else + else { echo "
CAMPAIGN HOT KEY ADDED: $campaign_id - $status - $hotkey\n"; @@ -8446,14 +8516,14 @@ if ($ADD==25) {echo "
CAMPAIGN LEAD RECYCLE NOT ADDED - there is already a lead-recycle for this campaign with this status\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_delay >= 43200) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_delay >= 43200) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) { - echo "
CAMPAIGN LEAD RECYCLE NOT ADDED - Please go back and look at the data you entered\n"; - echo "
status must be between 1 and 6 characters in length\n"; - echo "
attempt delay must be at least 120 seconds and less than 43200 seconds or 12 hours\n"; - echo "
maximum attempts must be from 1 to 10\n"; + echo "
CAMPAIGN LEAD RECYCLE NOT ADDED - Please go back and look at the data you entered\n"; + echo "
status must be between 1 and 6 characters in length\n"; + echo "
attempt delay must be at least 120 seconds and less than 43200 seconds or 12 hours\n"; + echo "
maximum attempts must be from 1 to 10\n"; } - else + else { echo "
CAMPAIGN LEAD RECYCLE ADDED: $campaign_id - $status - $attempt_delay\n"; @@ -8489,12 +8559,12 @@ if ($ADD==26) {echo "
AUTO ALT DIAL STATUS NOT ADDED - there is already an entry for this campaign with this status\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) { - echo "
AUTO ALT DIAL STATUS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
status must be between 1 and 6 characters in length\n"; + echo "
AUTO ALT DIAL STATUS NOT ADDED - Please go back and look at the data you entered\n"; + echo "
status must be between 1 and 6 characters in length\n"; } - else + else { echo "
AUTO ALT DIAL STATUS ADDED: $campaign_id - $status\n"; @@ -8535,13 +8605,13 @@ if ($ADD==27) {echo "
AGENT PAUSE CODE NOT ADDED - there is already an entry for this campaign with this pause code\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) { - echo "
AGENT PAUSE CODE NOT ADDED - Please go back and look at the data you entered\n"; - echo "
pause code must be between 1 and 6 characters in length\n"; - echo "
pause code name must be between 2 and 30 characters in length\n"; + echo "
AGENT PAUSE CODE NOT ADDED - Please go back and look at the data you entered\n"; + echo "
pause code must be between 1 and 6 characters in length\n"; + echo "
pause code name must be between 2 and 30 characters in length\n"; } - else + else { echo "
AGENT PAUSE CODE ADDED: $campaign_id - $pause_code - $pause_code_name\n"; @@ -8577,12 +8647,12 @@ if ($ADD==28) {echo "
CAMPAIGN DIAL STATUS NOT ADDED - there is already an entry for this campaign with this status\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) { - echo "
CAMPAIGN DIAL STATUS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
status must be between 1 and 6 characters in length\n"; + echo "
CAMPAIGN DIAL STATUS NOT ADDED - Please go back and look at the data you entered\n"; + echo "
status must be between 1 and 6 characters in length\n"; } - else + else { echo "
CAMPAIGN DIAL STATUS ADDED: $campaign_id - $status\n"; @@ -8637,14 +8707,14 @@ if ($ADD==211) {echo "
LIST NOT ADDED - there is already a list in the system with this ID\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or ($list_id < 100) or (strlen($list_id) > 8) ) + if ( (strlen($campaign_id) < 2) or (strlen($list_name) < 2) or ($list_id < 100) or (strlen($list_id) > 8) ) { - echo "
LIST NOT ADDED - Please go back and look at the data you entered\n"; - echo "
List ID must be between 2 and 8 characters in length\n"; - echo "
List name must be at least 2 characters in length\n"; - echo "
List ID must be greater than 100\n"; - } - else + echo "
LIST NOT ADDED - Please go back and look at the data you entered\n"; + echo "
List ID must be between 2 and 8 characters in length\n"; + echo "
List name must be at least 2 characters in length\n"; + echo "
List ID must be greater than 100\n"; + } + else { echo "
LIST ADDED: $list_id\n"; @@ -8700,13 +8770,13 @@ if ($ADD==2111) {echo "
GROUP NOT ADDED - there is already a campaign in the system with this ID\n";} else { - if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_color) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) ) + if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_color) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) ) { - echo "
GROUP NOT ADDED - Please go back and look at the data you entered\n"; - echo "
Group ID must be between 2 and 20 characters in length and contain no ' -+'.\n"; - echo "
Group name and group color must be at least 2 characters in length\n"; + echo "
GROUP NOT ADDED - Please go back and look at the data you entered\n"; + echo "
Group ID must be between 2 and 20 characters in length and contain no ' -+'.\n"; + echo "
Group name and group color must be at least 2 characters in length\n"; } - else + 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');"; $rslt=mysql_query($stmt, $link); @@ -8758,13 +8828,13 @@ if ($ADD==2011) {echo "
GROUP NOT ADDED - there is already a group in the system with this ID\n";} else { - if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) ) + if ( (strlen($group_id) < 2) or (strlen($group_name) < 2) or (strlen($group_id) > 20) or (eregi(' ',$group_id)) or (eregi("\-",$group_id)) or (eregi("\+",$group_id)) ) { - echo "
GROUP NOT ADDED - Please go back and look at the data you entered\n"; - echo "
Group ID must be between 2 and 20 characters in length and contain no ' -+'.\n"; - echo "
Group name and group color must be at least 2 characters in length\n"; + echo "
GROUP NOT ADDED - Please go back and look at the data you entered\n"; + echo "
Group ID must be between 2 and 20 characters in length and contain no ' -+'.\n"; + echo "
Group name and group color must be at least 2 characters in length\n"; } - else + 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) 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 from vicidial_inbound_groups where group_id=\"$source_group_id\";"; $rslt=mysql_query($stmt, $link); @@ -8805,12 +8875,12 @@ if ($ADD==2311) {echo "
DID NOT ADDED - there is already a DID in the system with this extension\n";} else { - if ( (strlen($did_pattern) < 2) or (eregi(' ',$did_pattern)) or (eregi('-',$did_pattern)) or (eregi("\+",$did_pattern)) ) + if ( (strlen($did_pattern) < 2) or (eregi(' ',$did_pattern)) or (eregi('-',$did_pattern)) or (eregi("\+",$did_pattern)) ) { - echo "
DID NOT ADDED - Please go back and look at the data you entered\n"; - echo "
DID Extension must be between 2 and 20 characters in length and contain no ' -+'.\n"; + echo "
DID NOT ADDED - Please go back and look at the data you entered\n"; + echo "
DID Extension must be between 2 and 20 characters in length and contain no ' -+'.\n"; } - else + else { $stmt="INSERT INTO vicidial_inbound_dids (did_pattern,did_description) values('$did_pattern','$did_description');"; $rslt=mysql_query($stmt, $link); @@ -8850,12 +8920,12 @@ if ($ADD==2411) {echo "
DID NOT ADDED - there is already a DID in the system with this extension\n";} else { - if ( (strlen($source_did) < 1) or (strlen($did_pattern) < 1) or (eregi(' ',$source_did)) or (eregi(' ',$did_pattern)) or (eregi("\+",$source_did)) ) + if ( (strlen($source_did) < 1) or (strlen($did_pattern) < 1) or (eregi(' ',$source_did)) or (eregi(' ',$did_pattern)) or (eregi("\+",$source_did)) ) { - echo "
DID NOT ADDED - Please go back and look at the data you entered\n"; - echo "
DID Extension must be between 2 and 20 characters in length and contain no ' -+'.\n"; + echo "
DID NOT ADDED - Please go back and look at the data you entered\n"; + echo "
DID Extension must be between 2 and 20 characters in length and contain no ' -+'.\n"; } - else + else { $stmt="INSERT INTO vicidial_inbound_dids (did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id) SELECT \"$did_pattern\",\"$did_description\",did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id from vicidial_inbound_dids where did_id=\"$source_did\";"; $rslt=mysql_query($stmt, $link); @@ -8908,12 +8978,12 @@ if ($ADD==2511) {echo "
CALL MENU NOT ADDED - there is already a CALL MENU in the system with this ID\n";} else { - if ( (strlen($menu_id) < 2) or (eregi(' ',$menu_id)) ) + if ( (strlen($menu_id) < 2) or (eregi(' ',$menu_id)) ) { - echo "
CALL MENU NOT ADDED - Please go back and look at the data you entered\n"; - echo "
Call Menu ID must be between 2 and 50 characters in length and contain no ' '.\n"; + echo "
CALL MENU NOT ADDED - Please go back and look at the data you entered\n"; + echo "
Call Menu ID must be between 2 and 50 characters in length and contain no ' '.\n"; } - else + else { $stmt="INSERT INTO vicidial_call_menu (menu_id,menu_name) values('$menu_id','$menu_name');"; $rslt=mysql_query($stmt, $link); @@ -8961,12 +9031,12 @@ if ($ADD==2611) {echo "
CALL MENU NOT ADDED - there is already a CALL MENU in the system with this ID\n";} else { - if ( (strlen($menu_id) < 2) or (eregi(' ',$menu_id)) or (strlen($source_menu) < 2) or (eregi(' ',$source_menu)) ) + if ( (strlen($menu_id) < 2) or (eregi(' ',$menu_id)) or (strlen($source_menu) < 2) or (eregi(' ',$source_menu)) ) { - echo "
CALL MENU NOT ADDED - Please go back and look at the data you entered\n"; - echo "
Call Menu ID must be between 2 and 50 characters in length and contain no ' '.\n"; + echo "
CALL MENU NOT ADDED - Please go back and look at the data you entered\n"; + echo "
Call Menu ID must be between 2 and 50 characters in length and contain no ' '.\n"; } - else + else { $stmt="INSERT INTO vicidial_call_menu (menu_id,menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group) SELECT \"$menu_id\",\"$menu_name\",menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group from vicidial_call_menu where menu_id=\"$source_menu\";"; $rslt=mysql_query($stmt, $link); @@ -9003,12 +9073,12 @@ if ($ADD==21111) {echo "
REMOTE AGENTS NOT ADDED - there is already a remote agents entry starting with this userID\n";} else { - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) + if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) { - echo "
REMOTE AGENTS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
User ID start and external extension must be at least 2 characters in length\n"; - } - else + echo "
REMOTE AGENTS NOT ADDED - Please go back and look at the data you entered\n"; + echo "
User ID start and external extension must be at least 2 characters in length\n"; + } + else { $stmt="INSERT INTO vicidial_remote_agents values('','$user_start','$number_of_lines','$server_ip','$conf_exten','$status','$campaign_id','$groups_value');"; $rslt=mysql_query($stmt, $link); @@ -9055,12 +9125,12 @@ if ($ADD==211111) {echo "
USER GROUP NOT ADDED - there is already a user group entry with this name\n";} else { - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) + if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) { - echo "
USER GROUP NOT ADDED - Please go back and look at the data you entered\n"; - echo "
Group name and description must be at least 2 characters in length\n"; - } - else + echo "
USER GROUP NOT ADDED - Please go back and look at the data you entered\n"; + echo "
Group name and description must be at least 2 characters in length\n"; + } + else { $stmt="INSERT INTO vicidial_user_groups(user_group,group_name,allowed_campaigns) values('$user_group','$group_name','-ALL-CAMPAIGNS-');"; $rslt=mysql_query($stmt, $link); @@ -9183,12 +9253,12 @@ if ($ADD==2111111) {echo "
SCRIPT NOT ADDED - there is already a script entry with this name\n";} else { - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) + if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) { - echo "
SCRIPT NOT ADDED - Please go back and look at the data you entered\n"; - echo "
Script name, description and text must be at least 2 characters in length\n"; - } - else + echo "
SCRIPT NOT ADDED - Please go back and look at the data you entered\n"; + echo "
Script name, description and text must be at least 2 characters in length\n"; + } + else { $stmt="INSERT INTO vicidial_scripts values('$script_id','$script_name','$script_comments','" . mysql_real_escape_string($script_text) . "','$active');"; $rslt=mysql_query($stmt, $link); @@ -9236,12 +9306,12 @@ if ($ADD==21111111) {echo "
FILTER NOT ADDED - there is already a filter entry with this ID\n";} else { - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) + if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) { - echo "
FILTER NOT ADDED - Please go back and look at the data you entered\n"; - echo "
Filter ID, name and SQL must be at least 2 characters in length\n"; - } - else + echo "
FILTER NOT ADDED - Please go back and look at the data you entered\n"; + echo "
Filter ID, name and SQL must be at least 2 characters in length\n"; + } + else { $stmt="INSERT INTO vicidial_lead_filters SET lead_filter_id='$lead_filter_id',lead_filter_name='$lead_filter_name',lead_filter_comments='$lead_filter_comments',lead_filter_sql='" . mysql_real_escape_string($lead_filter_sql) . "';"; $rslt=mysql_query($stmt, $link); @@ -9276,12 +9346,12 @@ if ($ADD==211111111) {echo "
CALL TIME DEFINITION NOT ADDED - there is already a call time entry with this ID\n";} else { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) + if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) { - echo "
CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; - echo "
Call Time ID and name must be at least 2 characters in length\n"; - } - else + echo "
CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; + echo "
Call Time ID and name must be at least 2 characters in length\n"; + } + else { $stmt="INSERT INTO vicidial_call_times SET call_time_id='$call_time_id',call_time_name='$call_time_name',call_time_comments='$call_time_comments';"; $rslt=mysql_query($stmt, $link); @@ -9316,12 +9386,12 @@ if ($ADD==2111111111) {echo "
STATE CALL TIME DEFINITION NOT ADDED - there is already a call time entry with this ID\n";} else { - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) + if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) { - echo "
STATE CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; - echo "
State Call Time ID, name and state must be at least 2 characters in length\n"; - } - else + echo "
STATE CALL TIME DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; + echo "
State Call Time ID, name and state must be at least 2 characters in length\n"; + } + else { $stmt="INSERT INTO vicidial_state_call_times SET state_call_time_id='$call_time_id',state_call_time_name='$call_time_name',state_call_time_comments='$call_time_comments',state_call_time_state='$state_call_time_state';"; $rslt=mysql_query($stmt, $link); @@ -9371,14 +9441,14 @@ if ($ADD==231111111) else { $shift_length_test = eregi_replace(':','',$shift_length); - if ( (strlen($shift_id) < 2) or (strlen($shift_name) < 2) or (strlen($shift_start_time) < 4) or (strlen($shift_start_time) > 4) or (strlen($shift_length) < 5) or (strlen($shift_length) > 5) or ($shift_start_time > 2359) or ($shift_length_test > 2400) ) + if ( (strlen($shift_id) < 2) or (strlen($shift_name) < 2) or (strlen($shift_start_time) < 4) or (strlen($shift_start_time) > 4) or (strlen($shift_length) < 5) or (strlen($shift_length) > 5) or ($shift_start_time > 2359) or ($shift_length_test > 2400) ) { - echo "
SHIFT DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; - echo "
Shift ID and name must be at least 2 characters in length\n"; - echo "
Shift Start Time must be 4 digits in length and be a valid time\n"; - echo "
Shift Length must be 5 characters in length and be 24 hours or less\n"; - } - else + echo "
SHIFT DEFINITION NOT ADDED - Please go back and look at the data you entered\n"; + echo "
Shift ID and name must be at least 2 characters in length\n"; + echo "
Shift Start Time must be 4 digits in length and be a valid time\n"; + echo "
Shift Length must be 5 characters in length and be 24 hours or less\n"; + } + else { $p=0; $shift_weekdays_ct = count($shift_weekdays); @@ -9448,25 +9518,36 @@ if ($ADD==21111111111) {echo "
PHONE NOT ADDED - there is already a Phone alias in the system with this login\n";} else { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
PHONE NOT ADDED - Please go back and look at the data you entered\n";} - else + $stmt="SELECT count(*) from vicidial_voicemail where voicemail_id='$voicemail_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
PHONE NOT ADDED - there is already a Voicemail ID in the system with this ID\n";} + else { - echo "
PHONE ADDED\n"; + if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) + { + echo "
PHONE NOT ADDED - Please go back and look at the data you entered\n"; + echo "
The following fields must have data: extension, server_ip, dialplan_number, voicemail_id, login, pass\n"; + } + else + { + echo "
PHONE ADDED\n"; - $stmt="INSERT INTO phones (extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,protocol,local_gmt,outbound_cid) values('$extension','$dialplan_number','$voicemail_id','$phone_ip','$computer_ip','$server_ip','$login','$pass','$status','$active','$phone_type','$fullname','$company','$picture','$protocol','$local_gmt','$outbound_cid');"; - $rslt=mysql_query($stmt, $link); + $stmt="INSERT INTO phones (extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,protocol,local_gmt,outbound_cid) values('$extension','$dialplan_number','$voicemail_id','$phone_ip','$computer_ip','$server_ip','$login','$pass','$status','$active','$phone_type','$fullname','$company','$picture','$protocol','$local_gmt','$outbound_cid');"; + $rslt=mysql_query($stmt, $link); - $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';"; - $rslt=mysql_query($stmtA, $link); + $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';"; + $rslt=mysql_query($stmtA, $link); - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONES', event_type='ADD', record_id='$extension', event_code='ADMIN ADD PHONE', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONES', event_type='ADD', record_id='$extension', event_code='ADMIN ADD PHONE', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } } } @@ -9496,9 +9577,9 @@ if ($ADD==22111111111) {echo "
PHONE ALIAS NOT ADDED - there is already a Phone Login in the system with this ID\n";} else { - if ( (strlen($alias_id) < 1) or (strlen($alias_name) < 2) ) + if ( (strlen($alias_id) < 1) or (strlen($alias_name) < 2) ) {echo "
PHONE ALIAS NOT ADDED - Please go back and look at the data you entered\n";} - else + else { echo "
PHONE ALIAS ADDED\n"; @@ -9537,9 +9618,9 @@ if ($ADD==23111111111) {echo "
GROUP ALIAS NOT ADDED - you cannot use reserved words in group aliases\n";} else { - if ( (strlen($group_alias_id) < 1) or (strlen($group_alias_name) < 2) ) + if ( (strlen($group_alias_id) < 1) or (strlen($group_alias_name) < 2) ) {echo "
GROUP ALIAS NOT ADDED - Please go back and look at the data you entered\n";} - else + else { echo "
GROUP ALIAS ADDED\n"; @@ -9574,9 +9655,9 @@ if ($ADD==211111111111) {echo "
SERVER NOT ADDED - there is already a server in the system with this ID\n";} else { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) + if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) {echo "
SERVER NOT ADDED - Please go back and look at the data you entered\n";} - else + else { echo "
SERVER ADDED\n"; @@ -9629,14 +9710,14 @@ if ($ADD==221111111111) {echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - there is already a server-trunk record for this campaign\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) { - echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - Please go back and look at the data you entered\n"; - echo "
campaign must be between 3 and 8 characters in length\n"; - echo "
server_ip delay must be at least 7 characters\n"; - echo "
trunks must be a digit from 0 to 9999\n"; + echo "
VICIDIAL SERVER TRUNK RECORD NOT ADDED - Please go back and look at the data you entered\n"; + echo "
campaign must be between 3 and 8 characters in length\n"; + echo "
server_ip delay must be at least 7 characters\n"; + echo "
trunks must be a digit from 0 to 9999\n"; } - else + else { echo "
VICIDIAL SERVER TRUNK RECORD ADDED: $campaign_id - $server_ip - $dedicated_trunks - $trunk_restriction\n"; @@ -9671,9 +9752,9 @@ if ($ADD==231111111111) {echo "
CONF TEMPLATE NOT ADDED - there is already a template in the system with this ID\n";} else { - if (strlen($template_id) < 2) + if (strlen($template_id) < 2) {echo "
CONF TEMPLATE NOT ADDED - Please go back and look at the data you entered\n";} - else + else { echo "
CONF TEMPLATE ADDED\n"; @@ -9707,9 +9788,9 @@ if ($ADD==241111111111) {echo "
CARRIER NOT ADDED - there is already a carrier in the system with this ID\n";} else { - if ( (strlen($carrier_id) < 2) or (strlen($server_ip) < 7) ) + if ( (strlen($carrier_id) < 2) or (strlen($server_ip) < 7) ) {echo "
CARRIER NOT ADDED - Please go back and look at the data you entered\n";} - else + else { echo "
CARRIER ADDED\n"; @@ -9746,9 +9827,9 @@ if ($ADD==251111111111) {echo "
TTS ENTRY NOT ADDED - there is already a tts entry in the system with this ID\n";} else { - if ( (strlen($tts_id) < 2) or (strlen($tts_name) < 3) ) + if ( (strlen($tts_id) < 2) or (strlen($tts_name) < 3) ) {echo "
TTS ENTRY NOT ADDED - Please go back and look at the data you entered\n";} - else + else { echo "
TTS ENTRY ADDED\n"; @@ -9782,9 +9863,9 @@ if ($ADD==261111111111) {echo "
MUSIC ON HOLD ENTRY NOT ADDED - there is already a moh entry in the system with this ID\n";} else { - if ( (strlen($moh_id) < 2) or (strlen($moh_name) < 3) or ($moh_id=='sounds') or ($moh_id=='agi-bin') or ($moh_id=='astdb') or ($moh_id=='keys') ) + if ( (strlen($moh_id) < 2) or (strlen($moh_name) < 3) or ($moh_id=='sounds') or ($moh_id=='agi-bin') or ($moh_id=='astdb') or ($moh_id=='keys') ) {echo "
MUSIC ON HOLD ENTRY NOT ADDED - Please go back and look at the data you entered\n";} - else + else { echo "
MUSIC ON HOLD ENTRY ADDED\n"; @@ -9804,6 +9885,58 @@ if ($ADD==261111111111) } +###################### +# ADD=271111111111 adds new voicemail box to the system +###################### + +if ($ADD==271111111111) + { + echo ""; + $stmt="SELECT count(*) from vicidial_voicemail where voicemail_id='$voicemail_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
VOICEMAIL BOX NOT ADDED - there is already a voicemail box in the system with this ID\n";} + else + { + $stmt="SELECT count(*) from phones where voicemail_id='$voicemail_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + {echo "
VOICEMAIL BOX NOT ADDED - there is already a phone in the system with this voicemail ID\n";} + else + { + if ( (strlen($voicemail_id) < 2) or (strlen($pass) < 2) or (strlen($fullname) < 3) ) + {echo "
VOICEMAIL BOX NOT ADDED - Please go back and look at the data you entered\n";} + else + { + echo "
VOICEMAIL BOX ADDED\n"; + + $stmt="INSERT INTO vicidial_voicemail SET voicemail_id='$voicemail_id',pass='$pass',email='$email',fullname='$fullname',active='$active';"; + $rslt=mysql_query($stmt, $link); + + $stmt="SELECT active_voicemail_server from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $active_voicemail_server = $row[0]; + + $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$active_voicemail_server';"; + $rslt=mysql_query($stmtA, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='VOICEMAIL', event_type='ADD', record_id='$voicemail_id', event_code='ADMIN ADD VOICEMAIL', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } + } + } + $ADD=371111111111; + } + + ###################### # ADD=2111111111111 adds new conference to the system ###################### @@ -9818,9 +9951,9 @@ if ($ADD==2111111111111) {echo "
CONFERENCE NOT ADDED - there is already a conference in the system with this ID and server\n";} else { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) {echo "
CONFERENCE NOT ADDED - Please go back and look at the data you entered\n";} - else + else { echo "
CONFERENCE ADDED\n"; @@ -9846,9 +9979,9 @@ if ($ADD==21111111111111) {echo "
VICIDIAL CONFERENCE NOT ADDED - there is already a vicidial conference in the system with this ID and server\n";} else { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) {echo "
VICIDIAL CONFERENCE NOT ADDED - Please go back and look at the data you entered\n";} - else + else { echo "
VICIDIAL CONFERENCE ADDED\n"; @@ -9881,13 +10014,13 @@ if ($ADD==221111111111111) {echo "
SYSTEM STATUS NOT ADDED - there is already a global-status in the system with this name\n";} else { - if ( (strlen($status) < 1) or (strlen($status_name) < 2) ) + if ( (strlen($status) < 1) or (strlen($status_name) < 2) ) { - echo "
SYSTEM STATUS NOT ADDED - Please go back and look at the data you entered\n"; - echo "
status must be between 1 and 8 characters in length\n"; - echo "
status name must be between 2 and 30 characters in length\n"; + echo "
SYSTEM STATUS NOT ADDED - Please go back and look at the data you entered\n"; + echo "
status must be between 1 and 8 characters in length\n"; + echo "
status name must be between 2 and 30 characters in length\n"; } - else + else { echo "
SYSTEM STATUS ADDED: $status_name - $status\n"; @@ -9922,13 +10055,13 @@ if ($ADD==231111111111111) {echo "
STATUS CATEGORY NOT ADDED - there is already a status category in the system with this ID: $row[0]\n";} else { - if ( (strlen($vsc_id) < 2) or (strlen($vsc_id) > 20) or (strlen($vsc_name) < 2) ) + if ( (strlen($vsc_id) < 2) or (strlen($vsc_id) > 20) or (strlen($vsc_name) < 2) ) { - echo "
STATUS CATEGORY NOT ADDED - Please go back and look at the data you entered\n"; - echo "
ID must be between 2 and 20 characters in length\n"; - echo "
name name must be between 2 and 50 characters in length\n"; + echo "
STATUS CATEGORY NOT ADDED - Please go back and look at the data you entered\n"; + echo "
ID must be between 2 and 20 characters in length\n"; + echo "
name name must be between 2 and 50 characters in length\n"; } - else + else { echo "
STATUS CATEGORY ADDED: $vsc_id - $vsc_name\n"; @@ -9972,13 +10105,13 @@ if ($ADD==241111111111111) {echo "
QC STATUS CODE NOT ADDED - there is already a qc status code in the system with this name: $row[0]\n";} else { - if ( (strlen($code) < 1) or (strlen($code_name) < 2) ) + if ( (strlen($code) < 1) or (strlen($code_name) < 2) ) { - echo "
QC STATUS CODE NOT ADDED - Please go back and look at the data you entered\n"; - echo "
code must be between 1 and 8 characters in length\n"; - echo "
code name must be between 2 and 30 characters in length\n"; + echo "
QC STATUS CODE NOT ADDED - Please go back and look at the data you entered\n"; + echo "
code must be between 1 and 8 characters in length\n"; + echo "
code name must be between 2 and 30 characters in length\n"; } - else + else { echo "
QC STATUS CODE ADDED: $code_name - $code\n"; @@ -10012,232 +10145,232 @@ if ($ADD==241111111111111) ###################### if ($ADD=="4A") -{ - if ($LOGmodify_users==1) { - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) + if ($LOGmodify_users==1) { - echo "
USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - if ($SSoutbound_autodial_active < 1) + echo ""; + + if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) { - $closer_default_blended = '0'; - $delete_filters = '0'; - $load_leads = '0'; + echo "
USER NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
Password and Full Name each need ot be at least 2 characters in length\n"; } - echo "
USER MODIFIED - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids',active='$active',download_lists='$download_lists',agent_shift_enforcement_override='$agent_shift_enforcement_override',manager_shift_enforcement_override='$manager_shift_enforcement_override',export_reports='$export_reports',delete_from_dnc='$delete_from_dnc',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ############################################################### - ##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### - $stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $ss_conf_ct = mysql_num_rows($rslt); - if ($ss_conf_ct > 0) + else { - $row=mysql_fetch_row($rslt); - $enable_vtiger_integration = $row[0]; - $vtiger_server_ip = $row[1]; - $vtiger_dbname = $row[2]; - $vtiger_login = $row[3]; - $vtiger_pass = $row[4]; - $vtiger_url = $row[5]; - } - ##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### - ############################################################# - - if ($enable_vtiger_integration > 0) - { - ### connect to your vtiger database - $linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass"); - if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());} - echo 'Connected successfully'; - mysql_select_db("$vtiger_dbname", $linkV); - - $user_name = $user; - $user_password = $pass; - $last_name = $full_name; - $is_admin = 'off'; - $roleid = 'H5'; - $status = 'Active'; - $groupid = '1'; - if ($user_level >= 7) {$roleid = 'H3';} - if ($user_level >= 8) {$roleid = 'H4';} - if ($user_level >= 9) {$roleid = 'H2';} - if ($user_level >= 9) {$is_admin = 'on';} - $salt = substr($user_name, 0, 2); - $salt = '$1$' . $salt . '$'; - $encrypted_password = crypt($user_password, $salt); - - ###################################### - ##### BEGIN Add/Update group info in Vtiger - $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; - $rslt=mysql_query($stmt, $linkV); - if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $group_found_count = $row[0]; - - ### group exists in vtiger, update it - if ($group_found_count > 0) + if ($SSoutbound_autodial_active < 1) { - $stmt="SELECT groupid from vtiger_groups where groupname='$user_group';"; - $rslt=mysql_query($stmt, $linkV); - if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $groupid = $row[0]; + $closer_default_blended = '0'; + $delete_filters = '0'; + $load_leads = '0'; } + echo "
USER MODIFIED - ADMIN: $user\n"; - ### user doesn't exist in vtiger, insert it - else - { - #### BEGIN CREATE NEW GROUP RECORD IN VTIGER - # Get next available id from vtiger_groups_seq to use as groupid - $stmt="SELECT id from vtiger_groups_seq;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $linkV); - $row=mysql_fetch_row($rslt); - $groupid = ($row[0] + 1); - if (!$rslt) {die('Could not execute: ' . mysql_error());} + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',delete_users='$delete_users',delete_user_groups='$delete_user_groups',delete_lists='$delete_lists',delete_campaigns='$delete_campaigns',delete_ingroups='$delete_ingroups',delete_remote_agents='$delete_remote_agents',load_leads='$load_leads',campaign_detail='$campaign_detail',ast_admin_access='$ast_admin_access',ast_delete_phones='$ast_delete_phones',delete_scripts='$delete_scripts',modify_leads='$modify_leads',hotkeys_active='$hotkeys_active',change_agent_campaign='$change_agent_campaign',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',delete_filters='$delete_filters',alter_agent_interface_options='$alter_agent_interface_options',closer_default_blended='$closer_default_blended',delete_call_times='$delete_call_times',modify_call_times='$modify_call_times',modify_users='$modify_users',modify_campaigns='$modify_campaigns',modify_lists='$modify_lists',modify_scripts='$modify_scripts',modify_filters='$modify_filters',modify_ingroups='$modify_ingroups',modify_usergroups='$modify_usergroups',modify_remoteagents='$modify_remoteagents',modify_servers='$modify_servers',view_reports='$view_reports',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',add_timeclock_log='$add_timeclock_log',modify_timeclock_log='$modify_timeclock_log',delete_timeclock_log='$delete_timeclock_log',alter_custphone_override='$alter_custphone_override',vdc_agent_api_access='$vdc_agent_api_access',modify_inbound_dids='$modify_inbound_dids',delete_inbound_dids='$delete_inbound_dids',active='$active',download_lists='$download_lists',agent_shift_enforcement_override='$agent_shift_enforcement_override',manager_shift_enforcement_override='$manager_shift_enforcement_override',export_reports='$export_reports',delete_from_dnc='$delete_from_dnc',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts' where user='$user';"; + $rslt=mysql_query($stmt, $link); - # Increase next available groupid with 1 so next record gets proper id - $stmt="UPDATE vtiger_groups_seq SET id = '$groupid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); - $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';"; - if ($DB) {echo "|$stmtA|\n";} - $rslt=mysql_query($stmtA, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - #### END CREATE NEW GROUP RECORD IN VTIGER - } - ##### END Add/Update group info in Vtiger - ###################################### - - ###################################### - ##### BEGIN Add/Update user info in Vtiger - $stmt="SELECT count(*) from vtiger_users where user_name='$user_name';"; - $rslt=mysql_query($stmt, $linkV); + ############################################################### + ##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### + $stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;"; + $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $found_count = $row[0]; - - ### user exists in vtiger, update it - if ($found_count > 0) + $ss_conf_ct = mysql_num_rows($rslt); + if ($ss_conf_ct > 0) { - $stmt="SELECT id from vtiger_users where user_name='$user_name';"; + $row=mysql_fetch_row($rslt); + $enable_vtiger_integration = $row[0]; + $vtiger_server_ip = $row[1]; + $vtiger_dbname = $row[2]; + $vtiger_login = $row[3]; + $vtiger_pass = $row[4]; + $vtiger_url = $row[5]; + } + ##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### + ############################################################# + + if ($enable_vtiger_integration > 0) + { + ### connect to your vtiger database + $linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass"); + if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());} + echo 'Connected successfully'; + mysql_select_db("$vtiger_dbname", $linkV); + + $user_name = $user; + $user_password = $pass; + $last_name = $full_name; + $is_admin = 'off'; + $roleid = 'H5'; + $status = 'Active'; + $groupid = '1'; + if ($user_level >= 7) {$roleid = 'H3';} + if ($user_level >= 8) {$roleid = 'H4';} + if ($user_level >= 9) {$roleid = 'H2';} + if ($user_level >= 9) {$is_admin = 'on';} + $salt = substr($user_name, 0, 2); + $salt = '$1$' . $salt . '$'; + $encrypted_password = crypt($user_password, $salt); + + ###################################### + ##### BEGIN Add/Update group info in Vtiger + $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; $rslt=mysql_query($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die('Could not execute: ' . mysql_error());} $row=mysql_fetch_row($rslt); - $userid = $row[0]; + $group_found_count = $row[0]; - $stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';"; - $rslt=mysql_query($stmt, $linkV); - if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $usergroupcount = $row[0]; - - $stmtA = "UPDATE vtiger_users SET user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status' where id='$userid';"; - if ($DB) {echo "|$stmtA|\n";} - $rslt=mysql_query($stmtA, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - $stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';"; - if ($DB) {echo "|$stmtB|\n";} - $rslt=mysql_query($stmtB, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - if ($usergroupcount < 1) + ### group exists in vtiger, update it + if ($group_found_count > 0) { - $stmt="SELECT user_group FROM vicidial_user_groups;"; - $rslt=mysql_query($stmt, $link); + $stmt="SELECT groupid from vtiger_groups where groupname='$user_group';"; + $rslt=mysql_query($stmt, $linkV); if ($DB) {echo "$stmt\n";} - $VD_groups_ct = mysql_num_rows($rslt); - $k=0; - $VD_groups_list=''; - while ($k < $VD_groups_ct) - { - $row=mysql_fetch_row($rslt); - $VD_groups_list .= "'$row[0]',"; - $k++; - } - $VD_groups_list = preg_replace("/.$/",'',$VD_groups_list); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $groupid = $row[0]; + } - $stmtC = "DELETE FROM vtiger_users2group WHERE userid='$userid' and groupid IN(SELECT groupid from vtiger_groups where groupname IN($VD_groups_list));"; + ### user doesn't exist in vtiger, insert it + else + { + #### BEGIN CREATE NEW GROUP RECORD IN VTIGER + # Get next available id from vtiger_groups_seq to use as groupid + $stmt="SELECT id from vtiger_groups_seq;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkV); + $row=mysql_fetch_row($rslt); + $groupid = ($row[0] + 1); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + # Increase next available groupid with 1 so next record gets proper id + $stmt="UPDATE vtiger_groups_seq SET id = '$groupid';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';"; + if ($DB) {echo "|$stmtA|\n";} + $rslt=mysql_query($stmtA, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + #### END CREATE NEW GROUP RECORD IN VTIGER + } + ##### END Add/Update group info in Vtiger + ###################################### + + ###################################### + ##### BEGIN Add/Update user info in Vtiger + $stmt="SELECT count(*) from vtiger_users where user_name='$user_name';"; + $rslt=mysql_query($stmt, $linkV); + if ($DB) {echo "$stmt\n";} + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $found_count = $row[0]; + + ### user exists in vtiger, update it + if ($found_count > 0) + { + $stmt="SELECT id from vtiger_users where user_name='$user_name';"; + $rslt=mysql_query($stmt, $linkV); + if ($DB) {echo "$stmt\n";} + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $userid = $row[0]; + + $stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';"; + $rslt=mysql_query($stmt, $linkV); + if ($DB) {echo "$stmt\n";} + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $usergroupcount = $row[0]; + + $stmtA = "UPDATE vtiger_users SET user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status' where id='$userid';"; + if ($DB) {echo "|$stmtA|\n";} + $rslt=mysql_query($stmtA, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';"; + if ($DB) {echo "|$stmtB|\n";} + $rslt=mysql_query($stmtB, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + if ($usergroupcount < 1) + { + $stmt="SELECT user_group FROM vicidial_user_groups;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_groups_ct = mysql_num_rows($rslt); + $k=0; + $VD_groups_list=''; + while ($k < $VD_groups_ct) + { + $row=mysql_fetch_row($rslt); + $VD_groups_list .= "'$row[0]',"; + $k++; + } + $VD_groups_list = preg_replace("/.$/",'',$VD_groups_list); + + $stmtC = "DELETE FROM vtiger_users2group WHERE userid='$userid' and groupid IN(SELECT groupid from vtiger_groups where groupname IN($VD_groups_list));"; + if ($DB) {echo "|$stmtC|\n";} + $rslt=mysql_query($stmtC, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; + if ($DB) {echo "|$stmtD|\n";} + $rslt=mysql_query($stmtD, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + } + } + + ### user doesn't exist in vtiger, insert it + else + { + #### BEGIN CREATE NEW USER RECORD IN VTIGER + $stmtA = "INSERT INTO vtiger_users SET user_name='$user_name',user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status',date_format='yyyy-mm-dd',first_name='',reports_to_id='',description='',title='',department='',phone_home='',phone_mobile='',phone_work='',phone_other='',phone_fax='',email1='',email2='',yahoo_id='',signature='',address_street='',address_city='',address_state='',address_country='',address_postalcode='',user_preferences='',imagename='';"; + if ($DB) {echo "|$stmtA|\n";} + $rslt=mysql_query($stmtA, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $userid = mysql_insert_id($linkV); + + $stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';"; + if ($DB) {echo "|$stmtB|\n";} + $rslt=mysql_query($stmtB, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtC|\n";} $rslt=mysql_query($stmtC, $linkV); if (!$rslt) {die('Could not execute: ' . mysql_error());} - $stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; + $stmtD = "UPDATE vtiger_users_seq SET id='$userid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_query($stmtD, $linkV); if (!$rslt) {die('Could not execute: ' . mysql_error());} + + #### END CREATE NEW USER RECORD IN VTIGER } + ##### END Add/Update user info in Vtiger + ###################################### } + ### END vtiger integration - ### user doesn't exist in vtiger, insert it - else - { - #### BEGIN CREATE NEW USER RECORD IN VTIGER - $stmtA = "INSERT INTO vtiger_users SET user_name='$user_name',user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status',date_format='yyyy-mm-dd',first_name='',reports_to_id='',description='',title='',department='',phone_home='',phone_mobile='',phone_work='',phone_other='',phone_fax='',email1='',email2='',yahoo_id='',signature='',address_street='',address_city='',address_state='',address_country='',address_postalcode='',user_preferences='',imagename='';"; - if ($DB) {echo "|$stmtA|\n";} - $rslt=mysql_query($stmtA, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $userid = mysql_insert_id($linkV); - - $stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';"; - if ($DB) {echo "|$stmtB|\n";} - $rslt=mysql_query($stmtB, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - $stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; - if ($DB) {echo "|$stmtC|\n";} - $rslt=mysql_query($stmtC, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - $stmtD = "UPDATE vtiger_users_seq SET id='$userid';"; - if ($DB) {echo "|$stmtD|\n";} - $rslt=mysql_query($stmtD, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - #### END CREATE NEW USER RECORD IN VTIGER - } - ##### END Add/Update user info in Vtiger - ###################################### } - ### END vtiger integration - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=3; # go to user modification below } -$ADD=3; # go to user modification below -} ###################### @@ -10245,233 +10378,232 @@ $ADD=3; # go to user modification below ###################### if ($ADD=="4B") -{ - if ($LOGmodify_users==1) { - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) + if ($LOGmodify_users==1) { - echo "
USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - if ($SSoutbound_autodial_active < 1) + echo ""; + + if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) { - $closer_default_blended = '0'; - $delete_filters = '0'; - $load_leads = '0'; + echo "
USER NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
Password and Full Name each need ot be at least 2 characters in length\n"; } - echo "
USER MODIFIED - ADMIN: $user\n"; - - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',alter_custphone_override='$alter_custphone_override',active='$active',agent_shift_enforcement_override='$agent_shift_enforcement_override',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ############################################################### - ##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### - $stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $ss_conf_ct = mysql_num_rows($rslt); - if ($ss_conf_ct > 0) + else { - $row=mysql_fetch_row($rslt); - $enable_vtiger_integration = $row[0]; - $vtiger_server_ip = $row[1]; - $vtiger_dbname = $row[2]; - $vtiger_login = $row[3]; - $vtiger_pass = $row[4]; - $vtiger_url = $row[5]; - } - ##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### - ############################################################# - - if ($enable_vtiger_integration > 0) - { - ### connect to your vtiger database - $linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass"); - if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());} - echo 'Connected successfully'; - mysql_select_db("$vtiger_dbname", $linkV); - - $user_name = $user; - $user_password = $pass; - $last_name = $full_name; - $is_admin = 'off'; - $roleid = 'H5'; - $status = 'Active'; - $groupid = '1'; - if ($user_level >= 7) {$roleid = 'H3';} - if ($user_level >= 8) {$roleid = 'H4';} - if ($user_level >= 9) {$roleid = 'H2';} - if ($user_level >= 9) {$is_admin = 'on';} - $salt = substr($user_name, 0, 2); - $salt = '$1$' . $salt . '$'; - $encrypted_password = crypt($user_password, $salt); - - ###################################### - ##### BEGIN Add/Update group info in Vtiger - $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; - $rslt=mysql_query($stmt, $linkV); - if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $group_found_count = $row[0]; - - ### group exists in vtiger, update it - if ($group_found_count > 0) + if ($SSoutbound_autodial_active < 1) { - $stmt="SELECT groupid from vtiger_groups where groupname='$user_group';"; - $rslt=mysql_query($stmt, $linkV); - if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $groupid = $row[0]; + $closer_default_blended = '0'; + $delete_filters = '0'; + $load_leads = '0'; } + echo "
USER MODIFIED - ADMIN: $user\n"; - ### user doesn't exist in vtiger, insert it - else - { - #### BEGIN CREATE NEW GROUP RECORD IN VTIGER - # Get next available id from vtiger_groups_seq to use as groupid - $stmt="SELECT id from vtiger_groups_seq;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $linkV); - $row=mysql_fetch_row($rslt); - $groupid = ($row[0] + 1); - if (!$rslt) {die('Could not execute: ' . mysql_error());} + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',hotkeys_active='$hotkeys_active',agent_choose_ingroups='$agent_choose_ingroups',closer_campaigns='$groups_value',scheduled_callbacks='$scheduled_callbacks',agentonly_callbacks='$agentonly_callbacks',agentcall_manual='$agentcall_manual',vicidial_recording='$vicidial_recording',vicidial_transfers='$vicidial_transfers',closer_default_blended='$closer_default_blended',vicidial_recording_override='$vicidial_recording_override',alter_custdata_override='$alter_custdata_override',qc_enabled='$qc_enabled',qc_user_level='$qc_user_level',qc_pass='$qc_pass',qc_finish='$qc_finish',qc_commit='$qc_commit',alter_custphone_override='$alter_custphone_override',active='$active',agent_shift_enforcement_override='$agent_shift_enforcement_override',email='$email',user_code='$user_code',territory='$territory',allow_alerts='$allow_alerts' where user='$user';"; + $rslt=mysql_query($stmt, $link); - # Increase next available groupid with 1 so next record gets proper id - $stmt="UPDATE vtiger_groups_seq SET id = '$groupid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); - $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';"; - if ($DB) {echo "|$stmtA|\n";} - $rslt=mysql_query($stmtA, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - #### END CREATE NEW GROUP RECORD IN VTIGER - } - ##### END Add/Update group info in Vtiger - ###################################### - - ###################################### - ##### BEGIN Add/Update user info in Vtiger - $stmt="SELECT count(*) from vtiger_users where user_name='$user_name';"; - $rslt=mysql_query($stmt, $linkV); + ############################################################### + ##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### + $stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;"; + $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $found_count = $row[0]; - - ### user exists in vtiger, update it - if ($found_count > 0) + $ss_conf_ct = mysql_num_rows($rslt); + if ($ss_conf_ct > 0) { - $stmt="SELECT id from vtiger_users where user_name='$user_name';"; + $row=mysql_fetch_row($rslt); + $enable_vtiger_integration = $row[0]; + $vtiger_server_ip = $row[1]; + $vtiger_dbname = $row[2]; + $vtiger_login = $row[3]; + $vtiger_pass = $row[4]; + $vtiger_url = $row[5]; + } + ##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### + ############################################################# + + if ($enable_vtiger_integration > 0) + { + ### connect to your vtiger database + $linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass"); + if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());} + echo 'Connected successfully'; + mysql_select_db("$vtiger_dbname", $linkV); + + $user_name = $user; + $user_password = $pass; + $last_name = $full_name; + $is_admin = 'off'; + $roleid = 'H5'; + $status = 'Active'; + $groupid = '1'; + if ($user_level >= 7) {$roleid = 'H3';} + if ($user_level >= 8) {$roleid = 'H4';} + if ($user_level >= 9) {$roleid = 'H2';} + if ($user_level >= 9) {$is_admin = 'on';} + $salt = substr($user_name, 0, 2); + $salt = '$1$' . $salt . '$'; + $encrypted_password = crypt($user_password, $salt); + + ###################################### + ##### BEGIN Add/Update group info in Vtiger + $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; $rslt=mysql_query($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die('Could not execute: ' . mysql_error());} $row=mysql_fetch_row($rslt); - $userid = $row[0]; + $group_found_count = $row[0]; - $stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';"; - $rslt=mysql_query($stmt, $linkV); - if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $usergroupcount = $row[0]; - - $stmtA = "UPDATE vtiger_users SET user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status' where id='$userid';"; - if ($DB) {echo "|$stmtA|\n";} - $rslt=mysql_query($stmtA, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - $stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';"; - if ($DB) {echo "|$stmtB|\n";} - $rslt=mysql_query($stmtB, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - if ($usergroupcount < 1) + ### group exists in vtiger, update it + if ($group_found_count > 0) { - $stmt="SELECT user_group FROM vicidial_user_groups;"; - $rslt=mysql_query($stmt, $link); + $stmt="SELECT groupid from vtiger_groups where groupname='$user_group';"; + $rslt=mysql_query($stmt, $linkV); if ($DB) {echo "$stmt\n";} - $VD_groups_ct = mysql_num_rows($rslt); - $k=0; - $VD_groups_list=''; - while ($k < $VD_groups_ct) - { - $row=mysql_fetch_row($rslt); - $VD_groups_list .= "'$row[0]',"; - $k++; - } - $VD_groups_list = preg_replace("/.$/",'',$VD_groups_list); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $groupid = $row[0]; + } - $stmtC = "DELETE FROM vtiger_users2group WHERE userid='$userid' and groupid IN(SELECT groupid from vtiger_groups where groupname IN($VD_groups_list));"; + ### user doesn't exist in vtiger, insert it + else + { + #### BEGIN CREATE NEW GROUP RECORD IN VTIGER + # Get next available id from vtiger_groups_seq to use as groupid + $stmt="SELECT id from vtiger_groups_seq;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkV); + $row=mysql_fetch_row($rslt); + $groupid = ($row[0] + 1); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + # Increase next available groupid with 1 so next record gets proper id + $stmt="UPDATE vtiger_groups_seq SET id = '$groupid';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';"; + if ($DB) {echo "|$stmtA|\n";} + $rslt=mysql_query($stmtA, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + #### END CREATE NEW GROUP RECORD IN VTIGER + } + ##### END Add/Update group info in Vtiger + ###################################### + + ###################################### + ##### BEGIN Add/Update user info in Vtiger + $stmt="SELECT count(*) from vtiger_users where user_name='$user_name';"; + $rslt=mysql_query($stmt, $linkV); + if ($DB) {echo "$stmt\n";} + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $found_count = $row[0]; + + ### user exists in vtiger, update it + if ($found_count > 0) + { + $stmt="SELECT id from vtiger_users where user_name='$user_name';"; + $rslt=mysql_query($stmt, $linkV); + if ($DB) {echo "$stmt\n";} + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $userid = $row[0]; + + $stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';"; + $rslt=mysql_query($stmt, $linkV); + if ($DB) {echo "$stmt\n";} + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $usergroupcount = $row[0]; + + $stmtA = "UPDATE vtiger_users SET user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status' where id='$userid';"; + if ($DB) {echo "|$stmtA|\n";} + $rslt=mysql_query($stmtA, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';"; + if ($DB) {echo "|$stmtB|\n";} + $rslt=mysql_query($stmtB, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + if ($usergroupcount < 1) + { + $stmt="SELECT user_group FROM vicidial_user_groups;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_groups_ct = mysql_num_rows($rslt); + $k=0; + $VD_groups_list=''; + while ($k < $VD_groups_ct) + { + $row=mysql_fetch_row($rslt); + $VD_groups_list .= "'$row[0]',"; + $k++; + } + $VD_groups_list = preg_replace("/.$/",'',$VD_groups_list); + + $stmtC = "DELETE FROM vtiger_users2group WHERE userid='$userid' and groupid IN(SELECT groupid from vtiger_groups where groupname IN($VD_groups_list));"; + if ($DB) {echo "|$stmtC|\n";} + $rslt=mysql_query($stmtC, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; + if ($DB) {echo "|$stmtD|\n";} + $rslt=mysql_query($stmtD, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + } + } + + ### user doesn't exist in vtiger, insert it + else + { + #### BEGIN CREATE NEW USER RECORD IN VTIGER + $stmtA = "INSERT INTO vtiger_users SET user_name='$user_name',user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status',date_format='yyyy-mm-dd',first_name='',reports_to_id='',description='',title='',department='',phone_home='',phone_mobile='',phone_work='',phone_other='',phone_fax='',email1='',email2='',yahoo_id='',signature='',address_street='',address_city='',address_state='',address_country='',address_postalcode='',user_preferences='',imagename='';"; + if ($DB) {echo "|$stmtA|\n";} + $rslt=mysql_query($stmtA, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $userid = mysql_insert_id($linkV); + + $stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';"; + if ($DB) {echo "|$stmtB|\n";} + $rslt=mysql_query($stmtB, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtC|\n";} $rslt=mysql_query($stmtC, $linkV); if (!$rslt) {die('Could not execute: ' . mysql_error());} - $stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; + $stmtD = "UPDATE vtiger_users_seq SET id='$userid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_query($stmtD, $linkV); if (!$rslt) {die('Could not execute: ' . mysql_error());} + + #### END CREATE NEW USER RECORD IN VTIGER } + ##### END Add/Update user info in Vtiger + ###################################### } + ### END vtiger integration - ### user doesn't exist in vtiger, insert it - else - { - #### BEGIN CREATE NEW USER RECORD IN VTIGER - $stmtA = "INSERT INTO vtiger_users SET user_name='$user_name',user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status',date_format='yyyy-mm-dd',first_name='',reports_to_id='',description='',title='',department='',phone_home='',phone_mobile='',phone_work='',phone_other='',phone_fax='',email1='',email2='',yahoo_id='',signature='',address_street='',address_city='',address_state='',address_country='',address_postalcode='',user_preferences='',imagename='';"; - if ($DB) {echo "|$stmtA|\n";} - $rslt=mysql_query($stmtA, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $userid = mysql_insert_id($linkV); - - $stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';"; - if ($DB) {echo "|$stmtB|\n";} - $rslt=mysql_query($stmtB, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - $stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; - if ($DB) {echo "|$stmtC|\n";} - $rslt=mysql_query($stmtC, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - $stmtD = "UPDATE vtiger_users_seq SET id='$userid';"; - if ($DB) {echo "|$stmtD|\n";} - $rslt=mysql_query($stmtD, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - #### END CREATE NEW USER RECORD IN VTIGER - } - ##### END Add/Update user info in Vtiger - ###################################### } - ### END vtiger integration - } + else + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=3; # go to user modification below } - else - { - echo "You do not have permission to view this page\n"; - exit; - } -$ADD=3; # go to user modification below -} - ###################### @@ -10479,233 +10611,233 @@ $ADD=3; # go to user modification below ###################### if ($ADD==4) -{ - if ($LOGmodify_users==1) { - echo ""; - - if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) + if ($LOGmodify_users==1) { - echo "
USER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
Password and Full Name each need ot be at least 2 characters in length\n"; - } - else - { - echo "
USER MODIFIED: $user\n"; + echo ""; - $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',active='$active',email='$email',user_code='$user_code',territory='$territory' where user='$user';"; - $rslt=mysql_query($stmt, $link); - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - ############################################################### - ##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### - $stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $ss_conf_ct = mysql_num_rows($rslt); - if ($ss_conf_ct > 0) + if ( (strlen($pass) < 2) or (strlen($full_name) < 2) or (strlen($user_level) < 1) ) { - $row=mysql_fetch_row($rslt); - $enable_vtiger_integration = $row[0]; - $vtiger_server_ip = $row[1]; - $vtiger_dbname = $row[2]; - $vtiger_login = $row[3]; - $vtiger_pass = $row[4]; - $vtiger_url = $row[5]; + echo "
USER NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
Password and Full Name each need ot be at least 2 characters in length\n"; } - ##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### - ############################################################# - - if ($enable_vtiger_integration > 0) + else { - ### connect to your vtiger database - $linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass"); - if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());} - echo 'Connected successfully'; - mysql_select_db("$vtiger_dbname", $linkV); + echo "
USER MODIFIED: $user\n"; - $user_name = $user; - $user_password = $pass; - $last_name = $full_name; - $is_admin = 'off'; - $roleid = 'H5'; - $status = 'Active'; - $groupid = '1'; - if ($user_level >= 7) {$roleid = 'H3';} - if ($user_level >= 8) {$roleid = 'H4';} - if ($user_level >= 9) {$roleid = 'H2';} - if ($user_level >= 9) {$is_admin = 'on';} - $salt = substr($user_name, 0, 2); - $salt = '$1$' . $salt . '$'; - $encrypted_password = crypt($user_password, $salt); + $stmt="UPDATE vicidial_users set pass='$pass',full_name='$full_name',user_level='$user_level',user_group='$user_group',phone_login='$phone_login',phone_pass='$phone_pass',active='$active',email='$email',user_code='$user_code',territory='$territory' where user='$user';"; + $rslt=mysql_query($stmt, $link); - ###################################### - ##### BEGIN Add/Update group info in Vtiger - $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; - $rslt=mysql_query($stmt, $linkV); + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERS', event_type='MODIFY', record_id='$user', event_code='ADMIN MODIFY USER', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + ############################################################### + ##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### + $stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;"; + $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $group_found_count = $row[0]; - - ### group exists in vtiger, update it - if ($group_found_count > 0) + $ss_conf_ct = mysql_num_rows($rslt); + if ($ss_conf_ct > 0) { - $stmt="SELECT groupid from vtiger_groups where groupname='$user_group';"; - $rslt=mysql_query($stmt, $linkV); - if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} $row=mysql_fetch_row($rslt); - $groupid = $row[0]; + $enable_vtiger_integration = $row[0]; + $vtiger_server_ip = $row[1]; + $vtiger_dbname = $row[2]; + $vtiger_login = $row[3]; + $vtiger_pass = $row[4]; + $vtiger_url = $row[5]; } + ##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### + ############################################################# - ### user doesn't exist in vtiger, insert it - else + if ($enable_vtiger_integration > 0) { - #### BEGIN CREATE NEW GROUP RECORD IN VTIGER - # Get next available id from vtiger_groups_seq to use as groupid - $stmt="SELECT id from vtiger_groups_seq;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $linkV); - $row=mysql_fetch_row($rslt); - $groupid = ($row[0] + 1); - if (!$rslt) {die('Could not execute: ' . mysql_error());} + ### connect to your vtiger database + $linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass"); + if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());} + echo 'Connected successfully'; + mysql_select_db("$vtiger_dbname", $linkV); - # Increase next available groupid with 1 so next record gets proper id - $stmt="UPDATE vtiger_groups_seq SET id = '$groupid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} + $user_name = $user; + $user_password = $pass; + $last_name = $full_name; + $is_admin = 'off'; + $roleid = 'H5'; + $status = 'Active'; + $groupid = '1'; + if ($user_level >= 7) {$roleid = 'H3';} + if ($user_level >= 8) {$roleid = 'H4';} + if ($user_level >= 9) {$roleid = 'H2';} + if ($user_level >= 9) {$is_admin = 'on';} + $salt = substr($user_name, 0, 2); + $salt = '$1$' . $salt . '$'; + $encrypted_password = crypt($user_password, $salt); - $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';"; - if ($DB) {echo "|$stmtA|\n";} - $rslt=mysql_query($stmtA, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - #### END CREATE NEW GROUP RECORD IN VTIGER - } - ##### END Add/Update group info in Vtiger - ###################################### - - ###################################### - ##### BEGIN Add/Update user info in Vtiger - $stmt="SELECT count(*) from vtiger_users where user_name='$user_name';"; - $rslt=mysql_query($stmt, $linkV); - if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $found_count = $row[0]; - - ### user exists in vtiger, update it - if ($found_count > 0) - { - $stmt="SELECT id from vtiger_users where user_name='$user_name';"; + ###################################### + ##### BEGIN Add/Update group info in Vtiger + $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; $rslt=mysql_query($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die('Could not execute: ' . mysql_error());} $row=mysql_fetch_row($rslt); - $userid = $row[0]; + $group_found_count = $row[0]; - $stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';"; - $rslt=mysql_query($stmt, $linkV); - if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $usergroupcount = $row[0]; - - $stmtA = "UPDATE vtiger_users SET user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status' where id='$userid';"; - if ($DB) {echo "|$stmtA|\n";} - $rslt=mysql_query($stmtA, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - $stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';"; - if ($DB) {echo "|$stmtB|\n";} - $rslt=mysql_query($stmtB, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - if ($usergroupcount < 1) + ### group exists in vtiger, update it + if ($group_found_count > 0) { - $stmt="SELECT user_group FROM vicidial_user_groups;"; - $rslt=mysql_query($stmt, $link); + $stmt="SELECT groupid from vtiger_groups where groupname='$user_group';"; + $rslt=mysql_query($stmt, $linkV); if ($DB) {echo "$stmt\n";} - $VD_groups_ct = mysql_num_rows($rslt); - $k=0; - $VD_groups_list=''; - while ($k < $VD_groups_ct) - { - $row=mysql_fetch_row($rslt); - $VD_groups_list .= "'$row[0]',"; - $k++; - } - $VD_groups_list = preg_replace("/.$/",'',$VD_groups_list); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $groupid = $row[0]; + } - $stmtC = "DELETE FROM vtiger_users2group WHERE userid='$userid' and groupid IN(SELECT groupid from vtiger_groups where groupname IN($VD_groups_list));"; + ### user doesn't exist in vtiger, insert it + else + { + #### BEGIN CREATE NEW GROUP RECORD IN VTIGER + # Get next available id from vtiger_groups_seq to use as groupid + $stmt="SELECT id from vtiger_groups_seq;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkV); + $row=mysql_fetch_row($rslt); + $groupid = ($row[0] + 1); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + # Increase next available groupid with 1 so next record gets proper id + $stmt="UPDATE vtiger_groups_seq SET id = '$groupid';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='';"; + if ($DB) {echo "|$stmtA|\n";} + $rslt=mysql_query($stmtA, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + #### END CREATE NEW GROUP RECORD IN VTIGER + } + ##### END Add/Update group info in Vtiger + ###################################### + + ###################################### + ##### BEGIN Add/Update user info in Vtiger + $stmt="SELECT count(*) from vtiger_users where user_name='$user_name';"; + $rslt=mysql_query($stmt, $linkV); + if ($DB) {echo "$stmt\n";} + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $found_count = $row[0]; + + ### user exists in vtiger, update it + if ($found_count > 0) + { + $stmt="SELECT id from vtiger_users where user_name='$user_name';"; + $rslt=mysql_query($stmt, $linkV); + if ($DB) {echo "$stmt\n";} + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $userid = $row[0]; + + $stmt="SELECT count(*) from vtiger_users2group WHERE userid='$userid' and groupid='$groupid';"; + $rslt=mysql_query($stmt, $linkV); + if ($DB) {echo "$stmt\n";} + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $usergroupcount = $row[0]; + + $stmtA = "UPDATE vtiger_users SET user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status' where id='$userid';"; + if ($DB) {echo "|$stmtA|\n";} + $rslt=mysql_query($stmtA, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtB = "UPDATE vtiger_user2role SET roleid='$roleid' where userid='$userid';"; + if ($DB) {echo "|$stmtB|\n";} + $rslt=mysql_query($stmtB, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + if ($usergroupcount < 1) + { + $stmt="SELECT user_group FROM vicidial_user_groups;"; + $rslt=mysql_query($stmt, $link); + if ($DB) {echo "$stmt\n";} + $VD_groups_ct = mysql_num_rows($rslt); + $k=0; + $VD_groups_list=''; + while ($k < $VD_groups_ct) + { + $row=mysql_fetch_row($rslt); + $VD_groups_list .= "'$row[0]',"; + $k++; + } + $VD_groups_list = preg_replace("/.$/",'',$VD_groups_list); + + $stmtC = "DELETE FROM vtiger_users2group WHERE userid='$userid' and groupid IN(SELECT groupid from vtiger_groups where groupname IN($VD_groups_list));"; + if ($DB) {echo "|$stmtC|\n";} + $rslt=mysql_query($stmtC, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; + if ($DB) {echo "|$stmtD|\n";} + $rslt=mysql_query($stmtD, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + } + } + + ### user doesn't exist in vtiger, insert it + else + { + #### BEGIN CREATE NEW USER RECORD IN VTIGER + $stmtA = "INSERT INTO vtiger_users SET user_name='$user_name',user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status',date_format='yyyy-mm-dd',first_name='',reports_to_id='',description='',title='',department='',phone_home='',phone_mobile='',phone_work='',phone_other='',phone_fax='',email1='',email2='',yahoo_id='',signature='',address_street='',address_city='',address_state='',address_country='',address_postalcode='',user_preferences='',imagename='';"; + if ($DB) {echo "|$stmtA|\n";} + $rslt=mysql_query($stmtA, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $userid = mysql_insert_id($linkV); + + $stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';"; + if ($DB) {echo "|$stmtB|\n";} + $rslt=mysql_query($stmtB, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; if ($DB) {echo "|$stmtC|\n";} $rslt=mysql_query($stmtC, $linkV); if (!$rslt) {die('Could not execute: ' . mysql_error());} - $stmtD = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; + $stmtD = "UPDATE vtiger_users_seq SET id='$userid';"; if ($DB) {echo "|$stmtD|\n";} $rslt=mysql_query($stmtD, $linkV); if (!$rslt) {die('Could not execute: ' . mysql_error());} + + #### END CREATE NEW USER RECORD IN VTIGER } + ##### END Add/Update user info in Vtiger + ###################################### } + ### END vtiger integration - ### user doesn't exist in vtiger, insert it - else - { - #### BEGIN CREATE NEW USER RECORD IN VTIGER - $stmtA = "INSERT INTO vtiger_users SET user_name='$user_name',user_password='$encrypted_password',last_name='$last_name',is_admin='$is_admin',status='$status',date_format='yyyy-mm-dd',first_name='',reports_to_id='',description='',title='',department='',phone_home='',phone_mobile='',phone_work='',phone_other='',phone_fax='',email1='',email2='',yahoo_id='',signature='',address_street='',address_city='',address_state='',address_country='',address_postalcode='',user_preferences='',imagename='';"; - if ($DB) {echo "|$stmtA|\n";} - $rslt=mysql_query($stmtA, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $userid = mysql_insert_id($linkV); - - $stmtB = "INSERT INTO vtiger_user2role SET userid='$userid',roleid='$roleid';"; - if ($DB) {echo "|$stmtB|\n";} - $rslt=mysql_query($stmtB, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - $stmtC = "INSERT INTO vtiger_users2group SET userid='$userid',groupid='$groupid';"; - if ($DB) {echo "|$stmtC|\n";} - $rslt=mysql_query($stmtC, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - $stmtD = "UPDATE vtiger_users_seq SET id='$userid';"; - if ($DB) {echo "|$stmtD|\n";} - $rslt=mysql_query($stmtD, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - #### END CREATE NEW USER RECORD IN VTIGER - } - ##### END Add/Update user info in Vtiger - ###################################### } - ### END vtiger integration - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=3; # go to user modification below } -$ADD=3; # go to user modification below -} ###################### # ADD=41 submit campaign modifications to the system - DETAIL ###################### if ($ADD==41) -{ + { if ($LOGmodify_campaigns==1) { echo ""; @@ -10784,13 +10916,13 @@ if ($ADD==41) } else { - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) + if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) { - echo "
CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
the campaign name needs to be at least 6 characters in length\n"; - echo "
|$campaign_name|$active|\n"; + echo "
CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
the campaign name needs to be at least 6 characters in length\n"; + echo "
|$campaign_name|$active|\n"; } - else + else { echo "
CAMPAIGN MODIFIED: $campaign_id\n"; @@ -10866,124 +10998,127 @@ if ($ADD==41) } } } - else + else { echo "You do not have permission to view this page\n"; exit; } -$ADD=31; # go to campaign modification form below -} + $ADD=31; # go to campaign modification form below + } + ###################### # ADD=42 modify/delete campaign status in the system ###################### if ($ADD==42) -{ + { if ($LOGmodify_campaigns==1) - { - echo ""; + { + echo ""; - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) - { - echo "
CAMPAIGN STATUS NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
the campaign id needs to be at least 2 characters in length\n"; - echo "
the campaign status needs to be at least 1 characters in length\n"; - } - else - { - if (ereg('delete',$stage)) + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) { - echo "
CUSTOM CAMPAIGN STATUS DELETED: $campaign_id - $status\n"; - - $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); - - $stmtA="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmtA, $link); - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_STATUS', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + echo "
CAMPAIGN STATUS NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
the campaign id needs to be at least 2 characters in length\n"; + echo "
the campaign status needs to be at least 1 characters in length\n"; } - if (ereg('modify',$stage)) + else { - echo "
CUSTOM CAMPAIGN STATUS MODIFIED: $campaign_id - $status\n"; + if (ereg('delete',$stage)) + { + echo "
CUSTOM CAMPAIGN STATUS DELETED: $campaign_id - $status\n"; - $stmt="UPDATE vicidial_campaign_statuses SET status_name='$status_name',selectable='$selectable',human_answered='$human_answered',category='$category',sale='$sale',dnc='$dnc',customer_contact='$customer_contact',not_interested='$not_interested',unworkable='$unworkable' where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); + $stmt="DELETE FROM vicidial_campaign_statuses where campaign_id='$campaign_id' and status='$status';"; + $rslt=mysql_query($stmt, $link); - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_STATUS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + $stmtA="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status';"; + $rslt=mysql_query($stmtA, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_STATUS', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } + if (ereg('modify',$stage)) + { + echo "
CUSTOM CAMPAIGN STATUS MODIFIED: $campaign_id - $status\n"; + + $stmt="UPDATE vicidial_campaign_statuses SET status_name='$status_name',selectable='$selectable',human_answered='$human_answered',category='$category',sale='$sale',dnc='$dnc',customer_contact='$customer_contact',not_interested='$not_interested',unworkable='$unworkable' where campaign_id='$campaign_id' and status='$status';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_STATUS', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN STATUS', event_sql=\"$SQL_log\", event_notes='Status: $status';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $SUB=22; + $ADD=31; # go to campaign modification form below } -$SUB=22; -$ADD=31; # go to campaign modification form below -} + ###################### # ADD=43 delete campaign hotkey in the system ###################### if ($ADD==43) -{ + { if ($LOGmodify_campaigns==1) - { - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) { - echo "
CAMPAIGN HOT KEY NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
the campaign id needs to be at least 2 characters in length\n"; - echo "
the campaign status needs to be at least 1 characters in length\n"; - echo "
the campaign hotkey needs to be at least 1 characters in length\n"; - } - else - { - echo "
CUSTOM CAMPAIGN HOT KEY DELETED: $campaign_id - $status - $hotkey\n"; + echo ""; - $stmt="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey';"; - $rslt=mysql_query($stmt, $link); + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or (strlen($hotkey) < 1) ) + { + echo "
CAMPAIGN HOT KEY NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
the campaign id needs to be at least 2 characters in length\n"; + echo "
the campaign status needs to be at least 1 characters in length\n"; + echo "
the campaign hotkey needs to be at least 1 characters in length\n"; + } + else + { + echo "
CUSTOM CAMPAIGN HOT KEY DELETED: $campaign_id - $status - $hotkey\n"; - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_HOTKEY', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN HOTKEY', event_sql=\"$SQL_log\", event_notes='Status: $status|HotKey: $hotkey';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + $stmt="DELETE FROM vicidial_campaign_hotkeys where campaign_id='$campaign_id' and status='$status' and hotkey='$hotkey';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_HOTKEY', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN HOTKEY', event_sql=\"$SQL_log\", event_notes='Status: $status|HotKey: $hotkey';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $SUB=23; + $ADD=31; # go to campaign modification form below } -$SUB=23; -$ADD=31; # go to campaign modification form below -} + ###################### # ADD=44 submit campaign modifications to the system - Basic View ###################### if ($ADD==44) -{ + { if ($LOGmodify_campaigns==1) { echo ""; @@ -11049,13 +11184,12 @@ if ($ADD==44) } else { - - if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) + if ( (strlen($campaign_name) < 6) or (strlen($active) < 1) ) { - echo "
CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
the campaign name needs to be at least 6 characters in length\n"; + echo "
CAMPAIGN NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
the campaign name needs to be at least 6 characters in length\n"; } - else + else { echo "
CAMPAIGN MODIFIED: $campaign_id\n"; @@ -11113,153 +11247,155 @@ if ($ADD==44) } } } - else + else { echo "You do not have permission to view this page\n"; exit; } -$ADD=34; # go to campaign modification form below -} + $ADD=34; # go to campaign modification form below + } + ###################### # ADD=45 modify campaign lead recycle in the system ###################### if ($ADD==45) -{ + { if ($LOGmodify_campaigns==1) - { - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_delay >= 43200) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) { - echo "
CAMPAIGN LEAD RECYCLE NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
status must be between 1 and 6 characters in length\n"; - echo "
attempt delay must be at least 120 seconds and less than 43200 seconds or 12 hours\n"; - echo "
maximum attempts must be from 1 to 10\n"; - } - else - { - echo "
CAMPAIGN LEAD MODIFIED: $campaign_id - $status - $attempt_delay\n"; + echo ""; - $stmt="UPDATE vicidial_lead_recycle SET attempt_delay='$attempt_delay',attempt_maximum='$attempt_maximum',active='$active' where campaign_id='$campaign_id' and status='$status';"; - $rslt=mysql_query($stmt, $link); + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) or ($attempt_delay < 120) or ($attempt_delay >= 43200) or ($attempt_maximum < 1) or ($attempt_maximum > 10) ) + { + echo "
CAMPAIGN LEAD RECYCLE NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
status must be between 1 and 6 characters in length\n"; + echo "
attempt delay must be at least 120 seconds and less than 43200 seconds or 12 hours\n"; + echo "
maximum attempts must be from 1 to 10\n"; + } + else + { + echo "
CAMPAIGN LEAD MODIFIED: $campaign_id - $status - $attempt_delay\n"; - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_RECYCLE', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LEAD RECYCLE', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_lead_recycle SET attempt_delay='$attempt_delay',attempt_maximum='$attempt_maximum',active='$active' where campaign_id='$campaign_id' and status='$status';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_RECYCLE', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LEAD RECYCLE', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $SUB=25; + $ADD=31; # go to campaign modification form below } -$SUB=25; -$ADD=31; # go to campaign modification form below -} + ###################### # ADD=47 modify agent pause code in the system ###################### if ($ADD==47) -{ + { if ($LOGmodify_campaigns==1) - { - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) { - echo "
AGENT PAUSE CODE NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
pause_code must be between 1 and 6 characters in length\n"; - echo "
pause_code name must be between 2 and 30 characters in length\n"; - } - else - { - echo "
AGENT PAUSE CODE MODIFIED: $campaign_id - $pause_code - $pause_code_name\n"; + echo ""; - $stmt="UPDATE vicidial_pause_codes SET pause_code_name='$pause_code_name',billable='$billable' where campaign_id='$campaign_id' and pause_code='$pause_code';"; - $rslt=mysql_query($stmt, $link); + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) or (strlen($pause_code) > 6) or (strlen($pause_code_name) < 2) ) + { + echo "
AGENT PAUSE CODE NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
pause_code must be between 1 and 6 characters in length\n"; + echo "
pause_code name must be between 2 and 30 characters in length\n"; + } + else + { + echo "
AGENT PAUSE CODE MODIFIED: $campaign_id - $pause_code - $pause_code_name\n"; - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_PAUSECODE', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN PAUSE CODE', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_pause_codes SET pause_code_name='$pause_code_name',billable='$billable' where campaign_id='$campaign_id' and pause_code='$pause_code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_PAUSECODE', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN PAUSE CODE', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $SUB=27; + $ADD=31; # go to campaign modification form below } -$SUB=27; -$ADD=31; # go to campaign modification form below -} ###################### # ADD=48 modify campaign QC settings in the system ###################### if ($ADD==48) -{ + { if ( ($LOGmodify_campaigns==1) and ($SSqc_features_active) ) - { - echo ""; - - if (strlen($campaign_id) < 2) { - echo "
QC SETTINGS NOT MODIFIED - Please go back and look at the data you entered\n"; - } - else - { - $p=0; - $qc_statuses_ct = count($qc_statuses); - while ($p < $qc_statuses_ct) + echo ""; + + if (strlen($campaign_id) < 2) { - $QC_statuses .= " $qc_statuses[$p]"; - $p++; + echo "
QC SETTINGS NOT MODIFIED - Please go back and look at the data you entered\n"; } - $p=0; - $qc_lists_ct = count($qc_lists); - while ($p < $qc_lists_ct) + else { - $QC_lists .= " $qc_lists[$p]"; - $p++; + $p=0; + $qc_statuses_ct = count($qc_statuses); + while ($p < $qc_statuses_ct) + { + $QC_statuses .= " $qc_statuses[$p]"; + $p++; + } + $p=0; + $qc_lists_ct = count($qc_lists); + while ($p < $qc_lists_ct) + { + $QC_lists .= " $qc_lists[$p]"; + $p++; + } + + if (strlen($QC_statuses)>0) {$QC_statuses .= " -";} + if (strlen($QC_lists)>0) {$QC_lists .= " -";} + + echo "
QC SETTINGS MODIFIED: $campaign_id\n"; + + $stmt="UPDATE vicidial_campaigns SET qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_lists='$QC_lists',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_shift_id='$qc_shift_id' where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_QC', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN QC SETTINGS', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); } - - if (strlen($QC_statuses)>0) {$QC_statuses .= " -";} - if (strlen($QC_lists)>0) {$QC_lists .= " -";} - - echo "
QC SETTINGS MODIFIED: $campaign_id\n"; - - $stmt="UPDATE vicidial_campaigns SET qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_lists='$QC_lists',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_shift_id='$qc_shift_id' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_QC', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN QC SETTINGS', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $SUB=28; + $ADD=31; # go to campaign modification form below } -$SUB=28; -$ADD=31; # go to campaign modification form below -} ###################### @@ -11267,39 +11403,39 @@ $ADD=31; # go to campaign modification form below ###################### if ($ADD=='40A') -{ + { if ($LOGmodify_campaigns==1) - { - echo ""; - - if (strlen($campaign_id) < 2) { - echo "
SURVEY SETTINGS NOT MODIFIED - Please go back and look at the data you entered\n"; - } - else - { - echo "
SURVEY SETTINGS MODIFIED: $campaign_id\n"; + echo ""; - $stmt="UPDATE vicidial_campaigns SET survey_first_audio_file='$survey_first_audio_file',survey_dtmf_digits='$survey_dtmf_digits',survey_ni_digit='$survey_ni_digit',survey_opt_in_audio_file='$survey_opt_in_audio_file',survey_ni_audio_file='$survey_ni_audio_file',survey_method='$survey_method',survey_no_response_action='$survey_no_response_action',survey_ni_status='$survey_ni_status',survey_response_digit_map='$survey_response_digit_map',survey_xfer_exten='$survey_xfer_exten',survey_camp_record_dir='$survey_camp_record_dir',voicemail_ext='$voicemail_ext',survey_third_digit='$survey_third_digit',survey_fourth_digit='$survey_fourth_digit',survey_third_audio_file='$survey_third_audio_file',survey_fourth_audio_file='$survey_fourth_audio_file',survey_third_status='$survey_third_status',survey_fourth_status='$survey_fourth_status',survey_third_exten='$survey_third_exten',survey_fourth_exten='$survey_fourth_exten' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); + if (strlen($campaign_id) < 2) + { + echo "
SURVEY SETTINGS NOT MODIFIED - Please go back and look at the data you entered\n"; + } + else + { + echo "
SURVEY SETTINGS MODIFIED: $campaign_id\n"; - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_SURVEY', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN SURVEY', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_campaigns SET survey_first_audio_file='$survey_first_audio_file',survey_dtmf_digits='$survey_dtmf_digits',survey_ni_digit='$survey_ni_digit',survey_opt_in_audio_file='$survey_opt_in_audio_file',survey_ni_audio_file='$survey_ni_audio_file',survey_method='$survey_method',survey_no_response_action='$survey_no_response_action',survey_ni_status='$survey_ni_status',survey_response_digit_map='$survey_response_digit_map',survey_xfer_exten='$survey_xfer_exten',survey_camp_record_dir='$survey_camp_record_dir',voicemail_ext='$voicemail_ext',survey_third_digit='$survey_third_digit',survey_fourth_digit='$survey_fourth_digit',survey_third_audio_file='$survey_third_audio_file',survey_fourth_audio_file='$survey_fourth_audio_file',survey_third_status='$survey_third_status',survey_fourth_status='$survey_fourth_status',survey_third_exten='$survey_third_exten',survey_fourth_exten='$survey_fourth_exten' where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_SURVEY', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN SURVEY', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $SUB='20A'; + $ADD=31; # go to campaign modification form below } -$SUB='20A'; -$ADD=31; # go to campaign modification form below -} ###################### @@ -11307,143 +11443,70 @@ $ADD=31; # go to campaign modification form below ###################### if ($ADD==49) -{ - if ($LOGmodify_campaigns==1) { - ##### MODIFY a list mix container entry ##### + if ($LOGmodify_campaigns==1) + { + ##### MODIFY a list mix container entry ##### if ($stage=='MODIFY') - { - echo ""; - - $Flist_mix_container = "list_mix_container_$vcl_id"; - $Fmix_method = "mix_method_$vcl_id"; - $Fstatus = "status_$vcl_id"; - $Fvcl_name = "vcl_name_$vcl_id"; - - if (isset($_GET[$Flist_mix_container])) {$list_mix_container=$_GET[$Flist_mix_container];} - elseif (isset($_POST[$Flist_mix_container])) {$list_mix_container=$_POST[$Flist_mix_container];} - if (isset($_GET[$Fmix_method])) {$mix_method=$_GET[$Fmix_method];} - elseif (isset($_POST[$Fmix_method])) {$mix_method=$_POST[$Fmix_method];} - if (isset($_GET[$Fstatus])) {$status=$_GET[$Fstatus];} - elseif (isset($_POST[$Fstatus])) {$status=$_POST[$Fstatus];} - if (isset($_GET[$Fvcl_name])) {$vcl_name=$_GET[$Fvcl_name];} - elseif (isset($_POST[$Fvcl_name])) {$vcl_name=$_POST[$Fvcl_name];} - $list_mix_container = preg_replace("/:$/","",$list_mix_container); - - if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_mix_container) < 6) or (strlen($vcl_name) < 2) ) { - echo "
LIST MIX NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
vcl_id must be between 1 and 20 characters in length\n"; - echo "
vcl_name name must be between 2 and 30 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_campaigns_list_mix SET vcl_name='$vcl_name',mix_method='$mix_method',list_mix_container='$list_mix_container' where campaign_id='$campaign_id' and vcl_id='$vcl_id';"; - $rslt=mysql_query($stmt, $link); + echo ""; - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + $Flist_mix_container = "list_mix_container_$vcl_id"; + $Fmix_method = "mix_method_$vcl_id"; + $Fstatus = "status_$vcl_id"; + $Fvcl_name = "vcl_name_$vcl_id"; - echo "
LIST MIX MODIFIED: $campaign_id - $vcl_id - $vcl_name\n"; - } - } + if (isset($_GET[$Flist_mix_container])) {$list_mix_container=$_GET[$Flist_mix_container];} + elseif (isset($_POST[$Flist_mix_container])) {$list_mix_container=$_POST[$Flist_mix_container];} + if (isset($_GET[$Fmix_method])) {$mix_method=$_GET[$Fmix_method];} + elseif (isset($_POST[$Fmix_method])) {$mix_method=$_POST[$Fmix_method];} + if (isset($_GET[$Fstatus])) {$status=$_GET[$Fstatus];} + elseif (isset($_POST[$Fstatus])) {$status=$_POST[$Fstatus];} + if (isset($_GET[$Fvcl_name])) {$vcl_name=$_GET[$Fvcl_name];} + elseif (isset($_POST[$Fvcl_name])) {$vcl_name=$_POST[$Fvcl_name];} + $list_mix_container = preg_replace("/:$/","",$list_mix_container); - ##### ADD a list mix container entry ##### - if ($stage=='ADD') - { - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_id) < 1) ) - { - echo "
LIST MIX NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
vcl_id must be between 1 and 20 characters in length\n"; - echo "
list_id must be at least 2 characters in length\n"; - } - else - { - $stmt="SELECT list_mix_container from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and vcl_id='$vcl_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $OLDlist_mix_container = $row[0]; - $NEWlist_mix_container = "$OLDlist_mix_container:$list_id|10|0| -|"; - - $stmt="UPDATE vicidial_campaigns_list_mix SET list_mix_container='$NEWlist_mix_container' where campaign_id='$campaign_id' and vcl_id='$vcl_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
LIST MIX MODIFIED: $campaign_id - $vcl_id - $list_id\n"; - } - } - - ##### REMOVE a list mix container entry ##### - if ($stage=='REMOVE') - { - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_id) < 1) ) - { - echo "
LIST MIX NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
vcl_id must be between 1 and 20 characters in length\n"; - echo "
list_id must be at least 2 characters in length\n"; - } - else - { - $stmt="SELECT list_mix_container from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and vcl_id='$vcl_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $MIXentries = $MT; - $MIXentries = explode(":", $row[0]); - $Ms_to_print = (count($MIXentries) - 0); - - if ($Ms_to_print < 2) + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_mix_container) < 6) or (strlen($vcl_name) < 2) ) { - echo "
LIST MIX NOT MODIFIED: You cannot delete the last list_id entry from a list mix\n"; + echo "
LIST MIX NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + echo "
vcl_name name must be between 2 and 30 characters in length\n"; + } + else + { + $stmt="UPDATE vicidial_campaigns_list_mix SET vcl_name='$vcl_name',mix_method='$mix_method',list_mix_container='$list_mix_container' where campaign_id='$campaign_id' and vcl_id='$vcl_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "
LIST MIX MODIFIED: $campaign_id - $vcl_id - $vcl_name\n"; + } + } + + ##### ADD a list mix container entry ##### + if ($stage=='ADD') + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_id) < 1) ) + { + echo "
LIST MIX NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + echo "
list_id must be at least 2 characters in length\n"; } else { - $MIXdetailsPCT = explode('|', $MIXentries[$mix_container_item]); - $MIXpercentPCT = $MIXdetailsPCT[2]; - - $q=0; - while ($Ms_to_print > $q) - { - if ( ($mix_container_item > $q) or ($mix_container_item < $q) ) - { - if ( ($q==0) and ($mix_container_item > 0) ) - { - $MIXdetailsONE = explode('|', $MIXentries[$q]); - $MIXpercentONE = ($MIXdetailsONE[2] + $MIXpercentPCT); - $NEWlist_mix_container .= "$MIXdetailsONE[0]|$MIXdetailsONE[1]|$MIXpercentONE|$MIXdetailsONE[3]|:"; - } - else - { - if ( ($q==1) and ($mix_container_item < 1) ) - { - $MIXdetailsONE = explode('|', $MIXentries[$q]); - $MIXpercentONE = ($MIXdetailsONE[2] + $MIXpercentPCT); - $NEWlist_mix_container .= "$MIXdetailsONE[0]|$MIXdetailsONE[1]|$MIXpercentONE|$MIXdetailsONE[3]|:"; - } - else - { - $NEWlist_mix_container .= "$MIXentries[$q]:"; - } - } - } - $q++; - } - $NEWlist_mix_container = preg_replace("/.$/",'',$NEWlist_mix_container); + $stmt="SELECT list_mix_container from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and vcl_id='$vcl_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $OLDlist_mix_container = $row[0]; + $NEWlist_mix_container = "$OLDlist_mix_container:$list_id|10|0| -|"; $stmt="UPDATE vicidial_campaigns_list_mix SET list_mix_container='$NEWlist_mix_container' where campaign_id='$campaign_id' and vcl_id='$vcl_id';"; $rslt=mysql_query($stmt, $link); @@ -11456,114 +11519,187 @@ if ($ADD==49) if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); - echo "
LIST MIX MODIFIED: $campaign_id - $vcl_id - $list_id - $mix_container_item\n"; + echo "
LIST MIX MODIFIED: $campaign_id - $vcl_id - $list_id\n"; } } - } - ##### ADD a NEW list mix ##### - if ($stage=='NEWMIX') - { - echo ""; + ##### REMOVE a list mix container entry ##### + if ($stage=='REMOVE') + { + echo ""; - if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($vcl_name) < 2) ) - { - echo "
LIST MIX NOT ADDED - Please go back and look at the data you entered\n"; - echo "
vcl_id must be between 1 and 20 characters in length\n"; - echo "
vcl_name must be at least 2 characters in length\n"; - } - else - { - $stmt="SELECT count(*) from vicidial_campaigns_list_mix where vcl_id='$vcl_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ($row[0] > 0) + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($list_id) < 1) ) { - echo "
LIST MIX NOT ADDED - There is already a list mix with this ID in the system\n"; + echo "
LIST MIX NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + echo "
list_id must be at least 2 characters in length\n"; } else { - $stmt="INSERT INTO vicidial_campaigns_list_mix SET list_mix_container='$list_id|1|100| $status -|',campaign_id='$campaign_id',vcl_id='$vcl_id',vcl_name='$vcl_name',mix_method='$mix_method',status='INACTIVE';"; + $stmt="SELECT list_mix_container from vicidial_campaigns_list_mix where campaign_id='$campaign_id' and vcl_id='$vcl_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $MIXentries = $MT; + $MIXentries = explode(":", $row[0]); + $Ms_to_print = (count($MIXentries) - 0); + + if ($Ms_to_print < 2) + { + echo "
LIST MIX NOT MODIFIED: You cannot delete the last list_id entry from a list mix\n"; + } + else + { + $MIXdetailsPCT = explode('|', $MIXentries[$mix_container_item]); + $MIXpercentPCT = $MIXdetailsPCT[2]; + + $q=0; + while ($Ms_to_print > $q) + { + if ( ($mix_container_item > $q) or ($mix_container_item < $q) ) + { + if ( ($q==0) and ($mix_container_item > 0) ) + { + $MIXdetailsONE = explode('|', $MIXentries[$q]); + $MIXpercentONE = ($MIXdetailsONE[2] + $MIXpercentPCT); + $NEWlist_mix_container .= "$MIXdetailsONE[0]|$MIXdetailsONE[1]|$MIXpercentONE|$MIXdetailsONE[3]|:"; + } + else + { + if ( ($q==1) and ($mix_container_item < 1) ) + { + $MIXdetailsONE = explode('|', $MIXentries[$q]); + $MIXpercentONE = ($MIXdetailsONE[2] + $MIXpercentPCT); + $NEWlist_mix_container .= "$MIXdetailsONE[0]|$MIXdetailsONE[1]|$MIXpercentONE|$MIXdetailsONE[3]|:"; + } + else + { + $NEWlist_mix_container .= "$MIXentries[$q]:"; + } + } + } + $q++; + } + $NEWlist_mix_container = preg_replace("/.$/",'',$NEWlist_mix_container); + + $stmt="UPDATE vicidial_campaigns_list_mix SET list_mix_container='$NEWlist_mix_container' where campaign_id='$campaign_id' and vcl_id='$vcl_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "
LIST MIX MODIFIED: $campaign_id - $vcl_id - $list_id - $mix_container_item\n"; + } + } + } + + ##### ADD a NEW list mix ##### + if ($stage=='NEWMIX') + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) or (strlen($vcl_name) < 2) ) + { + echo "
LIST MIX NOT ADDED - Please go back and look at the data you entered\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + echo "
vcl_name must be at least 2 characters in length\n"; + } + else + { + $stmt="SELECT count(*) from vicidial_campaigns_list_mix where vcl_id='$vcl_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ($row[0] > 0) + { + echo "
LIST MIX NOT ADDED - There is already a list mix with this ID in the system\n"; + } + else + { + $stmt="INSERT INTO vicidial_campaigns_list_mix SET list_mix_container='$list_id|1|100| $status -|',campaign_id='$campaign_id',vcl_id='$vcl_id',vcl_name='$vcl_name',mix_method='$mix_method',status='INACTIVE';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_LISTMIX', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "
LIST MIX ADDED: $campaign_id - $vcl_id - $vcl_name\n"; + } + } + } + + ##### DELETE an existing list mix ##### + if ($stage=='DELMIX') + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) ) + { + echo "
LIST MIX NOT DELETED - Please go back and look at the data you entered\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + } + else + { + $stmt="DELETE from vicidial_campaigns_list_mix where vcl_id='$vcl_id' and campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = ereg_replace(';','',$SQL_log); $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_LISTMIX', event_type='ADD', record_id='$campaign_id', event_code='ADMIN ADD CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_LISTMIX', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); - echo "
LIST MIX ADDED: $campaign_id - $vcl_id - $vcl_name\n"; + echo "
LIST MIX DELETED: $campaign_id - $vcl_id - $vcl_name\n"; + } + } + + ##### Set list mix entry to active ##### + if ($stage=='SETACTIVE') + { + echo ""; + + if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) ) + { + echo "
LIST MIX NOT ACTIVATED - Please go back and look at the data you entered\n"; + echo "
vcl_id must be between 1 and 20 characters in length\n"; + } + else + { + $stmt="UPDATE vicidial_campaigns_list_mix SET status='INACTIVE' where campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="UPDATE vicidial_campaigns_list_mix SET status='ACTIVE' where vcl_id='$vcl_id' and campaign_id='$campaign_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LIST MIX ACTIVE', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "
LIST MIX ACTIVATED: $campaign_id - $vcl_id - $vcl_name\n"; } } } - - ##### DELETE an existing list mix ##### - if ($stage=='DELMIX') - { - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) ) - { - echo "
LIST MIX NOT DELETED - Please go back and look at the data you entered\n"; - echo "
vcl_id must be between 1 and 20 characters in length\n"; - } - else - { - $stmt="DELETE from vicidial_campaigns_list_mix where vcl_id='$vcl_id' and campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_LISTMIX', event_type='DELETE', record_id='$campaign_id', event_code='ADMIN DELETE CAMPAIGN LIST MIX', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
LIST MIX DELETED: $campaign_id - $vcl_id - $vcl_name\n"; - } - } - - ##### Set list mix entry to active ##### - if ($stage=='SETACTIVE') - { - echo ""; - - if ( (strlen($campaign_id) < 2) or (strlen($vcl_id) < 1) ) - { - echo "
LIST MIX NOT ACTIVATED - Please go back and look at the data you entered\n"; - echo "
vcl_id must be between 1 and 20 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_campaigns_list_mix SET status='INACTIVE' where campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - $stmt="UPDATE vicidial_campaigns_list_mix SET status='ACTIVE' where vcl_id='$vcl_id' and campaign_id='$campaign_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CAMPAIGN_LISTMIX', event_type='MODIFY', record_id='$campaign_id', event_code='ADMIN MODIFY CAMPAIGN LIST MIX ACTIVE', event_sql=\"$SQL_log\", event_notes='List Mix: $vcl_id';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - echo "
LIST MIX ACTIVATED: $campaign_id - $vcl_id - $vcl_name\n"; - } - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $SUB=29; + $ADD=31; # go to campaign modification form below } -$SUB=29; -$ADD=31; # go to campaign modification form below -} ###################### @@ -11571,62 +11707,62 @@ $ADD=31; # go to campaign modification form below ###################### if ($ADD==411) -{ - if ($LOGmodify_lists==1) { - echo ""; - - if ( (strlen($list_name) < 2) or (strlen($campaign_id) < 2) ) + if ($LOGmodify_lists==1) { - echo "
LIST NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
list name must be at least 2 characters in length\n"; - } - else - { - if (strlen($reset_time) < 4) {$reset_time='';} + echo ""; - 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' where list_id='$list_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='MODIFY', record_id='$list_id', event_code='ADMIN MODIFY LIST', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - - if ($reset_list == 'Y') + if ( (strlen($list_name) < 2) or (strlen($campaign_id) < 2) ) { - echo "
RESETTING LIST-CALLED-STATUS\n"; - $stmtB="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id';"; - $rslt=mysql_query($stmtB, $link); + echo "
LIST NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
list name must be at least 2 characters in length\n"; + } + else + { + if (strlen($reset_time) < 4) {$reset_time='';} + + 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' where list_id='$list_id';"; + $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### $SQL_log = "$stmt|"; $SQL_log = ereg_replace(';','',$SQL_log); $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='RESET', record_id='$list_id', event_code='ADMIN RESET LIST', event_sql=\"$SQL_log\", event_notes='';"; + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='MODIFY', record_id='$list_id', event_code='ADMIN MODIFY LIST', event_sql=\"$SQL_log\", event_notes='';"; if ($DB) {echo "|$stmt|\n";} $rslt=mysql_query($stmt, $link); - } - if ($campaign_id != "$old_campaign_id") - { - echo "
REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($old_campaign_id)\n"; - $stmtC="DELETE from vicidial_hopper where list_id='$list_id' and campaign_id='$old_campaign_id';"; - $rslt=mysql_query($stmtC, $link); + + if ($reset_list == 'Y') + { + echo "
RESETTING LIST-CALLED-STATUS\n"; + $stmtB="UPDATE vicidial_list set called_since_last_reset='N' where list_id='$list_id';"; + $rslt=mysql_query($stmtB, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='LISTS', event_type='RESET', record_id='$list_id', event_code='ADMIN RESET LIST', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } + if ($campaign_id != "$old_campaign_id") + { + echo "
REMOVING LIST HOPPER LEADS FROM OLD CAMPAIGN HOPPER ($old_campaign_id)\n"; + $stmtC="DELETE from vicidial_hopper where list_id='$list_id' and campaign_id='$old_campaign_id';"; + $rslt=mysql_query($stmtC, $link); + } } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=311; # go to list modification form below } -$ADD=311; # go to list modification form below -} ###################### @@ -11634,89 +11770,88 @@ $ADD=311; # go to list modification form below ###################### if ($ADD==4111) -{ + { if ($LOGmodify_ingroups==1) - { - echo ""; - - if ( (strlen($group_name) < 2) or (strlen($group_color) < 2) ) { - echo "
GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
group name and group color must be at least 2 characters in length\n"; + echo ""; + + if ( (strlen($group_name) < 2) or (strlen($group_color) < 2) ) + { + echo "
GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
group name and group color must be at least 2 characters in length\n"; + } + else + { + $p=0; + $qc_statuses_ct = count($qc_statuses); + while ($p < $qc_statuses_ct) + { + $QC_statuses .= " $qc_statuses[$p]"; + $p++; + } + $p=0; + $qc_lists_ct = count($qc_lists); + while ($p < $qc_lists_ct) + { + $QC_lists .= " $qc_lists[$p]"; + $p++; + } + + if (strlen($QC_statuses)>0) {$QC_statuses .= " -";} + if (strlen($QC_lists)>0) {$QC_lists .= " -";} + + + if ($no_agent_action == "INGROUP") + { + if (isset($_GET["IGgroup_id_no_agent_action"])) {$IGgroup_id=$_GET["IGgroup_id_no_agent_action"];} + elseif (isset($_POST["IGgroup_id_no_agent_action"])) {$IGgroup_id=$_POST["IGgroup_id_no_agent_action"];} + if (isset($_GET["IGhandle_method_no_agent_action"])) {$IGhandle_method=$_GET["IGhandle_method_no_agent_action"];} + elseif (isset($_POST["IGhandle_method_no_agent_action"])) {$IGhandle_method=$_POST["IGhandle_method_no_agent_action"];} + if (isset($_GET["IGsearch_method_no_agent_action"])) {$IGsearch_method=$_GET["IGsearch_method_no_agent_action"];} + elseif (isset($_POST["IGsearch_method_no_agent_action"])) {$IGsearch_method=$_POST["IGsearch_method_no_agent_action"];} + if (isset($_GET["IGlist_id_no_agent_action"])) {$IGlist_id=$_GET["IGlist_id_no_agent_action"];} + elseif (isset($_POST["IGlist_id_no_agent_action"])) {$IGlist_id=$_POST["IGlist_id_no_agent_action"];} + if (isset($_GET["IGcampaign_id_no_agent_action"])) {$IGcampaign_id=$_GET["IGcampaign_id_no_agent_action"];} + elseif (isset($_POST["IGcampaign_id_no_agent_action"])) {$IGcampaign_id=$_POST["IGcampaign_id_no_agent_action"];} + if (isset($_GET["IGphone_code_no_agent_action"])) {$IGphone_code=$_GET["IGphone_code_no_agent_action"];} + elseif (isset($_POST["IGphone_code_no_agent_action"])) {$IGphone_code=$_POST["IGphone_code_no_agent_action"];} + + $no_agent_action_value = "$IGgroup_id,$IGhandle_method,$IGsearch_method,$IGlist_id,$IGcampaign_id,$IGphone_code"; + } + + if ($no_agent_action == "EXTENSION") + { + if (isset($_GET["EXextension_no_agent_action"])) {$EXextension=$_GET["EXextension_no_agent_action"];} + elseif (isset($_POST["EXextension_no_agent_action"])) {$EXextension=$_POST["EXextension_no_agent_action"];} + if (isset($_GET["EXcontext_no_agent_action"])) {$EXcontext=$_GET["EXcontext_no_agent_action"];} + elseif (isset($_POST["EXcontext_no_agent_action"])) {$EXcontext=$_POST["EXcontext_no_agent_action"];} + + $no_agent_action_value = "$EXextension,$EXcontext"; + } + + $no_agent_action_value = ereg_replace("[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]","",$no_agent_action_value); + + 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) . "' where group_id='$group_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='INGROUPS', event_type='MODIFY', record_id='$group_id', event_code='ADMIN MODIFY INGROUP', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - else - { - $p=0; - $qc_statuses_ct = count($qc_statuses); - while ($p < $qc_statuses_ct) - { - $QC_statuses .= " $qc_statuses[$p]"; - $p++; - } - $p=0; - $qc_lists_ct = count($qc_lists); - while ($p < $qc_lists_ct) - { - $QC_lists .= " $qc_lists[$p]"; - $p++; - } - - if (strlen($QC_statuses)>0) {$QC_statuses .= " -";} - if (strlen($QC_lists)>0) {$QC_lists .= " -";} - - - if ($no_agent_action == "INGROUP") - { - if (isset($_GET["IGgroup_id_no_agent_action"])) {$IGgroup_id=$_GET["IGgroup_id_no_agent_action"];} - elseif (isset($_POST["IGgroup_id_no_agent_action"])) {$IGgroup_id=$_POST["IGgroup_id_no_agent_action"];} - if (isset($_GET["IGhandle_method_no_agent_action"])) {$IGhandle_method=$_GET["IGhandle_method_no_agent_action"];} - elseif (isset($_POST["IGhandle_method_no_agent_action"])) {$IGhandle_method=$_POST["IGhandle_method_no_agent_action"];} - if (isset($_GET["IGsearch_method_no_agent_action"])) {$IGsearch_method=$_GET["IGsearch_method_no_agent_action"];} - elseif (isset($_POST["IGsearch_method_no_agent_action"])) {$IGsearch_method=$_POST["IGsearch_method_no_agent_action"];} - if (isset($_GET["IGlist_id_no_agent_action"])) {$IGlist_id=$_GET["IGlist_id_no_agent_action"];} - elseif (isset($_POST["IGlist_id_no_agent_action"])) {$IGlist_id=$_POST["IGlist_id_no_agent_action"];} - if (isset($_GET["IGcampaign_id_no_agent_action"])) {$IGcampaign_id=$_GET["IGcampaign_id_no_agent_action"];} - elseif (isset($_POST["IGcampaign_id_no_agent_action"])) {$IGcampaign_id=$_POST["IGcampaign_id_no_agent_action"];} - if (isset($_GET["IGphone_code_no_agent_action"])) {$IGphone_code=$_GET["IGphone_code_no_agent_action"];} - elseif (isset($_POST["IGphone_code_no_agent_action"])) {$IGphone_code=$_POST["IGphone_code_no_agent_action"];} - - $no_agent_action_value = "$IGgroup_id,$IGhandle_method,$IGsearch_method,$IGlist_id,$IGcampaign_id,$IGphone_code"; - } - - if ($no_agent_action == "EXTENSION") - { - if (isset($_GET["EXextension_no_agent_action"])) {$EXextension=$_GET["EXextension_no_agent_action"];} - elseif (isset($_POST["EXextension_no_agent_action"])) {$EXextension=$_POST["EXextension_no_agent_action"];} - if (isset($_GET["EXcontext_no_agent_action"])) {$EXcontext=$_GET["EXcontext_no_agent_action"];} - elseif (isset($_POST["EXcontext_no_agent_action"])) {$EXcontext=$_POST["EXcontext_no_agent_action"];} - - $no_agent_action_value = "$EXextension,$EXcontext"; - } - - $no_agent_action_value = ereg_replace("[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]","",$no_agent_action_value); - - 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) . "' where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='INGROUPS', event_type='MODIFY', record_id='$group_id', event_code='ADMIN MODIFY INGROUP', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=3111; # go to in-group modification form below } -$ADD=3111; # go to in-group modification form below -} - ###################### @@ -11724,39 +11859,39 @@ $ADD=3111; # go to in-group modification form below ###################### if ($ADD==4311) -{ + { if ($LOGmodify_dids==1) - { - echo ""; - - if ( (strlen($did_id) < 1) or (strlen($did_pattern) < 1) ) { - echo "
DID NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
did_extension must be at least 1 character in length\n"; - } - else - { - echo "
DID MODIFIED: $did_pattern\n"; + echo ""; - $stmt="UPDATE vicidial_inbound_dids set did_pattern='$did_pattern',did_description='$did_description',did_active='$did_active',did_route='$did_route',extension='$extension',exten_context='$exten_context',voicemail_ext='$voicemail_ext',phone='$phone',server_ip='$server_ip',user='$user',user_unavailable_action='$user_unavailable_action',user_route_settings_ingroup='$user_route_settings_ingroup',group_id='$group_id',call_handle_method='$call_handle_method',agent_search_method='$agent_search_method',list_id='$list_id',campaign_id='$campaign_id',phone_code='$phone_code',menu_id='$menu_id' where did_id='$did_id';"; - $rslt=mysql_query($stmt, $link); + if ( (strlen($did_id) < 1) or (strlen($did_pattern) < 1) ) + { + echo "
DID NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
did_extension must be at least 1 character in length\n"; + } + else + { + echo "
DID MODIFIED: $did_pattern\n"; - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='DIDS', event_type='MODIFY', record_id='$did_id', event_code='ADMIN MODIFY DID', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_inbound_dids set did_pattern='$did_pattern',did_description='$did_description',did_active='$did_active',did_route='$did_route',extension='$extension',exten_context='$exten_context',voicemail_ext='$voicemail_ext',phone='$phone',server_ip='$server_ip',user='$user',user_unavailable_action='$user_unavailable_action',user_route_settings_ingroup='$user_route_settings_ingroup',group_id='$group_id',call_handle_method='$call_handle_method',agent_search_method='$agent_search_method',list_id='$list_id',campaign_id='$campaign_id',phone_code='$phone_code',menu_id='$menu_id' where did_id='$did_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='DIDS', event_type='MODIFY', record_id='$did_id', event_code='ADMIN MODIFY DID', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=3311; # go to did modification form below } -$ADD=3311; # go to did modification form below -} ###################### @@ -11764,142 +11899,142 @@ $ADD=3311; # go to did modification form below ###################### if ($ADD==4511) -{ - if ($LOGmodify_dids==1) { - echo ""; - - if (strlen($menu_id) < 1) + if ($LOGmodify_dids==1) { - echo "
CALL MENU NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
menu_id must be at least 1 character in length\n"; - } - else - { - echo "
CALL MENU MODIFIED: $menu_id\n"; + echo ""; - $stmt="UPDATE vicidial_call_menu set menu_name='$menu_name',menu_prompt='$menu_prompt',menu_timeout='$menu_timeout',menu_timeout_prompt='$menu_timeout_prompt',menu_invalid_prompt='$menu_invalid_prompt',menu_repeat='$menu_repeat',menu_time_check='$menu_time_check',call_time_id='$call_time_id',track_in_vdac='$track_in_vdac',custom_dialplan_entry='$custom_dialplan_entry',tracking_group='$tracking_group' where menu_id='$menu_id';"; - $rslt=mysql_query($stmt, $link); - - $h=0; - $option_value_list='|'; - while ($h <= 18) + if (strlen($menu_id) < 1) { - $option_value=''; $option_description=''; $option_route=''; $option_route_value=''; $option_route_value_context=''; + echo "
CALL MENU NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
menu_id must be at least 1 character in length\n"; + } + else + { + echo "
CALL MENU MODIFIED: $menu_id\n"; - if (isset($_GET["option_value_$h"])) {$option_value=$_GET["option_value_$h"];} - elseif (isset($_POST["option_value_$h"])) {$option_value=$_POST["option_value_$h"];} - if (isset($_GET["option_description_$h"])) {$option_description=$_GET["option_description_$h"];} - elseif (isset($_POST["option_description_$h"])) {$option_description=$_POST["option_description_$h"];} - if (isset($_GET["option_route_$h"])) {$option_route=$_GET["option_route_$h"];} - elseif (isset($_POST["option_route_$h"])) {$option_route=$_POST["option_route_$h"];} - if (isset($_GET["option_route_value_$h"])) {$option_route_value=$_GET["option_route_value_$h"];} - elseif (isset($_POST["option_route_value_$h"])) {$option_route_value=$_POST["option_route_value_$h"];} - if (isset($_GET["option_route_value_context_$h"])) {$option_route_value_context=$_GET["option_route_value_context_$h"];} - elseif (isset($_POST["option_route_value_context_$h"])) {$option_route_value_context=$_POST["option_route_value_context_$h"];} + $stmt="UPDATE vicidial_call_menu set menu_name='$menu_name',menu_prompt='$menu_prompt',menu_timeout='$menu_timeout',menu_timeout_prompt='$menu_timeout_prompt',menu_invalid_prompt='$menu_invalid_prompt',menu_repeat='$menu_repeat',menu_time_check='$menu_time_check',call_time_id='$call_time_id',track_in_vdac='$track_in_vdac',custom_dialplan_entry='$custom_dialplan_entry',tracking_group='$tracking_group' where menu_id='$menu_id';"; + $rslt=mysql_query($stmt, $link); - if ($option_route == "INGROUP") + $h=0; + $option_value_list='|'; + while ($h <= 18) { - if (isset($_GET["IGhandle_method_$h"])) {$IGhandle_method=$_GET["IGhandle_method_$h"];} - elseif (isset($_POST["IGhandle_method_$h"])) {$IGhandle_method=$_POST["IGhandle_method_$h"];} - if (isset($_GET["IGsearch_method_$h"])) {$IGsearch_method=$_GET["IGsearch_method_$h"];} - elseif (isset($_POST["IGsearch_method_$h"])) {$IGsearch_method=$_POST["IGsearch_method_$h"];} - if (isset($_GET["IGlist_id_$h"])) {$IGlist_id=$_GET["IGlist_id_$h"];} - elseif (isset($_POST["IGlist_id_$h"])) {$IGlist_id=$_POST["IGlist_id_$h"];} - if (isset($_GET["IGcampaign_id_$h"])) {$IGcampaign_id=$_GET["IGcampaign_id_$h"];} - elseif (isset($_POST["IGcampaign_id_$h"])) {$IGcampaign_id=$_POST["IGcampaign_id_$h"];} - if (isset($_GET["IGphone_code_$h"])) {$IGphone_code=$_GET["IGphone_code_$h"];} - elseif (isset($_POST["IGphone_code_$h"])) {$IGphone_code=$_POST["IGphone_code_$h"];} + $option_value=''; $option_description=''; $option_route=''; $option_route_value=''; $option_route_value_context=''; - $option_route_value_context = "$IGhandle_method,$IGsearch_method,$IGlist_id,$IGcampaign_id,$IGphone_code"; - } + if (isset($_GET["option_value_$h"])) {$option_value=$_GET["option_value_$h"];} + elseif (isset($_POST["option_value_$h"])) {$option_value=$_POST["option_value_$h"];} + if (isset($_GET["option_description_$h"])) {$option_description=$_GET["option_description_$h"];} + elseif (isset($_POST["option_description_$h"])) {$option_description=$_POST["option_description_$h"];} + if (isset($_GET["option_route_$h"])) {$option_route=$_GET["option_route_$h"];} + elseif (isset($_POST["option_route_$h"])) {$option_route=$_POST["option_route_$h"];} + if (isset($_GET["option_route_value_$h"])) {$option_route_value=$_GET["option_route_value_$h"];} + elseif (isset($_POST["option_route_value_$h"])) {$option_route_value=$_POST["option_route_value_$h"];} + if (isset($_GET["option_route_value_context_$h"])) {$option_route_value_context=$_GET["option_route_value_context_$h"];} + elseif (isset($_POST["option_route_value_context_$h"])) {$option_route_value_context=$_POST["option_route_value_context_$h"];} - if ($non_latin < 1) - { - $option_value = ereg_replace("[^-\_0-9A-Z]","",$option_value); - $option_description = ereg_replace("[^- \:\/\_0-9a-zA-Z]","",$option_description); - $option_route = ereg_replace("[^-_0-9a-zA-Z]","",$option_route); - $option_route_value = ereg_replace("[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]","",$option_route_value); - $option_route_value_context = ereg_replace("[^,-_0-9a-zA-Z]","",$option_route_value_context); - } - - if (strlen($option_route) > 0) - { - $stmtA="SELECT count(*) from vicidial_call_menu_options where menu_id='$menu_id' and option_value='$option_value';"; - $rslt=mysql_query($stmtA, $link); - $row=mysql_fetch_row($rslt); - $option_exists = $row[0]; - - if ($option_exists > 0) + if ($option_route == "INGROUP") { - $stmtA="UPDATE vicidial_call_menu_options SET option_description='$option_description',option_route='$option_route',option_route_value='$option_route_value',option_route_value_context='$option_route_value_context' where menu_id='$menu_id' and option_value='$option_value';"; + if (isset($_GET["IGhandle_method_$h"])) {$IGhandle_method=$_GET["IGhandle_method_$h"];} + elseif (isset($_POST["IGhandle_method_$h"])) {$IGhandle_method=$_POST["IGhandle_method_$h"];} + if (isset($_GET["IGsearch_method_$h"])) {$IGsearch_method=$_GET["IGsearch_method_$h"];} + elseif (isset($_POST["IGsearch_method_$h"])) {$IGsearch_method=$_POST["IGsearch_method_$h"];} + if (isset($_GET["IGlist_id_$h"])) {$IGlist_id=$_GET["IGlist_id_$h"];} + elseif (isset($_POST["IGlist_id_$h"])) {$IGlist_id=$_POST["IGlist_id_$h"];} + if (isset($_GET["IGcampaign_id_$h"])) {$IGcampaign_id=$_GET["IGcampaign_id_$h"];} + elseif (isset($_POST["IGcampaign_id_$h"])) {$IGcampaign_id=$_POST["IGcampaign_id_$h"];} + if (isset($_GET["IGphone_code_$h"])) {$IGphone_code=$_GET["IGphone_code_$h"];} + elseif (isset($_POST["IGphone_code_$h"])) {$IGphone_code=$_POST["IGphone_code_$h"];} + + $option_route_value_context = "$IGhandle_method,$IGsearch_method,$IGlist_id,$IGcampaign_id,$IGphone_code"; + } + + if ($non_latin < 1) + { + $option_value = ereg_replace("[^-\_0-9A-Z]","",$option_value); + $option_description = ereg_replace("[^- \:\/\_0-9a-zA-Z]","",$option_description); + $option_route = ereg_replace("[^-_0-9a-zA-Z]","",$option_route); + $option_route_value = ereg_replace("[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]","",$option_route_value); + $option_route_value_context = ereg_replace("[^,-_0-9a-zA-Z]","",$option_route_value_context); + } + + if (strlen($option_route) > 0) + { + $stmtA="SELECT count(*) from vicidial_call_menu_options where menu_id='$menu_id' and option_value='$option_value';"; $rslt=mysql_query($stmtA, $link); - $stmtAX .= "$stmtA|"; + $row=mysql_fetch_row($rslt); + $option_exists = $row[0]; + + if ($option_exists > 0) + { + $stmtA="UPDATE vicidial_call_menu_options SET option_description='$option_description',option_route='$option_route',option_route_value='$option_route_value',option_route_value_context='$option_route_value_context' where menu_id='$menu_id' and option_value='$option_value';"; + $rslt=mysql_query($stmtA, $link); + $stmtAX .= "$stmtA|"; + } + else + { + $stmtA="INSERT INTO vicidial_call_menu_options SET menu_id='$menu_id',option_value='$option_value',option_description='$option_description',option_route='$option_route',option_route_value='$option_route_value',option_route_value_context='$option_route_value_context';"; + $rslt=mysql_query($stmtA, $link); + $stmtAX .= "$stmtA|"; + } } else { - $stmtA="INSERT INTO vicidial_call_menu_options SET menu_id='$menu_id',option_value='$option_value',option_description='$option_description',option_route='$option_route',option_route_value='$option_route_value',option_route_value_context='$option_route_value_context';"; + $stmtA="SELECT count(*) from vicidial_call_menu_options where menu_id='$menu_id' and option_value='$option_value';"; $rslt=mysql_query($stmtA, $link); - $stmtAX .= "$stmtA|"; + $row=mysql_fetch_row($rslt); + $option_exists_db = $row[0]; + + if ($option_exists_db > 0) + { + $stmtA="DELETE FROM vicidial_call_menu_options where menu_id='$menu_id' and option_value='$option_value';"; + $rslt=mysql_query($stmtA, $link); + $stmtAX .= "$stmtA|"; + } } + $option_value_list .= "$option_value|"; + $h++; } - else + ## delete existing database records that were not in the submit + while ($h <= 18) { - $stmtA="SELECT count(*) from vicidial_call_menu_options where menu_id='$menu_id' and option_value='$option_value';"; - $rslt=mysql_query($stmtA, $link); - $row=mysql_fetch_row($rslt); - $option_exists_db = $row[0]; - - if ($option_exists_db > 0) + if (!preg_match("/\|$dtmf[$h]\|/i",$option_value_list)) { - $stmtA="DELETE FROM vicidial_call_menu_options where menu_id='$menu_id' and option_value='$option_value';"; + $stmtA="SELECT count(*) from vicidial_call_menu_options where menu_id='$menu_id' and option_value='$dtmf[$h]';"; $rslt=mysql_query($stmtA, $link); - $stmtAX .= "$stmtA|"; + $row=mysql_fetch_row($rslt); + $option_exists_db = $row[0]; + + if ($option_exists_db > 0) + { + $stmtA="DELETE FROM vicidial_call_menu_options where menu_id='$menu_id' and option_value='$dtmf[$h]';"; + $rslt=mysql_query($stmtA, $link); + $stmtAX .= "$stmtA|"; + } } + $h++; } - $option_value_list .= "$option_value|"; - $h++; + + $stmtA="UPDATE servers set rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';"; + $rslt=mysql_query($stmtA, $link); + $stmtAX .= "$stmtA|"; + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|$stmtAX"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLMENUS', event_type='MODIFY', record_id='$menu_id', event_code='ADMIN MODIFY CALL MENU', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); } - ## delete existing database records that were not in the submit - while ($h <= 18) - { - if (!preg_match("/\|$dtmf[$h]\|/i",$option_value_list)) - { - $stmtA="SELECT count(*) from vicidial_call_menu_options where menu_id='$menu_id' and option_value='$dtmf[$h]';"; - $rslt=mysql_query($stmtA, $link); - $row=mysql_fetch_row($rslt); - $option_exists_db = $row[0]; - - if ($option_exists_db > 0) - { - $stmtA="DELETE FROM vicidial_call_menu_options where menu_id='$menu_id' and option_value='$dtmf[$h]';"; - $rslt=mysql_query($stmtA, $link); - $stmtAX .= "$stmtA|"; - } - } - $h++; - } - - $stmtA="UPDATE servers set rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y';"; - $rslt=mysql_query($stmtA, $link); - $stmtAX .= "$stmtA|"; - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|$stmtAX"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLMENUS', event_type='MODIFY', record_id='$menu_id', event_code='ADMIN MODIFY CALL MENU', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=3511; # go to call menu modification form below } -$ADD=3511; # go to call menu modification form below -} ###################### @@ -11907,40 +12042,39 @@ $ADD=3511; # go to call menu modification form below ###################### if ($ADD==41111) -{ + { if ($LOGmodify_remoteagents==1) - { - echo ""; - - if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) { - echo "
REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
User ID Start and External Extension must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); + echo ""; - echo "
REMOTE AGENTS MODIFIED\n"; + if ( (strlen($server_ip) < 2) or (strlen($user_start) < 2) or (strlen($campaign_id) < 2) or (strlen($conf_exten) < 2) ) + { + echo "
REMOTE AGENTS NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
User ID Start and External Extension must be at least 2 characters in length\n"; + } + else + { + $stmt="UPDATE vicidial_remote_agents set user_start='$user_start', number_of_lines='$number_of_lines', server_ip='$server_ip', conf_exten='$conf_exten', status='$status', campaign_id='$campaign_id', closer_campaigns='$groups_value' where remote_agent_id='$remote_agent_id';"; + $rslt=mysql_query($stmt, $link); - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='REMOTEAGENTS', event_type='MODIFY', record_id='$remote_agent_id', event_code='ADMIN MODIFY REMOTE AGENT', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + echo "
REMOTE AGENTS MODIFIED\n"; + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='REMOTEAGENTS', event_type='MODIFY', record_id='$remote_agent_id', event_code='ADMIN MODIFY REMOTE AGENT', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=31111; # go to remote agents modification form below } -$ADD=31111; # go to remote agents modification form below -} - ###################### @@ -11948,180 +12082,181 @@ $ADD=31111; # go to remote agents modification form below ###################### if ($ADD==411111) -{ + { if ($LOGmodify_usergroups==1) - { - echo ""; - - if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) { - echo "
USER GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
Group name and description must be at least 2 characters in length\n"; - } - else - { - $p=0; - $GROUP_shifts=' '; - $group_shifts_ct = count($group_shifts); - while ($p <= $group_shifts_ct) + echo ""; + + if ( (strlen($user_group) < 2) or (strlen($group_name) < 2) ) { - $group_shifts[$p] = ereg_replace("[^ -_0-9a-zA-Z]","",$group_shifts[$p]); - $GROUP_shifts .= "$group_shifts[$p] "; - $p++; + echo "
USER GROUP NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
Group name and description must be at least 2 characters in length\n"; } - $p=0; - $VGROUP_vgroups=' '; - $vgroup_vgroups_ct = count($agent_status_viewable_groups); - while ($p <= $vgroup_vgroups_ct) + else { - $agent_status_viewable_groups[$p] = ereg_replace("[^ -_0-9a-zA-Z]","",$agent_status_viewable_groups[$p]); - $VGROUP_vgroups .= "$agent_status_viewable_groups[$p] "; - $p++; - } - - $stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name',allowed_campaigns='$campaigns_value',qc_allowed_campaigns='$qc_campaigns_value',qc_allowed_inbound_groups='$qc_groups_value',group_shifts='$GROUP_shifts',forced_timeclock_login='$forced_timeclock_login',shift_enforcement='$shift_enforcement',agent_status_viewable_groups='$VGROUP_vgroups',agent_status_view_time='$agent_status_view_time' where user_group='$OLDuser_group';"; - $rslt=mysql_query($stmt, $link); + $p=0; + $GROUP_shifts=' '; + $group_shifts_ct = count($group_shifts); + while ($p <= $group_shifts_ct) + { + $group_shifts[$p] = ereg_replace("[^ -_0-9a-zA-Z]","",$group_shifts[$p]); + $GROUP_shifts .= "$group_shifts[$p] "; + $p++; + } + $p=0; + $VGROUP_vgroups=' '; + $vgroup_vgroups_ct = count($agent_status_viewable_groups); + while ($p <= $vgroup_vgroups_ct) + { + $agent_status_viewable_groups[$p] = ereg_replace("[^ -_0-9a-zA-Z]","",$agent_status_viewable_groups[$p]); + $VGROUP_vgroups .= "$agent_status_viewable_groups[$p] "; + $p++; + } + + $stmt="UPDATE vicidial_user_groups set user_group='$user_group', group_name='$group_name',allowed_campaigns='$campaigns_value',qc_allowed_campaigns='$qc_campaigns_value',qc_allowed_inbound_groups='$qc_groups_value',group_shifts='$GROUP_shifts',forced_timeclock_login='$forced_timeclock_login',shift_enforcement='$shift_enforcement',agent_status_viewable_groups='$VGROUP_vgroups',agent_status_view_time='$agent_status_view_time' where user_group='$OLDuser_group';"; + $rslt=mysql_query($stmt, $link); - echo "
USER GROUP MODIFIED\n"; + echo "
USER GROUP MODIFIED\n"; - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERGROUPS', event_type='MODIFY', record_id='$user_group', event_code='ADMIN MODIFY USER GROUP', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='USERGROUPS', event_type='MODIFY', record_id='$user_group', event_code='ADMIN MODIFY USER GROUP', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); - ############################################################### - ##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### - $stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;"; - $rslt=mysql_query($stmt, $link); - if ($DB) {echo "$stmt\n";} - $ss_conf_ct = mysql_num_rows($rslt); - if ($ss_conf_ct > 0) - { - $row=mysql_fetch_row($rslt); - $enable_vtiger_integration = $row[0]; - $vtiger_server_ip = $row[1]; - $vtiger_dbname = $row[2]; - $vtiger_login = $row[3]; - $vtiger_pass = $row[4]; - $vtiger_url = $row[5]; - } - ##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### - ############################################################# - - if ($enable_vtiger_integration > 0) - { - ### connect to your vtiger database - $linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass"); - if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());} - echo 'Connected successfully'; - mysql_select_db("$vtiger_dbname", $linkV); - - ###################################### - ##### BEGIN Add/Update group info in Vtiger - $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; - $rslt=mysql_query($stmt, $linkV); + ############################################################### + ##### START SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### + $stmt = "SELECT enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url FROM system_settings;"; + $rslt=mysql_query($stmt, $link); if ($DB) {echo "$stmt\n";} - if (!$rslt) {die('Could not execute: ' . mysql_error());} - $row=mysql_fetch_row($rslt); - $group_found_count = $row[0]; - - ### group exists in vtiger, update it - if ($group_found_count > 0) + $ss_conf_ct = mysql_num_rows($rslt); + if ($ss_conf_ct > 0) { - $stmt="SELECT groupid from vtiger_groups where groupname='$user_group';"; + $row=mysql_fetch_row($rslt); + $enable_vtiger_integration = $row[0]; + $vtiger_server_ip = $row[1]; + $vtiger_dbname = $row[2]; + $vtiger_login = $row[3]; + $vtiger_pass = $row[4]; + $vtiger_url = $row[5]; + } + ##### END SYSTEM_SETTINGS VTIGER CONNECTION INFO LOOKUP ##### + ############################################################# + + if ($enable_vtiger_integration > 0) + { + ### connect to your vtiger database + $linkV=mysql_connect("$vtiger_server_ip", "$vtiger_login","$vtiger_pass"); + if (!$linkV) {die("Could not connect: $vtiger_server_ip|$vtiger_dbname|$vtiger_login|$vtiger_pass" . mysql_error());} + echo 'Connected successfully'; + mysql_select_db("$vtiger_dbname", $linkV); + + ###################################### + ##### BEGIN Add/Update group info in Vtiger + $stmt="SELECT count(*) from vtiger_groups where groupname='$user_group';"; $rslt=mysql_query($stmt, $linkV); if ($DB) {echo "$stmt\n";} if (!$rslt) {die('Could not execute: ' . mysql_error());} $row=mysql_fetch_row($rslt); - $groupid = $row[0]; + $group_found_count = $row[0]; - $stmtA = "UPDATE vtiger_groups SET description='$group_name' where groupid='$groupid';"; - if ($DB) {echo "|$stmtA|\n";} - $rslt=mysql_query($stmtA, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} + ### group exists in vtiger, update it + if ($group_found_count > 0) + { + $stmt="SELECT groupid from vtiger_groups where groupname='$user_group';"; + $rslt=mysql_query($stmt, $linkV); + if ($DB) {echo "$stmt\n";} + if (!$rslt) {die('Could not execute: ' . mysql_error());} + $row=mysql_fetch_row($rslt); + $groupid = $row[0]; + + $stmtA = "UPDATE vtiger_groups SET description='$group_name' where groupid='$groupid';"; + if ($DB) {echo "|$stmtA|\n";} + $rslt=mysql_query($stmtA, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + } + + ### user doesn't exist in vtiger, insert it + else + { + #### BEGIN CREATE NEW GROUP RECORD IN VTIGER + # Get next available id from vtiger_groups_seq to use as groupid + $stmt="SELECT id from vtiger_groups_seq;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkV); + $row=mysql_fetch_row($rslt); + $groupid = ($row[0] + 1); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + # Increase next available groupid with 1 so next record gets proper id + $stmt="UPDATE vtiger_groups_seq SET id = '$groupid';"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='$group_name';"; + if ($DB) {echo "|$stmtA|\n";} + $rslt=mysql_query($stmtA, $linkV); + if (!$rslt) {die('Could not execute: ' . mysql_error());} + + #### END CREATE NEW GROUP RECORD IN VTIGER + } + ##### END Add/Update group info in Vtiger + ###################################### } - - ### user doesn't exist in vtiger, insert it - else - { - #### BEGIN CREATE NEW GROUP RECORD IN VTIGER - # Get next available id from vtiger_groups_seq to use as groupid - $stmt="SELECT id from vtiger_groups_seq;"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $linkV); - $row=mysql_fetch_row($rslt); - $groupid = ($row[0] + 1); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - # Increase next available groupid with 1 so next record gets proper id - $stmt="UPDATE vtiger_groups_seq SET id = '$groupid';"; - if ($DB) {echo "$stmt\n";} - $rslt=mysql_query($stmt, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - $stmtA = "INSERT INTO vtiger_groups SET groupid='$groupid',groupname='$user_group',description='$group_name';"; - if ($DB) {echo "|$stmtA|\n";} - $rslt=mysql_query($stmtA, $linkV); - if (!$rslt) {die('Could not execute: ' . mysql_error());} - - #### END CREATE NEW GROUP RECORD IN VTIGER - } - ##### END Add/Update group info in Vtiger - ###################################### } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=311111; # go to user group modification form below } -$ADD=311111; # go to user group modification form below -} + ###################### # ADD=4111111 modify script in the system ###################### if ($ADD==4111111) -{ + { if ($LOGmodify_scripts==1) - { - echo "\n"; - echo "\n"; - echo ""; - - if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) { - echo "
SCRIPT NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
Script name, description and text must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_scripts set script_name='$script_name', script_comments='$script_comments', script_text='" . mysql_real_escape_string($script_text) . "', active='$active' where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); + echo "\n"; + echo "\n"; + echo ""; - echo "
SCRIPT MODIFIED\n"; + if ( (strlen($script_id) < 2) or (strlen($script_name) < 2) or (strlen($script_text) < 2) ) + { + echo "
SCRIPT NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
Script name, description and text must be at least 2 characters in length\n"; + } + else + { + $stmt="UPDATE vicidial_scripts set script_name='$script_name', script_comments='$script_comments', script_text='" . mysql_real_escape_string($script_text) . "', active='$active' where script_id='$script_id';"; + $rslt=mysql_query($stmt, $link); - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SCRIPTS', event_type='MODIFY', record_id='$script_id', event_code='ADMIN MODIFY SCRIPT', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + echo "
SCRIPT MODIFIED\n"; + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SCRIPTS', event_type='MODIFY', record_id='$script_id', event_code='ADMIN MODIFY SCRIPT', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=3111111; # go to script modification form below } -$ADD=3111111; # go to script modification form below -} ###################### @@ -12129,41 +12264,41 @@ $ADD=3111111; # go to script modification form below ###################### if ($ADD==41111111) -{ + { if ($LOGmodify_filters==1) - { - echo "\n"; - echo "\n"; - echo ""; - - if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) { - echo "
FILTER NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
Filter ID, name and SQL must be at least 2 characters in length\n"; - } - else - { - $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='" . mysql_real_escape_string($lead_filter_sql) . "' where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); + echo "\n"; + echo "\n"; + echo ""; - echo "
FILTER MODIFIED\n"; + if ( (strlen($lead_filter_id) < 2) or (strlen($lead_filter_name) < 2) or (strlen($lead_filter_sql) < 2) ) + { + echo "
FILTER NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
Filter ID, name and SQL must be at least 2 characters in length\n"; + } + else + { + $stmt="UPDATE vicidial_lead_filters set lead_filter_name='$lead_filter_name', lead_filter_comments='$lead_filter_comments', lead_filter_sql='" . mysql_real_escape_string($lead_filter_sql) . "' where lead_filter_id='$lead_filter_id';"; + $rslt=mysql_query($stmt, $link); - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='FILTERS', event_type='MODIFY', record_id='$lead_filter_id', event_code='ADMIN MODIFY FILTER', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + echo "
FILTER MODIFIED\n"; + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='FILTERS', event_type='MODIFY', record_id='$lead_filter_id', event_code='ADMIN MODIFY FILTER', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=31111111; # go to filter modification form below } -$ADD=31111111; # go to filter modification form below -} ###################### @@ -12171,55 +12306,55 @@ $ADD=31111111; # go to filter modification form below ###################### if ($ADD==411111111) -{ + { if ($LOGmodify_call_times==1) - { - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) { - echo "
CALL TIME NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
Call Time ID and name must be at least 2 characters in length\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_call_times set call_time_name='$call_time_name', call_time_comments='$call_time_comments', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop', ct_sunday_start='$ct_sunday_start', ct_sunday_stop='$ct_sunday_stop', ct_monday_start='$ct_monday_start', ct_monday_stop='$ct_monday_stop', ct_tuesday_start='$ct_tuesday_start', ct_tuesday_stop='$ct_tuesday_stop', ct_wednesday_start='$ct_wednesday_start', ct_wednesday_stop='$ct_wednesday_stop', ct_thursday_start='$ct_thursday_start', ct_thursday_stop='$ct_thursday_stop', ct_friday_start='$ct_friday_start', ct_friday_stop='$ct_friday_stop', ct_saturday_start='$ct_saturday_start', ct_saturday_stop='$ct_saturday_stop' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); + echo ""; - echo "
CALL TIME MODIFIED\n"; + if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) ) + { + echo "
CALL TIME NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
Call Time ID and name must be at least 2 characters in length\n"; + } + else + { + $ct_default_start = preg_replace('/\D/', '', $ct_default_start); + $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); + $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); + $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); + $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); + $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); + $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); + $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); + $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); + $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); + $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); + $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); + $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); + $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); + $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); + $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); + $stmt="UPDATE vicidial_call_times set call_time_name='$call_time_name', call_time_comments='$call_time_comments', ct_default_start='$ct_default_start', ct_default_stop='$ct_default_stop', ct_sunday_start='$ct_sunday_start', ct_sunday_stop='$ct_sunday_stop', ct_monday_start='$ct_monday_start', ct_monday_stop='$ct_monday_stop', ct_tuesday_start='$ct_tuesday_start', ct_tuesday_stop='$ct_tuesday_stop', ct_wednesday_start='$ct_wednesday_start', ct_wednesday_stop='$ct_wednesday_stop', ct_thursday_start='$ct_thursday_start', ct_thursday_stop='$ct_thursday_stop', ct_friday_start='$ct_friday_start', ct_friday_stop='$ct_friday_stop', ct_saturday_start='$ct_saturday_start', ct_saturday_stop='$ct_saturday_stop' where call_time_id='$call_time_id';"; + $rslt=mysql_query($stmt, $link); - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLTIMES', event_type='MODIFY', record_id='$call_time_id', event_code='ADMIN MODIFY CALL TIME', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + echo "
CALL TIME MODIFIED\n"; + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLTIMES', event_type='MODIFY', record_id='$call_time_id', event_code='ADMIN MODIFY CALL TIME', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=311111111; # go to call time modification form below } -$ADD=311111111; # go to call time modification form below -} ###################### @@ -12227,55 +12362,55 @@ $ADD=311111111; # go to call time modification form below ###################### if ($ADD==4111111111) -{ + { if ($LOGmodify_call_times==1) - { - echo ""; - - if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) { - echo "
STATE CALL TIME NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
State Call Time ID, name and state must be at least 2 characters in length\n"; - } - else - { - $ct_default_start = preg_replace('/\D/', '', $ct_default_start); - $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); - $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); - $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); - $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); - $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); - $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); - $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); - $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); - $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); - $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); - $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); - $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); - $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); - $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); - $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); - $stmt="UPDATE vicidial_state_call_times set state_call_time_name='$call_time_name', state_call_time_comments='$call_time_comments', sct_default_start='$ct_default_start', sct_default_stop='$ct_default_stop', sct_sunday_start='$ct_sunday_start', sct_sunday_stop='$ct_sunday_stop', sct_monday_start='$ct_monday_start', sct_monday_stop='$ct_monday_stop', sct_tuesday_start='$ct_tuesday_start', sct_tuesday_stop='$ct_tuesday_stop', sct_wednesday_start='$ct_wednesday_start', sct_wednesday_stop='$ct_wednesday_stop', sct_thursday_start='$ct_thursday_start', sct_thursday_stop='$ct_thursday_stop', sct_friday_start='$ct_friday_start', sct_friday_stop='$ct_friday_stop', sct_saturday_start='$ct_saturday_start', sct_saturday_stop='$ct_saturday_stop', state_call_time_state='$state_call_time_state' where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); + echo ""; - echo "
STATE CALL TIME MODIFIED\n"; + if ( (strlen($call_time_id) < 2) or (strlen($call_time_name) < 2) or (strlen($state_call_time_state) < 2) ) + { + echo "
STATE CALL TIME NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
State Call Time ID, name and state must be at least 2 characters in length\n"; + } + else + { + $ct_default_start = preg_replace('/\D/', '', $ct_default_start); + $ct_default_stop = preg_replace('/\D/', '', $ct_default_stop); + $ct_sunday_start = preg_replace('/\D/', '', $ct_sunday_start); + $ct_sunday_stop = preg_replace('/\D/', '', $ct_sunday_stop); + $ct_monday_start = preg_replace('/\D/', '', $ct_monday_start); + $ct_monday_stop = preg_replace('/\D/', '', $ct_monday_stop); + $ct_tuesday_start = preg_replace('/\D/', '', $ct_tuesday_start); + $ct_tuesday_stop = preg_replace('/\D/', '', $ct_tuesday_stop); + $ct_wednesday_start = preg_replace('/\D/', '', $ct_wednesday_start); + $ct_wednesday_stop = preg_replace('/\D/', '', $ct_wednesday_stop); + $ct_thursday_start = preg_replace('/\D/', '', $ct_thursday_start); + $ct_thursday_stop = preg_replace('/\D/', '', $ct_thursday_stop); + $ct_friday_start = preg_replace('/\D/', '', $ct_friday_start); + $ct_friday_stop = preg_replace('/\D/', '', $ct_friday_stop); + $ct_saturday_start = preg_replace('/\D/', '', $ct_saturday_start); + $ct_saturday_stop = preg_replace('/\D/', '', $ct_saturday_stop); + $stmt="UPDATE vicidial_state_call_times set state_call_time_name='$call_time_name', state_call_time_comments='$call_time_comments', sct_default_start='$ct_default_start', sct_default_stop='$ct_default_stop', sct_sunday_start='$ct_sunday_start', sct_sunday_stop='$ct_sunday_stop', sct_monday_start='$ct_monday_start', sct_monday_stop='$ct_monday_stop', sct_tuesday_start='$ct_tuesday_start', sct_tuesday_stop='$ct_tuesday_stop', sct_wednesday_start='$ct_wednesday_start', sct_wednesday_stop='$ct_wednesday_stop', sct_thursday_start='$ct_thursday_start', sct_thursday_stop='$ct_thursday_stop', sct_friday_start='$ct_friday_start', sct_friday_stop='$ct_friday_stop', sct_saturday_start='$ct_saturday_start', sct_saturday_stop='$ct_saturday_stop', state_call_time_state='$state_call_time_state' where state_call_time_id='$call_time_id';"; + $rslt=mysql_query($stmt, $link); - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLTIMES', event_type='MODIFY', record_id='$call_time_id', event_code='ADMIN MODIFY STATE CALL TIME', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + echo "
STATE CALL TIME MODIFIED\n"; + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='CALLTIMES', event_type='MODIFY', record_id='$call_time_id', event_code='ADMIN MODIFY STATE CALL TIME', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=3111111111; # go to state call time modification form below } -$ADD=3111111111; # go to state call time modification form below -} ###################### @@ -12283,50 +12418,50 @@ $ADD=3111111111; # go to state call time modification form below ###################### if ($ADD==431111111) -{ + { if ($LOGmodify_call_times==1) - { - echo ""; + { + echo ""; - $shift_length_test = eregi_replace(':','',$shift_length); - if ( (strlen($shift_id) < 2) or (strlen($shift_name) < 2) or (strlen($shift_start_time) < 4) or (strlen($shift_start_time) > 4) or (strlen($shift_length) < 5) or (strlen($shift_length) > 5) or ($shift_start_time > 2359) or ($shift_length_test > 2400) ) - { - echo "
SHIFT DEFINITION NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
Shift ID and name must be at least 2 characters in length\n"; - echo "
Shift Start Time must be 4 digits in length and be a valid time\n"; - echo "
Shift Length must be 5 characters in length and be 24 hours or less\n"; - } - else - { - $p=0; - $shift_weekdays_ct = count($shift_weekdays); - while ($p <= $shift_weekdays_ct) + $shift_length_test = eregi_replace(':','',$shift_length); + if ( (strlen($shift_id) < 2) or (strlen($shift_name) < 2) or (strlen($shift_start_time) < 4) or (strlen($shift_start_time) > 4) or (strlen($shift_length) < 5) or (strlen($shift_length) > 5) or ($shift_start_time > 2359) or ($shift_length_test > 2400) ) { - $SHIFT_weekdays .= "$shift_weekdays[$p]"; - $p++; + echo "
SHIFT DEFINITION NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
Shift ID and name must be at least 2 characters in length\n"; + echo "
Shift Start Time must be 4 digits in length and be a valid time\n"; + echo "
Shift Length must be 5 characters in length and be 24 hours or less\n"; } - $shift_start_time = preg_replace('/\D/', '', $shift_start_time); - $stmt="UPDATE vicidial_shifts set shift_name='$shift_name', shift_start_time='$shift_start_time', shift_length='$shift_length', shift_weekdays='$SHIFT_weekdays' where shift_id='$shift_id';"; - $rslt=mysql_query($stmt, $link); + else + { + $p=0; + $shift_weekdays_ct = count($shift_weekdays); + while ($p <= $shift_weekdays_ct) + { + $SHIFT_weekdays .= "$shift_weekdays[$p]"; + $p++; + } + $shift_start_time = preg_replace('/\D/', '', $shift_start_time); + $stmt="UPDATE vicidial_shifts set shift_name='$shift_name', shift_start_time='$shift_start_time', shift_length='$shift_length', shift_weekdays='$SHIFT_weekdays' where shift_id='$shift_id';"; + $rslt=mysql_query($stmt, $link); - echo "
SHIFT MODIFIED\n"; + echo "
SHIFT MODIFIED\n"; - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SHIFTS', event_type='MODIFY', record_id='$shift_id', event_code='ADMIN MODIFY SHIFT', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='SHIFTS', event_type='MODIFY', record_id='$shift_id', event_code='ADMIN MODIFY SHIFT', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=331111111; # go to shift modification form below } -$ADD=331111111; # go to shift modification form below -} ###################### @@ -12334,47 +12469,47 @@ $ADD=331111111; # go to shift modification form below ###################### if ($ADD==41111111111) -{ - if ($LOGast_admin_access==1) { - echo ""; - - $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($extension != $old_extension) or ($server_ip != $old_server_ip) ) ) - {echo "
PHONE NOT MODIFIED - there is already a Phone in the system with this extension/server\n";} - else + if ($LOGast_admin_access==1) { - if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) - {echo "
PHONE NOT MODIFIED - Please go back and look at the data you entered\n";} - else + echo ""; + + $stmt="SELECT count(*) from phones where extension='$extension' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ( ($row[0] > 0) && ( ($extension != $old_extension) or ($server_ip != $old_server_ip) ) ) + {echo "
PHONE NOT MODIFIED - there is already a Phone in the system with this extension/server\n";} + else { - echo "
PHONE MODIFIED: $extension\n"; + if ( (strlen($extension) < 1) or (strlen($server_ip) < 7) or (strlen($dialplan_number) < 1) or (strlen($voicemail_id) < 1) or (strlen($login) < 1) or (strlen($pass) < 1)) + {echo "
PHONE NOT MODIFIED - Please go back and look at the data you entered\n";} + else + { + echo "
PHONE MODIFIED: $extension\n"; - $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid', enable_sipsak_messages='$enable_sipsak_messages', email='$email', template_id='$template_id', conf_override='$conf_override',phone_context='$phone_context',phone_ring_timeout='$phone_ring_timeout',conf_secret='$conf_secret' where extension='$old_extension' and server_ip='$old_server_ip';"; - $rslt=mysql_query($stmt, $link); + $stmt="UPDATE phones set extension='$extension', dialplan_number='$dialplan_number', voicemail_id='$voicemail_id', phone_ip='$phone_ip', computer_ip='$computer_ip', server_ip='$server_ip', login='$login', pass='$pass', status='$status', active='$active', phone_type='$phone_type', fullname='$fullname', company='$company', picture='$picture', protocol='$protocol', local_gmt='$local_gmt', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', login_user='$login_user', login_pass='$login_pass', login_campaign='$login_campaign', park_on_extension='$park_on_extension', conf_on_extension='$conf_on_extension', VICIDIAL_park_on_extension='$VICIDIAL_park_on_extension', VICIDIAL_park_on_filename='$VICIDIAL_park_on_filename', monitor_prefix='$monitor_prefix', recording_exten='$recording_exten', voicemail_exten='$voicemail_exten', voicemail_dump_exten='$voicemail_dump_exten', ext_context='$ext_context', dtmf_send_extension='$dtmf_send_extension', call_out_number_group='$call_out_number_group', client_browser='$client_browser', install_directory='$install_directory', local_web_callerID_URL='" . mysql_real_escape_string($local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysql_real_escape_string($VICIDIAL_web_URL) . "', AGI_call_logging_enabled='$AGI_call_logging_enabled', user_switching_enabled='$user_switching_enabled', conferencing_enabled='$conferencing_enabled', admin_hangup_enabled='$admin_hangup_enabled', admin_hijack_enabled='$admin_hijack_enabled', admin_monitor_enabled='$admin_monitor_enabled', call_parking_enabled='$call_parking_enabled', updater_check_enabled='$updater_check_enabled', AFLogging_enabled='$AFLogging_enabled', QUEUE_ACTION_enabled='$QUEUE_ACTION_enabled', CallerID_popup_enabled='$CallerID_popup_enabled', voicemail_button_enabled='$voicemail_button_enabled', enable_fast_refresh='$enable_fast_refresh', fast_refresh_rate='$fast_refresh_rate', enable_persistant_mysql='$enable_persistant_mysql', auto_dial_next_number='$auto_dial_next_number', VDstop_rec_after_each_call='$VDstop_rec_after_each_call', DBX_server='$DBX_server', DBX_database='$DBX_database', DBX_user='$DBX_user', DBX_pass='$DBX_pass', DBX_port='$DBX_port', DBY_server='$DBY_server', DBY_database='$DBY_database', DBY_user='$DBY_user', DBY_pass='$DBY_pass', DBY_port='$DBY_port', outbound_cid='$outbound_cid', enable_sipsak_messages='$enable_sipsak_messages', email='$email', template_id='$template_id', conf_override='$conf_override',phone_context='$phone_context',phone_ring_timeout='$phone_ring_timeout',conf_secret='$conf_secret' where extension='$old_extension' and server_ip='$old_server_ip';"; + $rslt=mysql_query($stmt, $link); - $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';"; - $rslt=mysql_query($stmtA, $link); + $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$server_ip';"; + $rslt=mysql_query($stmtA, $link); - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONES', event_type='MODIFY', record_id='$extension', event_code='ADMIN MODIFY PHONE', event_sql=\"$SQL_log\", event_notes='Server IP: $server_ip';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONES', event_type='MODIFY', record_id='$extension', event_code='ADMIN MODIFY PHONE', event_sql=\"$SQL_log\", event_notes='Server IP: $server_ip';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=31111111111; # go to phone modification form below } -$ADD=31111111111; # go to phone modification form below -} ###################### @@ -12382,39 +12517,39 @@ $ADD=31111111111; # go to phone modification form below ###################### if ($ADD==42111111111) -{ + { if ($LOGast_admin_access==1) - { - echo ""; - - $stmt="SELECT count(*) from phones_alias where alias_id='$alias_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( (strlen($alias_id) < 1) or (strlen($alias_name) < 2) ) - {echo "
PHONE ALIAS NOT MODIFIED - Please go back and look at the data you entered\n";} - else { - echo "
PHONE ALIAS MODIFIED: $alias_id\n"; + echo ""; - $stmt="UPDATE phones_alias set alias_name='$alias_name', logins_list='$logins_list' where alias_id='$alias_id';"; + $stmt="SELECT count(*) from phones_alias where alias_id='$alias_id';"; $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ( (strlen($alias_id) < 1) or (strlen($alias_name) < 2) ) + {echo "
PHONE ALIAS NOT MODIFIED - Please go back and look at the data you entered\n";} + else + { + echo "
PHONE ALIAS MODIFIED: $alias_id\n"; - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONEALIASES', event_type='MODIFY', record_id='$alias_id', event_code='ADMIN MODIFY PHONE ALIAS', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + $stmt="UPDATE phones_alias set alias_name='$alias_name', logins_list='$logins_list' where alias_id='$alias_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='PHONEALIASES', event_type='MODIFY', record_id='$alias_id', event_code='ADMIN MODIFY PHONE ALIAS', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=32111111111; # go to phone alias modification form below } -$ADD=32111111111; # go to phone alias modification form below -} ###################### @@ -12422,39 +12557,39 @@ $ADD=32111111111; # go to phone alias modification form below ###################### if ($ADD==43111111111) -{ + { if ($LOGast_admin_access==1) - { - echo ""; - - $stmt="SELECT count(*) from groups_alias where group_alias_id='$group_alias_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( (strlen($group_alias_id) < 1) or (strlen($group_alias_name) < 2) ) - {echo "
GROUP ALIAS NOT MODIFIED - Please go back and look at the data you entered\n";} - else { - echo "
GROUP ALIAS MODIFIED: $alias_id\n"; + echo ""; - $stmt="UPDATE groups_alias set group_alias_name='$group_alias_name', caller_id_number='$caller_id_number', caller_id_name='$caller_id_name', active='$active' where group_alias_id='$group_alias_id';"; + $stmt="SELECT count(*) from groups_alias where group_alias_id='$group_alias_id';"; $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ( (strlen($group_alias_id) < 1) or (strlen($group_alias_name) < 2) ) + {echo "
GROUP ALIAS NOT MODIFIED - Please go back and look at the data you entered\n";} + else + { + echo "
GROUP ALIAS MODIFIED: $alias_id\n"; - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='GROUPALIASES', event_type='MODIFY', record_id='$group_alias_id', event_code='ADMIN MODIFY GROUP ALIAS', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + $stmt="UPDATE groups_alias set group_alias_name='$group_alias_name', caller_id_number='$caller_id_number', caller_id_name='$caller_id_name', active='$active' where group_alias_id='$group_alias_id';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='GROUPALIASES', event_type='MODIFY', record_id='$group_alias_id', event_code='ADMIN MODIFY GROUP ALIAS', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=33111111111; # go to group alias modification form below } -$ADD=33111111111; # go to group alias modification form below -} ###################### @@ -12481,9 +12616,9 @@ if ($ADD==411111111111) {echo "
SERVER NOT MODIFIED - there is already a server in the system with this server_ip\n";} else { - if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) + if ( (strlen($server_id) < 1) or (strlen($server_ip) < 7) ) {echo "
SERVER NOT MODIFIED - Please go back and look at the data you entered\n";} - else + else { $stmt="UPDATE servers set server_id='$server_id',server_description='$server_description',server_ip='$server_ip',active='$active',asterisk_version='$asterisk_version', max_vicidial_trunks='$max_vicidial_trunks', telnet_host='$telnet_host', telnet_port='$telnet_port', ASTmgrUSERNAME='$ASTmgrUSERNAME', ASTmgrSECRET='$ASTmgrSECRET', ASTmgrUSERNAMEupdate='$ASTmgrUSERNAMEupdate', ASTmgrUSERNAMElisten='$ASTmgrUSERNAMElisten', ASTmgrUSERNAMEsend='$ASTmgrUSERNAMEsend', local_gmt='$local_gmt', voicemail_dump_exten='$voicemail_dump_exten', answer_transfer_agent='$answer_transfer_agent', ext_context='$ext_context', sys_perf_log='$sys_perf_log', vd_server_logs='$vd_server_logs', agi_output='$agi_output', vicidial_balance_active='$vicidial_balance_active',balance_trunks_offlimits='$balance_trunks_offlimits',recording_web_link='$recording_web_link',alt_server_ip='$alt_server_ip',active_asterisk_server='$active_asterisk_server',generate_vicidial_conf='$generate_vicidial_conf',rebuild_conf_files='$rebuild_conf_files',outbound_calls_per_second='$outbound_calls_per_second',sounds_update='$sounds_update',vicidial_recording_limit='$vicidial_recording_limit',carrier_logging_active='$carrier_logging_active',vicidial_balance_rank='$vicidial_balance_rank',rebuild_music_on_hold='$rebuild_music_on_hold',active_agent_login_server='$active_agent_login_server' where server_id='$old_server_id';"; $rslt=mysql_query($stmt, $link); @@ -12538,14 +12673,14 @@ if ($ADD==421111111111) } else { - if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) + if ( (strlen($campaign_id) < 2) or (strlen($server_ip) < 7) or (strlen($dedicated_trunks) < 1) or (strlen($trunk_restriction) < 1) ) { echo "
VICIDIAL SERVER TRUNK RECORD NOT MODIFIED - Please go back and look at the data you entered\n"; echo "
campaign must be between 3 and 8 characters in length\n"; echo "
server_ip delay must be at least 7 characters\n"; echo "
trunks must be a digit from 0 to 9999\n"; } - else + else { $stmt="UPDATE vicidial_server_trunks SET dedicated_trunks='$dedicated_trunks',trunk_restriction='$trunk_restriction' where campaign_id='$campaign_id' and server_ip='$server_ip';"; $rslt=mysql_query($stmt, $link); @@ -12789,41 +12924,86 @@ if ($ADD==461111111111) } +###################### +# ADD=471111111111 modify voicemail record in the system +###################### + +if ($ADD==471111111111) + { + if ($LOGmodify_servers==1) + { + echo ""; + + if ( (strlen($voicemail_id) < 2) or (strlen($fullname) < 2) ) + {echo "
VOICEMAIL BOX NOT MODIFIED - Please go back and look at the data you entered\n";} + else + { + $stmt="UPDATE vicidial_voicemail set fullname='$fullname',active='$active',pass='$pass',email='$email' where voicemail_id='$voicemail_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="SELECT active_voicemail_server from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $active_voicemail_server = $row[0]; + + $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$active_voicemail_server';"; + $rslt=mysql_query($stmtA, $link); + + echo "
VOICEMAIL BOX MODIFIED: $voicemail_id\n"; + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='VOICEMAIL', event_type='MODIFY', record_id='$voicemail_id', event_code='ADMIN MODIFY VOICEMAIL', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=371111111111; # go to voicemail entry modification form below + } + + ###################### # ADD=4111111111111 modify conference record in the system ###################### if ($ADD==4111111111111) -{ - if ($LOGast_admin_access==1) { - echo ""; - - $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) - {echo "
CONFERENCE NOT MODIFIED - there is already a Conference in the system with this extension-server\n";} - else + if ($LOGast_admin_access==1) { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
CONFERENCE NOT MODIFIED - Please go back and look at the data you entered\n";} - else - { - echo "
CONFERENCE MODIFIED: $conf_exten\n"; + echo ""; - $stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); + $stmt="SELECT count(*) from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) + {echo "
CONFERENCE NOT MODIFIED - there is already a Conference in the system with this extension-server\n";} + else + { + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + {echo "
CONFERENCE NOT MODIFIED - Please go back and look at the data you entered\n";} + else + { + echo "
CONFERENCE MODIFIED: $conf_exten\n"; + + $stmt="UPDATE conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; + $rslt=mysql_query($stmt, $link); + } } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=3111111111111; # go to conference modification form below } -$ADD=3111111111111; # go to conference modification form below -} ###################### @@ -12831,38 +13011,37 @@ $ADD=3111111111111; # go to conference modification form below ###################### if ($ADD==41111111111111) -{ - if ($LOGast_admin_access==1) { - echo ""; - - $stmt="SELECT count(*) from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) - {echo "
VICIDIAL CONFERENCE NOT MODIFIED - there is already a Conference in the system with this extension-server\n";} - else + if ($LOGast_admin_access==1) { - if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) - {echo "
VICIDIAL CONFERENCE NOT MODIFIED - Please go back and look at the data you entered\n";} - else + echo ""; + + $stmt="SELECT count(*) from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + if ( ($row[0] > 0) && ( ($conf_exten != $old_conf_exten) or ($server_ip != $old_server_ip) ) ) + {echo "
VICIDIAL CONFERENCE NOT MODIFIED - there is already a Conference in the system with this extension-server\n";} + else { - echo "
VICIDIAL CONFERENCE MODIFIED: $conf_exten\n"; + if ( (strlen($conf_exten) < 1) or (strlen($server_ip) < 7) ) + {echo "
VICIDIAL CONFERENCE NOT MODIFIED - Please go back and look at the data you entered\n";} + else + { + echo "
VICIDIAL CONFERENCE MODIFIED: $conf_exten\n"; - $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; - $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_conferences set conf_exten='$conf_exten',server_ip='$server_ip',extension='$extension' where conf_exten='$old_conf_exten';"; + $rslt=mysql_query($stmt, $link); + } } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=31111111111111; # go to vicidial conference modification form below } -$ADD=31111111111111; # go to vicidial conference modification form below -} - ###################### @@ -12978,13 +13157,13 @@ if ($ADD==431111111111111) { echo ""; - if ( (strlen($vsc_id) < 2) or (preg_match("/^UNDEFINED$/i",$vsc_id)) ) + if ( (strlen($vsc_id) < 2) or (preg_match("/^UNDEFINED$/i",$vsc_id)) ) { echo "
STATUS CATEGORY NOT MODIFIED - Please go back and look at the data you entered\n"; echo "
the status category cannot be a reserved category: UNDEFINED\n"; echo "
the status category needs to be at least 2 characters in length\n"; } - else + else { if (ereg('delete',$stage)) { @@ -13041,67 +13220,67 @@ if ($ADD==431111111111111) ###################### if ($ADD==441111111111111) -{ + { if ( ($LOGmodify_servers==1) and ($SSqc_features_active > 0) ) - { - echo ""; - - if (ereg('delete',$stage)) { - if ( (strlen($code) < 1) or (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$code)) ) + echo ""; + + if (ereg('delete',$stage)) { - echo "
QC STATUS CODE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
the qc status code cannot be a reserved status: B,NA,DNC,NA,DROP,INCALL,QUEUE,NEW\n"; - echo "
the qc status code needs to be at least 1 characters in length\n"; + if ( (strlen($code) < 1) or (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$code)) ) + { + echo "
QC STATUS CODE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
the qc status code cannot be a reserved status: B,NA,DNC,NA,DROP,INCALL,QUEUE,NEW\n"; + echo "
the qc status code needs to be at least 1 characters in length\n"; + } + else + { + echo "
QC STATUS CODE DELETED: $code\n"; + + $stmt="DELETE FROM vicidial_qc_codes where code='$code';"; + $rslt=mysql_query($stmt, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='QCCODES', event_type='DELETE', record_id='$vsc_id', event_code='ADMIN DELETE QC CODES', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } - else + if (ereg('modify',$stage)) { - echo "
QC STATUS CODE DELETED: $code\n"; + if ( (strlen($code) < 1) or (strlen($code_name) < 2) ) + { + echo "
QC STATUS CODE NOT MODIFIED - Please go back and look at the data you entered\n"; + echo "
the qc status code needs to be at least 1 characters in length\n"; + echo "
the qc status code name needs to be at least 1 characters in length\n"; + } + else + { + echo "
QC STATUS CODE MODIFIED: $code\n"; - $stmt="DELETE FROM vicidial_qc_codes where code='$code';"; - $rslt=mysql_query($stmt, $link); + $stmt="UPDATE vicidial_qc_codes SET code_name='$code_name' where code='$code';"; + $rslt=mysql_query($stmt, $link); - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='QCCODES', event_type='DELETE', record_id='$vsc_id', event_code='ADMIN DELETE QC CODES', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='QCCODES', event_type='MODIFY', record_id='$vsc_id', event_code='ADMIN MODIFY QC CODES', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + } } } - if (ereg('modify',$stage)) - { - if ( (strlen($code) < 1) or (strlen($code_name) < 2) ) - { - echo "
QC STATUS CODE NOT MODIFIED - Please go back and look at the data you entered\n"; - echo "
the qc status code needs to be at least 1 characters in length\n"; - echo "
the qc status code name needs to be at least 1 characters in length\n"; - } - else - { - echo "
QC STATUS CODE MODIFIED: $code\n"; - - $stmt="UPDATE vicidial_qc_codes SET code_name='$code_name' where code='$code';"; - $rslt=mysql_query($stmt, $link); - - ### LOG INSERTION Admin Log Table ### - $SQL_log = "$stmt|"; - $SQL_log = ereg_replace(';','',$SQL_log); - $SQL_log = addslashes($SQL_log); - $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='QCCODES', event_type='MODIFY', record_id='$vsc_id', event_code='ADMIN MODIFY QC CODES', event_sql=\"$SQL_log\", event_notes='';"; - if ($DB) {echo "|$stmt|\n";} - $rslt=mysql_query($stmt, $link); - } - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + $ADD=341111111111111; # go to qc status code modification form below } -$ADD=341111111111111; # go to qc status code modification form below -} @@ -13121,12 +13300,12 @@ if ($ADD==5) { echo ""; - if ( (strlen($user) < 2) or ($LOGdelete_users < 1) ) + if ( (strlen($user) < 2) or ($LOGdelete_users < 1) ) { - echo "
USER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
User be at least 2 characters in length\n"; + echo "
USER NOT DELETED - Please go back and look at the data you entered\n"; + echo "
User be at least 2 characters in length\n"; } - else + else { echo "
USER DELETION CONFIRMATION: $user\n"; echo "

Click here to delete user $user


\n"; @@ -13143,12 +13322,12 @@ if ($ADD==51) { echo ""; - if ( (strlen($campaign_id) < 2) or ($LOGdelete_campaigns < 1) ) + if ( (strlen($campaign_id) < 2) or ($LOGdelete_campaigns < 1) ) { - echo "
CAMPAIGN NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Campaign_id be at least 2 characters in length\n"; + echo "
CAMPAIGN NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Campaign_id be at least 2 characters in length\n"; } - else + else { echo "
CAMPAIGN DELETION CONFIRMATION: $campaign_id\n"; echo "

Click here to delete campaign $campaign_id


\n"; @@ -13165,12 +13344,12 @@ if ($ADD==52) { echo ""; - if (strlen($campaign_id) < 2) + if (strlen($campaign_id) < 2) { - echo "
AGENTS NOT LOGGED OUT OF CAMPAIGN - Please go back and look at the data you entered\n"; - echo "
Campaign_id be at least 2 characters in length\n"; + echo "
AGENTS NOT LOGGED OUT OF CAMPAIGN - Please go back and look at the data you entered\n"; + echo "
Campaign_id be at least 2 characters in length\n"; } - else + else { echo "
AGENT LOGOUT CONFIRMATION: $campaign_id\n"; echo "

Click here to log all agents out of $campaign_id


\n"; @@ -13189,12 +13368,12 @@ if ($ADD==53) {$group_id=$campaign_id;} echo ""; - if (strlen($campaign_id) < 2) + if (strlen($campaign_id) < 2) { - echo "
VDAC NOT CLEARED FOR CAMPAIGN - Please go back and look at the data you entered\n"; - echo "
Campaign_id be at least 2 characters in length\n"; + echo "
VDAC NOT CLEARED FOR CAMPAIGN - Please go back and look at the data you entered\n"; + echo "
Campaign_id be at least 2 characters in length\n"; } - else + else { echo "
VDAC CLEAR CONFIRMATION: $campaign_id\n"; echo "

Click here to delete the oldest LIVE record in VDAC for $campaign_id


\n"; @@ -13215,12 +13394,12 @@ if ($ADD==511) { echo ""; - if ( (strlen($list_id) < 2) or ($LOGdelete_lists < 1) ) + if ( (strlen($list_id) < 2) or ($LOGdelete_lists < 1) ) { - echo "
LIST NOT DELETED - Please go back and look at the data you entered\n"; - echo "
List_id be at least 2 characters in length\n"; + echo "
LIST NOT DELETED - Please go back and look at the data you entered\n"; + echo "
List_id be at least 2 characters in length\n"; } - else + else { echo "
LIST DELETION CONFIRMATION: $list_id\n"; echo "

Click here to delete list and all of its leads $list_id


\n"; @@ -13237,12 +13416,12 @@ if ($ADD==5111) { echo ""; - if ( (strlen($group_id) < 2) or ($LOGdelete_ingroups < 1) ) + if ( (strlen($group_id) < 2) or ($LOGdelete_ingroups < 1) ) { - echo "
IN-GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Group_id be at least 2 characters in length\n"; + echo "
IN-GROUP NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Group_id be at least 2 characters in length\n"; } - else + else { echo "
IN-GROUP DELETION CONFIRMATION: $group_id\n"; echo "

Click here to delete in-group $group_id


\n"; @@ -13259,12 +13438,12 @@ if ($ADD==5311) { echo ""; - if ( (strlen($did_id) < 1) or ($LOGdelete_dids < 1) ) + if ( (strlen($did_id) < 1) or ($LOGdelete_dids < 1) ) { - echo "
DID NOT DELETED - Please go back and look at the data you entered\n"; - echo "
did_id be at least 1 characters in length\n"; + echo "
DID NOT DELETED - Please go back and look at the data you entered\n"; + echo "
did_id be at least 1 characters in length\n"; } - else + else { echo "
DID DELETION CONFIRMATION: $menu_id\n"; echo "

Click here to delete DID $did_id


\n"; @@ -13281,12 +13460,12 @@ if ($ADD==5511) { echo ""; - if ( (strlen($menu_id) < 2) or ($LOGdelete_dids < 1) ) + if ( (strlen($menu_id) < 2) or ($LOGdelete_dids < 1) ) { - echo "
CALL MENU NOT DELETED - Please go back and look at the data you entered\n"; - echo "
menu_id be at least 2 characters in length\n"; + echo "
CALL MENU NOT DELETED - Please go back and look at the data you entered\n"; + echo "
menu_id be at least 2 characters in length\n"; } - else + else { echo "
CALL MENU DELETION CONFIRMATION: $menu_id\n"; echo "

Click here to delete CALL MENU $menu_id


\n"; @@ -13303,12 +13482,12 @@ if ($ADD==51111) { echo ""; - if ( (strlen($remote_agent_id) < 1) or ($LOGdelete_remote_agents < 1) ) + if ( (strlen($remote_agent_id) < 1) or ($LOGdelete_remote_agents < 1) ) { - echo "
REMOTE AGENT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Remote_agent_id be at least 2 characters in length\n"; + echo "
REMOTE AGENT NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Remote_agent_id be at least 2 characters in length\n"; } - else + else { echo "
REMOTE AGENT DELETION CONFIRMATION: $remote_agent_id\n"; echo "

Click here to delete remote agent $remote_agent_id


\n"; @@ -13325,12 +13504,12 @@ if ($ADD==511111) { echo ""; - if ( (strlen($user_group) < 2) or ($LOGdelete_user_groups < 1) ) + if ( (strlen($user_group) < 2) or ($LOGdelete_user_groups < 1) ) { - echo "
USER GROUP NOT DELETED - Please go back and look at the data you entered\n"; - echo "
User_group be at least 2 characters in length\n"; + echo "
USER GROUP NOT DELETED - Please go back and look at the data you entered\n"; + echo "
User_group be at least 2 characters in length\n"; } - else + else { echo "
USER GROUP DELETION CONFIRMATION: $user_group\n"; echo "

Click here to delete user group $user_group


\n"; @@ -13347,12 +13526,12 @@ if ($ADD==5111111) { echo ""; - if ( (strlen($script_id) < 2) or ($LOGdelete_scripts < 1) ) + if ( (strlen($script_id) < 2) or ($LOGdelete_scripts < 1) ) { - echo "
SCRIPT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Script_id must be at least 2 characters in length\n"; + echo "
SCRIPT NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Script_id must be at least 2 characters in length\n"; } - else + else { echo "
SCRIPT DELETION CONFIRMATION: $script_id\n"; echo "

Click here to delete script $script_id


\n"; @@ -13369,12 +13548,12 @@ if ($ADD==51111111) { echo ""; - if ( (strlen($lead_filter_id) < 2) or ($LOGdelete_filters < 1) ) + if ( (strlen($lead_filter_id) < 2) or ($LOGdelete_filters < 1) ) { - echo "
FILTER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Filter ID must be at least 2 characters in length\n"; + echo "
FILTER NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Filter ID must be at least 2 characters in length\n"; } - else + else { echo "
FILTER DELETION CONFIRMATION: $lead_filter_id\n"; echo "

Click here to delete filter $lead_filter_id


\n"; @@ -13391,12 +13570,12 @@ if ($ADD==511111111) { echo ""; - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) + if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) { - echo "
CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Call Time ID must be at least 2 characters in length\n"; + echo "
CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Call Time ID must be at least 2 characters in length\n"; } - else + else { echo "
CALL TIME DELETION CONFIRMATION: $call_time_id\n"; echo "

Click here to delete call time $call_time_id


\n"; @@ -13413,12 +13592,12 @@ if ($ADD==5111111111) { echo ""; - if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) + if ( (strlen($call_time_id) < 2) or ($LOGdelete_call_times < 1) ) { - echo "
STATE CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Call Time ID must be at least 2 characters in length\n"; + echo "
STATE CALL TIME NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Call Time ID must be at least 2 characters in length\n"; } - else + else { echo "
STATE CALL TIME DELETION CONFIRMATION: $call_time_id\n"; echo "

Click here to delete state call time $call_time_id


\n"; @@ -13435,12 +13614,12 @@ if ($ADD==531111111) { echo ""; - if ( (strlen($shift_id) < 2) or ($LOGdelete_call_times < 1) ) + if ( (strlen($shift_id) < 2) or ($LOGdelete_call_times < 1) ) { - echo "
SHIFT NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Shift ID must be at least 2 characters in length\n"; + echo "
SHIFT NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Shift ID must be at least 2 characters in length\n"; } - else + else { echo "
SHIFT DELETION CONFIRMATION: $shift_id\n"; echo "

Click here to delete shift $shift_id


\n"; @@ -13457,13 +13636,13 @@ if ($ADD==51111111111) { echo ""; - if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + if ( (strlen($extension) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) { - echo "
PHONE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Extension be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; + echo "
PHONE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Extension be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; } - else + else { echo "
PHONE DELETION CONFIRMATION: $extension - $server_ip\n"; echo "

Click here to delete phone $extension - $server_ip


\n"; @@ -13480,12 +13659,12 @@ if ($ADD==52111111111) { echo ""; - if ( (strlen($alias_id) < 1) or ($LOGast_delete_phones < 1) ) + if ( (strlen($alias_id) < 1) or ($LOGast_delete_phones < 1) ) { - echo "
PHONE ALIAS NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Alias ID must be at least 2 characters in length\n"; + echo "
PHONE ALIAS NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Alias ID must be at least 2 characters in length\n"; } - else + else { echo "
PHONE ALIAS DELETION CONFIRMATION: $alias_id\n"; echo "

Click here to delete phone alias $alias_id


\n"; @@ -13502,12 +13681,12 @@ if ($ADD==53111111111) { echo ""; - if ( (strlen($group_alias_id) < 1) or ($LOGast_delete_phones < 1) ) + if ( (strlen($group_alias_id) < 1) or ($LOGast_delete_phones < 1) ) { - echo "
GROUP ALIAS NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Group Alias ID must be at least 2 characters in length\n"; + echo "
GROUP ALIAS NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Group Alias ID must be at least 2 characters in length\n"; } - else + else { echo "
GROUP ALIAS DELETION CONFIRMATION: $group_alias_id\n"; echo "

Click here to delete group alias $group_alias_id


\n"; @@ -13524,13 +13703,13 @@ if ($ADD==511111111111) { echo ""; - if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + if ( (strlen($server_id) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) { - echo "
SERVER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Server ID be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; + echo "
SERVER NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Server ID be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; } - else + else { echo "
SERVER DELETION CONFIRMATION: $server_id - $server_ip\n"; echo "

Click here to delete phone $server_id - $server_ip


\n"; @@ -13547,12 +13726,12 @@ if ($ADD==531111111111) { echo ""; - if (strlen($template_id) < 2) + if (strlen($template_id) < 2) { - echo "
CONF TEMPLATE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Template ID be at least 2 characters in length\n"; + echo "
CONF TEMPLATE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Template ID be at least 2 characters in length\n"; } - else + else { echo "
CONF TEMPLATE DELETION CONFIRMATION: $template_id - $template_name\n"; echo "

Click here to delete conf template $template_id - $template_name


\n"; @@ -13569,12 +13748,12 @@ if ($ADD==541111111111) { echo ""; - if (strlen($carrier_id) < 2) + if (strlen($carrier_id) < 2) { - echo "
CARRIER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Carrier ID be at least 2 characters in length\n"; + echo "
CARRIER NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Carrier ID be at least 2 characters in length\n"; } - else + else { echo "
CARRIER DELETION CONFIRMATION: $carrier_id - $carrier_name\n"; echo "

Click here to delete carrier $carrier_id - $carrier_name


\n"; @@ -13591,12 +13770,12 @@ if ($ADD==551111111111) { echo ""; - if (strlen($tts_id) < 2) + if (strlen($tts_id) < 2) { - echo "
TTS ENTRY NOT DELETED - Please go back and look at the data you entered\n"; - echo "
TTS ID be at least 2 characters in length\n"; + echo "
TTS ENTRY NOT DELETED - Please go back and look at the data you entered\n"; + echo "
TTS ID be at least 2 characters in length\n"; } - else + else { echo "
TTS ENTRY DELETION CONFIRMATION: $tts_id - $tts_name\n"; echo "

Click here to delete tts entry $tts_id - $tts_name


\n"; @@ -13613,12 +13792,12 @@ if ($ADD==561111111111) { echo ""; - if (strlen($moh_id) < 2) + if (strlen($moh_id) < 2) { - echo "
MUSIC ON HOLD ENTRY NOT DELETED - Please go back and look at the data you entered\n"; - echo "
MOH ID be at least 2 characters in length\n"; + echo "
MUSIC ON HOLD ENTRY NOT DELETED - Please go back and look at the data you entered\n"; + echo "
MOH ID be at least 2 characters in length\n"; } - else + else { echo "
MUSIC ON HOLD ENTRY DELETION CONFIRMATION: $moh_id - $moh_name\n"; echo "

Click here to delete music on hold entry $moh_id - $moh_name


\n"; @@ -13627,6 +13806,28 @@ if ($ADD==561111111111) } +###################### +# ADD=571111111111 confirmation before deletion of voicemail record +###################### + +if ($ADD==571111111111) + { + echo ""; + + if (strlen($voicemail_id) < 2) + { + echo "
VOICEMAIL BOX NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Voicemail ID be at least 2 characters in length\n"; + } + else + { + echo "
VOICEMAIL BOX DELETION CONFIRMATION: $voicemail_id - $fullname\n"; + echo "

Click here to delete voicemail box $voicemail_id - $fullname


\n"; + } + $ADD='371111111111'; # go to voicemail entry modification below + } + + ###################### # ADD=5111111111111 confirmation before deletion of conference record ###################### @@ -13635,13 +13836,13 @@ if ($ADD==5111111111111) { echo ""; - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) { - echo "
CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; + echo "
CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; } - else + else { echo "
CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; echo "

Click here to delete phone $conf_exten - $server_ip


\n"; @@ -13658,13 +13859,13 @@ if ($ADD==51111111111111) { echo ""; - if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) + if ( (strlen($conf_exten) < 2) or (strlen($server_ip) < 7) or ($LOGast_delete_phones < 1) ) { - echo "
VICIDIAL CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Conference must be at least 2 characters in length\n"; - echo "
Server IP be at least 7 characters in length\n"; + echo "
VICIDIAL CONFERENCE NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Conference must be at least 2 characters in length\n"; + echo "
Server IP be at least 7 characters in length\n"; } - else + else { echo "
VICIDIAL CONFERENCE DELETION CONFIRMATION: $conf_exten - $server_ip\n"; echo "

Click here to delete phone $conf_exten - $server_ip


\n"; @@ -13691,8 +13892,8 @@ if ($ADD==6) if ( ( strlen($user) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_users < 1) ) { - echo "
USER NOT DELETED - Please go back and look at the data you entered\n"; - echo "
User be at least 2 characters in length\n"; + echo "
USER NOT DELETED - Please go back and look at the data you entered\n"; + echo "
User be at least 2 characters in length\n"; } else { @@ -13730,8 +13931,8 @@ if ($ADD==61) if ( ( strlen($campaign_id) < 2) or ($CoNfIrM != 'YES') or ($LOGdelete_campaigns < 1) ) { - echo "
CAMPAIGN NOT DELETED - Please go back and look at the data you entered\n"; - echo "
Campaign_id be at least 2 characters in length\n"; + echo "
CAMPAIGN NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Campaign_id be at least 2 characters in length\n"; } else { @@ -13790,6 +13991,7 @@ if ($ADD==61) $ADD='10'; # go to campaigns list } + ###################### # ADD=62 Logout all agents from a campaign ###################### @@ -13937,12 +14139,12 @@ if ($ADD==66) {echo "
AUTO ALT DIAL STATUS NOT DELETED - this auto alt dial status is not in this campaign\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) { echo "
AUTO ALT DIAL STATUS NOT DELETED - Please go back and look at the data you entered\n"; echo "
status must be between 1 and 6 characters in length\n"; } - else + else { echo "
AUTO ALT DIAL STATUS DELETED: $campaign_id - $status\n"; @@ -13973,6 +14175,7 @@ if ($ADD==66) $ADD=31; # go to campaign modification form below } + ###################### # ADD=67 delete agent pause code in the system ###################### @@ -13983,12 +14186,12 @@ if ($ADD==67) { echo ""; - if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) ) + if ( (strlen($campaign_id) < 2) or (strlen($pause_code) < 1) ) { echo "
CAMPAIGN PAUSE CODE NOT DELETED - Please go back and look at the data you entered\n"; echo "
pause code must be between 1 and 6 characters in length\n"; } - else + else { echo "
CAMPAIGN PAUSE CODE DELETED: $campaign_id - $pause_code\n"; @@ -14030,12 +14233,12 @@ if ($ADD==68) {echo "
CAMPAIGN DIAL STATUS NOT REMOVED - this dial status is not selected for this campaign\n";} else { - if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) + if ( (strlen($campaign_id) < 2) or (strlen($status) < 1) ) { echo "
CAMPAIGN DIAL STATUS NOT REMOVED - Please go back and look at the data you entered\n"; echo "
status must be between 1 and 6 characters in length\n"; } - else + else { echo "
CAMPAIGN DIAL STATUS REMOVED: $campaign_id - $status\n"; @@ -14149,6 +14352,7 @@ if ($ADD==6111) $ADD='1000'; # go to in-group list } + ###################### # ADD=6311 delete did record ###################### @@ -14808,6 +15012,47 @@ if ($ADD==661111111111) } +###################### +# ADD=671111111111 delete voicemail record +###################### + +if ($ADD==671111111111) + { + echo ""; + + if ( (strlen($voicemail_id) < 2) or ($CoNfIrM != 'YES') ) + { + echo "
VOICEMAIL BOX NOT DELETED - Please go back and look at the data you entered\n"; + echo "
Voicemail ID be at least 2 characters in length\n"; + } + else + { + $stmt="DELETE from vicidial_voicemail where voicemail_id='$voicemail_id';"; + $rslt=mysql_query($stmt, $link); + + $stmt="SELECT active_voicemail_server from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $active_voicemail_server = $row[0]; + + $stmtA="UPDATE servers SET rebuild_conf_files='Y' where generate_vicidial_conf='Y' and active_asterisk_server='Y' and server_ip='$active_voicemail_server';"; + $rslt=mysql_query($stmtA, $link); + + ### LOG INSERTION Admin Log Table ### + $SQL_log = "$stmt|"; + $SQL_log = ereg_replace(';','',$SQL_log); + $SQL_log = addslashes($SQL_log); + $stmt="INSERT INTO vicidial_admin_log set event_date='$SQLdate', user='$PHP_AUTH_USER', ip_address='$ip', event_section='VOICEMAIL', event_type='DELETE', record_id='$voicemail_id', event_code='ADMIN DELETE VOICEMAIL', event_sql=\"$SQL_log\", event_notes='';"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + + echo "
VOICEMAIL BOX DELETION COMPLETED: $voicemail_id\n"; + echo "

\n"; + } + $ADD='170000000000'; # go to voicemail entry list + } + + ###################### # ADD=6111111111111 delete conference record ###################### @@ -14893,257 +15138,260 @@ if ($ADD==61111111111111) ###################### if ($ADD==3) -{ - if ($LOGmodify_users==1) { - echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_users where user='$user';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_level = $row[4]; - $user_group = $row[5]; - $phone_login = $row[6]; - $phone_pass = $row[7]; - $delete_users = $row[8]; - $delete_user_groups = $row[9]; - $delete_lists = $row[10]; - $delete_campaigns = $row[11]; - $delete_ingroups = $row[12]; - $delete_remote_agents = $row[13]; - $load_leads = $row[14]; - $campaign_detail = $row[15]; - $ast_admin_access = $row[16]; - $ast_delete_phones = $row[17]; - $delete_scripts = $row[18]; - $modify_leads = $row[19]; - $hotkeys_active = $row[20]; - $change_agent_campaign =$row[21]; - $agent_choose_ingroups =$row[22]; - $scheduled_callbacks = $row[24]; - $agentonly_callbacks = $row[25]; - $agentcall_manual = $row[26]; - $vicidial_recording = $row[27]; - $vicidial_transfers = $row[28]; - $delete_filters = $row[29]; - $alter_agent_interface_options =$row[30]; - $closer_default_blended = $row[31]; - $delete_call_times = $row[32]; - $modify_call_times = $row[33]; - $modify_users = $row[34]; - $modify_campaigns = $row[35]; - $modify_lists = $row[36]; - $modify_scripts = $row[37]; - $modify_filters = $row[38]; - $modify_ingroups = $row[39]; - $modify_usergroups = $row[40]; - $modify_remoteagents = $row[41]; - $modify_servers = $row[42]; - $view_reports = $row[43]; - $vicidial_recording_override = $row[44]; - $alter_custdata_override = $row[45]; - $qc_enabled = $row[46]; - $qc_user_level = $row[47]; - $qc_pass = $row[48]; - $qc_finish = $row[49]; - $qc_commit = $row[50]; - $add_timeclock_log = $row[51]; - $modify_timeclock_log = $row[52]; - $delete_timeclock_log = $row[53]; - $alter_custphone_override = $row[54]; - $vdc_agent_api_access = $row[55]; - $modify_inbound_dids = $row[56]; - $delete_inbound_dids = $row[57]; - $active = $row[58]; - $alert_enabled = $row[59]; - $download_lists = $row[60]; - $agent_shift_enforcement_override = $row[61]; - $manager_shift_enforcement_override = $row[62]; - $export_reports = $row[64]; - $delete_from_dnc = $row[65]; - $email = $row[66]; - $user_code = $row[67]; - $territory = $row[68]; - $allow_alerts = $row[69]; - - if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) + if ($LOGmodify_users==1) { - echo "
You do not have permissions to modify this user: $row[1]\n"; - } - else - { - echo "
MODIFY A USERS RECORD: $row[1]\n"; - if ($LOGuser_level > 8) - {echo "\n";} + echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; - $o++; + if ($dispo == 'CBHOLD') + { + $CLB=""; + $CLE=""; + } + else + { + $CLB=''; + $CLE=''; + } + + echo "\n"; + $o++; + } } - } echo "\n"; echo "\n"; @@ -18069,47 +18317,47 @@ if ($ADD==311) $lead_list['Y_count'] = 0; $lead_list['N_count'] = 0; while ($statuses_to_print > $o) - { + { $rowx=mysql_fetch_row($rslt); $lead_list['count'] = ($lead_list['count'] + $rowx[2]); if ($rowx[1] == 'N') - { - $since_reset = 'N'; - $since_resetX = 'Y'; - } + { + $since_reset = 'N'; + $since_resetX = 'Y'; + } else - { - $since_reset = 'Y'; - $since_resetX = 'N'; - } + { + $since_reset = 'Y'; + $since_resetX = 'N'; + } $lead_list[$since_reset][$rowx[0]] = ($lead_list[$since_reset][$rowx[0]] + $rowx[2]); $lead_list[$since_reset.'_count'] = ($lead_list[$since_reset.'_count'] + $rowx[2]); #If opposite side is not set, it may not in the future so give it a value of zero if (!isset($lead_list[$since_resetX][$rowx[0]])) - { - $lead_list[$since_resetX][$rowx[0]]=0; - } + { + $lead_list[$since_resetX][$rowx[0]]=0; + } $o++; - } + } if ($lead_list['count'] > 0) - { - while (list($tzone,) = each($lead_list[$since_reset])) { - $LOCALzone=3600 * $tzone; - $LOCALdate=gmdate("D M Y H:i", time() + $LOCALzone); + while (list($tzone,) = each($lead_list[$since_reset])) + { + $LOCALzone=3600 * $tzone; + $LOCALdate=gmdate("D M Y H:i", time() + $LOCALzone); - if ($tzone >= 0) {$DISPtzone = "$plus$tzone";} - else {$DISPtzone = "$tzone";} - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} + if ($tzone >= 0) {$DISPtzone = "$plus$tzone";} + else {$DISPtzone = "$tzone";} + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; + echo "\n"; + } } - } echo "\n"; echo "\n"; @@ -18118,9 +18366,6 @@ if ($ADD==311) unset($lead_list); - - - echo "
\n"; echo "
OWNERS WITHIN THIS LIST:
\n"; echo "
\n"; + echo ""; + + $stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts from vicidial_users where user='$user';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $user_id = $row[0]; + $user = $row[1]; + $pass = $row[2]; + $full_name = $row[3]; + $user_level = $row[4]; + $user_group = $row[5]; + $phone_login = $row[6]; + $phone_pass = $row[7]; + $delete_users = $row[8]; + $delete_user_groups = $row[9]; + $delete_lists = $row[10]; + $delete_campaigns = $row[11]; + $delete_ingroups = $row[12]; + $delete_remote_agents = $row[13]; + $load_leads = $row[14]; + $campaign_detail = $row[15]; + $ast_admin_access = $row[16]; + $ast_delete_phones = $row[17]; + $delete_scripts = $row[18]; + $modify_leads = $row[19]; + $hotkeys_active = $row[20]; + $change_agent_campaign =$row[21]; + $agent_choose_ingroups =$row[22]; + $scheduled_callbacks = $row[24]; + $agentonly_callbacks = $row[25]; + $agentcall_manual = $row[26]; + $vicidial_recording = $row[27]; + $vicidial_transfers = $row[28]; + $delete_filters = $row[29]; + $alter_agent_interface_options =$row[30]; + $closer_default_blended = $row[31]; + $delete_call_times = $row[32]; + $modify_call_times = $row[33]; + $modify_users = $row[34]; + $modify_campaigns = $row[35]; + $modify_lists = $row[36]; + $modify_scripts = $row[37]; + $modify_filters = $row[38]; + $modify_ingroups = $row[39]; + $modify_usergroups = $row[40]; + $modify_remoteagents = $row[41]; + $modify_servers = $row[42]; + $view_reports = $row[43]; + $vicidial_recording_override = $row[44]; + $alter_custdata_override = $row[45]; + $qc_enabled = $row[46]; + $qc_user_level = $row[47]; + $qc_pass = $row[48]; + $qc_finish = $row[49]; + $qc_commit = $row[50]; + $add_timeclock_log = $row[51]; + $modify_timeclock_log = $row[52]; + $delete_timeclock_log = $row[53]; + $alter_custphone_override = $row[54]; + $vdc_agent_api_access = $row[55]; + $modify_inbound_dids = $row[56]; + $delete_inbound_dids = $row[57]; + $active = $row[58]; + $alert_enabled = $row[59]; + $download_lists = $row[60]; + $agent_shift_enforcement_override = $row[61]; + $manager_shift_enforcement_override = $row[62]; + $export_reports = $row[64]; + $delete_from_dnc = $row[65]; + $email = $row[66]; + $user_code = $row[67]; + $territory = $row[68]; + $allow_alerts = $row[69]; + + if ( ($user_level >= $LOGuser_level) and ($LOGuser_level < 9) ) + { + echo "
You do not have permissions to modify this user: $user\n"; + } else { - if ($LOGalter_agent_interface == "1") - {echo "\n";} + echo "
MODIFY A USERS RECORD: $user\n"; + if ($LOGuser_level > 8) + {echo "\n";} else - {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 "
User Number: $row[1]$NWB#vicidial_users-user$NWE
Password: $NWB#vicidial_users-pass$NWE
Full Name: $NWB#vicidial_users-full_name$NWE
User Level: $NWB#vicidial_users-user_level$NWE
User Group: \n";} + else + {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"; - - if ( ($LOGuser_level > 8) or ($LOGalter_agent_interface == "1") ) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - if ($SSoutbound_autodial_active > 0) - { - echo "\n"; } - echo "\n"; - echo "\n"; - echo "\n"; + echo "$Ugroups_list"; + echo "\n"; + echo "$NWB#vicidial_users-user_group$NWE\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - echo "\n"; - if ($SSqc_features_active > 0) + if ( ($LOGuser_level > 8) or ($LOGalter_agent_interface == "1") ) { - 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"; + if ($SSoutbound_autodial_active > 0) + { + echo "\n"; + } + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "\n"; + if ($SSqc_features_active > 0) + { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } } - } - if ($LOGuser_level > 8) - { - echo "\n"; - -#9BB9FB -#B9CBFD - 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 "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - - if ($SSoutbound_autodial_active > 0) + if ($LOGuser_level > 8) { - echo "\n"; - echo "\n"; + echo "\n"; + + #9BB9FB + #B9CBFD + 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 "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + echo "\n"; + echo "\n"; + + if ($SSoutbound_autodial_active > 0) + { + 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 "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "
User Number: $user$NWB#vicidial_users-user$NWE
Password: $NWB#vicidial_users-pass$NWE
Full Name: $NWB#vicidial_users-full_name$NWE
User Level: $NWB#vicidial_users-user_level$NWE
User Group: $NWB#vicidial_users-user_group$NWE
Phone Login: $NWB#vicidial_users-phone_login$NWE
Phone Pass: $NWB#vicidial_users-phone_pass$NWE
Active: $NWB#vicidial_users-active$NWE
Email: $NWB#vicidial_users-optional$NWE
User Code: $NWB#vicidial_users-optional$NWE
Territory: $NWB#vicidial_users-optional$NWE
AGENT INTERFACE OPTIONS:
Agent Choose Ingroups: $NWB#vicidial_users-agent_choose_ingroups$NWE
Hot Keys Active: $NWB#vicidial_users-hotkeys_active$NWE
Scheduled Callbacks: $NWB#vicidial_users-scheduled_callbacks$NWE
Agent-Only Callbacks: $NWB#vicidial_users-agentonly_callbacks$NWE
Agent Call Manual: $NWB#vicidial_users-agentcall_manual$NWE
Vicidial Recording: $NWB#vicidial_users-vicidial_recording$NWE
Vicidial Transfers: $NWB#vicidial_users-vicidial_transfers$NWE
Closer Default Blended: $NWB#vicidial_users-closer_default_blended$NWE
VICIDIAL Recording Override: $NWB#vicidial_users-vicidial_recording_override$NWE
Agent Alter Customer Data Override: $NWB#vicidial_users-alter_custdata_override$NWE
Agent Alter Customer Phone Override: $NWB#vicidial_users-alter_custphone_override$NWE
Phone Login: $NWB#vicidial_users-phone_login$NWE
Phone Pass: $NWB#vicidial_users-phone_pass$NWE
Active: $NWB#vicidial_users-active$NWE
Email: $NWB#vicidial_users-optional$NWE
User Code: $NWB#vicidial_users-optional$NWE
Territory: $NWB#vicidial_users-optional$NWE
Agent Shift Enforcement Override: $NWB#vicidial_users-agent_shift_enforcement_override$NWE
Alert Enabled: $alert_enabled $NWB#vicidial_users-alert_enabled$NWE
Allow Alerts: $NWB#vicidial_users-allow_alerts$NWE
Campaign Ranks: $NWB#vicidial_users-campaign_ranks$NWE
\n"; - echo "\n"; - echo "$RANKcampaigns_list"; - echo "
\n"; - echo "
Inbound Groups: $NWB#vicidial_users-closer_campaigns$NWE
\n"; - echo "\n"; - echo "$RANKgroups_list"; - echo "
\n"; - echo "
QC Enabled: $NWB#vicidial_users-qc_enabled$NWE
QC User Level: $NWB#vicidial_users-qc_user_level$NWE
QC Pass: $NWB#vicidial_users-qc_pass$NWE
QC Finish: $NWB#vicidial_users-qc_finish$NWE
QC Commit: $NWB#vicidial_users-qc_commit$NWE
AGENT INTERFACE OPTIONS:
Agent Choose Ingroups: $NWB#vicidial_users-agent_choose_ingroups$NWE
Hot Keys Active: $NWB#vicidial_users-hotkeys_active$NWE
Scheduled Callbacks: $NWB#vicidial_users-scheduled_callbacks$NWE
Agent-Only Callbacks: $NWB#vicidial_users-agentonly_callbacks$NWE
Agent Call Manual: $NWB#vicidial_users-agentcall_manual$NWE
Vicidial Recording: $NWB#vicidial_users-vicidial_recording$NWE
Vicidial Transfers: $NWB#vicidial_users-vicidial_transfers$NWE
Closer Default Blended: $NWB#vicidial_users-closer_default_blended$NWE
VICIDIAL Recording Override: $NWB#vicidial_users-vicidial_recording_override$NWE
Agent Alter Customer Data Override: $NWB#vicidial_users-alter_custdata_override$NWE
Agent Alter Customer Phone Override: $NWB#vicidial_users-alter_custphone_override$NWE
Agent Shift Enforcement Override: $NWB#vicidial_users-agent_shift_enforcement_override$NWE
Alert Enabled: $alert_enabled $NWB#vicidial_users-alert_enabled$NWE
Allow Alerts: $NWB#vicidial_users-allow_alerts$NWE
Campaign Ranks: $NWB#vicidial_users-campaign_ranks$NWE
\n"; + echo "\n"; + echo "$RANKcampaigns_list"; + echo "
\n"; + echo "
Inbound Groups: $NWB#vicidial_users-closer_campaigns$NWE
\n"; + echo "\n"; + echo "$RANKgroups_list"; + echo "
\n"; + echo "
QC Enabled: $NWB#vicidial_users-qc_enabled$NWE
QC User Level: $NWB#vicidial_users-qc_user_level$NWE
QC Pass: $NWB#vicidial_users-qc_pass$NWE
QC Finish: $NWB#vicidial_users-qc_finish$NWE
QC Commit: $NWB#vicidial_users-qc_commit$NWE
ADMIN INTERFACE OPTIONS:
View Reports: $NWB#vicidial_users-view_reports$NWE
Alter Agent Interface Options: $NWB#vicidial_users-alter_agent_interface_options$NWE
Modify Users: $NWB#vicidial_users-modify_sections$NWE
Change Agent Campaign: $NWB#vicidial_users-change_agent_campaign$NWE
Delete Users: $NWB#vicidial_users-delete_users$NWE
Modify User Groups: $NWB#vicidial_users-modify_sections$NWE
Delete User Groups: $NWB#vicidial_users-delete_user_groups$NWE
Modify Lists: $NWB#vicidial_users-modify_sections$NWE
Delete Lists: $NWB#vicidial_users-delete_lists$NWE
Load Leads: $NWB#vicidial_users-load_leads$NWE
Modify Leads: $NWB#vicidial_users-modify_leads$NWE
Download Lists: $NWB#vicidial_users-modify_leads$NWE
Export Reports: $NWB#vicidial_users-export_reports$NWE
Delete From DNC Lists: $NWB#vicidial_users-delete_from_dnc$NWE
Modify Campaigns: $NWB#vicidial_users-modify_sections$NWE
Campaign Detail: $NWB#vicidial_users-campaign_detail$NWE
Delete Campaigns: $NWB#vicidial_users-delete_campaigns$NWE
Modify In-Groups: $NWB#vicidial_users-modify_sections$NWE
Delete In-Groups: $NWB#vicidial_users-delete_ingroups$NWE
Modify DIDs: $NWB#vicidial_users-modify_sections$NWE
Delete DIDs: $NWB#vicidial_users-delete_ingroups$NWE
Modify Remote Agents: $NWB#vicidial_users-modify_sections$NWE
Delete Remote Agents: $NWB#vicidial_users-delete_remote_agents$NWE
Modify Scripts: $NWB#vicidial_users-modify_sections$NWE
Delete Scripts: $NWB#vicidial_users-delete_scripts$NWE
Modify Filters: $NWB#vicidial_users-modify_sections$NWE
Delete Filters: $NWB#vicidial_users-delete_filters$NWE
ADMIN INTERFACE OPTIONS:
View Reports: $NWB#vicidial_users-view_reports$NWE
Alter Agent Interface Options: $NWB#vicidial_users-alter_agent_interface_options$NWE
Modify Users: $NWB#vicidial_users-modify_sections$NWE
Change Agent Campaign: $NWB#vicidial_users-change_agent_campaign$NWE
Delete Users: $NWB#vicidial_users-delete_users$NWE
Modify User Groups: $NWB#vicidial_users-modify_sections$NWE
Delete User Groups: $NWB#vicidial_users-delete_user_groups$NWE
Modify Lists: $NWB#vicidial_users-modify_sections$NWE
Delete Lists: $NWB#vicidial_users-delete_lists$NWE
Load Leads: $NWB#vicidial_users-load_leads$NWE
Modify Leads: $NWB#vicidial_users-modify_leads$NWE
Download Lists: $NWB#vicidial_users-modify_leads$NWE
Export Reports: $NWB#vicidial_users-export_reports$NWE
Delete From DNC Lists: $NWB#vicidial_users-delete_from_dnc$NWE
Modify Campaigns: $NWB#vicidial_users-modify_sections$NWE
Campaign Detail: $NWB#vicidial_users-campaign_detail$NWE
Delete Campaigns: $NWB#vicidial_users-delete_campaigns$NWE
Modify In-Groups: $NWB#vicidial_users-modify_sections$NWE
Delete In-Groups: $NWB#vicidial_users-delete_ingroups$NWE
Modify DIDs: $NWB#vicidial_users-modify_sections$NWE
Delete DIDs: $NWB#vicidial_users-delete_ingroups$NWE
Modify Remote Agents: $NWB#vicidial_users-modify_sections$NWE
Delete Remote Agents: $NWB#vicidial_users-delete_remote_agents$NWE
Modify Scripts: $NWB#vicidial_users-modify_sections$NWE
Delete Scripts: $NWB#vicidial_users-delete_scripts$NWE
Modify Filters: $NWB#vicidial_users-modify_sections$NWE
Delete Filters: $NWB#vicidial_users-delete_filters$NWE
AGC Admin Access: $NWB#vicidial_users-ast_admin_access$NWE
AGC Delete Phones: $NWB#vicidial_users-ast_delete_phones$NWE
Modify Call Times: $NWB#vicidial_users-modify_call_times$NWE
Delete Call Times: $NWB#vicidial_users-delete_call_times$NWE
Modify Servers: $NWB#vicidial_users-modify_sections$NWE
Agent API Access: $NWB#vicidial_users-vdc_agent_api_access$NWE
Add Timeclock Log Record: $NWB#vicidial_users-add_timeclock_log$NWE
Modify Timeclock Log Record: $NWB#vicidial_users-modify_timeclock_log$NWE
Delete Timeclock Log Record: $NWB#vicidial_users-delete_timeclock_log$NWE
Manager Shift Enforcement Override: $NWB#vicidial_users-manager_shift_enforcement_override$NWE
AGC Admin Access: $NWB#vicidial_users-ast_admin_access$NWE
AGC Delete Phones: $NWB#vicidial_users-ast_delete_phones$NWE
Modify Call Times: $NWB#vicidial_users-modify_call_times$NWE
Delete Call Times: $NWB#vicidial_users-delete_call_times$NWE
Modify Servers: $NWB#vicidial_users-modify_sections$NWE
Agent API Access: $NWB#vicidial_users-vdc_agent_api_access$NWE
\n"; - echo "
Add Timeclock Log Record: $NWB#vicidial_users-add_timeclock_log$NWE
Modify Timeclock Log Record: $NWB#vicidial_users-modify_timeclock_log$NWE
Delete Timeclock Log Record: $NWB#vicidial_users-delete_timeclock_log$NWE
Manager Shift Enforcement Override: $NWB#vicidial_users-manager_shift_enforcement_override$NWE
\n"; - - if ($LOGdelete_users > 0) - { - echo "

DELETE THIS USER\n"; - } - echo "

Click here for user time sheet\n"; - echo "

Click here for user status\n"; - echo "

Click here for user stats\n"; - echo "

Click here for user multiple day status detail report\n"; - echo "

Click here for user CallBack Holds\n"; - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this record
\n"; + if ($LOGdelete_users > 0) + { + echo "

DELETE THIS USER\n"; + } + echo "

Click here for user time sheet\n"; + echo "

Click here for user status\n"; + echo "

Click here for user stats\n"; + echo "

Click here for user multiple day status detail report\n"; + echo "

Click here for user CallBack Holds\n"; + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this record\n"; + } } } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -15156,19 +15404,19 @@ if ( ($ADD==31) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list if ($ADD==31) -{ - if ($LOGmodify_campaigns==1) { - if ($stage=='show_dialable') + if ($LOGmodify_campaigns==1) { + if ($stage=='show_dialable') + { $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); - } + } if ($stage=='hide_dialable') - { + { $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); - } + } $stmt="SELECT enable_vtiger_integration,vtiger_url from system_settings;"; $rslt=mysql_query($stmt, $link); @@ -15350,14 +15598,13 @@ if ($ADD==31) $QCL_to_print = (count($QClists) -0); ##### get status listings for dynamic pulldown - $stmt="SELECT * from vicidial_statuses order by status"; + $stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses order by status"; $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; $dial_statuses_list=''; $qc_statuses_list=''; $survey_ni_status_list=''; - $o=0; while ($statuses_to_print > $o) { @@ -15395,7 +15642,7 @@ if ($ADD==31) $o++; } - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; + $stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; $rslt=mysql_query($stmt, $link); $Cstatuses_to_print = mysql_num_rows($rslt); @@ -15947,7 +16194,7 @@ if ($ADD==31) echo "
Safe Harbor Exten: $NWB#vicidial_campaigns-safe_harbor_exten$NWE
Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
Voicemail: voicemail chooser$NWB#vicidial_campaigns-voicemail_ext$NWE
Drop Transfer Group: \n"; echo "\n"; - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id'"; + $stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_campaign_statuses where campaign_id='$campaign_id'"; $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $o=0; @@ -16309,13 +16556,14 @@ if ($ADD==31) echo "
STATUSDESCRIPTIONSELECTABLEHUMAN ANSWERCATEGORYMODIFY-DELETE
\n"; echo "\n"; - $stmt="SELECT * from vicidial_campaign_hotkeys where campaign_id='$campaign_id' order by hotkey"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; + $stmt="SELECT status,hotkey,status_name,selectable,campaign_id from vicidial_campaign_hotkeys where campaign_id='$campaign_id' order by hotkey"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $o++; if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16369,7 +16617,7 @@ if ($ADD==31) } $camp_lists = eregi_replace(".$","",$camp_lists); - $stmt="SELECT * from vicidial_lead_recycle where campaign_id='$campaign_id' order by status"; + $stmt="SELECT recycle_id,campaign_id,status,attempt_delay,attempt_maximum,active from vicidial_lead_recycle where campaign_id='$campaign_id' order by status"; $rslt=mysql_query($stmt, $link); $recycle_to_print = mysql_num_rows($rslt); $o=0; @@ -16495,13 +16743,14 @@ if ($ADD==31) echo "
HOT KEYSTATUSDESCRIPTIONDELETE
\n"; echo "\n"; - $stmt="SELECT * from vicidial_pause_codes where campaign_id='$campaign_id' order by pause_code"; - $rslt=mysql_query($stmt, $link); - $pause_codes_to_print = mysql_num_rows($rslt); - $o=0; - while ($pause_codes_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $o++; + $stmt="SELECT pause_code,pause_code_name,billable,campaign_id from vicidial_pause_codes where campaign_id='$campaign_id' order by pause_code"; + $rslt=mysql_query($stmt, $link); + $pause_codes_to_print = mysql_num_rows($rslt); + $o=0; + while ($pause_codes_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $o++; if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -16643,7 +16892,7 @@ if ($ADD==31) echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "
PAUSE CODESBILLABLEMODIFYDELETE
Survey Response Digit Map: $NWB#vicidial_campaigns-survey_response_digit_map$NWE
Survey Survey Xfer Extension: $NWB#vicidial_campaigns-survey_xfer_exten$NWE
Survey Campaign Recording Directory: $NWB#vicidial_campaigns-survey_camp_record_dir$NWE
Voicemail: $NWB#vicidial_campaigns-voicemail_ext$NWE
Voicemail: voicemail chooser $NWB#vicidial_campaigns-voicemail_ext$NWE
\n"; @@ -16679,21 +16928,21 @@ if ( ($ADD==34) and ( (!eregi("$campaign_id",$LOGallowed_campaigns)) and (!eregi {$ADD=30;} # send to not allowed screen if not in vicidial_user_groups allowed_campaigns list if ($ADD==34) -{ - if ($LOGmodify_campaigns==1) { - if ($stage=='show_dialable') + if ($LOGmodify_campaigns==1) { + if ($stage=='show_dialable') + { $stmt="UPDATE vicidial_campaigns set display_dialable_count='Y' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); - } + } if ($stage=='hide_dialable') - { + { $stmt="UPDATE vicidial_campaigns set display_dialable_count='N' where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); - } + } - $stmt="SELECT * 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 from vicidial_campaigns where campaign_id='$campaign_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $dial_status_a = $row[3]; @@ -16734,7 +16983,7 @@ if ($ADD==34) else {$DEFlistDISABLE = 'disabled'; $DEFstatusDISABLED=1;} - $stmt="SELECT * from vicidial_statuses order by status"; + $stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses order by status"; $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $statuses_list=''; @@ -16752,7 +17001,7 @@ if ($ADD==34) $o++; } - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; + $stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; $rslt=mysql_query($stmt, $link); $Cstatuses_to_print = mysql_num_rows($rslt); @@ -17296,7 +17545,7 @@ if ( ($ADD==34) or ($ADD==31) ) $LMdial_statuses=$rowy[0]; } - $stmt="SELECT * from vicidial_campaigns_list_mix where campaign_id='$campaign_id' order by status, vcl_id"; + $stmt="SELECT vcl_id,vcl_name,campaign_id,list_mix_container,mix_method,status from vicidial_campaigns_list_mix where campaign_id='$campaign_id' order by status, vcl_id"; $rslt=mysql_query($stmt, $link); $listmixes = mysql_num_rows($rslt); $o=0; @@ -17900,7 +18149,7 @@ if ($ADD==311) $agent_script_override = $row[8]; # grab names of global statuses and statuses in the selected campaign - $stmt="SELECT * from vicidial_statuses order by status"; + $stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses order by status"; $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); @@ -17912,7 +18161,7 @@ if ($ADD==311) $o++; } - $stmt="SELECT * from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; + $stmt="SELECT status,status_name,selectable,campaign_id,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_campaign_statuses where campaign_id='$campaign_id' order by status"; $rslt=mysql_query($stmt, $link); $Cstatuses_to_print = mysql_num_rows($rslt); @@ -18024,28 +18273,27 @@ if ($ADD==311) if ($lead_list['count'] > 0) { while (list($dispo,) = each($lead_list[$since_reset])) - { - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - if ($dispo == 'CBHOLD') { - $CLB=""; - $CLE=""; - } - else - { - $CLB=''; - $CLE=''; - } + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - echo "
$CLB$dispo$CLE$statuses_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
$CLB$dispo$CLE$statuses_list[$dispo]".$lead_list['Y'][$dispo]."".$lead_list['N'][$dispo]."
SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
TOTAL$lead_list[count]
".$DISPtzone."     ($LOCALdate)".$lead_list['Y'][$tzone]."".$lead_list['N'][$tzone]."
".$DISPtzone."     ($LOCALdate)".$lead_list['Y'][$tzone]."".$lead_list['N'][$tzone]."
SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
TOTAL$lead_list[count]
\n"; @@ -18167,20 +18412,19 @@ if ($ADD==311) if ($lead_list['count'] > 0) { while (list($owner,) = each($lead_list[$since_reset])) - { + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} + $CLB=''; + $CLE=''; - $CLB=''; - $CLE=''; - - echo "\n"; - $o++; + echo "\n"; + $o++; + } } - } echo "\n"; echo "\n"; @@ -18189,9 +18433,6 @@ if ($ADD==311) unset($lead_list); - - - echo "
\n"; echo "
RANKS WITHIN THIS LIST:
\n"; echo "
$CLB$owner$CLE".$lead_list['Y'][$owner]."".$lead_list['N'][$owner]."
$CLB$owner$CLE".$lead_list['Y'][$owner]."".$lead_list['N'][$owner]."
SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
TOTAL$lead_list[count]
\n"; @@ -18238,20 +18479,19 @@ if ($ADD==311) if ($lead_list['count'] > 0) { while (list($rank,) = each($lead_list[$since_reset])) - { + { + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} + $CLB=''; + $CLE=''; - $CLB=''; - $CLE=''; - - echo "\n"; - $o++; + echo "\n"; + $o++; + } } - } echo "\n"; echo "\n"; @@ -18260,9 +18500,6 @@ if ($ADD==311) unset($lead_list); - - - $leads_in_list = 0; $leads_in_list_N = 0; $leads_in_list_Y = 0; @@ -18300,8 +18537,6 @@ if ($ADD==311) } - - echo "
\n"; echo "
CALLED COUNTS WITHIN THIS LIST:
\n"; echo "
$CLB$rank$CLE".$lead_list['Y'][$rank]."".$lead_list['N'][$rank]."
$CLB$rank$CLE".$lead_list['Y'][$rank]."".$lead_list['N'][$rank]."
SUBTOTALS$lead_list[Y_count]$lead_list[N_count]
TOTAL$lead_list[count]
\n"; @@ -18316,9 +18551,9 @@ if ($ADD==311) } echo "\n"; - $sts=0; - $statuses_called_to_print = count($status); - while ($statuses_called_to_print > $sts) + $sts=0; + $statuses_called_to_print = count($status); + while ($statuses_called_to_print > $sts) { $Pstatus = $status[$sts]; if (eregi("1$|3$|5$|7$|9$", $sts)) @@ -18353,7 +18588,6 @@ if ($ADD==311) echo ""; } - $o++; } if (!$called_printed) @@ -18410,426 +18644,401 @@ if ($ADD==311) ###################### if ($ADD==3111) -{ - if ($LOGmodify_ingroups==1) { - echo "
SUBTOTAL
$count_count[$o]
\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 from vicidial_inbound_groups where group_id='$group_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $group_name = $row[1]; - $group_color = $row[2]; - $active = $row[3]; - $web_form_address = stripslashes($row[4]); - $voicemail_ext = $row[5]; - $next_agent_call = $row[6]; - $fronter_display = $row[7]; - $script_id = $row[8]; - $get_call_launch = $row[9]; - $xferconf_a_dtmf = $row[10]; - $xferconf_a_number = $row[11]; - $xferconf_b_dtmf = $row[12]; - $xferconf_b_number = $row[13]; - $drop_call_seconds = $row[14]; - $drop_action = $row[15]; - $drop_exten = $row[16]; - $call_time_id = $row[17]; - $after_hours_action = $row[18]; - $after_hours_message_filename = $row[19]; - $after_hours_exten = $row[20]; - $after_hours_voicemail = $row[21]; - $welcome_message_filename = $row[22]; - $moh_context = $row[23]; - $onhold_prompt_filename = $row[24]; - $prompt_interval = $row[25]; - $agent_alert_exten = $row[26]; - $agent_alert_delay = $row[27]; - $default_xfer_group = $row[28]; - $queue_priority = $row[29]; - $drop_inbound_group = $row[30]; - $ingroup_recording_override = $row[31]; - $ingroup_rec_filename = $row[32]; - $afterhours_xfer_group = $row[33]; - $qc_enabled = $row[34]; - $qc_statuses = $row[35]; - $qc_shift_id = $row[36]; - $qc_get_record_launch = $row[37]; - $qc_show_recording = $row[38]; - $qc_web_form_address = stripslashes($row[39]); - $qc_script = $row[40]; - $play_place_in_line = $row[41]; - $play_estimate_hold_time = $row[42]; - $hold_time_option = $row[43]; - $hold_time_option_seconds = $row[44]; - $hold_time_option_exten = $row[45]; - $hold_time_option_voicemail = $row[46]; - $hold_time_option_xfer_group = $row[47]; - $hold_time_option_callback_filename = $row[48]; - $hold_time_option_callback_list_id = $row[49]; - $hold_recall_xfer_group = $row[50]; - $no_delay_call_route = $row[51]; - $play_welcome_message = $row[52]; - $answer_sec_pct_rt_stat_one = $row[53]; - $answer_sec_pct_rt_stat_two = $row[54]; - $default_group_alias = $row[55]; - $no_agent_no_queue = $row[56]; - $no_agent_action = $row[57]; - $no_agent_action_value = $row[58]; - $web_form_address_two = stripslashes($row[59]); - - ##### 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"; - $rslt=mysql_query($stmt, $link); - $Xgroups_to_print = mysql_num_rows($rslt); - $Xgroups_menu=''; - $Xgroups_selected=0; - $Dgroups_menu=''; - $Dgroups_selected=0; - $Agroups_menu=''; - $Agroups_selected=0; - $Hgroups_menu=''; - $Hgroups_selected=0; - $Tgroups_menu=''; - $Tgroups_selected=0; - $o=0; - while ($Xgroups_to_print > $o) + if ($LOGmodify_ingroups==1) { - $rowx=mysql_fetch_row($rslt); - $Xgroups_menu .= "\n"; - $Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; - if ($group_id!=$rowx[0]) - { - $Agroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; - $Tgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; - $Hgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; - } - $o++; - } - if ($Xgroups_selected < 1) - {$Xgroups_menu .= "\n";} - else - {$Xgroups_menu .= "\n";} - if ($Dgroups_selected < 1) - {$Dgroups_menu .= "\n";} - else - {$Dgroups_menu .= "\n";} - if ($Agroups_selected < 1) - {$Agroups_menu .= "\n";} - else - {$Agroups_menu .= "\n";} - if ($Tgroups_selected < 1) - {$Tgroups_menu .= "\n";} - else - {$Tgroups_menu .= "\n";} - if ($Hgroups_selected < 1) - {$Hgroups_menu .= "\n";} - else - {$Hgroups_menu .= "\n";} + echo "
\n"; + echo ""; - - echo "
MODIFY A GROUPS RECORD: $row[0]\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - if ($SSenable_second_webform > 0) - { - 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 "\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 "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - ##### get groups_alias listings for dynamic default group alias pulldown list menu - $stmt="SELECT group_alias_id,group_alias_name from groups_alias where active='Y' order by group_alias_id"; - $rslt=mysql_query($stmt, $link); - $group_alias_to_print = mysql_num_rows($rslt); - $group_alias_menu=''; - $group_alias_selected=0; - $o=0; - while ($group_alias_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $group_alias_menu .= "\n"; - $o++; - } - - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - if ($SSqc_features_active > 0) - { - echo "\n"; - echo "\n"; - - ##### get status listings for dynamic pulldown - $qc_statuses = preg_replace("/^ | -$/","",$qc_statuses); - $QCstatuses = explode(" ", $qc_statuses); - $QCs_to_print = (count($QCstatuses) -0); - $stmt="SELECT * from vicidial_statuses where status NOT IN('QUEUE','INCALL') order by status"; + ##### 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"; $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $qc_statuses_list=''; - + $Xgroups_to_print = mysql_num_rows($rslt); + $Xgroups_menu=''; + $Xgroups_selected=0; + $Dgroups_menu=''; + $Dgroups_selected=0; + $Agroups_menu=''; + $Agroups_selected=0; + $Hgroups_menu=''; + $Hgroups_selected=0; + $Tgroups_menu=''; + $Tgroups_selected=0; $o=0; - while ($statuses_to_print > $o) + while ($Xgroups_to_print > $o) { $rowx=mysql_fetch_row($rslt); - $qc_statuses_list .= "$rowx[0] - $rowx[1]\n"; + $Dgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; + if ($group_id!=$rowx[0]) + { + $Agroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; + $Tgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; + $Hgroups_menu .= "value=\"$rowx[0]\">$rowx[0] - $rowx[1]\n"; + } + $o++; + } + if ($Xgroups_selected < 1) + {$Xgroups_menu .= "\n";} + else + {$Xgroups_menu .= "\n";} + if ($Dgroups_selected < 1) + {$Dgroups_menu .= "\n";} + else + {$Dgroups_menu .= "\n";} + if ($Agroups_selected < 1) + {$Agroups_menu .= "\n";} + else + {$Agroups_menu .= "\n";} + if ($Tgroups_selected < 1) + {$Tgroups_menu .= "\n";} + else + {$Tgroups_menu .= "\n";} + if ($Hgroups_selected < 1) + {$Hgroups_menu .= "\n";} + else + {$Hgroups_menu .= "\n";} + + echo "
MODIFY A GROUPS RECORD: $row[0]\n"; + echo "\n"; + echo "\n"; + echo "
Group ID: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
Active: $NWB#vicidial_inbound_groups-active$NWE
Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
Web Form Two: $NWB#vicidial_inbound_groups-web_form_address$NWE
Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
Queue Priority: $NWB#vicidial_inbound_groups-queue_priority$NWE
Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE
Transfer-Conf DTMF 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Transfer-Conf Number 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Transfer-Conf DTMF 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Transfer-Conf Number 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Drop Call Seconds: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
Drop Action: $NWB#vicidial_inbound_groups-drop_action$NWE
Drop Exten: $NWB#vicidial_inbound_groups-drop_exten$NWE
Voicemail: $NWB#vicidial_inbound_groups-voicemail_ext$NWE
Drop Transfer Group: $NWB#vicidial_inbound_groups-drop_inbound_group$NWE
Call Time: $NWB#vicidial_inbound_groups-call_time_id$NWE
After Hours Action: $NWB#vicidial_inbound_groups-after_hours_action$NWE
After Hours Message Filename: audio chooser $NWB#vicidial_inbound_groups-after_hours_message_filename$NWE
After Hours Extension: $NWB#vicidial_inbound_groups-after_hours_exten$NWE
After Hours Voicemail: $NWB#vicidial_inbound_groups-after_hours_voicemail$NWE
After Hours Transfer Group: $NWB#vicidial_inbound_groups-afterhours_xfer_group$NWE
No Agents No Queueing: $NWB#vicidial_inbound_groups-no_agent_no_queue$NWE
No Agent No Queue Action: $NWB#vicidial_inbound_groups-no_agent_no_queue$NWE\n"; - - echo "
"; - echo "\n"; - - if ($no_agent_action=='CALLMENU') - { - echo ""; - echo "Call Menu:"; - echo ""; - echo " \n"; - } - if ($no_agent_action=='INGROUP') - { - if (strlen($no_agent_action_value) < 10) - {$no_agent_action_value = 'SALESLINE,CID,LB,998,TESTCAMP,1';} - $IGno_agent_action_value = explode(",",$no_agent_action_value); - $IGgroup_id = $IGno_agent_action_value[0]; - $IGhandle_method = $IGno_agent_action_value[1]; - $IGsearch_method = $IGno_agent_action_value[2]; - $IGlist_id = $IGno_agent_action_value[3]; - $IGcampaign_id = $IGno_agent_action_value[4]; - $IGphone_code = $IGno_agent_action_value[5]; - echo ""; - echo "In-Group:"; - echo ""; - echo " "; - echo "   Handle Method: \n"; - echo "
Search Method: \n"; - echo "   List ID: "; - echo "
Campaign ID: \n"; - echo "   Phone Code: "; - } - if ($no_agent_action=='DID') - { - $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$no_agent_action_value';"; + $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 from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - $did_id = $row[0]; + $group_name = $row[1]; + $group_color = $row[2]; + $active = $row[3]; + $web_form_address = stripslashes($row[4]); + $voicemail_ext = $row[5]; + $next_agent_call = $row[6]; + $fronter_display = $row[7]; + $script_id = $row[8]; + $get_call_launch = $row[9]; + $xferconf_a_dtmf = $row[10]; + $xferconf_a_number = $row[11]; + $xferconf_b_dtmf = $row[12]; + $xferconf_b_number = $row[13]; + $drop_call_seconds = $row[14]; + $drop_action = $row[15]; + $drop_exten = $row[16]; + $call_time_id = $row[17]; + $after_hours_action = $row[18]; + $after_hours_message_filename = $row[19]; + $after_hours_exten = $row[20]; + $after_hours_voicemail = $row[21]; + $welcome_message_filename = $row[22]; + $moh_context = $row[23]; + $onhold_prompt_filename = $row[24]; + $prompt_interval = $row[25]; + $agent_alert_exten = $row[26]; + $agent_alert_delay = $row[27]; + $default_xfer_group = $row[28]; + $queue_priority = $row[29]; + $drop_inbound_group = $row[30]; + $ingroup_recording_override = $row[31]; + $ingroup_rec_filename = $row[32]; + $afterhours_xfer_group = $row[33]; + $qc_enabled = $row[34]; + $qc_statuses = $row[35]; + $qc_shift_id = $row[36]; + $qc_get_record_launch = $row[37]; + $qc_show_recording = $row[38]; + $qc_web_form_address = stripslashes($row[39]); + $qc_script = $row[40]; + $play_place_in_line = $row[41]; + $play_estimate_hold_time = $row[42]; + $hold_time_option = $row[43]; + $hold_time_option_seconds = $row[44]; + $hold_time_option_exten = $row[45]; + $hold_time_option_voicemail = $row[46]; + $hold_time_option_xfer_group = $row[47]; + $hold_time_option_callback_filename = $row[48]; + $hold_time_option_callback_list_id = $row[49]; + $hold_recall_xfer_group = $row[50]; + $no_delay_call_route = $row[51]; + $play_welcome_message = $row[52]; + $answer_sec_pct_rt_stat_one = $row[53]; + $answer_sec_pct_rt_stat_two = $row[54]; + $default_group_alias = $row[55]; + $no_agent_no_queue = $row[56]; + $no_agent_action = $row[57]; + $no_agent_action_value = $row[58]; + $web_form_address_two = stripslashes($row[59]); - echo ""; - echo "DID:"; - echo ""; - echo " \n"; - } - if ($no_agent_action=='MESSAGE') - { - if (strlen($no_agent_action_value) < 3) - {$no_agent_action_value = 'nbdy-avail-to-take-call|vm-goodbye';} - echo "Audio File: audio chooser\n"; - } - if ($no_agent_action=='EXTENSION') - { - if (strlen($no_agent_action_value) < 3) - {$no_agent_action_value = '8304,default';} - $EXno_agent_action_value = explode(",",$no_agent_action_value); - $EXextension = $EXno_agent_action_value[0]; - $EXcontext = $EXno_agent_action_value[1]; - echo "Extension:   Context: \n"; - } - if ($no_agent_action=='VOICEMAIL') - { - echo "Voicemail Box: \n"; - } - - echo "
-
 
Welcome Message Filename: audio chooser $NWB#vicidial_inbound_groups-welcome_message_filename$NWE
Play Welcome Message: $NWB#vicidial_inbound_groups-play_welcome_message$NWE
Music On Hold Context: moh chooser $NWB#vicidial_inbound_groups-moh_context$NWE
On Hold Prompt Filename: audio chooser $NWB#vicidial_inbound_groups-onhold_prompt_filename$NWE
On Hold Prompt Interval: $NWB#vicidial_inbound_groups-prompt_interval$NWE
Play Place in Line: $NWB#vicidial_inbound_groups-play_place_in_line$NWE
Play Estimated Hold Time: $NWB#vicidial_inbound_groups-play_estimate_hold_time$NWE
Hold Time Option: $NWB#vicidial_inbound_groups-hold_time_option$NWE
Hold Time Option Seconds: $NWB#vicidial_inbound_groups-hold_time_option_seconds$NWE
Hold Time Option Extension: $NWB#vicidial_inbound_groups-hold_time_option_exten$NWE
Hold Time Option Voicemail: $NWB#vicidial_inbound_groups-hold_time_option_voicemail$NWE
Hold Time Option Transfer In-Group: $NWB#vicidial_inbound_groups-hold_time_option_xfer_group$NWE
Hold Time Option Callback Filename: audio chooser $NWB#vicidial_inbound_groups-hold_time_option_callback_filename$NWE
Hold Time Option Callback List ID: $NWB#vicidial_inbound_groups-hold_time_option_callback_list_id$NWE
Agent Alert Filename: audio chooser $NWB#vicidial_inbound_groups-agent_alert_exten$NWE
Agent Alert Delay: $NWB#vicidial_inbound_groups-agent_alert_delay$NWE
Default Transfer Group: $NWB#vicidial_inbound_groups-default_xfer_group$NWE
Default Group Alias: $NWB#vicidial_inbound_groups-default_group_alias$NWE
Hold Recall Transfer In-Group: $NWB#vicidial_inbound_groups-hold_recall_xfer_group$NWE
No Delay Call Route: $NWB#vicidial_inbound_groups-no_delay_call_route$NWE
In-Group Recording Override: $NWB#vicidial_inbound_groups-ingroup_recording_override$NWE
In-Group Recording Filename: $NWB#vicidial_inbound_groups-ingroup_rec_filename$NWE
Stats Percent of Calls Answered Within X seconds 1: $NWB#vicidial_inbound_groups-answer_sec_pct_rt_stat_one$NWE
Stats Percent of Calls Answered Within X seconds 2: $NWB#vicidial_inbound_groups-answer_sec_pct_rt_stat_one$NWE
 
Inbound Group QC Settings:
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + if ($SSenable_second_webform > 0) + { + 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 "\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 "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + ##### get groups_alias listings for dynamic default group alias pulldown list menu + $stmt="SELECT group_alias_id,group_alias_name from groups_alias where active='Y' order by group_alias_id"; + $rslt=mysql_query($stmt, $link); + $group_alias_to_print = mysql_num_rows($rslt); + $group_alias_menu=''; + $group_alias_selected=0; + $o=0; + while ($group_alias_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $group_alias_menu .= "\n"; $o++; } - $stmt="SELECT distinct(status),status_name from vicidial_campaign_statuses order by status"; - $rslt=mysql_query($stmt, $link); - $Cstatuses_to_print = mysql_num_rows($rslt); + echo "\n"; - $o=0; - while ($Cstatuses_to_print > $o) + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + + if ($SSqc_features_active > 0) { - $rowx=mysql_fetch_row($rslt); - if (!ereg("\"$rowx[0]\"",$qc_statuses_list)) + echo "\n"; + echo "\n"; + + ##### get status listings for dynamic pulldown + $qc_statuses = preg_replace("/^ | -$/","",$qc_statuses); + $QCstatuses = explode(" ", $qc_statuses); + $QCs_to_print = (count($QCstatuses) -0); + $stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses where status NOT IN('QUEUE','INCALL') order by status"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $qc_statuses_list=''; + + $o=0; + while ($statuses_to_print > $o) { + $rowx=mysql_fetch_row($rslt); $qc_statuses_list .= " $o) + { + $rowx=mysql_fetch_row($rslt); + if (!ereg("\"$rowx[0]\"",$qc_statuses_list)) + { + $qc_statuses_list .= " $o) + { + $rowx=mysql_fetch_row($rslt); + $QCscripts_list .= "\n"; + $scriptname_list["$rowx[0]"] = "$rowx[1]"; + $o++; + } + ##### get shifts listings for pulldown + $stmt="SELECT shift_id,shift_name from vicidial_shifts order by shift_id"; + $rslt=mysql_query($stmt, $link); + $shifts_to_print = mysql_num_rows($rslt); + $QCshifts_list=""; + $o=0; + while ($shifts_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $QCshifts_list .= "\n"; + $shiftname_list["$rowx[0]"] = "$rowx[1]"; + $o++; + } + + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; } - ##### get scripts listings for pulldown - $stmt="SELECT script_id,script_name from vicidial_scripts order by script_id"; - $rslt=mysql_query($stmt, $link); - $scripts_to_print = mysql_num_rows($rslt); - $QCscripts_list=""; - $o=0; - while ($scripts_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $QCscripts_list .= "\n"; - $scriptname_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - ##### get shifts listings for pulldown - $stmt="SELECT shift_id,shift_name from vicidial_shifts order by shift_id"; - $rslt=mysql_query($stmt, $link); - $shifts_to_print = mysql_num_rows($rslt); - $QCshifts_list=""; - $o=0; - while ($shifts_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $QCshifts_list .= "\n"; - $shiftname_list["$rowx[0]"] = "$rowx[1]"; - $o++; - } - - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - } - - echo "
Group ID: $row[0]$NWB#vicidial_inbound_groups-group_id$NWE
Group Name: $NWB#vicidial_inbound_groups-group_name$NWE
Group Color: $NWB#vicidial_inbound_groups-group_color$NWE
Active: $NWB#vicidial_inbound_groups-active$NWE
Web Form: $NWB#vicidial_inbound_groups-web_form_address$NWE
Web Form Two: $NWB#vicidial_inbound_groups-web_form_address$NWE
Next Agent Call: $NWB#vicidial_inbound_groups-next_agent_call$NWE
Queue Priority: $NWB#vicidial_inbound_groups-queue_priority$NWE
Fronter Display: $NWB#vicidial_inbound_groups-fronter_display$NWE
Script: $NWB#vicidial_inbound_groups-ingroup_script$NWE
Get Call Launch: $NWB#vicidial_inbound_groups-get_call_launch$NWE
Transfer-Conf DTMF 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Transfer-Conf Number 1: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Transfer-Conf DTMF 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Transfer-Conf Number 2: $NWB#vicidial_inbound_groups-xferconf_a_dtmf$NWE
Drop Call Seconds: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
Drop Action: $NWB#vicidial_inbound_groups-drop_action$NWE
Drop Exten: $NWB#vicidial_inbound_groups-drop_exten$NWE
Voicemail: voicemail chooser$NWB#vicidial_inbound_groups-voicemail_ext$NWE
Drop Transfer Group: $NWB#vicidial_inbound_groups-drop_inbound_group$NWE
Call Time: $NWB#vicidial_inbound_groups-call_time_id$NWE
After Hours Action: $NWB#vicidial_inbound_groups-after_hours_action$NWE
After Hours Message Filename: audio chooser $NWB#vicidial_inbound_groups-after_hours_message_filename$NWE
After Hours Extension: $NWB#vicidial_inbound_groups-after_hours_exten$NWE
After Hours Voicemail: voicemail chooser$NWB#vicidial_inbound_groups-after_hours_voicemail$NWE
After Hours Transfer Group: $NWB#vicidial_inbound_groups-afterhours_xfer_group$NWE
No Agents No Queueing: $NWB#vicidial_inbound_groups-no_agent_no_queue$NWE
No Agent No Queue Action: $NWB#vicidial_inbound_groups-no_agent_no_queue$NWE\n"; + + echo "
"; + echo "\n"; + + if ($no_agent_action=='CALLMENU') + { + echo ""; + echo "Call Menu:"; + echo ""; + echo " \n"; + } + if ($no_agent_action=='INGROUP') + { + if (strlen($no_agent_action_value) < 10) + {$no_agent_action_value = 'SALESLINE,CID,LB,998,TESTCAMP,1';} + $IGno_agent_action_value = explode(",",$no_agent_action_value); + $IGgroup_id = $IGno_agent_action_value[0]; + $IGhandle_method = $IGno_agent_action_value[1]; + $IGsearch_method = $IGno_agent_action_value[2]; + $IGlist_id = $IGno_agent_action_value[3]; + $IGcampaign_id = $IGno_agent_action_value[4]; + $IGphone_code = $IGno_agent_action_value[5]; + echo ""; + echo "In-Group:"; + echo ""; + echo " "; + echo "   Handle Method: \n"; + echo "
Search Method: \n"; + echo "   List ID: "; + echo "
Campaign ID: \n"; + echo "   Phone Code: "; + } + if ($no_agent_action=='DID') + { + $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$no_agent_action_value';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $did_id = $row[0]; + + echo ""; + echo "DID:"; + echo ""; + echo " \n"; + } + if ($no_agent_action=='MESSAGE') + { + if (strlen($no_agent_action_value) < 3) + {$no_agent_action_value = 'nbdy-avail-to-take-call|vm-goodbye';} + echo "Audio File: audio chooser\n"; + } + if ($no_agent_action=='EXTENSION') + { + if (strlen($no_agent_action_value) < 3) + {$no_agent_action_value = '8304,default';} + $EXno_agent_action_value = explode(",",$no_agent_action_value); + $EXextension = $EXno_agent_action_value[0]; + $EXcontext = $EXno_agent_action_value[1]; + echo "Extension:   Context: \n"; + } + if ($no_agent_action=='VOICEMAIL') + { + echo "Voicemail Box: voicemail chooser\n"; + } + + echo "
+
 
Welcome Message Filename: audio chooser $NWB#vicidial_inbound_groups-welcome_message_filename$NWE
Play Welcome Message: $NWB#vicidial_inbound_groups-play_welcome_message$NWE
Music On Hold Context: moh chooser $NWB#vicidial_inbound_groups-moh_context$NWE
On Hold Prompt Filename: audio chooser $NWB#vicidial_inbound_groups-onhold_prompt_filename$NWE
On Hold Prompt Interval: $NWB#vicidial_inbound_groups-prompt_interval$NWE
Play Place in Line: $NWB#vicidial_inbound_groups-play_place_in_line$NWE
Play Estimated Hold Time: $NWB#vicidial_inbound_groups-play_estimate_hold_time$NWE
Hold Time Option: $NWB#vicidial_inbound_groups-hold_time_option$NWE
Hold Time Option Seconds: $NWB#vicidial_inbound_groups-hold_time_option_seconds$NWE
Hold Time Option Extension: $NWB#vicidial_inbound_groups-hold_time_option_exten$NWE
Hold Time Option Voicemail: voicemail chooser $NWB#vicidial_inbound_groups-hold_time_option_voicemail$NWE
Hold Time Option Transfer In-Group: $NWB#vicidial_inbound_groups-hold_time_option_xfer_group$NWE
Hold Time Option Callback Filename: audio chooser $NWB#vicidial_inbound_groups-hold_time_option_callback_filename$NWE
Hold Time Option Callback List ID: $NWB#vicidial_inbound_groups-hold_time_option_callback_list_id$NWE
Agent Alert Filename: audio chooser $NWB#vicidial_inbound_groups-agent_alert_exten$NWE
Agent Alert Delay: $NWB#vicidial_inbound_groups-agent_alert_delay$NWE
Default Transfer Group: $NWB#vicidial_inbound_groups-default_xfer_group$NWE
Default Group Alias: $NWB#vicidial_inbound_groups-default_group_alias$NWE
Hold Recall Transfer In-Group: $NWB#vicidial_inbound_groups-hold_recall_xfer_group$NWE
No Delay Call Route: $NWB#vicidial_inbound_groups-no_delay_call_route$NWE
In-Group Recording Override: $NWB#vicidial_inbound_groups-ingroup_recording_override$NWE
In-Group Recording Filename: $NWB#vicidial_inbound_groups-ingroup_rec_filename$NWE
Stats Percent of Calls Answered Within X seconds 1: $NWB#vicidial_inbound_groups-answer_sec_pct_rt_stat_one$NWE
Stats Percent of Calls Answered Within X seconds 2: $NWB#vicidial_inbound_groups-answer_sec_pct_rt_stat_one$NWE
 
Inbound Group QC Settings:
QC Enabled: $NWB#vicidial_inbound_groups-qc_enabled$NWE
QC Statuses:
$NWB#vicidial_inbound_groups-qc_statuses$NWE
$qc_statuses_list
QC WebForm: $NWB#vicidial_inbound_groups-qc_web_form_address$NWE
QC Script: $NWB#vicidial_inbound_groups-qc_script$NWE
QC Shift: $NWB#vicidial_inbound_groups-qc_shift_id$NWE
QC Get Record Launch: $NWB#vicidial_inbound_groups-qc_get_record_launch$NWE
QC Show Recording: $NWB#vicidial_inbound_groups-qc_show_recording$NWE
QC Enabled: $NWB#vicidial_inbound_groups-qc_enabled$NWE
QC Statuses:
$NWB#vicidial_inbound_groups-qc_statuses$NWE
$qc_statuses_list
QC WebForm: $NWB#vicidial_inbound_groups-qc_web_form_address$NWE
QC Script: $NWB#vicidial_inbound_groups-qc_script$NWE
QC Shift: $NWB#vicidial_inbound_groups-qc_shift_id$NWE
QC Get Record Launch: $NWB#vicidial_inbound_groups-qc_get_record_launch$NWE
QC Show Recording: $NWB#vicidial_inbound_groups-qc_show_recording$NWE
\n"; - echo "

\n"; + echo "
\n"; + echo "

\n"; - ### list of agent rank or skill-level for this inbound group - echo "
\n"; - echo "
AGENT RANKS FOR THIS INBOUND GROUP:
\n"; - echo "\n"; - echo "\n"; + ### list of agent rank or skill-level for this inbound group + echo "
\n"; + echo "
AGENT RANKS FOR THIS INBOUND GROUP:
\n"; + echo "
USER     RANK     CALLS TODAY
\n"; + echo "\n"; $stmt="SELECT user,group_rank,calls_today from vicidial_inbound_group_agents where group_id='$group_id'"; $rsltx=mysql_query($stmt, $link); $users_to_print = mysql_num_rows($rsltx); $o=0; - while ($users_to_print > $o) { + while ($users_to_print > $o) + { $rowx=mysql_fetch_row($rsltx); $o++; - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; - } + echo "\n"; + } - echo "
USER     RANK     CALLS TODAY
$rowx[0]$rowx[1]$rowx[2]
$rowx[0]$rowx[1]$rowx[2]

\n"; + echo "

\n"; - echo "

\n"; + echo "

\n"; - echo "Click here to see a report for this inbound group

\n"; + echo "Click here to see a report for this inbound group

\n"; - echo "
\n"; + echo "
\n"; - echo "DIDS USING THIS IN-GROUP:
\n"; - echo "\n"; + echo "DIDS USING THIS IN-GROUP:
\n"; + echo "
\n"; $stmt="SELECT did_id,did_pattern,did_description from vicidial_inbound_dids where group_id='$group_id' and did_route='IN_GROUP';"; $rslt=mysql_query($stmt, $link); $dids_to_print = mysql_num_rows($rslt); $o=0; - while ($dids_to_print > $o) { + while ($dids_to_print > $o) + { $row=mysql_fetch_row($rslt); echo "\n"; $o++; + } + + echo "
$row[1] $row[2]

\n"; + echo "CALL MENUS USING THIS IN-GROUP:
\n"; + echo "\n"; + + $stmt="SELECT distinct vm.menu_id,menu_name from vicidial_call_menu vm,vicidial_call_menu_options vmo where vm.menu_id=vmo.menu_id and option_route='INGROUP' and option_route_value='$group_id';"; + $rslt=mysql_query($stmt, $link); + $cms_to_print = mysql_num_rows($rslt); + $o=0; + while ($cms_to_print > $o) + { + $row=mysql_fetch_row($rslt); + echo "\n"; + $o++; + } + + echo "
$row[0] $row[1]
\n"; + + if ($LOGdelete_ingroups > 0) + { + echo "

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; + echo "

DELETE THIS IN-GROUP\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this In-Group
\n"; + } } - - echo "
\n"; - echo "CALL MENUS USING THIS IN-GROUP:
\n"; - echo "\n"; - - $stmt="SELECT distinct vm.menu_id,menu_name from vicidial_call_menu vm,vicidial_call_menu_options vmo where vm.menu_id=vmo.menu_id and option_route='INGROUP' and option_route_value='$group_id';"; - $rslt=mysql_query($stmt, $link); - $cms_to_print = mysql_num_rows($rslt); - $o=0; - while ($cms_to_print > $o) { - $row=mysql_fetch_row($rslt); - echo "\n"; - $o++; - } - - echo "
$row[0] $row[1]
\n"; - - - if ($LOGdelete_ingroups > 0) - { - echo "

EMERGENCY VDAC CLEAR FOR THIS IN-GROUP

\n"; - echo "

DELETE THIS IN-GROUP\n"; - } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this In-Group
\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} @@ -18980,171 +19216,172 @@ if ($ADD==3111) ###################### if ($ADD==3311) -{ + { if ($LOGmodify_dids==1) - { - echo "
\n"; - echo ""; - - $didSQL = "did_id='$did_id'"; - if ( (strlen($did_id)<1) and (strlen($did_pattern)>0) ) - {$didSQL = "did_pattern='$did_pattern'";} - $stmt="SELECT * from vicidial_inbound_dids where $didSQL;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $did_id = $row[0]; - $did_pattern = $row[1]; - $did_description = $row[2]; - $did_active = $row[3]; - $did_route = $row[4]; - $extension = $row[5]; - $exten_context = $row[6]; - $voicemail_ext = $row[7]; - $phone = $row[8]; - $server_ip = $row[9]; - $user = $row[10]; - $user_unavailable_action = $row[11]; - $user_route_settings_ingroup = $row[12]; - $group_id = $row[13]; - $call_handle_method = $row[14]; - $agent_search_method = $row[15]; - $list_id = $row[16]; - $campaign_id = $row[17]; - $phone_code = $row[18]; - $menu_id = $row[19]; - - - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; - $rslt=mysql_query($stmt, $link); - $campaigns_to_print = mysql_num_rows($rslt); - $campaigns_list=''; - $o=0; - while ($campaigns_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $campaigns_list .= "\n"; - $o++; - } + 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 ""; - ##### get in-groups listings for dynamic pulldown - $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; - $rslt=mysql_query($stmt, $link); - $Xgroups_to_print = mysql_num_rows($rslt); - $Xgroups_menu=''; - $Xgroups_selected=0; - $o=0; - while ($Xgroups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $Xgroups_menu .= "\n"; - $o++; - } - if ($Xgroups_selected < 1) - {$Xgroups_menu .= "\n";} - else - {$Xgroups_menu .= "\n";} - - - ##### 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"; - $rslt=mysql_query($stmt, $link); - $Dgroups_to_print = mysql_num_rows($rslt); - $Dgroups_menu=''; - $Dgroups_selected=0; - $o=0; - while ($Dgroups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $Dgroups_menu .= "\n"; - $o++; - } - if ($Dgroups_selected < 1) - {$Dgroups_menu .= "\n";} - else - {$Dgroups_menu .= "\n";} - - - echo "
MODIFY A DID RECORD: $row[0]
\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"; - - $stmt="select menu_id,menu_name,menu_prompt from vicidial_call_menu;"; - $rslt=mysql_query($stmt, $link); - $menus_to_print = mysql_num_rows($rslt); - $menu_list=''; - $i=0; - while ($i < $menus_to_print) - { + $didSQL = "did_id='$did_id'"; + if ( (strlen($did_id)<1) and (strlen($did_pattern)>0) ) + {$didSQL = "did_pattern='$did_pattern'";} + $stmt="SELECT did_id,did_pattern,did_description,did_active,did_route,extension,exten_context,voicemail_ext,phone,server_ip,user,user_unavailable_action,user_route_settings_ingroup,group_id,call_handle_method,agent_search_method,list_id,campaign_id,phone_code,menu_id from vicidial_inbound_dids where $didSQL;"; + if ($DB) {echo "$stmt\n";} + $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - $menu_list .= ""; - $i++; + $did_id = $row[0]; + $did_pattern = $row[1]; + $did_description = $row[2]; + $did_active = $row[3]; + $did_route = $row[4]; + $extension = $row[5]; + $exten_context = $row[6]; + $voicemail_ext = $row[7]; + $phone = $row[8]; + $server_ip = $row[9]; + $user = $row[10]; + $user_unavailable_action = $row[11]; + $user_route_settings_ingroup = $row[12]; + $group_id = $row[13]; + $call_handle_method = $row[14]; + $agent_search_method = $row[15]; + $list_id = $row[16]; + $campaign_id = $row[17]; + $phone_code = $row[18]; + $menu_id = $row[19]; + + + $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; + $rslt=mysql_query($stmt, $link); + $campaigns_to_print = mysql_num_rows($rslt); + $campaigns_list=''; + $o=0; + while ($campaigns_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $campaigns_list .= "\n"; + $o++; + } + + ##### get in-groups listings for dynamic pulldown + $stmt="SELECT group_id,group_name from vicidial_inbound_groups order by group_id"; + $rslt=mysql_query($stmt, $link); + $Xgroups_to_print = mysql_num_rows($rslt); + $Xgroups_menu=''; + $Xgroups_selected=0; + $o=0; + while ($Xgroups_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $Xgroups_menu .= "\n"; + $o++; + } + if ($Xgroups_selected < 1) + {$Xgroups_menu .= "\n";} + else + {$Xgroups_menu .= "\n";} + + + ##### 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"; + $rslt=mysql_query($stmt, $link); + $Dgroups_to_print = mysql_num_rows($rslt); + $Dgroups_menu=''; + $Dgroups_selected=0; + $o=0; + while ($Dgroups_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $Dgroups_menu .= "\n"; + $o++; + } + if ($Dgroups_selected < 1) + {$Dgroups_menu .= "\n";} + else + {$Dgroups_menu .= "\n";} + + + echo "
MODIFY A DID RECORD: $row[0]\n"; + echo "\n"; + echo "\n"; + echo "
DID Extension: $NWB#vicidial_inbound_dids-did_pattern$NWE
DID Description: $NWB#vicidial_inbound_dids-did_description$NWE
Active: $NWB#vicidial_inbound_dids-did_active$NWE
DID Route: $NWB#vicidial_inbound_dids-did_route$NWE
Extension: $NWB#vicidial_inbound_dids-extension$NWE
Extension Context: $NWB#vicidial_inbound_dids-exten_context$NWE
Voicemail Box: $NWB#vicidial_inbound_dids-voicemail_ext$NWE
Phone Extension: $NWB#vicidial_inbound_dids-phone$NWE
Server IP: $NWB#vicidial_inbound_dids-server_ip$NWE
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + $stmt="select menu_id,menu_name,menu_prompt from vicidial_call_menu;"; + $rslt=mysql_query($stmt, $link); + $menus_to_print = mysql_num_rows($rslt); + $menu_list=''; + $i=0; + while ($i < $menus_to_print) + { + $row=mysql_fetch_row($rslt); + $menu_list .= ""; + $i++; + } + + echo "\n"; + + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
DID Extension: $NWB#vicidial_inbound_dids-did_pattern$NWE
DID Description: $NWB#vicidial_inbound_dids-did_description$NWE
Active: $NWB#vicidial_inbound_dids-did_active$NWE
DID Route: $NWB#vicidial_inbound_dids-did_route$NWE
Extension: $NWB#vicidial_inbound_dids-extension$NWE
Extension Context: $NWB#vicidial_inbound_dids-exten_context$NWE
Voicemail Box: voicemail chooser$NWB#vicidial_inbound_dids-voicemail_ext$NWE
Phone Extension: $NWB#vicidial_inbound_dids-phone$NWE
Server IP: $NWB#vicidial_inbound_dids-server_ip$NWE
Call Menu: $NWB#vicidial_inbound_dids-menu_id$NWE
User Agent: $NWB#vicidial_inbound_dids-user$NWE
User Unavailable Action: $NWB#vicidial_inbound_dids-user_unavailable_action$NWE
User Route Settings In-Group: $NWB#vicidial_inbound_dids-user_route_settings_ingroup$NWE
In-Group ID: $NWB#vicidial_inbound_dids-group_id$NWE
In-Group Call Handle Method: $NWB#vicidial_inbound_dids-call_handle_method$NWE
In-Group Agent Search Method: $NWB#vicidial_inbound_dids-agent_search_method$NWE
In-Group List ID: $NWB#vicidial_inbound_dids-list_id$NWE
In-Group Campaign ID: $NWB#vicidial_inbound_dids-campaign_id$NWE
In-Group Phone Code: $NWB#vicidial_inbound_dids-phone_code$NWE
\n"; + echo "

\n"; + + echo "
Click here to see a traffic report for this DID

\n"; + + if ($LOGdelete_dids > 0) + { + echo "

DELETE THIS DID\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this DID\n"; + } } - - echo "
Call Menu: $NWB#vicidial_inbound_dids-menu_id$NWE
User Agent: $NWB#vicidial_inbound_dids-user$NWE
User Unavailable Action: $NWB#vicidial_inbound_dids-user_unavailable_action$NWE
User Route Settings In-Group: $NWB#vicidial_inbound_dids-user_route_settings_ingroup$NWE
In-Group ID: $NWB#vicidial_inbound_dids-group_id$NWE
In-Group Call Handle Method: $NWB#vicidial_inbound_dids-call_handle_method$NWE
In-Group Agent Search Method: $NWB#vicidial_inbound_dids-agent_search_method$NWE
In-Group List ID: $NWB#vicidial_inbound_dids-list_id$NWE
In-Group Campaign ID: $NWB#vicidial_inbound_dids-campaign_id$NWE
In-Group Phone Code: $NWB#vicidial_inbound_dids-phone_code$NWE
\n"; - echo "

\n"; - - echo "
Click here to see a traffic report for this DID

\n"; - - if ($LOGdelete_dids > 0) - { - echo "

DELETE THIS DID\n"; - } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this DID\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} @@ -19153,302 +19390,304 @@ if ($ADD==3311) ###################### if ($ADD==3511) -{ - if ($LOGmodify_dids==1) { - echo "\n"; - $j++; - } - - if ($SSallow_custom_dialplan > 0) - { - echo "\n"; - } - else - { - echo "\n"; - } - - echo "\n"; - echo "
\n"; - echo ""; - - $stmt="SELECT menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group from vicidial_call_menu where menu_id='$menu_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $menu_name = $row[0]; - $menu_prompt = $row[1]; - $menu_timeout = $row[2]; - $menu_timeout_prompt = $row[3]; - $menu_invalid_prompt = $row[4]; - $menu_repeat = $row[5]; - $menu_time_check = $row[6]; - $call_time_id = $row[7]; - $track_in_vdac = $row[8]; - $custom_dialplan_entry= $row[9]; - $tracking_group = $row[10]; - - - echo "
MODIFY A CALL MENU RECORD: $menu_id
\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 "
Menu ID: $menu_id $NWB#vicidial_call_menu-menu_id$NWE
Menu Name: $NWB#vicidial_call_menu-menu_name$NWE
Menu Prompt: audio chooser $NWB#vicidial_call_menu-menu_prompt$NWE
Menu Timeout: $NWB#vicidial_call_menu-menu_timeout$NWE
Menu Timeout Prompt: audio chooser $NWB#vicidial_call_menu-menu_timeout_prompt$NWE
Menu Invalid Prompt: audio chooser $NWB#vicidial_call_menu-menu_invalid_prompt$NWE
Menu Repeat: $NWB#vicidial_call_menu-menu_repeat$NWE
Menu Time Check: $NWB#vicidial_call_menu-menu_time_check$NWE
Call Time: $NWB#vicidial_call_menu-call_time_id$NWE
Track Calls in Real-Time Report: $NWB#vicidial_call_menu-track_in_vdac$NWE
\n"; - - echo "\n"; - echo "\n"; - - $j=0; - $stmtA="SELECT option_value,option_description,option_route,option_route_value,option_route_value_context from vicidial_call_menu_options where menu_id='$menu_id' order by option_value;"; - $rslt=mysql_query($stmtA, $link); - $menus_to_print = mysql_num_rows($rslt); - - while ($menus_to_print > $j) - { + $stmt="SELECT menu_name,menu_prompt,menu_timeout,menu_timeout_prompt,menu_invalid_prompt,menu_repeat,menu_time_check,call_time_id,track_in_vdac,custom_dialplan_entry,tracking_group from vicidial_call_menu where menu_id='$menu_id';"; + $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - $Aoption_value[$j] = $row[0]; - $Aoption_description[$j] = $row[1]; - $Aoption_route[$j] = $row[2]; - $Aoption_route_value[$j] = $row[3]; - $Aoption_route_value_context[$j] = $row[4]; - $j++; - } + $menu_name = $row[0]; + $menu_prompt = $row[1]; + $menu_timeout = $row[2]; + $menu_timeout_prompt = $row[3]; + $menu_invalid_prompt = $row[4]; + $menu_repeat = $row[5]; + $menu_time_check = $row[6]; + $call_time_id = $row[7]; + $track_in_vdac = $row[8]; + $custom_dialplan_entry= $row[9]; + $tracking_group = $row[10]; - $j=0; - while ($menus_to_print > $j) - { - $choose_height = (($j * 40) + 400); - $option_value = $Aoption_value[$j]; - $option_description = $Aoption_description[$j]; - $option_route = $Aoption_route[$j]; - $option_route_value = $Aoption_route_value[$j]; - $option_route_value_context = $Aoption_route_value_context[$j]; - $dtmf_list = "\n"; + echo "\n"; + echo "
\n"; + echo ""; - echo "
Tracking Group: $NWB#vicidial_call_menu-tracking_group$NWE
Call Menu Options:
\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"; + + $j=0; + $stmtA="SELECT option_value,option_description,option_route,option_route_value,option_route_value_context from vicidial_call_menu_options where menu_id='$menu_id' order by option_value;"; + $rslt=mysql_query($stmtA, $link); + $menus_to_print = mysql_num_rows($rslt); + + while ($menus_to_print > $j) { - $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$option_route_value';"; - $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - $did_id = $row[0]; - - echo ""; - echo "DID:"; - echo ""; - echo " \n"; - } - if ($option_route=='HANGUP') - { - echo "Audio File: audio chooser\n"; - } - if ($option_route=='EXTENSION') - { - echo "Extension:   Context: \n"; - } - if ($option_route=='PHONE') - { - echo "Phone: \n"; - } - if ($option_route=='VOICEMAIL') - { - echo "Voicemail Box: \n"; - } - if ($option_route=='AGI') - { - echo "AGI: \n"; + $Aoption_value[$j] = $row[0]; + $Aoption_description[$j] = $row[1]; + $Aoption_route[$j] = $row[2]; + $Aoption_route_value[$j] = $row[3]; + $Aoption_route_value_context[$j] = $row[4]; + $j++; } - echo " -
  \n"; - $j++; - } - - while ($j <= 18) - { - $choose_height = (($j * 40) + 400); - $dtmf_list = ""; + $choose_height = (($j * 40) + 400); + $option_value = $Aoption_value[$j]; + $option_description = $Aoption_description[$j]; + $option_route = $Aoption_route[$j]; + $option_route_value = $Aoption_route_value[$j]; + $option_route_value_context = $Aoption_route_value_context[$j]; - if (eregi("1$|3$|5$|7$|9$", $j)) - {$bgcolor='bgcolor="#B9CBFD"';} + $dtmf_list = ""; + + if (eregi("1$|3$|5$|7$|9$", $j)) + {$bgcolor='bgcolor="#CCFFFF"';} + else + {$bgcolor='bgcolor="#99FFCC"';} + + echo "\n"; + $j++; + } + + while ($j <= 18) + { + $choose_height = (($j * 40) + 400); + $dtmf_list = ""; + + if (eregi("1$|3$|5$|7$|9$", $j)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + $j++; + } + + if ($SSallow_custom_dialplan > 0) + { + echo "\n"; + } else - {$bgcolor='bgcolor="#9BB9FB"';} + { + echo "\n"; + } - echo "\n"; + echo "
Menu ID: $menu_id $NWB#vicidial_call_menu-menu_id$NWE
Menu Name: $NWB#vicidial_call_menu-menu_name$NWE
Menu Prompt: audio chooser $NWB#vicidial_call_menu-menu_prompt$NWE
Menu Timeout: $NWB#vicidial_call_menu-menu_timeout$NWE
Menu Timeout Prompt: audio chooser $NWB#vicidial_call_menu-menu_timeout_prompt$NWE
Menu Invalid Prompt: audio chooser $NWB#vicidial_call_menu-menu_invalid_prompt$NWE
Menu Repeat: $NWB#vicidial_call_menu-menu_repeat$NWE
Menu Time Check: "; - - if (eregi("1$|3$|5$|7$|9$", $j)) - {$bgcolor='bgcolor="#CCFFFF"';} else - {$bgcolor='bgcolor="#99FFCC"';} - - echo "
- Option: $dtmf_list   - Description: - Route: $NWB#vicidial_call_menu-option_value$NWE
- - \n"; - - if ($option_route=='CALLMENU') { - echo ""; - echo "Call Menu:"; - echo ""; - echo " \n"; + echo "\n"; } - if ($option_route=='INGROUP') + echo " $NWB#vicidial_call_menu-menu_time_check$NWE
Call Time: $NWB#vicidial_call_menu-call_time_id$NWE
Track Calls in Real-Time Report: "; - echo " "; - echo "   Handle Method: \n"; - echo "
Search Method: \n"; - echo "   List ID: "; - echo "
Campaign ID: \n"; - echo "   Phone Code: "; + echo "\n"; } - if ($option_route=='DID') + else + { + echo "\n"; + } + echo "$NWB#vicidial_call_menu-track_in_vdac$NWE
Tracking Group: $NWB#vicidial_call_menu-tracking_group$NWE
Call Menu Options:
+ Option: $dtmf_list   + Description: + Route: $NWB#vicidial_call_menu-option_value$NWE
+ + \n"; + + if ($option_route=='CALLMENU') + { + echo ""; + echo "Call Menu:"; + echo ""; + echo " \n"; + } + if ($option_route=='INGROUP') + { + if (strlen($option_route_value_context) < 10) + {$option_route_value_context = 'CID,LB,998,TESTCAMP,1';} + $IGoption_route_value_context = explode(",",$option_route_value_context); + $IGhandle_method = $IGoption_route_value_context[0]; + $IGsearch_method = $IGoption_route_value_context[1]; + $IGlist_id = $IGoption_route_value_context[2]; + $IGcampaign_id = $IGoption_route_value_context[3]; + $IGphone_code = $IGoption_route_value_context[4]; + echo ""; + echo "In-Group:"; + echo ""; + echo " "; + echo " "; + echo "   Handle Method: \n"; + echo "
Search Method: \n"; + echo "   List ID: "; + echo "
Campaign ID: \n"; + echo "   Phone Code: "; + } + if ($option_route=='DID') + { + $stmt="SELECT did_id from vicidial_inbound_dids where did_pattern='$option_route_value';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $did_id = $row[0]; + + echo ""; + echo "DID:"; + echo ""; + echo " \n"; + } + if ($option_route=='HANGUP') + { + echo "Audio File: audio chooser\n"; + } + if ($option_route=='EXTENSION') + { + echo "Extension:   Context: \n"; + } + if ($option_route=='PHONE') + { + echo "Phone: \n"; + } + if ($option_route=='VOICEMAIL') + { + echo "Voicemail Box: voicemail chooser\n"; + } + if ($option_route=='AGI') + { + echo "AGI: \n"; + } + + echo "
+
 
+ Option: $dtmf_list   + Description: + Route: + $NWB#vicidial_call_menu-option_value$NWE
+ + \n"; + echo " +
 
Custom Dialplan Entry:
$NWB#vicidial_call_menu-custom_dialplan_entry$NWE
Custom Dialplan Entry: Disabled $NWB#vicidial_call_menu-custom_dialplan_entry$NWE
- Option: $dtmf_list   - Description: - Route: - $NWB#vicidial_call_menu-option_value$NWE
+ echo "
\n"; + echo "

\n"; - \n"; - echo " -
 
Custom Dialplan Entry:
$NWB#vicidial_call_menu-custom_dialplan_entry$NWE
Custom Dialplan Entry: Disabled $NWB#vicidial_call_menu-custom_dialplan_entry$NWE
\n"; - echo "

\n"; - - echo "DIDS USING THIS CALL MENU:
\n"; - echo "\n"; + echo "DIDS USING THIS CALL MENU:
\n"; + echo "
\n"; $stmt="SELECT did_id,did_pattern,did_description from vicidial_inbound_dids where menu_id='$menu_id' and did_route='CALLMENU';"; $rslt=mysql_query($stmt, $link); $dids_to_print = mysql_num_rows($rslt); $o=0; - while ($dids_to_print > $o) { + while ($dids_to_print > $o) + { $row=mysql_fetch_row($rslt); echo "\n"; $o++; - } + } - echo "
$row[1] $row[2]

\n"; + echo "

\n"; - echo "CALL MENUS USING THIS CALL MENU:
\n"; - echo "\n"; + echo "CALL MENUS USING THIS CALL MENU:
\n"; + echo "
\n"; $stmt="SELECT distinct vm.menu_id,menu_name from vicidial_call_menu vm,vicidial_call_menu_options vmo where vm.menu_id=vmo.menu_id and option_route='CALLMENU' and option_route_value='$menu_id';"; $rslt=mysql_query($stmt, $link); $cms_to_print = mysql_num_rows($rslt); $o=0; - while ($cms_to_print > $o) { + while ($cms_to_print > $o) + { $row=mysql_fetch_row($rslt); echo "\n"; $o++; - } + } - echo "
$row[0] $row[1]
\n"; + echo "\n"; - if ($LOGdelete_dids > 0) - { - echo "

DELETE THIS CALL MENU\n"; + if ($LOGdelete_dids > 0) + { + echo "

DELETE THIS CALL MENU\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this CALL MENU
\n"; + } } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this CALL MENU\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} @@ -19457,62 +19696,62 @@ if ($ADD==3511) ###################### if ($ADD==31111) -{ + { if ($LOGmodify_remoteagents==1) - { - echo "\n"; -echo "\n"; - -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $remote_agent_id = $row[0]; - $user_start = $row[1]; - $number_of_lines = $row[2]; - $server_ip = $row[3]; - $conf_exten = $row[4]; - $status = $row[5]; - $campaign_id = $row[6]; - - echo "
MODIFY A REMOTE AGENTS ENTRY: $row[0]
\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
Server IP: $NWB#vicidial_remote_agents-server_ip$NWE
External Extension: (dial plan number dialed to reach agents)$NWB#vicidial_remote_agents-conf_exten$NWE
Status: $NWB#vicidial_remote_agents-status$NWE
Campaign: $NWB#vicidial_remote_agents-campaign_id$NWE
Inbound Groups: \n"; - echo "$groups_list"; - echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
\n"; - echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; - - - if ($LOGdelete_remote_agents > 0) { - echo "

DELETE THIS REMOTE AGENT\n"; + echo "
\n"; + echo ""; + + $stmt="SELECT remote_agent_id,user_start,number_of_lines,server_ip,conf_exten,status,campaign_id,closer_campaigns from vicidial_remote_agents where remote_agent_id='$remote_agent_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $remote_agent_id = $row[0]; + $user_start = $row[1]; + $number_of_lines = $row[2]; + $server_ip = $row[3]; + $conf_exten = $row[4]; + $status = $row[5]; + $campaign_id = $row[6]; + + echo "
MODIFY A REMOTE AGENTS ENTRY: $row[0]\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
User ID Start: (numbers only, incremented)$NWB#vicidial_remote_agents-user_start$NWE
Number of Lines: (numbers only)$NWB#vicidial_remote_agents-number_of_lines$NWE
Server IP: $NWB#vicidial_remote_agents-server_ip$NWE
External Extension: (dial plan number dialed to reach agents)$NWB#vicidial_remote_agents-conf_exten$NWE
Status: $NWB#vicidial_remote_agents-status$NWE
Campaign: $NWB#vicidial_remote_agents-campaign_id$NWE
Inbound Groups: \n"; + echo "$groups_list"; + echo "$NWB#vicidial_remote_agents-closer_campaigns$NWE
\n"; + echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; + + + if ($LOGdelete_remote_agents > 0) + { + echo "

DELETE THIS REMOTE AGENT\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this remote agent
\n"; + } } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this remote agent\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -19520,118 +19759,118 @@ if ($ADD==31111) ###################### if ($ADD==311111) -{ - if ($LOGmodify_usergroups==1) { - 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 * from vicidial_user_groups where user_group='$user_group';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $user_group = $row[0]; - $group_name = $row[1]; - $GROUP_shifts = $row[5]; - $forced_timeclock_login = $row[6]; - $shift_enforcement = $row[7]; - $VGROUP_vgroups = $row[8]; - $agent_status_view_time = $row[9]; - - echo ""; - - echo "
MODIFY A USERS GROUP ENTRY\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - - echo "\n"; - - echo "\n"; - - - echo "\n"; + + if ($SSqc_features_active > 0) + { + echo "\n"; + echo "\n"; + } + + echo "\n"; + echo "
Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
Force Timeclock Login: $NWB#vicidial_user_groups-forced_timeclock_login$NWE
Shift Enforcement: $NWB#vicidial_user_groups-shift_enforcement$NWE
Allowed Campaigns:
$NWB#vicidial_user_groups-allowed_campaigns$NWE
\n"; - echo "$campaigns_list
 "; - echo "
Group Shifts:
$NWB#vicidial_user_groups-group_shifts$NWE
\n"; - $stmt="SELECT shift_id,shift_name from vicidial_shifts order by shift_id"; - $rslt=mysql_query($stmt, $link); - $shifts_to_print = mysql_num_rows($rslt); - $o=0; - while ($shifts_to_print > $o) + if ($LOGmodify_usergroups==1) { - $rowx=mysql_fetch_row($rslt); - $shift_id_value = $rowx[0]; - $shift_name_value = $rowx[1]; - echo "
\n"; + echo ""; + + $stmt="SELECT user_group,group_name,allowed_campaigns,qc_allowed_campaigns,qc_allowed_inbound_groups,group_shifts,forced_timeclock_login,shift_enforcement,agent_status_viewable_groups,agent_status_view_time from vicidial_user_groups where user_group='$user_group';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $user_group = $row[0]; + $group_name = $row[1]; + $GROUP_shifts = $row[5]; + $forced_timeclock_login = $row[6]; + $shift_enforcement = $row[7]; + $VGROUP_vgroups = $row[8]; + $agent_status_view_time = $row[9]; + + echo ""; + + echo "
MODIFY A USERS GROUP ENTRY\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"; - - if ($SSqc_features_active > 0) - { - echo "\n"; - echo "\n"; - } - echo "\n"; - echo "
Group: (no spaces or punctuation)$NWB#vicidial_user_groups-user_group$NWE
Description: (description of group)$NWB#vicidial_user_groups-group_name$NWE
Force Timeclock Login: $NWB#vicidial_user_groups-forced_timeclock_login$NWE
Shift Enforcement: $NWB#vicidial_user_groups-shift_enforcement$NWE
Allowed Campaigns:
$NWB#vicidial_user_groups-allowed_campaigns$NWE
\n"; + echo "$campaigns_list
 "; + echo "
Group Shifts:
$NWB#vicidial_user_groups-group_shifts$NWE
\n"; + $stmt="SELECT shift_id,shift_name from vicidial_shifts order by shift_id"; + $rslt=mysql_query($stmt, $link); + $shifts_to_print = mysql_num_rows($rslt); + $o=0; + while ($shifts_to_print > $o) { - if (ereg(" $shift_id_value ", $GROUP_shifts)) + $rowx=mysql_fetch_row($rslt); + $shift_id_value = $rowx[0]; + $shift_name_value = $rowx[1]; + echo " $shift_id_value - $shift_name_value
\n"; + $o++; } - echo "> $shift_id_value - $shift_name_value
\n"; - $o++; - } - echo "
 
Agent Status Viewable Groups:
$NWB#vicidial_user_groups-agent_status_viewable_groups$NWE
\n"; - echo "ALL-GROUPS - All user groups in the system
\n"; - echo "CAMPAIGN-AGENTS - All users logged into the same camapaign as the agent
\n"; + echo "
Agent Status Viewable Groups:
$NWB#vicidial_user_groups-agent_status_viewable_groups$NWE
\n"; + echo "ALL-GROUPS - All user groups in the system
\n"; + echo "CAMPAIGN-AGENTS - All users logged into the same camapaign as the agent
\n"; - $stmt="SELECT user_group,group_name from vicidial_user_groups order by user_group"; - $rslt=mysql_query($stmt, $link); - $view_groups_to_print = mysql_num_rows($rslt); - $o=0; - while ($view_groups_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $vgroups_id_value = $rowx[0]; - $vgroups_name_value = $rowx[1]; - echo " $o) { - if (ereg(" $vgroups_id_value ", $VGROUP_vgroups)) + $rowx=mysql_fetch_row($rslt); + $vgroups_id_value = $rowx[0]; + $vgroups_name_value = $rowx[1]; + echo " $vgroups_id_value - $vgroups_name_value
\n"; + $o++; } - echo "> $vgroups_id_value - $vgroups_name_value
\n"; - $o++; - } - echo "
 
Agent Status View Time: $NWB#vicidial_user_groups-agent_status_view_time$NWE
QC Allowed Campaigns:
$NWB#vicidial_user_groups-qc_allowed_campaigns$NWE
\n"; - echo "$qc_campaigns_list"; echo "
 
QC Allowed Inbound Groups:
$NWB#vicidial_user_groups-qc_allowed_inbound_groups$NWE
\n"; - echo "$qc_groups_list"; - echo "
 
\n"; + echo "
Agent Status View Time: $NWB#vicidial_user_groups-agent_status_view_time$NWE
QC Allowed Campaigns:
$NWB#vicidial_user_groups-qc_allowed_campaigns$NWE
\n"; + echo "$qc_campaigns_list"; + echo "
 
QC Allowed Inbound Groups:
$NWB#vicidial_user_groups-qc_allowed_inbound_groups$NWE
\n"; + echo "$qc_groups_list"; + echo "
 
\n"; - ### list of users in this user group + ### list of users in this user group $active_confs = 0; $stmt="SELECT user,full_name,user_level,active from vicidial_users where user_group='$user_group'"; @@ -19645,45 +19884,44 @@ if ($ADD==311111) $o=0; while ($users_to_print > $o) - { + { $rowx=mysql_fetch_row($rsltx); $o++; - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - echo "
$rowx[0]$rowx[1]$rowx[2]$rowx[3]
$rowx[0]$rowx[1]$rowx[2]$rowx[3]

\n"; + + + echo "

Click here to see all CallBack Holds in this user group

\n"; + echo "

Click here to see the Timeclock Status for this user group

\n"; + + if ($LOGdelete_user_groups > 0) + { + echo "

DELETE THIS USER GROUP\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this user group\n"; + } } - - echo "

\n"; - - - - echo "

Click here to see all CallBack Holds in this user group

\n"; - echo "

Click here to see the Timeclock Status for this user group

\n"; - - if ($LOGdelete_user_groups > 0) - { - echo "

DELETE THIS USER GROUP\n"; - } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this user group
\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -19691,95 +19929,95 @@ if ($ADD==311111) ###################### if ($ADD==3111111) -{ + { if ($LOGmodify_scripts==1) - { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_scripts where script_id='$script_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $script_name = $row[1]; - $script_comments = $row[2]; - $script_text = stripslashes($row[3]); - $active = $row[4]; - echo ""; - - echo "
MODIFY A SCRIPT\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Script ID: $script_id$NWB#vicidial_scripts-script_name$NWE
Script Name: (title of the script)$NWB#vicidial_scripts-script_name$NWE
Script Comments: $NWB#vicidial_scripts-script_comments$NWE
Active: $NWB#vicidial_scripts-active$NWE
Script Text:

Preview Script
"; - # BEGIN Insert Field - echo ""; - echo "
"; - # END Insert Field - echo " $NWB#vicidial_scripts-script_text$NWE
\n"; - - if ($LOGdelete_scripts > 0) { - echo "

DELETE THIS SCRIPT\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo ""; + + $stmt="SELECT script_id,script_name,script_comments,script_text,active from vicidial_scripts where script_id='$script_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $script_name = $row[1]; + $script_comments = $row[2]; + $script_text = stripslashes($row[3]); + $active = $row[4]; + echo ""; + + echo "
MODIFY A SCRIPT\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Script ID: $script_id$NWB#vicidial_scripts-script_name$NWE
Script Name: (title of the script)$NWB#vicidial_scripts-script_name$NWE
Script Comments: $NWB#vicidial_scripts-script_comments$NWE
Active: $NWB#vicidial_scripts-active$NWE
Script Text:

Preview Script
"; + # BEGIN Insert Field + echo ""; + echo "
"; + # END Insert Field + echo " $NWB#vicidial_scripts-script_text$NWE
\n"; + + if ($LOGdelete_scripts > 0) + { + echo "

DELETE THIS SCRIPT\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this script\n"; + } } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this script\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -19787,30 +20025,30 @@ if ($ADD==3111111) ###################### if ($ADD==31111111) -{ - if ($LOGmodify_filters==1) { - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; - echo ""; + if ($LOGmodify_filters==1) + { + echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; + echo ""; - $stmt="SELECT * from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $lead_filter_name = $row[1]; - $lead_filter_comments = $row[2]; - $lead_filter_sql = stripslashes($row[3]); - echo ""; + $stmt="SELECT lead_filter_id,lead_filter_name,lead_filter_comments,lead_filter_sql from vicidial_lead_filters where lead_filter_id='$lead_filter_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $lead_filter_name = $row[1]; + $lead_filter_comments = $row[2]; + $lead_filter_sql = stripslashes($row[3]); + echo ""; - echo "
MODIFY A FILTER\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Filter ID: $lead_filter_id$NWB#vicidial_lead_filters-lead_filter_id$NWE
Filter Name: (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
Filter Comments: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
Filter SQL: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
\n"; + echo "
MODIFY A FILTER
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Filter ID: $lead_filter_id$NWB#vicidial_lead_filters-lead_filter_id$NWE
Filter Name: (short description of the filter)$NWB#vicidial_lead_filters-lead_filter_name$NWE
Filter Comments: $NWB#vicidial_lead_filters-lead_filter_comments$NWE
Filter SQL: $NWB#vicidial_lead_filters-lead_filter_sql$NWE
\n"; ##### get campaigns listing for dynamic pulldown $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns order by campaign_id"; @@ -19826,31 +20064,31 @@ if ($ADD==31111111) $o++; } - echo "

"; - echo "
TEST ON CAMPAIGN:
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "

"; + echo "
TEST ON CAMPAIGN: \n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; - if ($LOGdelete_filters > 0) - { - echo "

DELETE THIS FILTER\n"; + if ($LOGdelete_filters > 0) + { + echo "

DELETE THIS FILTER\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this filter\n"; + } } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this filter\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -19858,46 +20096,44 @@ if ($ADD==31111111) ###################### if ($ADD==321111111) -{ -if ($LOGmodify_call_times==1) -{ - -if ( ($stage=="ADD") and (strlen($state_rule)>0) ) { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; + if ($LOGmodify_call_times==1) + { + if ( ($stage=="ADD") and (strlen($state_rule)>0) ) + { + $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $ct_state_call_times = $row[0]; - if (eregi("\|$",$ct_state_call_times)) - {$ct_state_call_times = "$ct_state_call_times$state_rule\|";} + if (eregi("\|$",$ct_state_call_times)) + {$ct_state_call_times = "$ct_state_call_times$state_rule\|";} + else + {$ct_state_call_times = "$ct_state_call_times\|$state_rule\|";} + $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; + $rslt=mysql_query($stmt, $link); + echo "State Rule Added: $state_rule
\n"; + } + if ( ($stage=="REMOVE") and (strlen($state_rule)>0) ) + { + $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $ct_state_call_times = $row[0]; + + $ct_state_call_times = eregi_replace("\|$state_rule\|",'|',$ct_state_call_times); + $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; + $rslt=mysql_query($stmt, $link); + echo "State Rule Removed: $state_rule
\n"; + } + + $ADD=311111111; + } else - {$ct_state_call_times = "$ct_state_call_times\|$state_rule\|";} - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "State Rule Added: $state_rule
\n"; + { + echo "You are not authorized to view this page. Please go back."; + } } -if ( ($stage=="REMOVE") and (strlen($state_rule)>0) ) - { - $stmt="SELECT ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $ct_state_call_times = $row[0]; - - $ct_state_call_times = eregi_replace("\|$state_rule\|",'|',$ct_state_call_times); - $stmt="UPDATE vicidial_call_times set ct_state_call_times='$ct_state_call_times' where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - echo "State Rule Removed: $state_rule
\n"; - } - -$ADD=311111111; -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} ###################### @@ -19905,152 +20141,154 @@ echo "You are not authorized to view this page. Please go back."; ###################### if ($ADD==311111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - -$ct_srs=1; -$b=0; -$srs_SQL =''; -if (strlen($ct_state_call_times)>2) { - $state_rules = explode('|',$ct_state_call_times); - $ct_srs = ((count($state_rules)) - 1); - } -echo "\n"; -echo "\n"; -while($ct_srs >= $b) - { - if (strlen($state_rules[$b])>0) + if ($LOGmodify_call_times==1) { - $stmt="SELECT state_call_time_state,state_call_time_name from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; + echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_call_times where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $call_time_name = $row[1]; - $call_time_comments = $row[2]; - $ct_default_start = $row[3]; - $ct_default_stop = $row[4]; - $ct_sunday_start = $row[5]; - $ct_sunday_stop = $row[6]; - $ct_monday_start = $row[7]; - $ct_monday_stop = $row[8]; - $ct_tuesday_start = $row[9]; - $ct_tuesday_stop = $row[10]; - $ct_wednesday_start = $row[11]; - $ct_wednesday_stop = $row[12]; - $ct_thursday_start = $row[13]; - $ct_thursday_stop = $row[14]; - $ct_friday_start = $row[15]; - $ct_friday_stop = $row[16]; - $ct_saturday_start = $row[17]; - $ct_saturday_stop = $row[18]; - $ct_state_call_times = $row[19]; - -echo ""; - -echo "
MODIFY A CALL TIME\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Call Time ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
Default Start: Default Stop: $NWB#vicidial_call_times-ct_default_start$NWE
Sunday Start: Sunday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Monday Start: Monday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Tuesday Start: Tuesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Wednesday Start: Wednesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Thursday Start: Thursday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Friday Start: Friday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Saturday Start: Saturday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Active State Call Time Definitions for this Record:  
\n"; - $srs_SQL .= "'$state_rules[$b]',"; - $srs_state_SQL .= "'$row[0]',"; + $call_time_name = $row[1]; + $call_time_comments = $row[2]; + $ct_default_start = $row[3]; + $ct_default_stop = $row[4]; + $ct_sunday_start = $row[5]; + $ct_sunday_stop = $row[6]; + $ct_monday_start = $row[7]; + $ct_monday_stop = $row[8]; + $ct_tuesday_start = $row[9]; + $ct_tuesday_stop = $row[10]; + $ct_wednesday_start = $row[11]; + $ct_wednesday_stop = $row[12]; + $ct_thursday_start = $row[13]; + $ct_thursday_stop = $row[14]; + $ct_friday_start = $row[15]; + $ct_friday_stop = $row[16]; + $ct_saturday_start = $row[17]; + $ct_saturday_stop = $row[18]; + $ct_state_call_times = $row[19]; + + echo ""; + + echo "
MODIFY A CALL TIME
\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 "\n"; + + $ct_srs=1; + $b=0; + $srs_SQL =''; + if (strlen($ct_state_call_times)>2) + { + $state_rules = explode('|',$ct_state_call_times); + $ct_srs = ((count($state_rules)) - 1); + } + echo "\n"; + echo "\n"; + while($ct_srs >= $b) + { + if (strlen($state_rules[$b])>0) + { + $stmt="SELECT state_call_time_state,state_call_time_name from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + echo "\n"; + $srs_SQL .= "'$state_rules[$b]',"; + $srs_state_SQL .= "'$row[0]',"; + } + $b++; + } + if (strlen($srs_SQL)>2) + { + $srs_SQL = "$srs_SQL''"; + $srs_state_SQL = "$srs_state_SQL''"; + $srs_SQL = "where state_call_time_id NOT IN($srs_SQL) and state_call_time_state NOT IN($srs_state_SQL)"; + } + else + {$srs_SQL='';} + $stmt="SELECT state_call_time_id,state_call_time_name from vicidial_state_call_times $srs_SQL order by state_call_time_id;"; + $rslt=mysql_query($stmt, $link); + $sct_to_print = mysql_num_rows($rslt); + $sct_list=''; + + $o=0; + while ($sct_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $sct_list .= "\n"; + $o++; + } + echo "\n"; + echo "\n"; + + echo "
\n"; + echo ""; + + $stmt="SELECT call_time_id,call_time_name,call_time_comments,ct_default_start,ct_default_stop,ct_sunday_start,ct_sunday_stop,ct_monday_start,ct_monday_stop,ct_tuesday_start,ct_tuesday_stop,ct_wednesday_start,ct_wednesday_stop,ct_thursday_start,ct_thursday_stop,ct_friday_start,ct_friday_stop,ct_saturday_start,ct_saturday_stop,ct_state_call_times from vicidial_call_times where call_time_id='$call_time_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - echo "
$state_rules[$b] - REMOVE $row[0] - $row[1]
Call Time ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
Default Start: Default Stop: $NWB#vicidial_call_times-ct_default_start$NWE
Sunday Start: Sunday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Monday Start: Monday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Tuesday Start: Tuesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Wednesday Start: Wednesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Thursday Start: Thursday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Friday Start: Friday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Saturday Start: Saturday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Active State Call Time Definitions for this Record:  
$state_rules[$b] - REMOVE $row[0] - $row[1]
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "Add state call time rule:


\n"; + echo "CAMPAIGNS USING THIS CALL TIME:
\n"; + echo "\n"; + + $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where local_call_time='$call_time_id';"; + $rslt=mysql_query($stmt, $link); + $camps_to_print = mysql_num_rows($rslt); + $o=0; + while ($camps_to_print > $o) + { + $row=mysql_fetch_row($rslt); + echo "\n"; + $o++; + } + + echo "
$row[0] $row[1]
\n"; + echo "INBOUND GROUPS USING THIS CALL TIME:
\n"; + echo "\n"; + + $stmt="SELECT group_id,group_name from vicidial_inbound_groups where call_time_id='$call_time_id';"; + $rslt=mysql_query($stmt, $link); + $camps_to_print = mysql_num_rows($rslt); + $o=0; + while ($camps_to_print > $o) + { + $row=mysql_fetch_row($rslt); + echo "\n"; + $o++; + } + + echo "
$row[0] $row[1]
\n"; + echo "

\n"; + + if ($LOGdelete_call_times > 0) + { + echo "

DELETE THIS CALL TIME DEFINITION\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this call time
\n"; + } } - $b++; + else + { + echo "You are not authorized to view this page. Please go back."; + } + } -if (strlen($srs_SQL)>2) - { - $srs_SQL = "$srs_SQL''"; - $srs_state_SQL = "$srs_state_SQL''"; - $srs_SQL = "where state_call_time_id NOT IN($srs_SQL) and state_call_time_state NOT IN($srs_state_SQL)"; - } -else - {$srs_SQL='';} -$stmt="SELECT state_call_time_id,state_call_time_name from vicidial_state_call_times $srs_SQL order by state_call_time_id;"; -$rslt=mysql_query($stmt, $link); -$sct_to_print = mysql_num_rows($rslt); -$sct_list=''; - -$o=0; -while ($sct_to_print > $o) { - $rowx=mysql_fetch_row($rslt); - $sct_list .= "\n"; - $o++; -} -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "Add state call time rule:


\n"; -echo "CAMPAIGNS USING THIS CALL TIME:
\n"; -echo "\n"; - - $stmt="SELECT campaign_id,campaign_name from vicidial_campaigns where local_call_time='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - echo "\n"; - $o++; - } - -echo "
$row[0] $row[1]
\n"; -echo "INBOUND GROUPS USING THIS CALL TIME:
\n"; -echo "\n"; - - $stmt="SELECT group_id,group_name from vicidial_inbound_groups where call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - echo "\n"; - $o++; - } - -echo "
$row[0] $row[1]
\n"; -echo "


\n"; - -if ($LOGdelete_call_times > 0) - { - echo "

DELETE THIS CALL TIME DEFINITION\n"; - } -if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this call time\n"; - } -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} ###################### @@ -20058,332 +20296,327 @@ echo "You are not authorized to view this page. Please go back."; ###################### if ($ADD==3111111111) -{ - -if ($LOGmodify_call_times==1) -{ -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 * from vicidial_state_call_times where state_call_time_id='$call_time_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $state_call_time_state =$row[1]; - $call_time_name = $row[2]; - $call_time_comments = $row[3]; - $ct_default_start = $row[4]; - $ct_default_stop = $row[5]; - $ct_sunday_start = $row[6]; - $ct_sunday_stop = $row[7]; - $ct_monday_start = $row[8]; - $ct_monday_stop = $row[9]; - $ct_tuesday_start = $row[10]; - $ct_tuesday_stop = $row[11]; - $ct_wednesday_start = $row[12]; - $ct_wednesday_stop = $row[13]; - $ct_thursday_start = $row[14]; - $ct_thursday_stop = $row[15]; - $ct_friday_start = $row[16]; - $ct_friday_stop = $row[17]; - $ct_saturday_start = $row[18]; - $ct_saturday_stop = $row[19]; - -echo ""; - -echo "
MODIFY A STATE CALL TIME
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Call Time ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
State Call Time State: $NWB#vicidial_call_times-state_call_time_state$NWE
State Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
State Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
Default Start: Default Stop: $NWB#vicidial_call_times-ct_default_start$NWE
Sunday Start: Sunday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Monday Start: Monday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Tuesday Start: Tuesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Wednesday Start: Wednesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Thursday Start: Thursday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Friday Start: Friday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Saturday Start: Saturday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE


\n"; -echo "CALL TIMES USING THIS STATE CALL TIME:
\n"; -echo "\n"; - - $stmt="SELECT call_time_id,call_time_name from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\";"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { - $row=mysql_fetch_row($rslt); - echo "\n"; - $o++; - } - -echo "
$row[0] $row[1]
\n"; -echo "


\n"; - -if ($LOGdelete_call_times > 0) { - echo "

DELETE THIS STATE CALL TIME DEFINITION\n"; + if ($LOGmodify_call_times==1) + { + 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 state_call_time_id,state_call_time_state,state_call_time_name,state_call_time_comments,sct_default_start,sct_default_stop,sct_sunday_start,sct_sunday_stop,sct_monday_start,sct_monday_stop,sct_tuesday_start,sct_tuesday_stop,sct_wednesday_start,sct_wednesday_stop,sct_thursday_start,sct_thursday_stop,sct_friday_start,sct_friday_stop,sct_saturday_start,sct_saturday_stop from vicidial_state_call_times where state_call_time_id='$call_time_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $state_call_time_state =$row[1]; + $call_time_name = $row[2]; + $call_time_comments = $row[3]; + $ct_default_start = $row[4]; + $ct_default_stop = $row[5]; + $ct_sunday_start = $row[6]; + $ct_sunday_stop = $row[7]; + $ct_monday_start = $row[8]; + $ct_monday_stop = $row[9]; + $ct_tuesday_start = $row[10]; + $ct_tuesday_stop = $row[11]; + $ct_wednesday_start = $row[12]; + $ct_wednesday_stop = $row[13]; + $ct_thursday_start = $row[14]; + $ct_thursday_stop = $row[15]; + $ct_friday_start = $row[16]; + $ct_friday_stop = $row[17]; + $ct_saturday_start = $row[18]; + $ct_saturday_stop = $row[19]; + + echo ""; + + echo "
MODIFY A STATE CALL TIME\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Call Time ID: $call_time_id$NWB#vicidial_call_times-call_time_id$NWE
State Call Time State: $NWB#vicidial_call_times-state_call_time_state$NWE
State Call Time Name: (short description of the call time)$NWB#vicidial_call_times-call_time_name$NWE
State Call Time Comments: $NWB#vicidial_call_times-call_time_comments$NWE
Default Start: Default Stop: $NWB#vicidial_call_times-ct_default_start$NWE
Sunday Start: Sunday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Monday Start: Monday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Tuesday Start: Tuesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Wednesday Start: Wednesday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Thursday Start: Thursday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Friday Start: Friday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE
Saturday Start: Saturday Stop: $NWB#vicidial_call_times-ct_sunday_start$NWE


\n"; + echo "CALL TIMES USING THIS STATE CALL TIME:
\n"; + echo "\n"; + + $stmt="SELECT call_time_id,call_time_name from vicidial_call_times where ct_state_call_times LIKE \"%|$call_time_id|%\";"; + $rslt=mysql_query($stmt, $link); + $camps_to_print = mysql_num_rows($rslt); + $o=0; + while ($camps_to_print > $o) + { + $row=mysql_fetch_row($rslt); + echo "\n"; + $o++; + } + + echo "
$row[0] $row[1]
\n"; + echo "

\n"; + + if ($LOGdelete_call_times > 0) + { + echo "

DELETE THIS STATE CALL TIME DEFINITION\n"; + } + } + else + { + echo "You are not authorized to view this page. Please go back."; + } } -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} - - ###################### # ADD=331111111 modify shift definition info in the system ###################### if ($ADD==331111111) -{ - -if ($LOGmodify_call_times==1) -{ -echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_shifts where shift_id='$shift_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $shift_name = $row[1]; - $shift_start_time = $row[2]; - $shift_length = $row[3]; - $shift_weekdays = $row[4]; - - $shift_start_hour = substr($shift_start_time,0,2); - $shift_start_min = substr($shift_start_time,2,2); - $shift_length_hour = substr($shift_length,0,2); - $shift_length_min = substr($shift_length,3,2); - $shift_end_hour = ($shift_start_hour + $shift_length_hour); - $shift_end_min = ($shift_start_min + $shift_length_min); - if ($shift_end_min >=60) + { + if ($LOGmodify_call_times==1) { - $shift_end_min = ($shift_end_min - 60); - $shift_end_hour++; - } - if ($shift_end_hour >=24) - { - $shift_end_hour = ($shift_end_hour - 24); - } - $shift_end_hour = sprintf("%02s", $shift_end_hour); - $shift_end_min = sprintf("%02s", $shift_end_min); - $shift_end = "$shift_end_hour$shift_end_min"; + echo "
\n"; + echo ""; -echo ""; - -echo "
MODIFY A SHIFT\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "
Shift ID: $shift_id
Shift Name: (short description of the shift)$NWB#vicidial_shifts-shift_name$NWE
Shift Start Time: \n"; -echo "   Shift End Time: \n"; -echo " $NWB#vicidial_shifts-shift_start_time$NWE
Shift Length: $NWB#vicidial_shifts-shift_length$NWE
Shift Weekdays:
$NWB#vicidial_shifts-shift_weekdays$NWE
\n"; -echo "Sunday
\n"; -echo "Monday
\n"; -echo "Tuesday
\n"; -echo "Wednesday
\n"; -echo "Thursday
\n"; -echo "Friday
\n"; -echo "Saturday
\n"; -echo "
\n"; - -echo "


\n"; -echo "USER GROUPS USING THIS SHIFT:
\n"; -echo "\n"; - - - $stmt="SELECT user_group,group_name from vicidial_user_groups where group_shifts LIKE\"% $shift_id %\";"; - $rslt=mysql_query($stmt, $link); - $camps_to_print = mysql_num_rows($rslt); - $o=0; - while ($camps_to_print > $o) { + $stmt="SELECT shift_id,shift_name,shift_start_time,shift_length,shift_weekdays from vicidial_shifts where shift_id='$shift_id';"; + $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); - echo "\n"; - $o++; + $shift_name = $row[1]; + $shift_start_time = $row[2]; + $shift_length = $row[3]; + $shift_weekdays = $row[4]; + + $shift_start_hour = substr($shift_start_time,0,2); + $shift_start_min = substr($shift_start_time,2,2); + $shift_length_hour = substr($shift_length,0,2); + $shift_length_min = substr($shift_length,3,2); + $shift_end_hour = ($shift_start_hour + $shift_length_hour); + $shift_end_min = ($shift_start_min + $shift_length_min); + if ($shift_end_min >=60) + { + $shift_end_min = ($shift_end_min - 60); + $shift_end_hour++; + } + if ($shift_end_hour >=24) + { + $shift_end_hour = ($shift_end_hour - 24); + } + $shift_end_hour = sprintf("%02s", $shift_end_hour); + $shift_end_min = sprintf("%02s", $shift_end_min); + $shift_end = "$shift_end_hour$shift_end_min"; + + echo ""; + + echo "
MODIFY A SHIFT\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
$row[0] $row[1]
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Shift ID: $shift_id
Shift Name: (short description of the shift)$NWB#vicidial_shifts-shift_name$NWE
Shift Start Time: \n"; + echo "   Shift End Time: \n"; + echo " $NWB#vicidial_shifts-shift_start_time$NWE
Shift Length: $NWB#vicidial_shifts-shift_length$NWE
Shift Weekdays:
$NWB#vicidial_shifts-shift_weekdays$NWE
\n"; + echo "Sunday
\n"; + echo "Monday
\n"; + echo "Tuesday
\n"; + echo "Wednesday
\n"; + echo "Thursday
\n"; + echo "Friday
\n"; + echo "Saturday
\n"; + echo "
\n"; + + echo "


\n"; + echo "USER GROUPS USING THIS SHIFT:
\n"; + echo "\n"; + + $stmt="SELECT user_group,group_name from vicidial_user_groups where group_shifts LIKE\"% $shift_id %\";"; + $rslt=mysql_query($stmt, $link); + $camps_to_print = mysql_num_rows($rslt); + $o=0; + while ($camps_to_print > $o) + { + $row=mysql_fetch_row($rslt); + echo "\n"; + $o++; + } + + echo "
$row[0] $row[1]
\n"; + echo "

\n"; + + if ($LOGdelete_call_times > 0) + { + echo "

DELETE THIS SHIFT DEFINITION\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this shift\n"; + } + } + else + { + echo "You are not authorized to view this page. Please go back."; + } + } -echo "\n"; -echo "

\n"; - -if ($LOGdelete_call_times > 0) - { - echo "

DELETE THIS SHIFT DEFINITION\n"; - } -if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this shift\n"; - } -} -else -{ -echo "You are not authorized to view this page. Please go back."; -} - -} - - ###################### # ADD=31111111111 modify phone record in the system ###################### if ($ADD==31111111111) -{ + { if ($LOGast_admin_access==1) - { - echo "
\n"; - echo ""; - - $stmt="SELECT * from phones where extension='$extension' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "
MODIFY A PHONE RECORD: $row[1]\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 "\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 "\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 "\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 "\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 "\n"; - - echo "
Phone extension: $NWB#phones-extension$NWE
Dial Plan Number: (digits only)$NWB#phones-dialplan_number$NWE
Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
Phone IP address: (optional)$NWB#phones-phone_ip$NWE
Computer IP address: (optional)$NWB#phones-computer_ip$NWE
Server IP: $NWB#phones-server_ip$NWE
Login: $NWB#phones-login$NWE
Password: $NWB#phones-pass$NWE
Status: $NWB#phones-status$NWE
Active Account: $NWB#phones-active$NWE
Phone Type: $NWB#phones-phone_type$NWE
Full Name: $NWB#phones-fullname$NWE
Email: $NWB#phones-email$NWE
Company: $NWB#phones-company$NWE
Picture: $NWB#phones-picture$NWE
New Messages: $row[14]$NWB#phones-messages$NWE
Old Messages: $row[15]$NWB#phones-old_messages$NWE
Client Protocol: $NWB#phones-protocol$NWE
Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE
Phone Ring Timeout: $NWB#phones-phone_ring_timeout$NWE
Manager Login: $NWB#phones-ASTmgrUSERNAME$NWE
Manager Secret: $NWB#phones-ASTmgrSECRET$NWE
VICIDIAL Default User: $NWB#phones-login_user$NWE
VICIDIAL Default Pass: $NWB#phones-login_pass$NWE
VICIDIAL Default Campaign: $NWB#phones-login_campaign$NWE
Park Exten: $NWB#phones-park_on_extension$NWE
Conf Exten: $NWB#phones-conf_on_extension$NWE
VICIDIAL Park Exten: $NWB#phones-VICIDIAL_park_on_extension$NWE
VICIDIAL Park File: $NWB#phones-VICIDIAL_park_on_filename$NWE
Monitor Prefix: $NWB#phones-monitor_prefix$NWE
Recording Exten: $NWB#phones-recording_exten$NWE
VMailMain Exten: $NWB#phones-voicemail_exten$NWE
VMailDump Exten: $NWB#phones-voicemail_dump_exten$NWE
Exten Context: $NWB#phones-ext_context$NWE
Phone Context: $NWB#phones-phone_context$NWE
Conf File Secret: $NWB#phones-conf_secret$NWE
DTMFSend Channel: $NWB#phones-dtmf_send_extension$NWE
Outbound Call Group: $NWB#phones-call_out_number_group$NWE
Browser Location: $NWB#phones-client_browser$NWE
Install Directory: $NWB#phones-install_directory$NWE
CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
VICIDIAL Default URL: $NWB#phones-VICIDIAL_web_URL$NWE
Call Logging: $NWB#phones-AGI_call_logging_enabled$NWE
User Switching: $NWB#phones-user_switching_enabled$NWE
Conferencing: $NWB#phones-conferencing_enabled$NWE
Admin Hang Up: $NWB#phones-admin_hangup_enabled$NWE
Admin Hijack: $NWB#phones-admin_hijack_enabled$NWE
Admin Monitor: $NWB#phones-admin_monitor_enabled$NWE
Call Park: $NWB#phones-call_parking_enabled$NWE
Updater Check: $NWB#phones-updater_check_enabled$NWE
AF Logging: $NWB#phones-AFLogging_enabled$NWE
Queue Enabled: $NWB#phones-QUEUE_ACTION_enabled$NWE
CallerID Popup: $NWB#phones-CallerID_popup_enabled$NWE
VMail Button: $NWB#phones-voicemail_button_enabled$NWE
Fast Refresh: $NWB#phones-enable_fast_refresh$NWE
Fast Refresh Rate: (in ms)$NWB#phones-fast_refresh_rate$NWE
Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
Auto Dial Next Number: $NWB#phones-auto_dial_next_number$NWE
Stop Rec after each call: $NWB#phones-VDstop_rec_after_each_call$NWE
Enable SIPSAK Messages: $NWB#phones-enable_sipsak_messages$NWE
DBX Server: (Primary DB Server)$NWB#phones-DBX_server$NWE
DBX Database: (Primary Server Database)$NWB#phones-DBX_database$NWE
DBX User: (Primary DB Login)$NWB#phones-DBX_user$NWE
DBX Pass: (Primary DB Secret)$NWB#phones-DBX_pass$NWE
DBX Port: (Primary DB Port)$NWB#phones-DBX_port$NWE
DBY Server: (Secondary DB Server)$NWB#phones-DBY_server$NWE
DBY Database: (Secondary Server Database)$NWB#phones-DBY_database$NWE
DBY User: (Secondary DB Login)$NWB#phones-DBY_user$NWE
DBY Pass: (Secondary DB Secret)$NWB#phones-DBY_pass$NWE
DBY Port: (Secondary DB Port)$NWB#phones-DBY_port$NWE
Template ID: \n"; - - echo "\n"; - - echo "\n"; - echo "
\n"; + echo ""; + + $stmt="SELECT extension,dialplan_number,voicemail_id,phone_ip,computer_ip,server_ip,login,pass,status,active,phone_type,fullname,company,picture,messages,old_messages,protocol,local_gmt,ASTmgrUSERNAME,ASTmgrSECRET,login_user,login_pass,login_campaign,park_on_extension,conf_on_extension,VICIDIAL_park_on_extension,VICIDIAL_park_on_filename,monitor_prefix,recording_exten,voicemail_exten,voicemail_dump_exten,ext_context,dtmf_send_extension,call_out_number_group,client_browser,install_directory,local_web_callerID_URL,VICIDIAL_web_URL,AGI_call_logging_enabled,user_switching_enabled,conferencing_enabled,admin_hangup_enabled,admin_hijack_enabled,admin_monitor_enabled,call_parking_enabled,updater_check_enabled,AFLogging_enabled,QUEUE_ACTION_enabled,CallerID_popup_enabled,voicemail_button_enabled,enable_fast_refresh,fast_refresh_rate,enable_persistant_mysql,auto_dial_next_number,VDstop_rec_after_each_call,DBX_server,DBX_database,DBX_user,DBX_pass,DBX_port,DBY_server,DBY_database,DBY_user,DBY_pass,DBY_port,outbound_cid,enable_sipsak_messages,email,template_id,conf_override,phone_context,phone_ring_timeout,conf_secret from phones where extension='$extension' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + echo "
MODIFY A PHONE RECORD: $row[1]\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 "\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 "\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 "\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 "\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 "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "
Phone extension: $NWB#phones-extension$NWE
Dial Plan Number: (digits only)$NWB#phones-dialplan_number$NWE
Voicemail Box: (digits only)$NWB#phones-voicemail_id$NWE
Outbound CallerID: (digits only)$NWB#phones-outbound_cid$NWE
Phone IP address: (optional)$NWB#phones-phone_ip$NWE
Computer IP address: (optional)$NWB#phones-computer_ip$NWE
Server IP: $NWB#phones-server_ip$NWE
Login: $NWB#phones-login$NWE
Password: $NWB#phones-pass$NWE
Status: $NWB#phones-status$NWE
Active Account: $NWB#phones-active$NWE
Phone Type: $NWB#phones-phone_type$NWE
Full Name: $NWB#phones-fullname$NWE
Email: $NWB#phones-email$NWE
Company: $NWB#phones-company$NWE
Picture: $NWB#phones-picture$NWE
New Messages: $row[14]$NWB#phones-messages$NWE
Old Messages: $row[15]$NWB#phones-old_messages$NWE
Client Protocol: $NWB#phones-protocol$NWE
Local GMT: (Do NOT Adjust for DST)$NWB#phones-local_gmt$NWE
Phone Ring Timeout: $NWB#phones-phone_ring_timeout$NWE
Manager Login: $NWB#phones-ASTmgrUSERNAME$NWE
Manager Secret: $NWB#phones-ASTmgrSECRET$NWE
VICIDIAL Default User: $NWB#phones-login_user$NWE
VICIDIAL Default Pass: $NWB#phones-login_pass$NWE
VICIDIAL Default Campaign: $NWB#phones-login_campaign$NWE
Park Exten: $NWB#phones-park_on_extension$NWE
Conf Exten: $NWB#phones-conf_on_extension$NWE
VICIDIAL Park Exten: $NWB#phones-VICIDIAL_park_on_extension$NWE
VICIDIAL Park File: $NWB#phones-VICIDIAL_park_on_filename$NWE
Monitor Prefix: $NWB#phones-monitor_prefix$NWE
Recording Exten: $NWB#phones-recording_exten$NWE
VMailMain Exten: $NWB#phones-voicemail_exten$NWE
VMailDump Exten: $NWB#phones-voicemail_dump_exten$NWE
Exten Context: $NWB#phones-ext_context$NWE
Phone Context: $NWB#phones-phone_context$NWE
Conf File Secret: $NWB#phones-conf_secret$NWE
DTMFSend Channel: $NWB#phones-dtmf_send_extension$NWE
Outbound Call Group: $NWB#phones-call_out_number_group$NWE
Browser Location: $NWB#phones-client_browser$NWE
Install Directory: $NWB#phones-install_directory$NWE
CallerID URL: $NWB#phones-local_web_callerID_URL$NWE
VICIDIAL Default URL: $NWB#phones-VICIDIAL_web_URL$NWE
Call Logging: $NWB#phones-AGI_call_logging_enabled$NWE
User Switching: $NWB#phones-user_switching_enabled$NWE
Conferencing: $NWB#phones-conferencing_enabled$NWE
Admin Hang Up: $NWB#phones-admin_hangup_enabled$NWE
Admin Hijack: $NWB#phones-admin_hijack_enabled$NWE
Admin Monitor: $NWB#phones-admin_monitor_enabled$NWE
Call Park: $NWB#phones-call_parking_enabled$NWE
Updater Check: $NWB#phones-updater_check_enabled$NWE
AF Logging: $NWB#phones-AFLogging_enabled$NWE
Queue Enabled: $NWB#phones-QUEUE_ACTION_enabled$NWE
CallerID Popup: $NWB#phones-CallerID_popup_enabled$NWE
VMail Button: $NWB#phones-voicemail_button_enabled$NWE
Fast Refresh: $NWB#phones-enable_fast_refresh$NWE
Fast Refresh Rate: (in ms)$NWB#phones-fast_refresh_rate$NWE
Persistant MySQL: $NWB#phones-enable_persistant_mysql$NWE
Auto Dial Next Number: $NWB#phones-auto_dial_next_number$NWE
Stop Rec after each call: $NWB#phones-VDstop_rec_after_each_call$NWE
Enable SIPSAK Messages: $NWB#phones-enable_sipsak_messages$NWE
DBX Server: (Primary DB Server)$NWB#phones-DBX_server$NWE
DBX Database: (Primary Server Database)$NWB#phones-DBX_database$NWE
DBX User: (Primary DB Login)$NWB#phones-DBX_user$NWE
DBX Pass: (Primary DB Secret)$NWB#phones-DBX_pass$NWE
DBX Port: (Primary DB Port)$NWB#phones-DBX_port$NWE
DBY Server: (Secondary DB Server)$NWB#phones-DBY_server$NWE
DBY Database: (Secondary Server Database)$NWB#phones-DBY_database$NWE
DBY User: (Secondary DB Login)$NWB#phones-DBY_user$NWE
DBY Pass: (Secondary DB Secret)$NWB#phones-DBY_pass$NWE
DBY Port: (Secondary DB Port)$NWB#phones-DBY_port$NWE
Template ID: $NWB#phones-template_id$NWE
Conf Override: $NWB#phones-conf_override$NWE
\n"; + + echo "

Click here for phone stats\n"; + + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS PHONE\n"; + } } - echo "$templates_list"; - echo "\n"; - echo "$NWB#phones-template_id$NWE
Conf Override: $NWB#phones-conf_override$NWE
\n"; - - echo "

Click here for phone stats\n"; - - if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS PHONE\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -20391,70 +20624,70 @@ if ($ADD==31111111111) ###################### if ($ADD==32111111111) -{ + { if ($LOGast_admin_access==1) - { - echo "
\n"; - echo ""; - - $stmt="SELECT * from phones_alias where alias_id='$alias_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "
MODIFY A PHONE ALIAS RECORD: $row[0]\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Alias ID: $row[0] $NWB#phones-alias_id$NWE
Alias Name: $NWB#phones-alias_name$NWE
Phones Logins List: (comma separated)$NWB#phones-logins_list$NWE
\n"; - - - ### list of phones in this phones alias - $phone_alias_SQL = ereg_replace(',',"','",$row[2]); - - echo "
\n"; - echo "
PHONES WITHIN THIS PHONES ALIAS:
\n"; - echo "\n"; - echo "\n"; - - $stmt="SELECT login,extension,server_ip,protocol,phone_ip from phones where login IN ('$phone_alias_SQL');"; - if ($DB) {echo "|$stmt|";} - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - - echo "
LOGINEXTENSIONSERVERPROTOCOLIP
$rowx[0]$rowx[1]$rowx[2]$rowx[3]$rowx[4]

\n"; - - if ($LOGast_delete_phones > 0) { - echo "

DELETE THIS PHONE ALIAS\n"; + echo "
\n"; + echo ""; + + $stmt="SELECT alias_id,alias_name,logins_list from phones_alias where alias_id='$alias_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + echo "
MODIFY A PHONE ALIAS RECORD: $row[0]\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Alias ID: $row[0] $NWB#phones-alias_id$NWE
Alias Name: $NWB#phones-alias_name$NWE
Phones Logins List: (comma separated)$NWB#phones-logins_list$NWE
\n"; + + + ### list of phones in this phones alias + $phone_alias_SQL = ereg_replace(',',"','",$row[2]); + + echo "
\n"; + echo "
PHONES WITHIN THIS PHONES ALIAS:
\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT login,extension,server_ip,protocol,phone_ip from phones where login IN ('$phone_alias_SQL');"; + if ($DB) {echo "|$stmt|";} + $rsltx=mysql_query($stmt, $link); + $lists_to_print = mysql_num_rows($rsltx); + + $o=0; + while ($lists_to_print > $o) { + $rowx=mysql_fetch_row($rsltx); + $o++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
LOGINEXTENSIONSERVERPROTOCOLIP
$rowx[0]$rowx[1]$rowx[2]$rowx[3]$rowx[4]

\n"; + + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS PHONE ALIAS\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this phone alias
\n"; + } } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this phone alias\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -20462,44 +20695,44 @@ if ($ADD==32111111111) ###################### if ($ADD==33111111111) -{ + { if ($LOGast_admin_access==1) - { - echo "
\n"; - echo ""; - - $stmt="SELECT group_alias_id,group_alias_name,caller_id_number,caller_id_name,active from groups_alias where group_alias_id='$group_alias_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - - echo "
MODIFY A GROUP ALIAS RECORD: $row[0]\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Group Alias ID: $row[0] $NWB#phones-group_alias_id$NWE
Group Alias Name: $NWB#phones-group_alias_name$NWE
CallerID Number: $NWB#phones-caller_id_number$NWE
CallerID Name: $NWB#phones-caller_id_name$NWE
Active:
\n"; - - - if ($LOGast_delete_phones > 0) { - echo "

DELETE THIS GROUP ALIAS\n"; + echo "
\n"; + echo ""; + + $stmt="SELECT group_alias_id,group_alias_name,caller_id_number,caller_id_name,active from groups_alias where group_alias_id='$group_alias_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + + echo "
MODIFY A GROUP ALIAS RECORD: $row[0]\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Group Alias ID: $row[0] $NWB#phones-group_alias_id$NWE
Group Alias Name: $NWB#phones-group_alias_name$NWE
CallerID Number: $NWB#phones-caller_id_number$NWE
CallerID Name: $NWB#phones-caller_id_name$NWE
Active:
\n"; + + + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS GROUP ALIAS\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this group alias
\n"; + } } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this group alias\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -20507,298 +20740,299 @@ if ($ADD==33111111111) ###################### if ($ADD==311111111111) -{ - if ($LOGmodify_servers==1) { - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "TRUNKS:
\n"; + echo "CAMPAIGN:
\n"; + echo "RESTRICTION:
\n"; + echo "
\n"; + + echo "
\n"; + + + ### list of carriers on this server + echo "
\n"; + echo "
CARRIERS WITHIN THIS SERVER:
\n"; + echo "
\n"; - echo ""; + if ($LOGmodify_servers==1) + { + echo "\n"; + echo "
\n"; + echo ""; - $stmt="SELECT server_id,server_description,server_ip,active,asterisk_version,max_vicidial_trunks,telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,local_gmt,voicemail_dump_exten,answer_transfer_agent,ext_context,sys_perf_log,vd_server_logs,agi_output,vicidial_balance_active,balance_trunks_offlimits,recording_web_link,alt_server_ip,active_asterisk_server,generate_vicidial_conf,rebuild_conf_files,outbound_calls_per_second,sysload,channels_total,cpu_idle_percent,disk_usage,sounds_update,vicidial_recording_limit,carrier_logging_active,vicidial_balance_rank,rebuild_music_on_hold,active_agent_login_server from servers where server_id='$server_id' or server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $server_id = $row[0]; - $server_description = $row[1]; - $server_ip = $row[2]; - $active = $row[3]; - $asterisk_version = $row[4]; - $max_vicidial_trunks = $row[5]; - $telnet_host = $row[6]; - $telnet_port = $row[7]; - $ASTmgrUSERNAME = $row[8]; - $ASTmgrSECRET = $row[9]; - $ASTmgrUSERNAMEupdate = $row[10]; - $ASTmgrUSERNAMElisten = $row[11]; - $ASTmgrUSERNAMEsend = $row[12]; - $local_gmt = $row[13]; - $voicemail_dump_exten = $row[14]; - $answer_transfer_agent = $row[15]; - $ext_context = $row[16]; - $sys_perf_log = $row[17]; - $vd_server_logs = $row[18]; - $agi_output = $row[19]; - $vicidial_balance_active = $row[20]; - $balance_trunks_offlimits = $row[21]; - $recording_web_link = $row[22]; - $alt_server_ip = $row[23]; - $active_asterisk_server = $row[24]; - $generate_vicidial_conf = $row[25]; - $rebuild_conf_files = $row[26]; - $outbound_calls_per_second = $row[27]; - $sysload = $row[28]; - $channels_total = $row[29]; - $cpu_idle_percent = $row[30]; - $disk_usage = $row[31]; - $sounds_update = $row[32]; - $vicidial_recording_limit = $row[33]; - $carrier_logging_active = $row[34]; - $vicidial_balance_rank = $row[35]; - $rebuild_music_on_hold = $row[36]; - $active_agent_login_server = $row[37]; + $stmt="SELECT server_id,server_description,server_ip,active,asterisk_version,max_vicidial_trunks,telnet_host,telnet_port,ASTmgrUSERNAME,ASTmgrSECRET,ASTmgrUSERNAMEupdate,ASTmgrUSERNAMElisten,ASTmgrUSERNAMEsend,local_gmt,voicemail_dump_exten,answer_transfer_agent,ext_context,sys_perf_log,vd_server_logs,agi_output,vicidial_balance_active,balance_trunks_offlimits,recording_web_link,alt_server_ip,active_asterisk_server,generate_vicidial_conf,rebuild_conf_files,outbound_calls_per_second,sysload,channels_total,cpu_idle_percent,disk_usage,sounds_update,vicidial_recording_limit,carrier_logging_active,vicidial_balance_rank,rebuild_music_on_hold,active_agent_login_server from servers where server_id='$server_id' or server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $server_id = $row[0]; + $server_description = $row[1]; + $server_ip = $row[2]; + $active = $row[3]; + $asterisk_version = $row[4]; + $max_vicidial_trunks = $row[5]; + $telnet_host = $row[6]; + $telnet_port = $row[7]; + $ASTmgrUSERNAME = $row[8]; + $ASTmgrSECRET = $row[9]; + $ASTmgrUSERNAMEupdate = $row[10]; + $ASTmgrUSERNAMElisten = $row[11]; + $ASTmgrUSERNAMEsend = $row[12]; + $local_gmt = $row[13]; + $voicemail_dump_exten = $row[14]; + $answer_transfer_agent = $row[15]; + $ext_context = $row[16]; + $sys_perf_log = $row[17]; + $vd_server_logs = $row[18]; + $agi_output = $row[19]; + $vicidial_balance_active = $row[20]; + $balance_trunks_offlimits = $row[21]; + $recording_web_link = $row[22]; + $alt_server_ip = $row[23]; + $active_asterisk_server = $row[24]; + $generate_vicidial_conf = $row[25]; + $rebuild_conf_files = $row[26]; + $outbound_calls_per_second = $row[27]; + $sysload = $row[28]; + $channels_total = $row[29]; + $cpu_idle_percent = $row[30]; + $disk_usage = $row[31]; + $sounds_update = $row[32]; + $vicidial_recording_limit = $row[33]; + $carrier_logging_active = $row[34]; + $vicidial_balance_rank = $row[35]; + $rebuild_music_on_hold = $row[36]; + $active_agent_login_server = $row[37]; - $cpu = (100 - $cpu_idle_percent); - $disk_usage = preg_replace("/ /"," - ",$disk_usage); - $disk_usage = preg_replace("/\|/","%     ",$disk_usage); + $cpu = (100 - $cpu_idle_percent); + $disk_usage = preg_replace("/ /"," - ",$disk_usage); + $disk_usage = preg_replace("/\|/","%     ",$disk_usage); - echo "
MODIFY A SERVER RECORD: $row[0]\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "
MODIFY A SERVER RECORD: $row[0]\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Server ID: $NWB#servers-server_id$NWE
Server Description: $NWB#servers-server_description$NWE
Server IP Address: $NWB#servers-server_ip$NWE
Active: $NWB#servers-active$NWE
\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 "\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 "\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 "\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 "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; - echo "\n"; - echo "
Server ID: $NWB#servers-server_id$NWE
Server Description: $NWB#servers-server_description$NWE
Server IP Address: $NWB#servers-server_ip$NWE
Active: $NWB#servers-active$NWE
System Load: $sysload - $cpu%   $NWB#servers-sysload$NWE
Live Channels: $channels_total   $NWB#servers-channels_total$NWE
Disk Usage: $disk_usage   $NWB#servers-disk_usage$NWE
System Load: $sysload - $cpu%   $NWB#servers-sysload$NWE
Live Channels: $channels_total   $NWB#servers-channels_total$NWE
Disk Usage: $disk_usage   $NWB#servers-disk_usage$NWE
Asterisk Version: $NWB#servers-asterisk_version$NWE
Max VICIDIAL Trunks: $NWB#servers-max_vicidial_trunks$NWE
Max Calls per Second: $NWB#servers-outbound_calls_per_second$NWE
VICIDIAL Balance Dialing: $NWB#servers-vicidial_balance_active$NWE
VICIDIAL Balance Rank: $NWB#servers-vicidial_balance_rank$NWE
VICIDIAL Balance Offlimits: $NWB#servers-balance_trunks_offlimits$NWE
Telnet Host: $NWB#servers-telnet_host$NWE
Telnet Port: $NWB#servers-telnet_port$NWE
Manager User: $NWB#servers-ASTmgrUSERNAME$NWE
Manager Secret: $NWB#servers-ASTmgrSECRET$NWE
Manager Update User: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
Manager Listen User: $NWB#servers-ASTmgrUSERNAMElisten$NWE
Manager Send User: $NWB#servers-ASTmgrUSERNAMEsend$NWE
Local GMT: (Do NOT Adjust for DST)$NWB#servers-local_gmt$NWE
VMail Dump Exten: $NWB#servers-voicemail_dump_exten$NWE
VICIDIAL AD extension: $NWB#servers-answer_transfer_agent$NWE
Default Context: $NWB#servers-ext_context$NWE
System Performance: $NWB#servers-sys_perf_log$NWE
Server Logs: $NWB#servers-vd_server_logs$NWE
AGI Output: $NWB#servers-agi_output$NWE
Carrier Logging Active: $NWB#servers-carrier_logging_active$NWE
Recording Web Link: $NWB#servers-recording_web_link$NWE
Alternate Recording Server IP: $NWB#servers-alt_server_ip$NWE
Active Asterisk Server: $NWB#servers-active_asterisk_server$NWE
Active Agent Server: $NWB#servers-active_agent_login_server$NWE
Generate conf files: $NWB#servers-generate_vicidial_conf$NWE
Rebuild conf files: $NWB#servers-rebuild_conf_files$NWE
Rebuild Music On Hold: $NWB#servers-rebuild_music_on_hold$NWE
Sounds Update: $NWB#servers-sounds_update$NWE
ViciDial Recording Limit: $NWB#servers-vicidial_recording_limit$NWE
Asterisk Version: $NWB#servers-asterisk_version$NWE
Max VICIDIAL Trunks: $NWB#servers-max_vicidial_trunks$NWE
Max Calls per Second: $NWB#servers-outbound_calls_per_second$NWE
VICIDIAL Balance Dialing: $NWB#servers-vicidial_balance_active$NWE
VICIDIAL Balance Rank: $NWB#servers-vicidial_balance_rank$NWE
VICIDIAL Balance Offlimits: $NWB#servers-balance_trunks_offlimits$NWE
Telnet Host: $NWB#servers-telnet_host$NWE
Telnet Port: $NWB#servers-telnet_port$NWE
Manager User: $NWB#servers-ASTmgrUSERNAME$NWE
Manager Secret: $NWB#servers-ASTmgrSECRET$NWE
Manager Update User: $NWB#servers-ASTmgrUSERNAMEupdate$NWE
Manager Listen User: $NWB#servers-ASTmgrUSERNAMElisten$NWE
Manager Send User: $NWB#servers-ASTmgrUSERNAMEsend$NWE
Local GMT: (Do NOT Adjust for DST)$NWB#servers-local_gmt$NWE
VMail Dump Exten: $NWB#servers-voicemail_dump_exten$NWE
VICIDIAL AD extension: $NWB#servers-answer_transfer_agent$NWE
Default Context: $NWB#servers-ext_context$NWE
System Performance: $NWB#servers-sys_perf_log$NWE
Server Logs: $NWB#servers-vd_server_logs$NWE
AGI Output: $NWB#servers-agi_output$NWE
Carrier Logging Active: $NWB#servers-carrier_logging_active$NWE
Recording Web Link: $NWB#servers-recording_web_link$NWE
Alternate Recording Server IP: $NWB#servers-alt_server_ip$NWE
Active Asterisk Server: $NWB#servers-active_asterisk_server$NWE
Active Agent Server: $NWB#servers-active_agent_login_server$NWE
Generate conf files: $NWB#servers-generate_vicidial_conf$NWE
Rebuild conf files: $NWB#servers-rebuild_conf_files$NWE
Rebuild Music On Hold: $NWB#servers-rebuild_music_on_hold$NWE
Sounds Update: $NWB#servers-sounds_update$NWE
ViciDial Recording Limit: $NWB#servers-vicidial_recording_limit$NWE
\n"; + echo "
\n"; - ### vicidial server trunk records for this server - echo "

VICIDIAL TRUNKS FOR THIS SERVER:   $NWB#vicidial_server_trunks$NWE
\n"; - echo "\n"; - echo "\n"; + ### vicidial server trunk records for this server + echo "

VICIDIAL TRUNKS FOR THIS SERVER:   $NWB#vicidial_server_trunks$NWE
\n"; + echo "
CAMPAIGN TRUNKS RESTRICTION DELETE
\n"; + echo "\n"; - $stmt="SELECT * from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; + $stmt="SELECT server_ip,campaign_id,dedicated_trunks,trunk_restriction from vicidial_server_trunks where server_ip='$server_ip' order by campaign_id"; $rslt=mysql_query($stmt, $link); $recycle_to_print = mysql_num_rows($rslt); $o=0; - while ($recycle_to_print > $o) { + while ($recycle_to_print > $o) + { $rowx=mysql_fetch_row($rslt); $o++; - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "
CAMPAIGN TRUNKS RESTRICTION DELETE
$rowx[1]
\n"; + echo "
$rowx[1]\n"; + echo "\n"; + echo "\n"; + echo "DELETE
\n"; + + echo "
ADD NEW SERVER VICIDIAL TRUNK RECORD
\n"; + echo "\n"; echo "\n"; - echo "\n"; - echo "
DELETE
\n"; + echo "\n"; + + $active_carriers = 0; + $inactive_carriers = 0; + $stmt="SELECT carrier_id,carrier_name,registration_string,active from vicidial_server_carriers where server_ip='$row[2]'"; + $rsltx=mysql_query($stmt, $link); + $carriers_to_print = mysql_num_rows($rsltx); + $camp_lists=''; + + $o=0; + while ($carriers_to_print > $o) + { + $rowx=mysql_fetch_row($rsltx); + $o++; + if (ereg("Y", $rowx[3])) {$active_carriers++;} + if (ereg("N", $rowx[3])) {$inactive_carriers++;} + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
CARRIER IDNAMEREGISTRATIONACTIVE
$rowx[0]$rowx[1]$rowx[2]$rowx[3]

\n"; + + + ### list of phones on this server + echo "
\n"; + echo "
PHONES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_phones = 0; + $inactive_phones = 0; + $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; + $rsltx=mysql_query($stmt, $link); + $lists_to_print = mysql_num_rows($rsltx); + $camp_lists=''; + + $o=0; + while ($lists_to_print > $o) + { + $rowx=mysql_fetch_row($rsltx); + $o++; + if (ereg("Y", $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_phones++;} + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
EXTENSIONNAMEACTIVE
$rowx[0]$rowx[2]$rowx[1]

\n"; + + + ### list of conferences on this server + echo "
\n"; + echo "
CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_confs = 0; + $stmt="SELECT conf_exten,extension from conferences where server_ip='$row[2]'"; + $rsltx=mysql_query($stmt, $link); + $lists_to_print = mysql_num_rows($rsltx); + $camp_lists=''; + + $o=0; + while ($lists_to_print > $o) + { + $rowx=mysql_fetch_row($rsltx); + $o++; + $active_confs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
CONFERENCEEXTENSION
$rowx[0]$rowx[2]

\n"; + + + ### list of vicidial conferences on this server + echo "
\n"; + echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; + echo "\n"; + echo "\n"; + + $active_vdconfs = 0; + $stmt="SELECT conf_exten,extension from vicidial_conferences where server_ip='$row[2]'"; + $rsltx=mysql_query($stmt, $link); + $lists_to_print = mysql_num_rows($rsltx); + $camp_lists=''; + + $o=0; + while ($lists_to_print > $o) + { + $rowx=mysql_fetch_row($rsltx); + $o++; + $active_vdconfs++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
VD CONFERENCEEXTENSION
$rowx[0]$rowx[2]

\n"; + + + echo "
\n"; + + $camp_lists = eregi_replace(".$","",$camp_lists); + echo "This server has $active_carriers active carriers and $inactive_carriers inactive carriers

\n"; + echo "This server has $active_phones active phones and $inactive_phones inactive phones

\n"; + echo "This server has $active_confs active conferences

\n"; + echo "This server has $active_vdconfs active vicidial conferences

\n"; + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS SERVER\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this server\n"; + } } - - echo "
\n"; - - echo "
ADD NEW SERVER VICIDIAL TRUNK RECORD
\n"; - echo "\n"; - echo "\n"; - echo "TRUNKS:
\n"; - echo "CAMPAIGN:
\n"; - echo "RESTRICTION:
\n"; - echo "
\n"; - - echo "

\n"; - - - ### list of carriers on this server - echo "
\n"; - echo "
CARRIERS WITHIN THIS SERVER:
\n"; - echo "\n"; - echo "\n"; - - $active_carriers = 0; - $inactive_carriers = 0; - $stmt="SELECT carrier_id,carrier_name,registration_string,active from vicidial_server_carriers where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $carriers_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($carriers_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[3])) {$active_carriers++;} - if (ereg("N", $rowx[3])) {$inactive_carriers++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - - echo "
CARRIER IDNAMEREGISTRATIONACTIVE
$rowx[0]$rowx[1]$rowx[2]$rowx[3]

\n"; - - - ### list of phones on this server - echo "
\n"; - echo "
PHONES WITHIN THIS SERVER:
\n"; - echo "\n"; - echo "\n"; - - $active_phones = 0; - $inactive_phones = 0; - $stmt="SELECT extension,active,fullname from phones where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_phones++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - - echo "
EXTENSIONNAMEACTIVE
$rowx[0]$rowx[2]$rowx[1]

\n"; - - - ### list of conferences on this server - echo "
\n"; - echo "
CONFERENCES WITHIN THIS SERVER:
\n"; - echo "\n"; - echo "\n"; - - $active_confs = 0; - $stmt="SELECT conf_exten,extension from conferences where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $o++; - $active_confs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - - echo "
CONFERENCEEXTENSION
$rowx[0]$rowx[2]

\n"; - - - ### list of vicidial conferences on this server - echo "
\n"; - echo "
VICIDIAL CONFERENCES WITHIN THIS SERVER:
\n"; - echo "\n"; - echo "\n"; - - $active_vdconfs = 0; - $stmt="SELECT conf_exten,extension from vicidial_conferences where server_ip='$row[2]'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $o++; - $active_vdconfs++; - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - - echo "
VD CONFERENCEEXTENSION
$rowx[0]$rowx[2]

\n"; - - - echo "
\n"; - - $camp_lists = eregi_replace(".$","",$camp_lists); - echo "This server has $active_carriers active carriers and $inactive_carriers inactive carriers

\n"; - echo "This server has $active_phones active phones and $inactive_phones inactive phones

\n"; - echo "This server has $active_confs active conferences

\n"; - echo "This server has $active_vdconfs active vicidial conferences

\n"; - echo "
\n"; - if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS SERVER\n"; - } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this server
\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -20806,111 +21040,111 @@ if ($ADD==311111111111) ###################### if ($ADD==331111111111) -{ + { if ($LOGast_admin_access==1) - { - echo "
\n"; - echo ""; - - $stmt="SELECT template_id,template_name,template_contents from vicidial_conf_templates where template_id='$template_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $template_id = $row[0]; - $template_name = $row[1]; - $template_contents = $row[2]; - - echo "
MODIFY A CONF TEMPLATE RECORD: $row[0]
\n"; - echo "\n"; - echo "\n"; - - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Template ID: $template_id
Template Name: $NWB#vicidial_conf_templates-template_name$NWE
Template Contents: $NWB#vicidial_conf_templates-template_contents$NWE
\n"; - - echo "
\n"; - - ### list of phones using this conf template - echo "
\n"; - echo "
PHONES USING THIS CONF TEMPLATE:
\n"; - echo "\n"; - echo "\n"; - - $active_phones = 0; - $inactive_phones = 0; - $stmt="SELECT extension,active,fullname,server_ip from phones where template_id='$template_id'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_phones++;} + echo "
EXTENSIONNAMESERVERACTIVE
\n"; + echo "
MODIFY A CONF TEMPLATE RECORD: $row[0]\n"; + echo "\n"; + echo "\n"; + + echo "
\n"; + echo ""; - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} + $stmt="SELECT template_id,template_name,template_contents from vicidial_conf_templates where template_id='$template_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $template_id = $row[0]; + $template_name = $row[1]; + $template_contents = $row[2]; - echo "
$rowx[0]$rowx[2]$rowx[3]$rowx[1]
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Template ID: $template_id
Template Name: $NWB#vicidial_conf_templates-template_name$NWE
Template Contents: $NWB#vicidial_conf_templates-template_contents$NWE
\n"; + + echo "
\n"; + + ### list of phones using this conf template + echo "
\n"; + echo "
PHONES USING THIS CONF TEMPLATE:
\n"; + echo "\n"; + echo "\n"; + + $active_phones = 0; + $inactive_phones = 0; + $stmt="SELECT extension,active,fullname,server_ip from phones where template_id='$template_id'"; + $rsltx=mysql_query($stmt, $link); + $lists_to_print = mysql_num_rows($rsltx); + $camp_lists=''; + + $o=0; + while ($lists_to_print > $o) + { + $rowx=mysql_fetch_row($rsltx); + $o++; + if (ereg("Y", $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_phones++;} + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
EXTENSIONNAMESERVERACTIVE
$rowx[0]$rowx[2]$rowx[3]$rowx[1]

\n"; + + ### list of carriers using this conf template + echo "
\n"; + echo "
CARRIERS USING THIS CONF TEMPLATE:
\n"; + echo "\n"; + echo "\n"; + + $active_phones = 0; + $inactive_phones = 0; + $stmt="SELECT carrier_id,active,carrier_name,server_ip from vicidial_server_carriers where template_id='$template_id'"; + $rsltx=mysql_query($stmt, $link); + $lists_to_print = mysql_num_rows($rsltx); + $camp_lists=''; + + $o=0; + while ($lists_to_print > $o) + { + $rowx=mysql_fetch_row($rsltx); + $o++; + if (ereg("Y", $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";} + if (ereg("N", $rowx[1])) {$inactive_phones++;} + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + } + + echo "
CARRIERNAMESERVERACTIVE
$rowx[0]$rowx[2]$rowx[3]$rowx[1]

\n"; + + + + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS CONF TEMPLATE\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this conf template
\n"; + } } - - echo "

\n"; - - ### list of carriers using this conf template - echo "
\n"; - echo "
CARRIERS USING THIS CONF TEMPLATE:
\n"; - echo "\n"; - echo "\n"; - - $active_phones = 0; - $inactive_phones = 0; - $stmt="SELECT carrier_id,active,carrier_name,server_ip from vicidial_server_carriers where template_id='$template_id'"; - $rsltx=mysql_query($stmt, $link); - $lists_to_print = mysql_num_rows($rsltx); - $camp_lists=''; - - $o=0; - while ($lists_to_print > $o) - { - $rowx=mysql_fetch_row($rsltx); - $o++; - if (ereg("Y", $rowx[1])) {$active_phones++; $camp_lists .= "'$rowx[0]',";} - if (ereg("N", $rowx[1])) {$inactive_phones++;} - - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} - - echo "\n"; - } - - echo "
CARRIERNAMESERVERACTIVE
$rowx[0]$rowx[2]$rowx[3]$rowx[1]

\n"; - - - - if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS CONF TEMPLATE\n"; - } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this conf template\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -20918,95 +21152,95 @@ if ($ADD==331111111111) ###################### if ($ADD==341111111111) -{ + { if ($LOGast_admin_access==1) - { - echo "
\n"; - echo ""; - - $stmt="SELECT carrier_id,carrier_name,registration_string,template_id,account_entry,protocol,globals_string,dialplan_entry,server_ip,active from vicidial_server_carriers where carrier_id='$carrier_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $carrier_id = $row[0]; - $carrier_name = $row[1]; - $registration_string = $row[2]; - $template_id = $row[3]; - $account_entry = $row[4]; - $protocol = $row[5]; - $globals_string = $row[6]; - $dialplan_entry = $row[7]; - $server_ip = $row[8]; - $active = $row[9]; - - echo "
MODIFY A CARRIER RECORD: $row[0]\n"; - echo "\n"; - echo "\n"; - - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "
Carrier ID: $carrier_id
Carrier Name: $NWB#vicidial_server_carriers-carrier_name$NWE
Registration String: $NWB#vicidial_server_carriers-registration_string$NWE
Template ID: \n"; - - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; + echo ""; + + $stmt="SELECT carrier_id,carrier_name,registration_string,template_id,account_entry,protocol,globals_string,dialplan_entry,server_ip,active from vicidial_server_carriers where carrier_id='$carrier_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $carrier_id = $row[0]; + $carrier_name = $row[1]; + $registration_string = $row[2]; + $template_id = $row[3]; + $account_entry = $row[4]; + $protocol = $row[5]; + $globals_string = $row[6]; + $dialplan_entry = $row[7]; + $server_ip = $row[8]; + $active = $row[9]; + + echo "
MODIFY A CARRIER RECORD: $row[0]\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 "
Carrier ID: $carrier_id
Carrier Name: $NWB#vicidial_server_carriers-carrier_name$NWE
Registration String: $NWB#vicidial_server_carriers-registration_string$NWE
Template ID: $NWB#vicidial_server_carriers-template_id$NWE
Account Entry: $NWB#vicidial_server_carriers-account_entry$NWE
Protocol: $NWB#vicidial_server_carriers-protocol$NWE
Globals String: $NWB#vicidial_server_carriers-globals_string$NWE
Dialplan Entry: $NWB#vicidial_server_carriers-dialplan_entry$NWE
Server IP: $NWB#vicidial_server_carriers-server_ip$NWE
Active: $NWB#vicidial_server_carriers-active$NWE
\n"; + + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS CARRIER\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this carrier
\n"; + } } - echo "$templates_list"; - echo "\n"; - echo "$NWB#vicidial_server_carriers-template_id$NWE
Account Entry: $NWB#vicidial_server_carriers-account_entry$NWE
Protocol: $NWB#vicidial_server_carriers-protocol$NWE
Globals String: $NWB#vicidial_server_carriers-globals_string$NWE
Dialplan Entry: $NWB#vicidial_server_carriers-dialplan_entry$NWE
Server IP: $NWB#vicidial_server_carriers-server_ip$NWE
Active: $NWB#vicidial_server_carriers-active$NWE
\n"; - - echo "
\n"; - if ($LOGast_delete_phones > 0) - { - echo "

DELETE THIS CARRIER\n"; - } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this carrier\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -21014,50 +21248,50 @@ if ($ADD==341111111111) ###################### if ($ADD==351111111111) -{ + { if ($LOGast_admin_access==1) - { - echo "
\n"; - echo ""; - - $stmt="SELECT tts_id,tts_name,active,tts_text from vicidial_tts_prompts where tts_id='$tts_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $tts_id = $row[0]; - $tts_name = $row[1]; - $active = $row[2]; - $tts_text = $row[3]; - - echo "
MODIFY A TTS RECORD: $tts_id\n"; - echo "\n"; - echo "\n"; - - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - - echo "\n"; - echo "
TTS ID: $tts_id
TTS Name: $NWB#vicidial_tts_prompts-tts_name$NWE
Active: $NWB#vicidial_tts_prompts-active$NWE
TTS Text: $NWB#vicidial_tts_prompts-tts_text$NWE
\n"; - - echo "
\n"; - if ($LOGast_delete_phones > 0) { - echo "

DELETE THIS TTS ENTRY\n"; + echo "
\n"; + echo ""; + + $stmt="SELECT tts_id,tts_name,active,tts_text from vicidial_tts_prompts where tts_id='$tts_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $tts_id = $row[0]; + $tts_name = $row[1]; + $active = $row[2]; + $tts_text = $row[3]; + + echo "
MODIFY A TTS RECORD: $tts_id\n"; + echo "\n"; + echo "\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "
TTS ID: $tts_id
TTS Name: $NWB#vicidial_tts_prompts-tts_name$NWE
Active: $NWB#vicidial_tts_prompts-active$NWE
TTS Text: $NWB#vicidial_tts_prompts-tts_text$NWE
\n"; + + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS TTS ENTRY\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this TTS entry
\n"; + } } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this TTS entry\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -21065,77 +21299,133 @@ if ($ADD==351111111111) ###################### if ($ADD==361111111111) -{ + { if ($LOGast_admin_access==1) - { - echo "
\n"; - echo ""; - - $stmt="SELECT moh_id,moh_name,active,random from vicidial_music_on_hold where moh_id='$moh_id';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $moh_id = $row[0]; - $moh_name = $row[1]; - $active = $row[2]; - $random = $row[3]; - - echo "
MODIFY A MUSIC ON HOLD RECORD: $moh_id\n"; - echo "\n"; - echo "\n"; - - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "
Music On Hold ID: $moh_id
Music On Hold Name: $NWB#vicidial_music_on_hold-moh_name$NWE
Active: $NWB#vicidial_music_on_hold-active$NWE
Random Order: $NWB#vicidial_music_on_hold-random$NWE
Audio Files: \n"; - ##### get files listing for rank/delete options - $stmt="SELECT filename,rank from vicidial_music_on_hold_files where moh_id='$moh_id' order by rank;"; - $rsltx=mysql_query($stmt, $link); - $mohfiles_to_print = mysql_num_rows($rsltx); - $ranks = ($mohfiles_to_print + 2); - $o=0; - while ($mohfiles_to_print > $o) { - $rowx=mysql_fetch_row($rsltx); - echo "Rank: \n"; - - echo "\n"; - - echo "\n"; - echo "
\n"; + echo ""; + + $stmt="SELECT moh_id,moh_name,active,random from vicidial_music_on_hold where moh_id='$moh_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $moh_id = $row[0]; + $moh_name = $row[1]; + $active = $row[2]; + $random = $row[3]; + + echo "
MODIFY A MUSIC ON HOLD RECORD: $moh_id\n"; + echo "\n"; + echo "\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + + echo "\n"; + + echo "\n"; + echo "
Music On Hold ID: $moh_id
Music On Hold Name: $NWB#vicidial_music_on_hold-moh_name$NWE
Active: $NWB#vicidial_music_on_hold-active$NWE
Random Order: $NWB#vicidial_music_on_hold-random$NWE
Audio Files: \n"; + ##### get files listing for rank/delete options + $stmt="SELECT filename,rank from vicidial_music_on_hold_files where moh_id='$moh_id' order by rank;"; + $rsltx=mysql_query($stmt, $link); + $mohfiles_to_print = mysql_num_rows($rsltx); + $ranks = ($mohfiles_to_print + 2); + $o=0; + while ($mohfiles_to_print > $o) { - echo "\n"; - $k++; + $rowx=mysql_fetch_row($rsltx); + echo "Rank: \n"; + + echo "   $rowx[0] - DELETE
\n"; + $o++; } - echo "\n"; - echo "   $rowx[0] - DELETE
\n"; - $o++; + echo "
Add An Audio File: audio chooser $NWB#vicidial_music_on_hold-filename$NWE
\n"; + + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE MUSIC ON HOLD ENTRY\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this Music On Hold entry
\n"; + } } - - echo "
Add An Audio File: audio chooser $NWB#vicidial_music_on_hold-filename$NWE
\n"; - - echo "
\n"; - if ($LOGast_delete_phones > 0) - { - echo "

DELETE MUSIC ON HOLD ENTRY\n"; - } - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to this Music On Hold entry\n"; - } - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } + } + + +###################### +# ADD=371111111111 modify voicemail box in the system +###################### + +if ($ADD==371111111111) + { + if ($LOGast_admin_access==1) + { + echo "
\n"; + echo ""; + + $stmt="SELECT voicemail_id,pass,fullname,active,email,messages,old_messages from vicidial_voicemail where voicemail_id='$voicemail_id';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $voicemail_id = $row[0]; + $pass = $row[1]; + $fullname = $row[2]; + $active = $row[3]; + $email = $row[4]; + $messages = $row[5]; + $old_messages = $row[6]; + + echo "
MODIFY A VOICEMAIL BOX: $tts_id\n"; + echo "\n"; + echo "\n"; + + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
Voicemail ID: $voicemail_id
Password: $NWB#vicidial_voicemail-pass$NWE
Name: $NWB#vicidial_voicemail-fullname$NWE
Email: $NWB#vicidial_voicemail-email$NWE
Active: $NWB#vicidial_voicemail-active$NWE
New Messages: $messages
Old Messages: $old_messages
\n"; + + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS VOICEMAIL BOX\n"; + } + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to this voicemail box
\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } } -} ###################### @@ -21143,45 +21433,45 @@ if ($ADD==361111111111) ###################### if ($ADD==3111111111111) -{ - if ($LOGast_admin_access==1) { - echo "
\n"; - echo ""; - - $stmt="SELECT * from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $conf_exten = $row[0]; - $server_ip = $row[1]; - - echo "
MODIFY A CONFERENCE RECORD: $row[0]\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Conference: $NWB#conferences-conf_exten$NWE
Server IP: $NWB#conferences-server_ip$NWE
Current Extension:
\n"; - - echo "
\n"; - if ($LOGast_delete_phones > 0) + if ($LOGast_admin_access==1) { - echo "

DELETE THIS CONFERENCE\n"; + echo "
\n"; + echo ""; + + $stmt="SELECT conf_exten,server_ip,extension from conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + echo "
MODIFY A CONFERENCE RECORD: $row[0]\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Conference: $NWB#conferences-conf_exten$NWE
Server IP: $NWB#conferences-server_ip$NWE
Current Extension:
\n"; + + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS CONFERENCE\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; } } - else - { - echo "You do not have permission to view this page\n"; - exit; - } -} ###################### @@ -21189,45 +21479,45 @@ if ($ADD==3111111111111) ###################### if ($ADD==31111111111111) -{ - if ($LOGast_admin_access==1) { - echo "
\n"; - echo ""; - - $stmt="SELECT * from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $conf_exten = $row[0]; - $server_ip = $row[1]; - - echo "
MODIFY A VICIDIAL CONFERENCE RECORD: $row[0]\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Conference: $NWB#conferences-conf_exten$NWE
Server IP: $NWB#conferences-server_ip$NWE
Current Extension:
\n"; - - echo "
\n"; - if ($LOGast_delete_phones > 0) + if ($LOGast_admin_access==1) { - echo "

DELETE THIS VICIDIAL CONFERENCE\n"; + echo "
\n"; + echo ""; + + $stmt="SELECT conf_exten,server_ip,extension,leave_3way,leave_3way_datetime from vicidial_conferences where conf_exten='$conf_exten' and server_ip='$server_ip';"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $conf_exten = $row[0]; + $server_ip = $row[1]; + + echo "
MODIFY A VICIDIAL CONFERENCE RECORD: $row[0]\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Conference: $NWB#conferences-conf_exten$NWE
Server IP: $NWB#conferences-server_ip$NWE
Current Extension:
\n"; + + echo "
\n"; + if ($LOGast_delete_phones > 0) + { + echo "

DELETE THIS VICIDIAL CONFERENCE\n"; + } + } + else + { + echo "You do not have permission to view this page\n"; + exit; } } - else - { - echo "You do not have permission to view this page\n"; - exit; - } -} @@ -21236,183 +21526,184 @@ if ($ADD==31111111111111) ###################### if ($ADD==311111111111111) -{ - if ($LOGmodify_servers==1) { - echo "
\n"; - echo ""; - - $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform from system_settings;"; - $rslt=mysql_query($stmt, $link); - $row=mysql_fetch_row($rslt); - $version = $row[0]; - $install_date = $row[1]; - $use_non_latin = $row[2]; - $webroot_writable = $row[3]; - $enable_queuemetrics_logging = $row[4]; - $queuemetrics_server_ip = $row[5]; - $queuemetrics_dbname = $row[6]; - $queuemetrics_login = $row[7]; - $queuemetrics_pass = $row[8]; - $queuemetrics_url = $row[9]; - $queuemetrics_log_id = $row[10]; - $queuemetrics_eq_prepend = $row[11]; - $vicidial_agent_disable = $row[12]; - $allow_sipsak_messages = $row[13]; - $admin_home_url = $row[14]; - $enable_agc_xfer_log = $row[15]; - $db_schema_version = $row[16]; - $auto_user_add_value = $row[17]; - $timeclock_end_of_day = $row[18]; - $timeclock_last_reset_date = $row[19]; - $vdc_header_date_format = $row[20]; - $vdc_customer_date_format = $row[21]; - $vdc_header_phone_format = $row[22]; - $vdc_agent_api_active = $row[23]; - $qc_last_pull_time = $row[24]; - $enable_vtiger_integration = $row[25]; - $vtiger_server_ip = $row[26]; - $vtiger_dbname = $row[27]; - $vtiger_login = $row[28]; - $vtiger_pass = $row[29]; - $vtiger_url = $row[30]; - $qc_features_active = $row[31]; - $outbound_autodial_active = $row[32]; - $outbound_calls_per_second = $row[33]; - $enable_tts_integration = $row[34]; - $agentonly_callback_campaign_lock = $row[35]; - $sounds_central_control_active = $row[36]; - $sounds_web_server = $row[37]; - $sounds_web_directory = $row[38]; - $active_voicemail_server = $row[39]; - $auto_dial_limit = $row[40]; - $user_territories_active = $row[41]; - $allow_custom_dialplan = $row[42]; - $db_schema_update_date = $row[43]; - $enable_second_webform = $row[44]; - - echo "
MODIFY VICIDIAL SYSTEM SETTINGS\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 "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - - echo "
Version: $version
DB Schema Version: $db_schema_version
DB Schema Update Date: $db_schema_update_date
Auto User-add Value: $auto_user_add_value
Install Date: $install_date
Use Non-Latin: $NWB#settings-use_non_latin$NWE
Webroot Writable: $NWB#settings-webroot_writable$NWE
VICIDIAL Agent Disable Display: $NWB#settings-vicidial_agent_disable$NWE
Allow SIPSAK Messages: $NWB#settings-allow_sipsak_messages$NWE
Admin Home URL: $NWB#settings-admin_home_url$NWE
Enable Agent Transfer Logfile: $NWB#settings-enable_agc_xfer_log$NWE
Timeclock End Of Day: $NWB#settings-timeclock_end_of_day$NWE
Timeclock Last Auto Logout: $timeclock_last_reset_date
Agent Screen Header Date Format: $NWB#settings-vdc_header_date_format$NWE
Agent Screen Customer Date Format: $NWB#settings-vdc_customer_date_format$NWE
Agent Screen Customer Phone Format: $NWB#settings-vdc_header_phone_format$NWE
Agent API Active: $NWB#settings-vdc_agent_api_active$NWE
Agent Only Callback Campaign Lock: $NWB#settings-agentonly_callback_campaign_lock$NWE
Central Sound Control Active: $NWB#settings-sounds_central_control_active$NWE
Sounds Web Server: $NWB#settings-sounds_web_server$NWE
Sounds Web Directory: $sounds_web_directory $NWB#settings-sounds_web_directory$NWE
Active Voicemail Server: \n"; + $stmt="SELECT version,install_date,use_non_latin,webroot_writable,enable_queuemetrics_logging,queuemetrics_server_ip,queuemetrics_dbname,queuemetrics_login,queuemetrics_pass,queuemetrics_url,queuemetrics_log_id,queuemetrics_eq_prepend,vicidial_agent_disable,allow_sipsak_messages,admin_home_url,enable_agc_xfer_log,db_schema_version,auto_user_add_value,timeclock_end_of_day,timeclock_last_reset_date,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,vdc_agent_api_active,qc_last_pull_time,enable_vtiger_integration,vtiger_server_ip,vtiger_dbname,vtiger_login,vtiger_pass,vtiger_url,qc_features_active,outbound_autodial_active,outbound_calls_per_second,enable_tts_integration,agentonly_callback_campaign_lock,sounds_central_control_active,sounds_web_server,sounds_web_directory,active_voicemail_server,auto_dial_limit,user_territories_active,allow_custom_dialplan,db_schema_update_date,enable_second_webform from system_settings;"; + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $version = $row[0]; + $install_date = $row[1]; + $use_non_latin = $row[2]; + $webroot_writable = $row[3]; + $enable_queuemetrics_logging = $row[4]; + $queuemetrics_server_ip = $row[5]; + $queuemetrics_dbname = $row[6]; + $queuemetrics_login = $row[7]; + $queuemetrics_pass = $row[8]; + $queuemetrics_url = $row[9]; + $queuemetrics_log_id = $row[10]; + $queuemetrics_eq_prepend = $row[11]; + $vicidial_agent_disable = $row[12]; + $allow_sipsak_messages = $row[13]; + $admin_home_url = $row[14]; + $enable_agc_xfer_log = $row[15]; + $db_schema_version = $row[16]; + $auto_user_add_value = $row[17]; + $timeclock_end_of_day = $row[18]; + $timeclock_last_reset_date = $row[19]; + $vdc_header_date_format = $row[20]; + $vdc_customer_date_format = $row[21]; + $vdc_header_phone_format = $row[22]; + $vdc_agent_api_active = $row[23]; + $qc_last_pull_time = $row[24]; + $enable_vtiger_integration = $row[25]; + $vtiger_server_ip = $row[26]; + $vtiger_dbname = $row[27]; + $vtiger_login = $row[28]; + $vtiger_pass = $row[29]; + $vtiger_url = $row[30]; + $qc_features_active = $row[31]; + $outbound_autodial_active = $row[32]; + $outbound_calls_per_second = $row[33]; + $enable_tts_integration = $row[34]; + $agentonly_callback_campaign_lock = $row[35]; + $sounds_central_control_active = $row[36]; + $sounds_web_server = $row[37]; + $sounds_web_directory = $row[38]; + $active_voicemail_server = $row[39]; + $auto_dial_limit = $row[40]; + $user_territories_active = $row[41]; + $allow_custom_dialplan = $row[42]; + $db_schema_update_date = $row[43]; + $enable_second_webform = $row[44]; - 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 "\n"; - echo "\n"; - - echo "\n"; - - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - - echo "\n"; - echo "
\n"; + echo ""; - echo "$servers_list"; - echo "\n"; - echo "$NWB#settings-active_voicemail_server$NWE
Auto Dial Limit: \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 "\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 "\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 "\n"; + echo "\n"; + echo "\n"; + + echo "\n"; + echo "
Version: $version
DB Schema Version: $db_schema_version
DB Schema Update Date: $db_schema_update_date
Auto User-add Value: $auto_user_add_value
Install Date: $install_date
Use Non-Latin: $NWB#settings-use_non_latin$NWE
Webroot Writable: $NWB#settings-webroot_writable$NWE
VICIDIAL Agent Disable Display: $NWB#settings-vicidial_agent_disable$NWE
Allow SIPSAK Messages: $NWB#settings-allow_sipsak_messages$NWE
Admin Home URL: $NWB#settings-admin_home_url$NWE
Enable Agent Transfer Logfile: $NWB#settings-enable_agc_xfer_log$NWE
Timeclock End Of Day: $NWB#settings-timeclock_end_of_day$NWE
Timeclock Last Auto Logout: $timeclock_last_reset_date
Agent Screen Header Date Format: $NWB#settings-vdc_header_date_format$NWE
Agent Screen Customer Date Format: $NWB#settings-vdc_customer_date_format$NWE
Agent Screen Customer Phone Format: $NWB#settings-vdc_header_phone_format$NWE
Agent API Active: $NWB#settings-vdc_agent_api_active$NWE
Agent Only Callback Campaign Lock: $NWB#settings-agentonly_callback_campaign_lock$NWE
Central Sound Control Active: $NWB#settings-sounds_central_control_active$NWE
Sounds Web Server: $NWB#settings-sounds_web_server$NWE
Sounds Web Directory: $sounds_web_directory $NWB#settings-sounds_web_directory$NWE
Active Voicemail Server: $NWB#settings-active_voicemail_server$NWE
Auto Dial Limit: $NWB#settings-auto_dial_limit$NWE
Outbound Auto-Dial Active: $NWB#settings-outbound_autodial_active$NWE
Max FILL Calls per Second: $NWB#settings-outbound_calls_per_second$NWE
Allow Custom Dialplan Entries: $NWB#settings-allow_custom_dialplan$NWE
User Territories Active: $NWB#settings-user_territories_active$NWE
Enable Second Webform: $NWB#settings-enable_second_webform$NWE
Enable TTS Integration: $NWB#settings-enable_tts_integration$NWE
QC Features Active: $NWB#settings-qc_features_active$NWE
QC Last Pull Time: $qc_last_pull_time
Enable QueueMetrics Logging: $NWB#settings-enable_queuemetrics_logging$NWE
QueueMetrics Server IP: $NWB#settings-queuemetrics_server_ip$NWE
QueueMetrics DB Name: $NWB#settings-queuemetrics_dbname$NWE
QueueMetrics DB Login: $NWB#settings-queuemetrics_login$NWE
QueueMetrics DB Password: $NWB#settings-queuemetrics_pass$NWE
QueueMetrics URL: $NWB#settings-queuemetrics_url$NWE
QueueMetrics Log ID: $NWB#settings-queuemetrics_log_id$NWE
QueueMetrics EnterQueue Prepend: $NWB#settings-queuemetrics_eq_prepend$NWE
Enable Vtiger Integration: $NWB#settings-enable_vtiger_integration$NWE\n"; + echo "   Click here to Synchronize users with Vtiger\n"; + echo "
Vtiger DB Server IP: $NWB#settings-vtiger_server_ip$NWE
Vtiger DB Name: $NWB#settings-vtiger_dbname$NWE
Vtiger DB Login: $NWB#settings-vtiger_login$NWE
Vtiger DB Password: $NWB#settings-vtiger_pass$NWE
Vtiger URL: $NWB#settings-vtiger_url$NWE
\n"; + echo "\n"; + if ($LOGuser_level >= 9) + { + echo "

Click here to see Admin chages to the system settings\n"; + } } - echo "$NWB#settings-auto_dial_limit$NWE
Outbound Auto-Dial Active: $NWB#settings-outbound_autodial_active$NWE
Max FILL Calls per Second: $NWB#settings-outbound_calls_per_second$NWE
Allow Custom Dialplan Entries: $NWB#settings-allow_custom_dialplan$NWE
User Territories Active: $NWB#settings-user_territories_active$NWE
Enable Second Webform: $NWB#settings-enable_second_webform$NWE
Enable TTS Integration: $NWB#settings-enable_tts_integration$NWE
QC Features Active: $NWB#settings-qc_features_active$NWE
QC Last Pull Time: $qc_last_pull_time
Enable QueueMetrics Logging: $NWB#settings-enable_queuemetrics_logging$NWE
QueueMetrics Server IP: $NWB#settings-queuemetrics_server_ip$NWE
QueueMetrics DB Name: $NWB#settings-queuemetrics_dbname$NWE
QueueMetrics DB Login: $NWB#settings-queuemetrics_login$NWE
QueueMetrics DB Password: $NWB#settings-queuemetrics_pass$NWE
QueueMetrics URL: $NWB#settings-queuemetrics_url$NWE
QueueMetrics Log ID: $NWB#settings-queuemetrics_log_id$NWE
QueueMetrics EnterQueue Prepend: $NWB#settings-queuemetrics_eq_prepend$NWE
Enable Vtiger Integration: $NWB#settings-enable_vtiger_integration$NWE\n"; - echo "   Click here to Synchronize users with Vtiger\n"; - echo "
Vtiger DB Server IP: $NWB#settings-vtiger_server_ip$NWE
Vtiger DB Name: $NWB#settings-vtiger_dbname$NWE
Vtiger DB Login: $NWB#settings-vtiger_login$NWE
Vtiger DB Password: $NWB#settings-vtiger_pass$NWE
Vtiger URL: $NWB#settings-vtiger_url$NWE
\n"; - echo "\n"; - if ($LOGuser_level >= 9) - { - echo "

Click here to see Admin chages to the system settings\n"; - } - - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} @@ -21493,114 +21782,114 @@ if ($ADD==311111111111111) ###################### if ($ADD==321111111111111) -{ - if ($LOGmodify_servers==1) { - echo "
\n"; - echo ""; - - echo "
\n"; - echo "VICIDIAL STATUSES WITHIN THIS SYSTEM:   $NWB#vicidial_statuses$NWE
\n"; - echo "\n"; - echo "\n"; - - ##### get status category listings for dynamic pulldown - $stmt="SELECT vsc_id,vsc_name from vicidial_status_categories order by vsc_id desc"; - $rslt=mysql_query($stmt, $link); - $cats_to_print = mysql_num_rows($rslt); - $cats_list=""; - - $o=0; - while ($cats_to_print > $o) + if ($LOGmodify_servers==1) { - $rowx=mysql_fetch_row($rslt); - $cats_list .= "\n"; - $catsname_list["$rowx[0]"] = substr($rowx[1],0,20); - $o++; - } + echo "
STATUSDESCRIPTIONSELECT-
ABLE
HUMAN
ANSWER
CATEGORYMODIFY/DELETE
\n"; - echo "\n"; } - - echo "
\n"; + echo ""; + + echo "
\n"; + echo "VICIDIAL STATUSES WITHIN THIS SYSTEM:   $NWB#vicidial_statuses$NWE
\n"; + echo "\n"; + echo "\n"; + + ##### get status category listings for dynamic pulldown + $stmt="SELECT vsc_id,vsc_name from vicidial_status_categories order by vsc_id desc"; + $rslt=mysql_query($stmt, $link); + $cats_to_print = mysql_num_rows($rslt); + $cats_list=""; + + $o=0; + while ($cats_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $cats_list .= "\n"; + $catsname_list["$rowx[0]"] = substr($rowx[1],0,20); + $o++; + } - $stmt="SELECT * from vicidial_statuses order by status;"; - $rslt=mysql_query($stmt, $link); - $statuses_to_print = mysql_num_rows($rslt); - $o=0; - while ($statuses_to_print > $o) - { - $rowx=mysql_fetch_row($rslt); - $AScategory = $rowx[4]; - $o++; + $stmt="SELECT status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable from vicidial_statuses order by status;"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $AScategory = $rowx[4]; + $o++; - if (eregi("1$|3$|5$|7$|9$", $o)) - {$bgcolor='bgcolor="#B9CBFD"';} - else - {$bgcolor='bgcolor="#9BB9FB"';} + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + } + + echo "
STATUSDESCRIPTIONSELECT-
ABLE
HUMAN
ANSWER
CATEGORYMODIFY/DELETE
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "$rowx[0]
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "$rowx[0]\n"; + echo "\n"; + echo "         \n"; + echo "   \n"; + + if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0])) + { + echo "DELETE\n"; + } + else + { + echo "DELETE\n"; + } + + echo "
\n"; + + echo "  Sale:   \n"; + echo "  DNC:   \n"; + echo "  Customer Contact:   \n"; + echo "  Not Interested:   \n"; + echo "  Unworkable:   \n"; + + echo "
\n"; + + echo "
ADD NEW SYSTEM STATUS
\n"; + echo "\n"; + echo "Status:   \n"; + echo "Description:
\n"; + echo "Selectable:   \n"; + echo "Human Answer:   \n"; + echo "Sale:   \n"; + echo "DNC:   \n"; + echo "Customer Contact:  
\n"; + echo "Not Interested:   \n"; + echo "Unworkable:   \n"; + echo "Category: \n"; echo "\n"; - echo "
        \n"; - echo "   \n"; - - if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0])) - { - echo "DELETE\n"; - } - else - { - echo "DELETE\n"; - } + echo "  
\n"; + echo "
\n"; - echo "
\n"; + echo "
\n"; - echo "  Sale:   \n"; - echo "  DNC:   \n"; - echo "  Customer Contact:   \n"; - echo "  Not Interested:   \n"; - echo "  Unworkable:   \n"; - - echo "
\n"; - - echo "
ADD NEW SYSTEM STATUS
\n"; - echo "\n"; - echo "Status:   \n"; - echo "Description:
\n"; - echo "Selectable:   \n"; - echo "Human Answer:   \n"; - echo "Sale:   \n"; - echo "DNC:   \n"; - echo "Customer Contact:  
\n"; - echo "Not Interested:   \n"; - echo "Unworkable:   \n"; - echo "Category: \n"; - echo "  
\n"; - echo "
\n"; - - echo "

\n"; - - } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} @@ -21611,18 +21900,18 @@ if ($ADD==321111111111111) ###################### if ($ADD==331111111111111) -{ - if ($LOGmodify_servers==1) { - echo "
\n"; - echo ""; + if ($LOGmodify_servers==1) + { + echo "
\n"; + echo ""; - echo "
\n"; - echo "VICIDIAL STATUS CATEGORIES:   $NWB#vicidial_status_categories$NWE
\n"; - echo "\n"; - echo "\n"; + echo "
\n"; + echo "VICIDIAL STATUS CATEGORIES:   $NWB#vicidial_status_categories$NWE
\n"; + echo "
CATEGORYNAMESTATUSES IN THIS CATEGORY
\n"; + echo "\n"; - $stmt="SELECT * from vicidial_status_categories order by vsc_id;"; + $stmt="SELECT vsc_id,vsc_name,vsc_description,tovdad_display,sale_category,dead_lead_category from vicidial_status_categories order by vsc_id;"; $rslt=mysql_query($stmt, $link); $statuses_to_print = mysql_num_rows($rslt); $o=0; @@ -21685,28 +21974,28 @@ if ($ADD==331111111111111) $p++; } + + echo "
CATEGORYNAMESTATUSES IN THIS CATEGORY
\n"; - echo "
\n"; + echo "
ADD NEW STATUS CATEGORY
\n"; + echo "\n"; + echo "Category ID:   \n"; + echo "Name:  
\n"; + echo "TimeOnVDAD Display:   \n"; + echo "Sale Category:   \n"; + echo "Dead Lead Category:  
\n"; + echo "Description:   \n"; + echo "
\n"; - echo "
ADD NEW STATUS CATEGORY
\n"; - echo "\n"; - echo "Category ID:   \n"; - echo "Name:  
\n"; - echo "TimeOnVDAD Display:   \n"; - echo "Sale Category:   \n"; - echo "Dead Lead Category:  
\n"; - echo "Description:   \n"; - echo "
\n"; + echo "

\n"; - echo "
\n"; - - } + } else - { - echo "You do not have permission to view this page\n"; - exit; + { + echo "You do not have permission to view this page\n"; + exit; + } } -} @@ -21717,121 +22006,121 @@ if ($ADD==331111111111111) ###################### if ($ADD==341111111111111) -{ + { if ( ($LOGmodify_servers==1) and ($SSqc_features_active > 0) ) + { + echo "
\n"; + echo ""; + + echo "
\n"; + echo "VICIDIAL QC STATUS CODES WITHIN THIS SYSTEM:   $NWB#vicidial_qc_status_codes$NWE
\n"; + echo "\n"; + echo "\n"; + + ##### go through each QC status code + $stmt="SELECT count(*) from vicidial_qc_codes;"; + $rslt=mysql_query($stmt, $link); + $rowx=mysql_fetch_row($rslt); + if ($rowx[0] > 0) + { + $stmt="SELECT code,code_name from vicidial_qc_codes order by code;"; + $rslt=mysql_query($stmt, $link); + $statuses_to_print = mysql_num_rows($rslt); + $o=0; + while ($statuses_to_print > $o) + { + $rowx=mysql_fetch_row($rslt); + $o++; + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + + echo "\n"; + echo "\n"; + echo "\n"; + } + } + echo "
STATUS CODEDESCRIPTIONMODIFY/DELETE
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "$rowx[0]
        \n"; + echo "   \n"; + + if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0])) + { + echo "DELETE\n"; + } + else + { + echo "DELETE\n"; + } + echo "
\n"; + + echo "
ADD NEW QC STATUS CODE
\n"; + echo "\n"; + echo "Status:   \n"; + echo "Description:
\n"; + echo "
\n"; + + echo "

\n"; + + } + else + { + echo "You do not have permission to view this page\n"; + exit; + } + } + + + + + + +###################### +# ADD=550 user search form +###################### + +if ($ADD==550) { echo "
\n"; echo ""; - echo "
\n"; - echo "VICIDIAL QC STATUS CODES WITHIN THIS SYSTEM:   $NWB#vicidial_qc_status_codes$NWE
\n"; - echo "\n"; - echo "\n"; + echo "
SEARCH FOR A USER\n"; + echo "\n"; + echo "
STATUS CODEDESCRIPTIONMODIFY/DELETE
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; - echo "\n"; - echo "\n"; - } - } - echo "
User Number:
Full Name:
User Level:
User Group:
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "$rowx[0]         \n"; - echo "   \n"; - - if (preg_match("/^B$|^NA$|^DNC$|^NA$|^DROP$|^INCALL$|^QUEUE$|^NEW$/i",$rowx[0])) - { - echo "DELETE\n"; - } - else - { - echo "DELETE\n"; - } - echo "
\n"; - - echo "
ADD NEW QC STATUS CODE
\n"; - echo "\n"; - echo "Status:   \n"; - echo "Description:
\n"; - echo "
\n"; - - echo "

\n"; - - } - else - { - echo "You do not have permission to view this page\n"; - exit; - } -} - - - - - - -###################### -# ADD=550 search form -###################### - -if ($ADD==550) -{ -echo "\n"; - -echo "\n"; -echo "
\n"; -echo ""; - -echo "
SEARCH FOR A USER
\n"; -echo "\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; + + echo "\n"; + echo "
User Number:
Full Name:
User Level:
User Group:
\n"; } -echo "$groups_list
\n"; - -} ###################### # ADD=660 user search results ###################### if ($ADD==660) -{ -echo "
\n"; + { + echo "
\n"; echo ""; $SQL = ''; @@ -21842,16 +22131,17 @@ echo "
\n"; $SQL = eregi_replace(" and$", "", $SQL); if (strlen($SQL)>5) {$SQL = "and $SQL";} - $stmt="SELECT * from vicidial_users where user_level <= $LOGuser_level $SQL order by full_name desc;"; + $stmt="SELECT user_id,user,pass,full_name,user_level,user_group,phone_login,phone_pass,delete_users,delete_user_groups,delete_lists,delete_campaigns,delete_ingroups,delete_remote_agents,load_leads,campaign_detail,ast_admin_access,ast_delete_phones,delete_scripts,modify_leads,hotkeys_active,change_agent_campaign,agent_choose_ingroups,closer_campaigns,scheduled_callbacks,agentonly_callbacks,agentcall_manual,vicidial_recording,vicidial_transfers,delete_filters,alter_agent_interface_options,closer_default_blended,delete_call_times,modify_call_times,modify_users,modify_campaigns,modify_lists,modify_scripts,modify_filters,modify_ingroups,modify_usergroups,modify_remoteagents,modify_servers,view_reports,vicidial_recording_override,alter_custdata_override,qc_enabled,qc_user_level,qc_pass,qc_finish,qc_commit,add_timeclock_log,modify_timeclock_log,delete_timeclock_log,alter_custphone_override,vdc_agent_api_access,modify_inbound_dids,delete_inbound_dids,active,alert_enabled,download_lists,agent_shift_enforcement_override,manager_shift_enforcement_override,shift_override_flag,export_reports,delete_from_dnc,email,user_code,territory,allow_alerts from vicidial_users where user_level <= $LOGuser_level $SQL order by full_name desc;"; # echo "\n|$stmt|\n"; $rslt=mysql_query($stmt, $link); $people_to_print = mysql_num_rows($rslt); -echo "
SEARCH RESULTS:\n"; -echo "
\n"; + echo "
SEARCH RESULTS:\n"; + echo "
\n"; $o=0; - while ($people_to_print > $o) { + while ($people_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -21860,12 +22150,12 @@ echo "
\n"; echo ""; echo "\n"; $o++; + } + + echo "
$row[1]$row[3]$row[4]$row[5]MODIFY | STATS | STATUS | TIME
\n"; + } -echo "
\n"; - -} - ###################################################################################################### ###################################################################################################### @@ -21877,158 +22167,158 @@ echo "
\n"; # ADD=8 find all callbacks on hold by a User ###################### if ($ADD==8) -{ - if ($LOGmodify_users==1) { + if ($LOGmodify_users==1) + { if ($SUB==89) - { - $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user='$user' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';"; - $rslt=mysql_query($stmt, $link); - echo "
User($user) callback listings LIVE for more than one month have been made INACTIVE\n"; - } + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user='$user' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';"; + $rslt=mysql_query($stmt, $link); + echo "
User($user) callback listings LIVE for more than one month have been made INACTIVE\n"; + } if ($SUB==899) - { - $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user='$user' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';"; - $rslt=mysql_query($stmt, $link); - echo "
User($user) callback listings LIVE for more than one week have been made INACTIVE\n"; + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user='$user' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';"; + $rslt=mysql_query($stmt, $link); + echo "
User($user) callback listings LIVE for more than one week have been made INACTIVE\n"; + } } - } -$CBinactiveLINK = "
Remove LIVE Callbacks older than one month for this user
Remove LIVE Callbacks older than one week for this user
"; + $CBinactiveLINK = "
Remove LIVE Callbacks older than one month for this user
Remove LIVE Callbacks older than one week for this user
"; -echo ""; + echo ""; $CBquerySQLwhere = "and user='$user'"; -echo "
USER CALLBACK HOLD LISTINGS: $user\n"; -$oldADD = "ADD=8&user=$user"; -$ADD='82'; -} + echo "
USER CALLBACK HOLD LISTINGS: $user\n"; + $oldADD = "ADD=8&user=$user"; + $ADD='82'; + } ###################### # ADD=81 find all callbacks on hold within a Campaign ###################### if ($ADD==81) -{ - if ($LOGmodify_campaigns==1) { + if ($LOGmodify_campaigns==1) + { if ($SUB==89) - { - $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where campaign_id='$campaign_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';"; - $rslt=mysql_query($stmt, $link); - echo "
campaign($campaign_id) callback listings LIVE for more than one month have been made INACTIVE\n"; - } + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where campaign_id='$campaign_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';"; + $rslt=mysql_query($stmt, $link); + echo "
campaign($campaign_id) callback listings LIVE for more than one month have been made INACTIVE\n"; + } if ($SUB==899) - { - $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where campaign_id='$campaign_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';"; - $rslt=mysql_query($stmt, $link); - echo "
campaign($campaign_id) callback listings LIVE for more than one week have been made INACTIVE\n"; + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where campaign_id='$campaign_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';"; + $rslt=mysql_query($stmt, $link); + echo "
campaign($campaign_id) callback listings LIVE for more than one week have been made INACTIVE\n"; + } } - } -$CBinactiveLINK = "
Remove LIVE Callbacks older than one month for this campaign
Remove LIVE Callbacks older than one week for this campaign
"; + $CBinactiveLINK = "
Remove LIVE Callbacks older than one month for this campaign
Remove LIVE Callbacks older than one week for this campaign
"; -echo ""; + echo ""; $CBquerySQLwhere = "and campaign_id='$campaign_id'"; -echo "
CAMPAIGN CALLBACK HOLD LISTINGS: $campaign_id\n"; -$oldADD = "ADD=81&campaign_id=$campaign_id"; -$ADD='82'; -} + echo "
CAMPAIGN CALLBACK HOLD LISTINGS: $campaign_id\n"; + $oldADD = "ADD=81&campaign_id=$campaign_id"; + $ADD='82'; + } ###################### # ADD=811 find all callbacks on hold within a List ###################### if ($ADD==811) -{ - if ($LOGmodify_lists==1) { + if ($LOGmodify_lists==1) + { if ($SUB==89) - { - $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where list_id='$list_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';"; - $rslt=mysql_query($stmt, $link); - echo "
list($list_id) callback listings LIVE for more than one month have been made INACTIVE\n"; - } + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where list_id='$list_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';"; + $rslt=mysql_query($stmt, $link); + echo "
list($list_id) callback listings LIVE for more than one month have been made INACTIVE\n"; + } if ($SUB==899) - { - $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where list_id='$list_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';"; - $rslt=mysql_query($stmt, $link); - echo "
list($list_id) callback listings LIVE for more than one week have been made INACTIVE\n"; + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where list_id='$list_id' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';"; + $rslt=mysql_query($stmt, $link); + echo "
list($list_id) callback listings LIVE for more than one week have been made INACTIVE\n"; + } } - } -$CBinactiveLINK = "
Remove LIVE Callbacks older than one month for this list
Remove LIVE Callbacks older than one week for this list
"; + $CBinactiveLINK = "
Remove LIVE Callbacks older than one month for this list
Remove LIVE Callbacks older than one week for this list
"; -echo ""; + echo ""; $CBquerySQLwhere = "and list_id='$list_id'"; -echo "
LIST CALLBACK HOLD LISTINGS: $list_id\n"; -$oldADD = "ADD=811&list_id=$list_id"; -$ADD='82'; -} + echo "
LIST CALLBACK HOLD LISTINGS: $list_id\n"; + $oldADD = "ADD=811&list_id=$list_id"; + $ADD='82'; + } ###################### # ADD=8111 find all callbacks on hold within a user group ###################### if ($ADD==8111) -{ - if ($LOGmodify_usergroups==1) { + if ($LOGmodify_usergroups==1) + { if ($SUB==89) - { - $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user_group='$user_group' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';"; - $rslt=mysql_query($stmt, $link); - echo "
user group($user_group) callback listings LIVE for more than one month have been made INACTIVE\n"; - } + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user_group='$user_group' and status IN('LIVE','ACTIVE') and callback_time < '$past_month_date';"; + $rslt=mysql_query($stmt, $link); + echo "
user group($user_group) callback listings LIVE for more than one month have been made INACTIVE\n"; + } if ($SUB==899) - { - $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user_group='$user_group' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';"; - $rslt=mysql_query($stmt, $link); - echo "
user group($user_group) callback listings LIVE for more than one week have been made INACTIVE\n"; + { + $stmt="UPDATE vicidial_callbacks SET status='INACTIVE' where user_group='$user_group' and status IN('LIVE','ACTIVE') and callback_time < '$past_week_date';"; + $rslt=mysql_query($stmt, $link); + echo "
user group($user_group) callback listings LIVE for more than one week have been made INACTIVE\n"; + } } - } $CBinactiveLINK = "
Remove LIVE Callbacks older than one month for this user group
Remove LIVE Callbacks older than one week for this user group
"; echo ""; $CBquerySQLwhere = "and user_group='$user_group'"; -echo "
USER GROUP CALLBACK HOLD LISTINGS: $list_id\n"; -$oldADD = "ADD=8111&user_group=$user_group"; -$ADD='82'; -} + echo "
USER GROUP CALLBACK HOLD LISTINGS: $list_id\n"; + $oldADD = "ADD=8111&user_group=$user_group"; + $ADD='82'; + } ###################### # ADD=82 display all callbacks on hold ###################### if ($ADD==82) -{ + { + $USERlink='stage=USERIDDOWN'; + $GROUPlink='stage=GROUPDOWN'; + $ENDATElink='stage=ENDATEDOWN'; + $SQLorder='order by '; + if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc,'; $USERlink='stage=USERIDUP';} + if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc,'; $NAMElink='stage=NAMEUP';} + if (eregi("ENDATEDOWN",$stage)) {$SQLorder='order by entry_time desc,'; $LEVELlink='stage=LEVELUP';} -$USERlink='stage=USERIDDOWN'; -$GROUPlink='stage=GROUPDOWN'; -$ENDATElink='stage=ENDATEDOWN'; -$SQLorder='order by '; -if (eregi("USERIDDOWN",$stage)) {$SQLorder='order by user desc,'; $USERlink='stage=USERIDUP';} -if (eregi("GROUPDOWN",$stage)) {$SQLorder='order by user_group desc,'; $NAMElink='stage=NAMEUP';} -if (eregi("ENDATEDOWN",$stage)) {$SQLorder='order by entry_time desc,'; $LEVELlink='stage=LEVELUP';} - - $stmt="SELECT * from vicidial_callbacks where status IN('ACTIVE','LIVE') $CBquerySQLwhere $SQLorder recipient,status desc,callback_time"; + $stmt="SELECT callback_id,lead_id,list_id,campaign_id,status,entry_time,callback_time,modify_date,user,recipient,comments,user_group from vicidial_callbacks where status IN('ACTIVE','LIVE') $CBquerySQLwhere $SQLorder recipient,status desc,callback_time"; $rslt=mysql_query($stmt, $link); $cb_to_print = mysql_num_rows($rslt); -echo ""; echo ""; echo ""; - echo ""; echo ""; + echo ""; echo ""; echo ""; echo ""; @@ -22243,7 +22533,7 @@ if ($ADD==100) $o++; } - $stmt="SELECT list_id,list_name,list_description,0,active,list_lastcalldate,campaign_id from vicidial_lists where list_id NOT IN($lists_printed'');"; + $stmt="SELECT list_id,list_name,list_description,0,active,list_lastcalldate,campaign_id,reset_time from vicidial_lists where list_id NOT IN($lists_printed'');"; $rslt=mysql_query($stmt, $link); $lists_to_print = mysql_num_rows($rslt); $o=0; @@ -22257,6 +22547,7 @@ if ($ADD==100) echo ""; echo ""; echo ""; + echo ""; echo ""; echo ""; echo ""; @@ -22641,7 +22932,6 @@ if ($ADD==1000000000) echo ""; echo "\n"; - $o=0; while ($statecalltimes_to_print > $o) { @@ -23062,6 +23352,50 @@ if ($ADD==160000000000) } +###################### +# ADD=170000000000 display all voicemail entries +###################### +if ($ADD==170000000000) + { + echo "
\n"; -echo "
\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; + echo "
LEADLIST CAMPAIGNENTRY DATECALLBACK DATEUSERRECIPIENTSTATUSGROUP
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; $o=0; - while ($cb_to_print > $o) { + while ($cb_to_print > $o) + { $row=mysql_fetch_row($rslt); if (eregi("1$|3$|5$|7$|9$", $o)) {$bgcolor='bgcolor="#B9CBFD"';} @@ -22046,13 +22336,13 @@ echo ""; echo "\n"; $o++; + } + + echo "
LEADLIST CAMPAIGNENTRY DATECALLBACK DATEUSERRECIPIENTSTATUSGROUP
G echo "$row[11]
\n"; + + echo "$CBinactiveLINK"; } -echo "
\n"; - -echo "$CBinactiveLINK"; -} - ###################################################################################################### @@ -22233,8 +22523,8 @@ if ($ADD==100) echo "
$row[0] $row[1] $row[2] $row[3] $row[7] $row[3] $row[4] $row[5] $row[6]
$row[0] $row[1] $row[2] $row[7] $row[3] $row[4] $row[5]DEFAULT STOPMODIFY
> + > 0) or ($SSsounds_central_control_active > 0) ) { ?> @@ -1236,6 +1254,10 @@ $SSenable_tts_integration = $row[1]; ?> > 1) and (strlen($admin_hh) > 1) ) { + ?> + > + 1) { ?> > diff --git a/www/vicidial/non_agent_api.php b/www/vicidial/non_agent_api.php index f84246dd..b18e8220 100644 --- a/www/vicidial/non_agent_api.php +++ b/www/vicidial/non_agent_api.php @@ -25,11 +25,12 @@ # 90522-0506 - Security fix # 90530-0946 - Added QueueMetrics blind monitoring option # 90721-1428 - Added rank and owner as vicidial_list fields -# 90904-1535 - Added moh_list +# 90904-1535 - Added moh_list musiconhold list +# 90916-2342 - Added vm_list voicemail list # -$version = '2.2.0-12'; -$build = '90904-1535'; +$version = '2.2.0-13'; +$build = '90916-2342'; require("dbconnect.php"); @@ -592,6 +593,122 @@ if ($function == 'moh_list') +################################################################################ +### vm_list - sends a list of the voicemail boxes in the system +################################################################################ +if ($function == 'vm_list') + { + $stmt="SELECT count(*) from vicidial_users where user='$user' and pass='$pass' and user_level > 6;"; + if ($DB) {echo "|$stmt|\n";} + $rslt=mysql_query($stmt, $link); + $row=mysql_fetch_row($rslt); + $allowed_user=$row[0]; + if ($allowed_user < 1) + { + $result = 'ERROR'; + $result_reason = "vm_list USER DOES NOT HAVE PERMISSION TO VIEW VOICEMAIL BOXES LIST"; + echo "$result: $result_reason: |$user|$allowed_user|\n"; + $data = "$allowed_user"; + api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data); + exit; + } + else + { + $server_name = getenv("SERVER_NAME"); + $server_port = getenv("SERVER_PORT"); + if (eregi("443",$server_port)) {$HTTPprotocol = 'https://';} + else {$HTTPprotocol = 'http://';} + $admDIR = "$HTTPprotocol$server_name:$server_port"; + + echo "\n"; + echo "NON-AGENT API\n"; + echo "\n"; + echo "\n\n"; + + echo "\n"; + echo "close frame\n"; + echo "
\n"; + echo "
\n"; + echo ""; + + $stmt="SELECT voicemail_id,fullname,active,messages,old_messages from vicidial_voicemail order by voicemail_id"; + $rslt=mysql_query($stmt, $link); + $vm_to_print = mysql_num_rows($rslt); + + echo "
VOICEMAIL BOXES:\n"; + echo "
\n"; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + + $o=0; + while ($vm_to_print > $o) + { + $row=mysql_fetch_row($rslt); + + if (eregi("1$|3$|5$|7$|9$", $o)) + {$bgcolor='bgcolor="#B9CBFD"';} + else + {$bgcolor='bgcolor="#9BB9FB"';} + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "\n"; + $o++; + } + + echo "
VOICEMAIL IDNameActiveNew MessagesOld MessagesMODIFY
$row[0]$row[1]$row[2]$row[3]$row[4]MODIFY
\n"; + } + + ###################### # ADD=1000000000000 display all conferences ###################### @@ -23664,7 +23998,7 @@ if (isset($camp_lists)) $g++; } - $stmt="SELECT * FROM vicidial_call_times where call_time_id='$local_call_time';"; + $stmt="SELECT call_time_id,call_time_name,call_time_comments,ct_default_start,ct_default_stop,ct_sunday_start,ct_sunday_stop,ct_monday_start,ct_monday_stop,ct_tuesday_start,ct_tuesday_stop,ct_wednesday_start,ct_wednesday_stop,ct_thursday_start,ct_thursday_stop,ct_friday_start,ct_friday_stop,ct_saturday_start,ct_saturday_stop,ct_state_call_times FROM vicidial_call_times where call_time_id='$local_call_time';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $rowx=mysql_fetch_row($rslt); @@ -23699,7 +24033,7 @@ if (isset($camp_lists)) { if (strlen($state_rules[$b])>1) { - $stmt="SELECT * from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; + $stmt="SELECT state_call_time_id,state_call_time_state,state_call_time_name,state_call_time_comments,sct_default_start,sct_default_stop,sct_sunday_start,sct_sunday_stop,sct_monday_start,sct_monday_stop,sct_tuesday_start,sct_tuesday_stop,sct_wednesday_start,sct_wednesday_stop,sct_thursday_start,sct_thursday_stop,sct_friday_start,sct_friday_stop,sct_saturday_start,sct_saturday_stop from vicidial_state_call_times where state_call_time_id='$state_rules[$b]';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); $Gstate_call_time_id = "$row[0]"; diff --git a/www/vicidial/admin_header.php b/www/vicidial/admin_header.php index 4a27ef91..3792d9a3 100644 --- a/www/vicidial/admin_header.php +++ b/www/vicidial/admin_header.php @@ -16,6 +16,7 @@ # 90628-1016 - Added Text-to-speech options # 90830-2213 - Added Music On Hold options # 90904-1534 - Added launch_moh_chooser +# 90916-2334 - Added Voicemail options # @@ -410,6 +411,19 @@ else document.getElementById("audio_chooser_span").innerHTML = Iframe_content; } + function launch_vm_chooser(fieldname,stage,vposition) + { + var audiolistURL = "./non_agent_api.php"; + var audiolistQuery = "source=admin&function=vm_list&user=" + user + "&pass=" + pass + "&format=selectframe&stage=" + stage + "&comments=" + fieldname; + var Iframe_content = ''; + + document.getElementById("audio_chooser_span").style.position = "absolute"; + document.getElementById("audio_chooser_span").style.left = "220px"; + document.getElementById("audio_chooser_span").style.top = vposition + "px"; + document.getElementById("audio_chooser_span").style.visibility = 'visible'; + document.getElementById("audio_chooser_span").innerHTML = Iframe_content; + } + function close_chooser() { document.getElementById("audio_chooser_span").style.visibility = 'hidden'; @@ -683,7 +697,7 @@ if ( ($ADD==3511) or ($ADD==2511) or ($ADD==2611) or ($ADD==4511) or ($ADD==5511 } else {value='';} - new_content = "Voicemail Box: "; + new_content = "Voicemail Box: voicemail chooser"; } if (selected_route=='AGI') { @@ -831,7 +845,7 @@ if ( ($ADD==3111) or ($ADD==2111) or ($ADD==2011) or ($ADD==4111) or ($ADD==5111 } else {value = '101';} - new_content = "Voicemail Box: "; + new_content = "Voicemail Box: voicemail chooser"; } if (new_content.length < 1) @@ -1126,6 +1140,8 @@ $SSenable_tts_integration = $row[1]; else {$audio_sh=''; $audio_fc='BLACK';} if ($sh=='moh') {$moh_sh="bgcolor=\"$moh_color\""; $moh_fc="$moh_font";} else {$moh_sh=''; $moh_fc='BLACK';} + if ($sh=='vm') {$vm_sh="bgcolor=\"$vm_color\""; $vm_fc="$vm_font";} + else {$vm_sh=''; $vm_fc='BLACK';} if ($sh=='tts') {$tts_sh="bgcolor=\"$tts_color\""; $tts_fc="$tts_font";} else {$tts_sh=''; $tts_fc='BLACK';} @@ -1149,6 +1165,8 @@ $SSenable_tts_integration = $row[1]; SIZE=> System Settings
>   SIZE=> System Statuses
>   + SIZE=> Voicemail
  > Show MOH Entries   |   > Add A New MOH Entry
  > Show Voicemail Entries   |   > Add A New Voicemail Entry
  > System Settings
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + $stmt="SELECT voicemail_id,fullname,email from vicidial_voicemail where active='Y' order by voicemail_id"; + $rslt=mysql_query($stmt, $link); + $vm_to_print = mysql_num_rows($rslt); + $k=0; + $sf=0; + while ($vm_to_print > $k) + { + $rowx=mysql_fetch_row($rslt); + $voicemail_id[$k] = $rowx[0]; + $fullname[$k] = $rowx[1]; + $email[$k] = $rowx[2]; + $sf++; + if (eregi("1$|3$|5$|7$|9$", $sf)) + {$bgcolor='bgcolor="#E6E6E6"';} + else + {$bgcolor='bgcolor="#F6F6F6"';} + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + $k++; + } + + $stmt="SELECT voicemail_id,fullname,email,extension from phones where active='Y' order by voicemail_id"; + $rslt=mysql_query($stmt, $link); + $vm_to_print = mysql_num_rows($rslt); + $k=0; + $sf=0; + while ($vm_to_print > $k) + { + $rowx=mysql_fetch_row($rslt); + $voicemail_id[$k] = $rowx[0]; + $fullname[$k] = $rowx[1]; + $email[$k] = $rowx[2]; + $extension[$k] = $rowx[3]; + $sf++; + if (eregi("1$|3$|5$|7$|9$", $sf)) + {$bgcolor='bgcolor="#E6E6E6"';} + else + {$bgcolor='bgcolor="#F6F6F6"';} + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + + $k++; + } + echo "
#Voicemail BoxesNameEmail
$sf$voicemail_id[$k]$fullname[$k]$email[$k]
$sf$voicemail_id[$k]$extension[$k] - $fullname[$k]$email[$k]
\n"; + + exit; + } + } + + + + ################################################################################ ### blind_monitor - sends call to phone from session from listening ################################################################################ @@ -976,7 +1093,7 @@ if ( (eregi("POSTAL",$postalgmt)) && (strlen($postal_code)>4) ) { if (preg_match('/^1$/', $phone_code)) { - $stmt="select * from vicidial_postal_codes where country_code='$phone_code' and postal_code LIKE \"$postal_code%\";"; + $stmt="select postal_code,state,GMT_offset,DST,DST_range,country,country_code from vicidial_postal_codes where country_code='$phone_code' and postal_code LIKE \"$postal_code%\";"; $rslt=mysql_query($stmt, $link); $pc_recs = mysql_num_rows($rslt); if ($pc_recs > 0) @@ -997,7 +1114,7 @@ if ($postalgmt_found < 1) ### UNITED STATES ### if ($phone_code =='1') { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; + $stmt="select country_code,country,areacode,state,GMT_offset,DST,DST_range,geographic_description from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; $rslt=mysql_query($stmt, $link); $pc_recs = mysql_num_rows($rslt); if ($pc_recs > 0) @@ -1012,7 +1129,7 @@ if ($postalgmt_found < 1) ### MEXICO ### if ($phone_code =='52') { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; + $stmt="select country_code,country,areacode,state,GMT_offset,DST,DST_range,geographic_description from vicidial_phone_codes where country_code='$phone_code' and areacode='$USarea';"; $rslt=mysql_query($stmt, $link); $pc_recs = mysql_num_rows($rslt); if ($pc_recs > 0) @@ -1027,7 +1144,7 @@ if ($postalgmt_found < 1) ### AUSTRALIA ### if ($phone_code =='61') { - $stmt="select * from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; + $stmt="select country_code,country,areacode,state,GMT_offset,DST,DST_range,geographic_description from vicidial_phone_codes where country_code='$phone_code' and state='$state';"; $rslt=mysql_query($stmt, $link); $pc_recs = mysql_num_rows($rslt); if ($pc_recs > 0) @@ -1043,7 +1160,7 @@ if ($postalgmt_found < 1) if (!$PC_processed) { $PC_processed++; - $stmt="select * from vicidial_phone_codes where country_code='$phone_code';"; + $stmt="select country_code,country,areacode,state,GMT_offset,DST,DST_range,geographic_description from vicidial_phone_codes where country_code='$phone_code';"; $rslt=mysql_query($stmt, $link); $pc_recs = mysql_num_rows($rslt); if ($pc_recs > 0) @@ -1604,7 +1721,7 @@ $GMT_gmt = "$tz"; $GMT_day = "$pday"; $GMT_hour = ($phour + $pmin); -$stmt="SELECT * FROM vicidial_call_times where call_time_id='$local_call_time';"; +$stmt="SELECT call_time_id,call_time_name,call_time_comments,ct_default_start,ct_default_stop,ct_sunday_start,ct_sunday_stop,ct_monday_start,ct_monday_stop,ct_tuesday_start,ct_tuesday_stop,ct_wednesday_start,ct_wednesday_stop,ct_thursday_start,ct_thursday_stop,ct_friday_start,ct_friday_stop,ct_saturday_start,ct_saturday_stop,ct_state_call_times FROM vicidial_call_times where call_time_id='$local_call_time';"; if ($DB) {echo "$stmt\n";} $rslt=mysql_query($stmt, $link); $rowx=mysql_fetch_row($rslt);