diff --git a/agc_2-X/trunk/UPGRADE b/agc_2-X/trunk/UPGRADE
index 2250467e..5eadc7ef 100644
--- a/agc_2-X/trunk/UPGRADE
+++ b/agc_2-X/trunk/UPGRADE
@@ -96,6 +96,10 @@ OTHER CHANGES:
16. Added update_log_entry function to the non-agent API, which allows the
updating of the status of an inbound or outbound call log entry.
+17. Added ability to set an audio store file for the voicemail greeting message
+
+18. Added ability to delete audio files from the audio store
+
diff --git a/agc_2-X/trunk/bin/ADMIN_audio_store_sync.pl b/agc_2-X/trunk/bin/ADMIN_audio_store_sync.pl
index f11ef47f..9bba2a99 100644
--- a/agc_2-X/trunk/bin/ADMIN_audio_store_sync.pl
+++ b/agc_2-X/trunk/bin/ADMIN_audio_store_sync.pl
@@ -15,6 +15,7 @@
# 100621-1018 - Added admin_web_directory variable use
# 100824-0032 - Fixed issue with first MoH file being skipped when playing in non-random order
# 101217-2137 - Small fix for admin directories not directly off of the webroot
+# 121019-0729 - Added audio_store_purge feature
#
# constants
@@ -163,7 +164,7 @@ $dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VA
### Grab Server values from the database
-$stmtA = "SELECT active_asterisk_server FROM servers where server_ip = '$VARserver_ip';";
+$stmtA = "SELECT active_asterisk_server,audio_store_purge FROM servers where server_ip = '$VARserver_ip';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@@ -171,6 +172,7 @@ if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$active_asterisk_server = $aryA[0];
+ $audio_store_purge = $aryA[1];
}
$sthA->finish();
@@ -205,6 +207,37 @@ $stmtA="UPDATE servers SET sounds_update='N' where server_ip='$VARserver_ip';";
$affected_rows = $dbhA->do($stmtA);
+$gsm='.gsm';
+$wav='.wav';
+$ulaw='.ulaw';
+$audio_file_deleted=0;
+if (length($audio_store_purge) > 0)
+ {
+ if ($DB) {print "starting audio file deletion process...\n";}
+
+ $stmtA="UPDATE servers SET audio_store_purge='' where server_ip='$VARserver_ip';";
+ $affected_rows = $dbhA->do($stmtA);
+
+ @purge_data = split(/\n/, $audio_store_purge);
+ $i=0;
+ foreach(@purge_data)
+ {
+ if (length($purge_data[$i])>0)
+ {
+ if ( -e ("/var/lib/asterisk/sounds/$purge_data[$i]$wav"))
+ {`rm -f /var/lib/asterisk/sounds/$purge_data[$i]$wav`; $audio_file_deleted++;}
+ if ( -e ("/var/lib/asterisk/sounds/$purge_data[$i]$gsm"))
+ {`rm -f /var/lib/asterisk/sounds/$purge_data[$i]$gsm`; $audio_file_deleted++;}
+ if ( -e ("/var/lib/asterisk/sounds/$purge_data[$i]$ulaw"))
+ {`rm -f /var/lib/asterisk/sounds/$purge_data[$i]$ulaw`; $audio_file_deleted++;}
+ if ($audio_file_deleted < 1)
+ {if ($DB) {print "no audio file deleted: $purge_data[$i]|$i\n";}}
+ if ($DBX>0) {print "audio file delete process: $purge_data[$i]|$i|$audio_file_deleted\n";}
+ }
+ $i++;
+ }
+ if ($DB) {print "total audio files deleted: $audio_file_deleted|$i\n";}
+ }
### find wget binary
diff --git a/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl b/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl
index 6bc22e1c..fc8f3cae 100644
--- a/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl
+++ b/agc_2-X/trunk/bin/ADMIN_keepalive_ALL.pl
@@ -74,6 +74,7 @@
# 120512-2332 - Added loopback dialaround for ringing of calls
# 120706-1325 - Added Call Menu qualify SQL option
# 120820-1026 - Added clearing of vicidial_session_data table at end of day
+# 121019-1021 - Added voicemail greeting option
#
$DB=0; # Debug flag
@@ -1147,7 +1148,7 @@ if ($timeclock_end_of_day_NOW > 0)
################################################################################
##### Get the settings from system_settings #####
-$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs,generate_cross_server_exten,voicemail_timezones,default_voicemail_timezone,call_menu_qualify_enabled FROM system_settings;";
+$stmtA = "SELECT sounds_central_control_active,active_voicemail_server,custom_dialplan_entry,default_codecs,generate_cross_server_exten,voicemail_timezones,default_voicemail_timezone,call_menu_qualify_enabled,allow_voicemail_greeting FROM system_settings;";
# print "$stmtA\n";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -1163,9 +1164,30 @@ if ($sthArows > 0)
$SSvoicemail_timezones = $aryA[5];
$SSdefault_voicemail_timezone = $aryA[6];
$SScall_menu_qualify_enabled = $aryA[7];
+ $SSallow_voicemail_greeting = $aryA[8];
}
$sthA->finish();
if ($DBXXX > 0) {print "SYSTEM SETTINGS: $sounds_central_control_active|$active_voicemail_server|$SScustom_dialplan_entry|$SSdefault_codecs\n";}
+
+##### Get the settings for this server's server_ip #####
+$stmtA = "SELECT active_asterisk_server,generate_vicidial_conf,rebuild_conf_files,asterisk_version,sounds_update,conf_secret,custom_dialplan_entry FROM servers where server_ip='$server_ip';";
+# 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)
+ {
+ @aryA = $sthA->fetchrow_array;
+ $active_asterisk_server = $aryA[0];
+ $generate_vicidial_conf = $aryA[1];
+ $rebuild_conf_files = $aryA[2];
+ $asterisk_version = $aryA[3];
+ $sounds_update = $aryA[4];
+ $self_conf_secret = $aryA[5];
+ $SERVERcustom_dialplan_entry = $aryA[6];
+ }
+$sthA->finish();
+
if ( ($active_voicemail_server =~ /$server_ip/) && ((length($active_voicemail_server)) eq (length($server_ip))) )
{
$THISserver_voicemail=1;
@@ -1332,6 +1354,72 @@ if ( ($active_voicemail_server =~ /$server_ip/) && ((length($active_voicemail_se
##### END Parsing of the voicemail.conf file
################################################################################
}
+ if (($SSallow_voicemail_greeting > 0) && ($sounds_update =~ /Y/) )
+ {
+ $stmtA = "SELECT voicemail_id,voicemail_greeting,count(*) FROM phones where voicemail_greeting != '' and voicemail_greeting is not NULL and active='Y' group by voicemail_id order by voicemail_id limit 10000;";
+ # print "$stmtA\n";
+ $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
+ $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
+ $sthArows=$sthA->rows;
+ $vmb_ct=0;
+ while ($sthArows > $vmb_ct)
+ {
+ @aryA = $sthA->fetchrow_array;
+ $VG_voicemail_id = $aryA[0];
+ $VG_voicemail_greeting = $aryA[1];
+
+ $gsm='.gsm';
+ $wav='.wav';
+ $audio_file_copied=0;
+ if ( -e ("/var/lib/asterisk/sounds/$VG_voicemail_greeting$wav"))
+ {
+ `cp /var/lib/asterisk/sounds/$VG_voicemail_greeting$wav /var/spool/asterisk/voicemail/default/$VG_voicemail_id/unavail$wav`;
+ $audio_file_copied++;
+ }
+ if ( -e ("/var/lib/asterisk/sounds/$VG_voicemail_greeting$gsm"))
+ {
+ `cp /var/lib/asterisk/sounds/$VG_voicemail_greeting$gsm /var/spool/asterisk/voicemail/default/$VG_voicemail_id/unavail$gsm`;
+ $audio_file_copied++;
+ }
+ if ($audio_file_copied < 1)
+ {if ($DB) {print "no voicemail greeting copied: $VG_voicemail_id|$VG_voicemail_greeting\n";}}
+ if ($DBX>0) {print "Custom Voicemail Greeting: $VG_voicemail_id|$VG_voicemail_greeting|$audio_file_copied\n";}
+
+ $vmb_ct++;
+ }
+
+ $stmtA = "SELECT voicemail_id,voicemail_greeting,count(*) FROM vicidial_voicemail where voicemail_greeting != '' and voicemail_greeting is not NULL and active='Y' group by voicemail_id order by voicemail_id limit 10000;";
+ # print "$stmtA\n";
+ $sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
+ $sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
+ $sthArows=$sthA->rows;
+ $vmb_ct=0;
+ while ($sthArows > $vmb_ct)
+ {
+ @aryA = $sthA->fetchrow_array;
+ $VG_voicemail_id = $aryA[0];
+ $VG_voicemail_greeting = $aryA[1];
+
+ $gsm='.gsm';
+ $wav='.wav';
+ $audio_file_copied=0;
+ if ( -e ("/var/lib/asterisk/sounds/$VG_voicemail_greeting$wav"))
+ {
+ `cp /var/lib/asterisk/sounds/$VG_voicemail_greeting$wav /var/spool/asterisk/voicemail/default/$VG_voicemail_id/unavail$wav`;
+ $audio_file_copied++;
+ }
+ if ( -e ("/var/lib/asterisk/sounds/$VG_voicemail_greeting$gsm"))
+ {
+ `cp /var/lib/asterisk/sounds/$VG_voicemail_greeting$gsm /var/spool/asterisk/voicemail/default/$VG_voicemail_id/unavail$gsm`;
+ $audio_file_copied++;
+ }
+ if ($audio_file_copied < 1)
+ {if ($DB) {print "no voicemail greeting copied: $VG_voicemail_id|$VG_voicemail_greeting\n";}}
+ if ($DBX>0) {print "Custom Voicemail Greeting: $VG_voicemail_id|$VG_voicemail_greeting|$audio_file_copied\n";}
+
+ $vmb_ct++;
+ }
+ }
}
else
{
@@ -1348,26 +1436,6 @@ else
$sthA->finish();
}
-##### Get the settings for this server's server_ip #####
-$stmtA = "SELECT active_asterisk_server,generate_vicidial_conf,rebuild_conf_files,asterisk_version,sounds_update,conf_secret,custom_dialplan_entry FROM servers where server_ip='$server_ip';";
-# 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)
- {
- @aryA = $sthA->fetchrow_array;
- $active_asterisk_server = $aryA[0];
- $generate_vicidial_conf = $aryA[1];
- $rebuild_conf_files = $aryA[2];
- $asterisk_version = $aryA[3];
- $sounds_update = $aryA[4];
- $self_conf_secret = $aryA[5];
- $SERVERcustom_dialplan_entry = $aryA[6];
- }
-$sthA->finish();
-
-
if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($rebuild_conf_files =~ /Y/) )
{
if ($DB) {print "generating new auto-gen conf files\n";}
@@ -1501,8 +1569,8 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
{
$Vext .= "; Voicemail Extensions:\n";
$Vext .= "exten => _85026666666666.,1,Wait(1)\n";
- $Vext .= "exten => _85026666666666.,2,Voicemail(\${EXTEN:14}|u)\n";
- $Vext .= "exten => _85026666666666.,3,Hangup\n";
+ $Vext .= "exten => _85026666666666.,n,Voicemail(\${EXTEN:14},u)\n";
+ $Vext .= "exten => _85026666666666.,n,Hangup\n";
$Vext .= "exten => 8500,1,VoicemailMain\n";
$Vext .= "exten => 8500,2,Goto(s,6)\n";
if ($asterisk_version =~ /^1.2/)
diff --git a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql
index aedde579..f970aed3 100644
--- a/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql
+++ b/agc_2-X/trunk/extras/MySQL_AST_CREATE_tables.sql
@@ -83,6 +83,7 @@ webphone_auto_answer ENUM('Y','N') default 'Y',
voicemail_timezone VARCHAR(30) default 'eastern',
voicemail_options VARCHAR(255) default '',
user_group VARCHAR(20) default '---ALL---',
+voicemail_greeting VARCHAR(100) default '',
index (server_ip),
unique index extenserver (extension, server_ip)
);
@@ -130,7 +131,8 @@ conf_secret VARCHAR(20) default 'test',
external_server_ip VARCHAR(100) default '',
custom_dialplan_entry TEXT,
active_twin_server_ip VARCHAR(15) default '',
-user_group VARCHAR(20) default '---ALL---'
+user_group VARCHAR(20) default '---ALL---',
+audio_store_purge TEXT
);
CREATE UNIQUE INDEX server_id on servers (server_id);
@@ -1484,7 +1486,9 @@ expanded_list_stats ENUM('0','1') default '1',
contacts_enabled ENUM('0','1') default '0',
svn_version VARCHAR(100) default '',
call_menu_qualify_enabled ENUM('0','1') default '0',
-admin_list_counts ENUM('0','1') default '1'
+admin_list_counts ENUM('0','1') default '1',
+allow_voicemail_greeting ENUM('0','1') default '0',
+audio_store_purge TEXT
);
CREATE TABLE vicidial_campaigns_list_mix (
@@ -2205,7 +2209,8 @@ email VARCHAR(100),
delete_vm_after_email ENUM('N','Y') default 'N',
voicemail_timezone VARCHAR(30) default 'eastern',
voicemail_options VARCHAR(255) default '',
-user_group VARCHAR(20) default '---ALL---'
+user_group VARCHAR(20) default '---ALL---',
+voicemail_greeting VARCHAR(100) default ''
);
CREATE TABLE vicidial_user_territory_log (
@@ -2908,4 +2913,4 @@ INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,cate
INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed) values('MAXCAL','Inbound Max Calls Drop','N','Y','UNDEFINED','N','N','N','N','N','N','N');
INSERT INTO vicidial_statuses (status,status_name,selectable,human_answered,category,sale,dnc,customer_contact,not_interested,unworkable,scheduled_callback,completed) values('LRERR','Outbound Local Channel Res Err','N','Y','UNDEFINED','N','N','N','N','N','N','N');
-UPDATE system_settings SET db_schema_version='1327',db_schema_update_date=NOW();
+UPDATE system_settings SET db_schema_version='1328',db_schema_update_date=NOW();
diff --git a/agc_2-X/trunk/extras/upgrade_2.6.sql b/agc_2-X/trunk/extras/upgrade_2.6.sql
index d42c9c08..75c6eeba 100644
--- a/agc_2-X/trunk/extras/upgrade_2.6.sql
+++ b/agc_2-X/trunk/extras/upgrade_2.6.sql
@@ -70,3 +70,13 @@ ALTER TABLE vicidial_campaigns MODIFY agent_dial_owner_only ENUM('NONE','USER','
UPDATE system_settings SET db_schema_version='1327',db_schema_update_date=NOW() where db_schema_version < 1327;
+ALTER TABLE phones ADD voicemail_greeting VARCHAR(100) default '';
+
+ALTER TABLE vicidial_voicemail ADD voicemail_greeting VARCHAR(100) default '';
+
+ALTER TABLE system_settings ADD allow_voicemail_greeting ENUM('0','1') default '0';
+ALTER TABLE system_settings ADD audio_store_purge TEXT;
+
+ALTER TABLE servers ADD audio_store_purge TEXT;
+
+UPDATE system_settings SET db_schema_version='1328',db_schema_update_date=NOW() where db_schema_version < 1328;
diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt
index fec95a2b..c6da4e55 100644
--- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt
+++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.6.txt
@@ -17,6 +17,11 @@ Admin List Counts||
This setting allows you to disable the list counts that appear on the Lists listing and the Campaign modify screens. Default is 1 for enabled||
The Y_API_LAUNCH option can be used with the agent API to launch the webphone in a separate Iframe or window||
If the option has BLANK at the end, then users are allowed to dial leads with no owner defined in addition to owner defined leads||
+Voicemail Greeting||
+This optional setting allows you to define a voicemail greeting audio file from the audio store. Default is blank||
+Allow Voicemail Greeting Chooser||
+If this setting is enabled it will allow you to choose an audio file from the audio store to be played as the voicemail greeting to a specific voicemail box. Default is 0 for disabled||
+File to Delete||
############################################################ CLIENT
diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php
index bf4720e9..d3e3b9d4 100644
--- a/agc_2-X/trunk/www/vicidial/admin.php
+++ b/agc_2-X/trunk/www/vicidial/admin.php
@@ -1750,6 +1750,10 @@ if (isset($_GET["qualify_sql"])) {$qualify_sql=$_GET["qualify_sql"];}
elseif (isset($_POST["qualify_sql"])) {$qualify_sql=$_POST["qualify_sql"];}
if (isset($_GET["admin_list_counts"])) {$admin_list_counts=$_GET["admin_list_counts"];}
elseif (isset($_POST["admin_list_counts"])) {$admin_list_counts=$_POST["admin_list_counts"];}
+if (isset($_GET["voicemail_greeting"])) {$voicemail_greeting=$_GET["voicemail_greeting"];}
+ elseif (isset($_POST["voicemail_greeting"])) {$voicemail_greeting=$_POST["voicemail_greeting"];}
+if (isset($_GET["allow_voicemail_greeting"])) {$allow_voicemail_greeting=$_GET["allow_voicemail_greeting"];}
+ elseif (isset($_POST["allow_voicemail_greeting"])) {$allow_voicemail_greeting=$_POST["allow_voicemail_greeting"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -1815,7 +1819,7 @@ if ($download_max_system_stats_metric_name) {
#############################################
##### START SYSTEM_SETTINGS LOOKUP #####
-$stmt = "SELECT use_non_latin,enable_queuemetrics_logging,enable_vtiger_integration,qc_features_active,outbound_autodial_active,sounds_central_control_active,enable_second_webform,user_territories_active,custom_fields_enabled,admin_web_directory,webphone_url,first_login_trigger,hosted_settings,default_phone_registration_password,default_phone_login_password,default_server_password,test_campaign_calls,active_voicemail_server,voicemail_timezones,default_voicemail_timezone,default_local_gmt,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,call_menu_qualify_enabled,admin_list_counts FROM system_settings;";
+$stmt = "SELECT use_non_latin,enable_queuemetrics_logging,enable_vtiger_integration,qc_features_active,outbound_autodial_active,sounds_central_control_active,enable_second_webform,user_territories_active,custom_fields_enabled,admin_web_directory,webphone_url,first_login_trigger,hosted_settings,default_phone_registration_password,default_phone_login_password,default_server_password,test_campaign_calls,active_voicemail_server,voicemail_timezones,default_voicemail_timezone,default_local_gmt,campaign_cid_areacodes_enabled,pllb_grouping_limit,did_ra_extensions_enabled,expanded_list_stats,contacts_enabled,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,call_menu_qualify_enabled,admin_list_counts,allow_voicemail_greeting FROM system_settings;";
$rslt=mysql_query($stmt, $link);
if ($DB) {echo "$stmt\n";}
$qm_conf_ct = mysql_num_rows($rslt);
@@ -1855,6 +1859,7 @@ if ($qm_conf_ct > 0)
$SStables_use_alt_log_db = $row[30];
$SScall_menu_qualify_enabled = $row[31];
$SSadmin_list_counts = $row[32];
+ $SSallow_voicemail_greeting = $row[33];
}
##### END SETTINGS LOOKUP #####
###########################################
@@ -2093,6 +2098,7 @@ if ($non_latin < 1)
$dial_ingroup_cid = ereg_replace("[^0-9]","",$dial_ingroup_cid);
$call_menu_qualify_enabled = ereg_replace("[^0-9]","",$call_menu_qualify_enabled);
$admin_list_counts = ereg_replace("[^0-9]","",$admin_list_counts);
+ $allow_voicemail_greeting = ereg_replace("[^0-9]","",$allow_voicemail_greeting);
$drop_call_seconds = ereg_replace("[^-0-9]","",$drop_call_seconds);
@@ -2525,6 +2531,7 @@ if ($non_latin < 1)
$survey_third_audio_file = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$survey_third_audio_file);
$survey_fourth_audio_file = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$survey_fourth_audio_file);
$safe_harbor_audio_field = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$safe_harbor_audio_field);
+ $voicemail_greeting = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$voicemail_greeting);
### ALPHA-NUMERIC and underscore and dash and comma
$logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list);
@@ -3143,12 +3150,13 @@ else
# 120820-1104 - Added is_webphone option Y_API_LAUNCH
# 120831-1523 - Added vicidial_dial_log outbound call logging
# 121018-2321 - Added blank option to owner only dialing
+# 121019-0520 - Added voicemail greeting audio chooser options to phones and voicemail boxes
#
# 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.6-376a';
-$build = '121018-2321';
+$admin_version = '2.6-377a';
+$build = '121019-0520';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -7231,6 +7239,10 @@ if ($ADD==99999)
Delete Voicemail After Email - This optional setting allows you to have the voicemail messages deleted from the system after they have been emailed out. Default is N.
+
+
+ Voicemail Greeting - This optional setting allows you to define a voicemail greeting audio file from the audio store. Default is blank.
+
Voicemail Zone - This setting allows you to set the zone that this voicemail box will be set to when the time is logged for a message. Default is set in the System Settings.
@@ -7418,6 +7430,10 @@ if ($ADD==99999)
Delete Voicemail After Email - This optional setting allows you to have the voicemail messages deleted from the system after they have been emailed out. Default is N.
+
+
+ Voicemail Greeting - This optional setting allows you to define a voicemail greeting audio file from the audio store. Default is blank.
+
@@ -8247,6 +8263,11 @@ if ($ADD==99999)
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.
+
+
+
+ Allow Voicemail Greeting Chooser - If this setting is enabled it will allow you to choose an audio file from the audio store to be played as the voicemail greeting to a specific voicemail box. Default is 0 for disabled.
+
@@ -16807,7 +16828,7 @@ if ($ADD==41111111111)
{
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', delete_vm_after_email='$delete_vm_after_email',is_webphone='$is_webphone',use_external_server_ip='$use_external_server_ip',codecs_list='$codecs_list',codecs_with_template='$codecs_with_template',webphone_dialpad='$webphone_dialpad',on_hook_agent='$on_hook_agent',webphone_auto_answer='$webphone_auto_answer',voicemail_timezone='$voicemail_timezone',voicemail_options='$voicemail_options',user_group='$user_group' where extension='$old_extension' and server_ip='$old_server_ip';";
+ $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', delete_vm_after_email='$delete_vm_after_email',is_webphone='$is_webphone',use_external_server_ip='$use_external_server_ip',codecs_list='$codecs_list',codecs_with_template='$codecs_with_template',webphone_dialpad='$webphone_dialpad',on_hook_agent='$on_hook_agent',webphone_auto_answer='$webphone_auto_answer',voicemail_timezone='$voicemail_timezone',voicemail_options='$voicemail_options',user_group='$user_group',voicemail_greeting='$voicemail_greeting' 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';";
@@ -17258,15 +17279,18 @@ if ($ADD==471111111111)
{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',delete_vm_after_email='$delete_vm_after_email',voicemail_timezone='$voicemail_timezone',voicemail_options='$voicemail_options',user_group='$user_group' where voicemail_id='$voicemail_id';";
+ $stmt="UPDATE vicidial_voicemail set fullname='$fullname',active='$active',pass='$pass',email='$email',delete_vm_after_email='$delete_vm_after_email',voicemail_timezone='$voicemail_timezone',voicemail_options='$voicemail_options',user_group='$user_group',voicemail_greeting='$voicemail_greeting' where voicemail_id='$voicemail_id';";
$rslt=mysql_query($stmt, $link);
+ if ($DB) {echo "|$stmt|";}
$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';";
+ $sounds_updateSQL='';
+ if ($SSallow_voicemail_greeting > 0) {$sounds_updateSQL = ",sounds_update='Y'";}
+ $stmtA="UPDATE servers SET rebuild_conf_files='Y'$sounds_updateSQL 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";
@@ -17477,7 +17501,7 @@ if ($ADD==411111111111111)
}
$tables_use_alt_log_db = preg_replace("/,$/","",$new_altlog_value);
- $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysql_real_escape_string($webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db',webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts';";
+ $stmt="UPDATE system_settings set use_non_latin='$use_non_latin',webroot_writable='$webroot_writable',enable_queuemetrics_logging='$enable_queuemetrics_logging',queuemetrics_server_ip='$queuemetrics_server_ip',queuemetrics_dbname='$queuemetrics_dbname',queuemetrics_login='$queuemetrics_login',queuemetrics_pass='$queuemetrics_pass',queuemetrics_url='$queuemetrics_url',queuemetrics_log_id='$queuemetrics_log_id',queuemetrics_eq_prepend='$queuemetrics_eq_prepend',vicidial_agent_disable='$vicidial_agent_disable',allow_sipsak_messages='$allow_sipsak_messages',admin_home_url='$admin_home_url',enable_agc_xfer_log='$enable_agc_xfer_log',timeclock_end_of_day='$timeclock_end_of_day',vdc_header_date_format='$vdc_header_date_format',vdc_customer_date_format='$vdc_customer_date_format',vdc_header_phone_format='$vdc_header_phone_format',vdc_agent_api_active='$vdc_agent_api_active',enable_vtiger_integration='$enable_vtiger_integration',vtiger_server_ip='$vtiger_server_ip',vtiger_dbname='$vtiger_dbname',vtiger_login='$vtiger_login',vtiger_pass='$vtiger_pass',vtiger_url='$vtiger_url',qc_features_active='$qc_features_active',outbound_autodial_active='$outbound_autodial_active',outbound_calls_per_second='$outbound_calls_per_second',enable_tts_integration='$enable_tts_integration',agentonly_callback_campaign_lock='$agentonly_callback_campaign_lock',sounds_central_control_active='$sounds_central_control_active',sounds_web_server='$sounds_web_server',sounds_web_directory='$sounds_web_directory',active_voicemail_server='$active_voicemail_server',auto_dial_limit='$auto_dial_limit',user_territories_active='$user_territories_active',allow_custom_dialplan='$allow_custom_dialplan',enable_second_webform='$enable_second_webform',default_webphone='$default_webphone',default_external_server_ip='$default_external_server_ip',webphone_url='" . mysql_real_escape_string($webphone_url) . "',enable_agc_dispo_log='$enable_agc_dispo_log',custom_dialplan_entry='$custom_dialplan_entry',queuemetrics_loginout='$queuemetrics_loginout',callcard_enabled='$callcard_enabled',queuemetrics_callstatus='$queuemetrics_callstatus',default_codecs='$default_codecs',admin_web_directory='$admin_web_directory',label_title='$label_title',label_first_name='$label_first_name',label_middle_initial='$label_middle_initial',label_last_name='$label_last_name',label_address1='$label_address1',label_address2='$label_address2',label_address3='$label_address3',label_city='$label_city',label_state='$label_state',label_province='$label_province',label_postal_code='$label_postal_code',label_vendor_lead_code='$label_vendor_lead_code',label_gender='$label_gender',label_phone_number='$label_phone_number',label_phone_code='$label_phone_code',label_alt_phone='$label_alt_phone',label_security_phrase='$label_security_phrase',label_email='$label_email',label_comments='$label_comments',custom_fields_enabled='$custom_fields_enabled',slave_db_server='$slave_db_server',reports_use_slave_db='$reports_use_slave_db',webphone_systemkey='$webphone_systemkey',first_login_trigger='$first_login_trigger',default_phone_registration_password='$default_phone_registration_password',default_phone_login_password='$default_phone_login_password',default_server_password='$default_server_password',admin_modify_refresh='$admin_modify_refresh',nocache_admin='$nocache_admin',generate_cross_server_exten='$generate_cross_server_exten',queuemetrics_addmember_enabled='$queuemetrics_addmember_enabled',queuemetrics_dispo_pause='$queuemetrics_dispo_pause',label_hide_field_logs='$label_hide_field_logs',queuemetrics_pe_phone_append='$queuemetrics_pe_phone_append',test_campaign_calls='$test_campaign_calls',agents_calls_reset='$agents_calls_reset',default_voicemail_timezone='$default_voicemail_timezone',default_local_gmt='$default_local_gmt',noanswer_log='$noanswer_log',alt_log_server_ip='$alt_log_server_ip',alt_log_dbname='$alt_log_dbname',alt_log_login='$alt_log_login',alt_log_pass='$alt_log_pass',tables_use_alt_log_db='$tables_use_alt_log_db',did_agent_log='$did_agent_log',campaign_cid_areacodes_enabled='$campaign_cid_areacodes_enabled',pllb_grouping_limit='$pllb_grouping_limit',did_ra_extensions_enabled='$did_ra_extensions_enabled',expanded_list_stats='$expanded_list_stats',contacts_enabled='$contacts_enabled',call_menu_qualify_enabled='$call_menu_qualify_enabled',admin_list_counts='$admin_list_counts',allow_voicemail_greeting='$allow_voicemail_greeting';";
$rslt=mysql_query($stmt, $link);
if ($reload_dialplan_on_servers > 0)
@@ -28349,7 +28373,7 @@ if ($ADD==31111111111)
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,delete_vm_after_email,is_webphone,use_external_server_ip,codecs_list,codecs_with_template,webphone_dialpad,on_hook_agent,webphone_auto_answer,voicemail_timezone,voicemail_options,user_group from phones where extension='$extension' and server_ip='$server_ip' $LOGadmin_viewable_groupsSQL;"; + $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,delete_vm_after_email,is_webphone,use_external_server_ip,codecs_list,codecs_with_template,webphone_dialpad,on_hook_agent,webphone_auto_answer,voicemail_timezone,voicemail_options,user_group,voicemail_greeting from phones where extension='$extension' and server_ip='$server_ip' $LOGadmin_viewable_groupsSQL;"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -28407,6 +28431,12 @@ if ($ADD==31111111111) } echo " $NWB#phones-voicemail_timezone$NWE | |
| Voicemail Options: | $NWB#phones-voicemail_options$NWE |
| Voicemail Greeting: | audio chooser $NWB#phones-voicemail_greeting$NWE | Company: | $NWB#phones-company$NWE | \n"; echo "
| Picture: | $NWB#phones-picture$NWE |
| New Messages: | $row[14]$NWB#phones-messages$NWE |
| \n";
echo "";
- $stmt="SELECT voicemail_id,pass,fullname,active,email,messages,old_messages,delete_vm_after_email,voicemail_timezone,voicemail_options,user_group from vicidial_voicemail where voicemail_id='$voicemail_id' $LOGadmin_viewable_groupsSQL;";
+ $stmt="SELECT voicemail_id,pass,fullname,active,email,messages,old_messages,delete_vm_after_email,voicemail_timezone,voicemail_options,user_group,voicemail_greeting from vicidial_voicemail where voicemail_id='$voicemail_id' $LOGadmin_viewable_groupsSQL;";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
$voicemail_id = $row[0];
@@ -29371,9 +29401,11 @@ if ($ADD==371111111111)
$voicemail_timezone = $row[8];
$voicemail_options = $row[9];
$user_group = $row[10];
+ $voicemail_greeting = $row[11];
echo " MODIFY A VOICEMAIL BOX: $tts_id |