phone option added to allow no instructions to be played on direct extension calls that go to voicemail

git-svn-id: svn://192.168.202.10@2063 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2014-01-27 04:06:50 +00:00
parent 9d7dff4798
commit 1063ef2cba
7 changed files with 49 additions and 13 deletions
+3 -1
View File
@@ -179,7 +179,9 @@ OTHER CHANGES:
30. Added Agent API pause_code function
31. Added VMAIL_NO_INST options to send calls to voicemail with no instructions
playing after the voicemail greeting
playing after the voicemail greeting. Also phone option has been added
to allow no instructions to be played on direct extension calls that go
to voicemail.
+22 -7
View File
@@ -91,9 +91,10 @@
# 131022-1746 - Added uptime gathering and asterisk auto-restart feature
# 140112-1910 - Fixed issue with MoH in Astrisk 1.8
# 140126-1153 - Added VMAIL_NO_INST option dialplan generation
# 140126-2252 - Added voicemail_instructions option for phones
#
$build = '140126-1153';
$build = '140126-2252';
$DB=0; # Debug flag
$MT[0]=''; $MT[1]='';
@@ -1920,7 +1921,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
##### BEGIN Generate the IAX phone entries #####
$stmtA = "SELECT extension,dialplan_number,voicemail_id,pass,template_id,conf_override,email,template_id,conf_override,outbound_cid,fullname,phone_context,phone_ring_timeout,conf_secret,delete_vm_after_email,codecs_list,codecs_with_template,voicemail_timezone,voicemail_options FROM phones where server_ip='$server_ip' and protocol='IAX2' and active='Y' order by extension;";
$stmtA = "SELECT extension,dialplan_number,voicemail_id,pass,template_id,conf_override,email,template_id,conf_override,outbound_cid,fullname,phone_context,phone_ring_timeout,conf_secret,delete_vm_after_email,codecs_list,codecs_with_template,voicemail_timezone,voicemail_options,voicemail_instructions FROM phones where server_ip='$server_ip' and protocol='IAX2' and active='Y' order by extension;";
# print "$stmtA\n";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -1948,6 +1949,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$codecs_with_template[$i] = $aryA[16];
$voicemail_timezone[$i] = $aryA[17];
$voicemail_options[$i] = $aryA[18];
$voicemail_instructions[$i] = $aryA[19];
if ( (length($SSdefault_codecs) > 2) && (length($codecs_list[$i]) < 3) )
{$codecs_list[$i] = $SSdefault_codecs;}
$active_dialplan_numbers .= "'$aryA[1]',";
@@ -2035,8 +2037,14 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
{
$Pext .= "exten => $dialplan[$i],1,Dial(IAX2/$extension[$i],$phone_ring_timeout[$i],)\n";
}
$Pext .= "exten => $dialplan[$i],2,Goto(default,85026666666666$voicemail[$i],1)\n";
# $Pext .= "exten => $dialplan[$i],2,Goto(default,85026666666667$voicemail[$i],1)\n";
if ($voicemail_instructions[$i] =~ /Y/)
{
$Pext .= "exten => $dialplan[$i],2,Goto(default,85026666666666$voicemail[$i],1)\n";
}
else
{
$Pext .= "exten => $dialplan[$i],2,Goto(default,85026666666667$voicemail[$i],1)\n";
}
if (!(( $ast_ver_str{major} = 1 ) && ($ast_ver_str{minor} < 6)))
{
$Pext .= "exten => $dialplan[$i],3,Hangup()\n";
@@ -2054,7 +2062,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
##### BEGIN Generate the SIP phone entries #####
$stmtA = "SELECT extension,dialplan_number,voicemail_id,pass,template_id,conf_override,email,template_id,conf_override,outbound_cid,fullname,phone_context,phone_ring_timeout,conf_secret,delete_vm_after_email,codecs_list,codecs_with_template,voicemail_timezone,voicemail_options FROM phones where server_ip='$server_ip' and protocol='SIP' and active='Y' order by extension;";
$stmtA = "SELECT extension,dialplan_number,voicemail_id,pass,template_id,conf_override,email,template_id,conf_override,outbound_cid,fullname,phone_context,phone_ring_timeout,conf_secret,delete_vm_after_email,codecs_list,codecs_with_template,voicemail_timezone,voicemail_options,voicemail_instructions FROM phones where server_ip='$server_ip' and protocol='SIP' and active='Y' order by extension;";
# print "$stmtA\n";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
@@ -2082,6 +2090,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$codecs_with_template[$i] = $aryA[16];
$voicemail_timezone[$i] = $aryA[17];
$voicemail_options[$i] = $aryA[18];
$voicemail_instructions[$i] = $aryA[19];
if ( (length($SSdefault_codecs) > 2) && (length($codecs_list[$i]) < 3) )
{$codecs_list[$i] = $SSdefault_codecs;}
$active_dialplan_numbers .= "'$aryA[1]',";
@@ -2167,8 +2176,14 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
{
$Pext .= "exten => $dialplan[$i],1,Dial(SIP/$extension[$i],$phone_ring_timeout[$i],)\n";
}
$Pext .= "exten => $dialplan[$i],2,Goto(default,85026666666666$voicemail[$i],1)\n";
# $Pext .= "exten => $dialplan[$i],2,Goto(default,85026666666667$voicemail[$i],1)\n";
if ($voicemail_instructions[$i] =~ /Y/)
{
$Pext .= "exten => $dialplan[$i],2,Goto(default,85026666666666$voicemail[$i],1)\n";
}
else
{
$Pext .= "exten => $dialplan[$i],2,Goto(default,85026666666667$voicemail[$i],1)\n";
}
if (!(( $ast_ver_str{major} = 1 ) && ($ast_ver_str{minor} < 6)))
{
$Pext .= "exten => $dialplan[$i],3,Hangup()\n";
@@ -85,6 +85,7 @@ voicemail_options VARCHAR(255) default '',
user_group VARCHAR(20) default '---ALL---',
voicemail_greeting VARCHAR(100) default '',
voicemail_dump_exten_no_inst VARCHAR(20) default '85026666666667',
voicemail_instructions ENUM('Y','N') default 'Y',
index (server_ip),
index (voicemail_id),
index (dialplan_number),
@@ -3251,4 +3252,4 @@ UPDATE vicidial_configuration set value='1766' where name='qc_database_version';
UPDATE system_settings set vdc_agent_api_active='1';
UPDATE system_settings SET db_schema_version='1366',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1367',db_schema_update_date=NOW();
+4
View File
@@ -196,3 +196,7 @@ ALTER TABLE phones ADD voicemail_dump_exten_no_inst VARCHAR(20) default '8502666
ALTER TABLE servers ADD voicemail_dump_exten_no_inst VARCHAR(20) default '85026666666667';
UPDATE system_settings SET db_schema_version='1366',db_schema_update_date=NOW() where db_schema_version < 1366;
ALTER TABLE phones ADD voicemail_instructions ENUM('Y','N') default 'Y';
UPDATE system_settings SET db_schema_version='1367',db_schema_update_date=NOW() where db_schema_version < 1367;
@@ -264,6 +264,8 @@ Used for Drop, After-hours and No-agent-no-queue actions. This is the caller ID
VMAIL_NO_INST will send the call to the voicemail box that you have defined below and will not play instructions after the voicemail message||
VMAIL Dump Exten NI||
This is the dial plan prefix used to send calls directly to a user's voicemail from a live call in the astGUIclient app. This is the No Instructions setting||
Voicemail Instructions||
This setting allows you to define if the voicemail instructions will play after the voicemail greeting when a call rings on the agent extension and times out to voicemail. Default is Y||
########################## CHANGES TO EXISTING PHRASES IN ADMIN TRANSLATION
+11 -4
View File
@@ -1822,6 +1822,8 @@ if (isset($_GET["dispo_max_dispo"])) {$dispo_max_dispo=$_GET["dispo_max_dispo"
elseif (isset($_POST["dispo_max_dispo"])) {$dispo_max_dispo=$_POST["dispo_max_dispo"];}
if (isset($_GET["voicemail_dump_exten_no_inst"])) {$voicemail_dump_exten_no_inst=$_GET["voicemail_dump_exten_no_inst"];}
elseif (isset($_POST["voicemail_dump_exten_no_inst"])) {$voicemail_dump_exten_no_inst=$_POST["voicemail_dump_exten_no_inst"];}
if (isset($_GET["voicemail_instructions"])) {$voicemail_instructions=$_GET["voicemail_instructions"];}
elseif (isset($_POST["voicemail_instructions"])) {$voicemail_instructions=$_POST["voicemail_instructions"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -2248,6 +2250,7 @@ if ($non_latin < 1)
$manual_dial_lead_id = preg_replace('/[^NY]/','',$manual_dial_lead_id);
$auto_restart_asterisk = preg_replace('/[^NY]/','',$auto_restart_asterisk);
$asterisk_temp_no_restart = preg_replace('/[^NY]/','',$asterisk_temp_no_restart);
$voicemail_instructions = preg_replace('/[^NY]/','',$voicemail_instructions);
$qc_enabled = preg_replace('/[^0-9NY]/','',$qc_enabled);
$active = preg_replace('/[^0-9NY]/','',$active);
@@ -3268,12 +3271,13 @@ else
# 140108-0752 - Added webserver and hostname to report logging
# 140117-0840 - Added option for Lists Pass Report
# 140126-0939 - Added VMAIL_NO_INST options
# 140126-2253 - Added voicemail_instructions option for phones
#
# 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.8-423a';
$build = '140126-0939';
$admin_version = '2.8-424a';
$build = '140126-2253';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -13641,7 +13645,7 @@ if ($ADD==41111111111)
{
echo "<br>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='" . mysqli_real_escape_string($link, $local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysqli_real_escape_string($link, $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',voicemail_dump_exten_no_inst='$voicemail_dump_exten_no_inst' 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='" . mysqli_real_escape_string($link, $local_web_callerID_URL) . "', VICIDIAL_web_URL='" . mysqli_real_escape_string($link, $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',voicemail_dump_exten_no_inst='$voicemail_dump_exten_no_inst',voicemail_instructions='$voicemail_instructions' where extension='$old_extension' and server_ip='$old_server_ip';";
$rslt=mysql_to_mysqli($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';";
@@ -26668,7 +26672,7 @@ if ($ADD==31111111111)
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$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,voicemail_dump_exten_no_inst 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,voicemail_dump_exten_no_inst,voicemail_instructions from phones where extension='$extension' and server_ip='$server_ip' $LOGadmin_viewable_groupsSQL;";
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
@@ -26732,6 +26736,9 @@ if ($ADD==31111111111)
}
else
{echo "<input type=hidden name=voicemail_greeting value=\"$row[84]\"";}
echo "<tr bgcolor=#B6D3FC><td align=right>Voicemail Instructions: </td><td align=left><select size=1 name=voicemail_instructions><option>Y</option><option>N</option><option selected>$row[86]</option></select>$NWB#phones-voicemail_instructions$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Company: </td><td align=left><input type=text name=company size=10 maxlength=10 value=\"$row[12]\">$NWB#phones-company$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Picture: </td><td align=left><input type=text name=picture size=20 maxlength=19 value=\"$row[13]\">$NWB#phones-picture$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>New Messages: </td><td align=left><b>$row[14]</b>$NWB#phones-messages$NWE</td></tr>\n";
+5
View File
@@ -9,6 +9,7 @@
# 131029-2058 - Added auto-restart asterisk help
# 131208-1635 - Added help for max dead, dispo and pause time campaign options
# 140126-1023 - Added VMAIL_NO_INST options
# 140126-2254 - Added voicemail_instructions option for phones
#
@@ -3379,6 +3380,10 @@ if ($SSoutbound_autodial_active > 0)
<A NAME="phones-voicemail_greeting">
<B>Voicemail Greeting -</B> This optional setting allows you to define a voicemail greeting audio file from the audio store. Default is blank.
<BR>
<A NAME="phones-voicemail_instructions">
<B>Voicemail Instructions -</B> This setting allows you to define if the voicemail instructions will play after the voicemail greeting when a call rings on the agent extension and times out to voicemail. Default is Y.
<BR>
<A NAME="phones-picture">
<BR>