Added System Settings to allow custom prompts on agent login and when an agent leaves a 3way call in the agent screen.
Added ability to use url encoded web form addresses in non-agent API add_list and update_list functions. git-svn-id: svn://192.168.202.10@2296 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -55,8 +55,9 @@ REQUIRED STEPS!!!
|
||||
|
||||
OTHER CHANGES:
|
||||
|
||||
1. No new changes yet
|
||||
|
||||
1. Added System Settings to allow custom prompts on agent login and when an
|
||||
agent leaves a 3way call in the agent screen. Must Have Asterisk 1.8+
|
||||
for it to work.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# ADMIN_keepalive_ALL.pl version 2.10
|
||||
# ADMIN_keepalive_ALL.pl version 2.12
|
||||
#
|
||||
# Designed to keep the astGUIclient processes alive and check every minute
|
||||
# Replaces all other ADMIN_keepalive scripts
|
||||
@@ -98,9 +98,10 @@
|
||||
# 141125-1710 - Added gather_stats_flag for audio sync script launch on voicemail server
|
||||
# 141227-0957 - Changed to clear out old unavail voicemail greetings before copying custom greeting
|
||||
# 150112-2018 - Added flag to delete voicemail greeting when changed from an audio file to empty
|
||||
# 150307-1738 - Added custom meetme enter sounds(only works with Asterisk 1.8)
|
||||
#
|
||||
|
||||
$build = '150112-2018';
|
||||
$build = '150307-1738';
|
||||
|
||||
$DB=0; # Debug flag
|
||||
|
||||
@@ -1292,7 +1293,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,allow_voicemail_greeting,reload_timestamp 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,reload_timestamp,meetme_enter_login_filename,meetme_enter_leave3way_filename FROM system_settings;";
|
||||
# print "$stmtA\n";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
@@ -1310,6 +1311,8 @@ if ($sthArows > 0)
|
||||
$SScall_menu_qualify_enabled = $aryA[7];
|
||||
$SSallow_voicemail_greeting = $aryA[8];
|
||||
$SSreload_timestamp = $aryA[9];
|
||||
$meetme_enter_login_filename = $aryA[10];
|
||||
$meetme_enter_leave3way_filename = $aryA[11];
|
||||
}
|
||||
$sthA->finish();
|
||||
if ($DBXXX > 0) {print "SYSTEM SETTINGS: $sounds_central_control_active|$active_voicemail_server|$SScustom_dialplan_entry|$SSdefault_codecs\n";}
|
||||
@@ -2398,6 +2401,33 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
}
|
||||
|
||||
|
||||
##### BEGIN Generate custom meetme entries if set #####
|
||||
$meetme_custom_ext='';
|
||||
if ( (length($meetme_enter_login_filename) > 0) || (length($meetme_enter_leave3way_filename) > 0) )
|
||||
{
|
||||
if (length($meetme_enter_login_filename) < 1) {$meetme_enter_login_filename='sip-silence';}
|
||||
if (length($meetme_enter_leave3way_filename) < 1) {$meetme_enter_leave3way_filename='sip-silence';}
|
||||
|
||||
$meetme_custom_ext .= '[meetme-enter-login]';
|
||||
$meetme_custom_ext .= "\n; meetme entry for Vicidial agent logging in, Asterisk 1.8+ compatible only\n";
|
||||
$meetme_custom_ext .= "exten => _8600XXX,1,Meetme(\${EXTEN},FG($meetme_enter_login_filename))\n";
|
||||
$meetme_custom_ext .= "exten => _8600XXX,n,Hangup()\n";
|
||||
$meetme_custom_ext .= "\n";
|
||||
$meetme_custom_ext .= 'exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})';
|
||||
$meetme_custom_ext .= "\n\n";
|
||||
$meetme_custom_ext .= '[meetme-enter-leave3way]';
|
||||
$meetme_custom_ext .= "\n; meetme entry for Vicidial agent leaving 3way call, Asterisk 1.8+ compatible only\n";
|
||||
$meetme_custom_ext .= "exten => _8600XXX,1,Meetme(\${EXTEN},FG($meetme_enter_leave3way_filename))\n";
|
||||
$meetme_custom_ext .= "exten => _8600XXX,n,Hangup()\n";
|
||||
$meetme_custom_ext .= "\n";
|
||||
$meetme_custom_ext .= 'exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})';
|
||||
$meetme_custom_ext .= "\n\n";
|
||||
|
||||
if ($DBX>0) {print "Custom Meetme login and leave3way entries generated: |$meetme_enter_login_filename|$meetme_enter_leave3way_filename|\n";}
|
||||
}
|
||||
##### END Generate custom meetme entries if set #####
|
||||
|
||||
|
||||
##### BEGIN Generate the Call Menu entries #####
|
||||
$stmtA = "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,dtmf_log,dtmf_field,qualify_sql FROM vicidial_call_menu order by menu_id;";
|
||||
# print "$stmtA\n";
|
||||
@@ -3091,6 +3121,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
|
||||
print ext "; WARNING- THIS FILE IS AUTO-GENERATED BY VICIDIAL, ANY EDITS YOU MAKE WILL BE LOST\n";
|
||||
print ext "$ext\n";
|
||||
print ext "$meetme_custom_ext\n";
|
||||
print ext "$call_menu_ext\n";
|
||||
print ext "\n";
|
||||
if (length($SScustom_dialplan_entry)>5)
|
||||
|
||||
+5
-3
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# AST_update.pl version 2.10
|
||||
# AST_update.pl version 2.12
|
||||
#
|
||||
# DESCRIPTION:
|
||||
# uses the Asterisk Manager interface and DBD::MySQL to update the live_channels
|
||||
@@ -27,7 +27,7 @@
|
||||
#
|
||||
# It is recommended that you run this program on each local Asterisk machine
|
||||
#
|
||||
# Copyright (C) 2014 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# version changes:
|
||||
# 41228-1659 - modified to compensate for manager output response hiccups
|
||||
@@ -63,9 +63,10 @@
|
||||
# 140510-0119 - Small formatting and asterisk version changes
|
||||
# 141113-1601 - Added concurrency check
|
||||
# 141124-2309 - Fixed Fhour variable bug
|
||||
# 150308-0911 - Added filter for agent sessions in new meetme-enter contexts
|
||||
#
|
||||
|
||||
$build = '141124-2309';
|
||||
$build = '150308-0911';
|
||||
|
||||
# constants
|
||||
$SYSPERF=0; # system performance logging to MySQL server_performance table every 5 seconds
|
||||
@@ -868,6 +869,7 @@ while($one_day_interval > 0)
|
||||
}
|
||||
if ($DBX) {print "EXcount: $EXcount\n";}
|
||||
if (length($list_chan_12[6])<2) {$list_chan_12[6] = 'SIP/ring';}
|
||||
if ($list_chan_12[1] =~ /^meetme-enter/) {$list_chan_12[6] =~ s/\(.*//gi;}
|
||||
$list_channels[$c] = "$list_chan_12[0] $list_chan_12[6]";
|
||||
}
|
||||
$list_SIP[$c] = $list_channels[$c];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2015-01-23
|
||||
NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2015-03-09
|
||||
|
||||
This document describes the functions of an API(Application Programming
|
||||
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
|
||||
@@ -98,6 +98,8 @@ Changes:
|
||||
140617-2029 - Added vicidial_users wrapup_seconds_override option
|
||||
140812-0939 - Added phone_number and vendor_lead_code to agent_status function output
|
||||
150123-1611 - Fixed issue with list local call times and add_lead
|
||||
150217-1404 - archive deleted callbacks to vicidial_callbacks_archive table
|
||||
150309-0250 - Added ability to use urlencoded web form addresses
|
||||
|
||||
|
||||
API Functions use the 'function' variable
|
||||
@@ -1109,6 +1111,8 @@ web_form_address - 6-100 characters
|
||||
web_form_address_two - 6-100 characters
|
||||
reset_time - 4-100 characters, must be in valid 4-digit groups of 24-hour time (i.e. 0900-1700-2359)
|
||||
expiration_date - 10 characters, must be in valid date format YYYY-MM-DD (i.e. 2012-11-25)
|
||||
NOTES:
|
||||
- for the web form addresses, you can URL encode them to include standard URL special characters
|
||||
|
||||
|
||||
Example URL strings for API calls:
|
||||
@@ -1161,6 +1165,7 @@ expiration_date - 10 characters, must be in valid date format YYYY-MM-DD (i.e. 2
|
||||
NOTES:
|
||||
- in order to set a field to empty('') set it equal to --BLANK--, i.e. "&drop_inbound_group=--BLANK--"
|
||||
- please use no special characters like apostrophes, quotes or amphersands
|
||||
- for the web form addresses, you can URL encode them to include standard URL special characters
|
||||
|
||||
|
||||
Example URL strings for API calls:
|
||||
|
||||
@@ -1582,7 +1582,9 @@ callback_time_24hour ENUM('0','1') default '0',
|
||||
active_modules TEXT,
|
||||
allow_chats ENUM('0','1') default '0',
|
||||
enable_languages ENUM('0','1') default '0',
|
||||
language_method VARCHAR(20) default 'DISABLED'
|
||||
language_method VARCHAR(20) default 'DISABLED',
|
||||
meetme_enter_login_filename VARCHAR(255) default '',
|
||||
meetme_enter_leave3way_filename VARCHAR(255) default ''
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_campaigns_list_mix (
|
||||
@@ -3370,4 +3372,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='1405',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1406',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
UPDATE system_settings SET db_schema_version='1404',version='2.11rc1tk',db_schema_update_date=NOW() where db_schema_version < 1404;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1405',version='2.12b0.5',db_schema_update_date=NOW() where db_schema_version < 1405;
|
||||
|
||||
ALTER TABLE system_settings ADD meetme_enter_login_filename VARCHAR(255) default '';
|
||||
ALTER TABLE system_settings ADD meetme_enter_leave3way_filename VARCHAR(255) default '';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1406',db_schema_update_date=NOW() where db_schema_version < 1406;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+18
-11
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# manager_send.php version 2.10
|
||||
# manager_send.php version 2.12
|
||||
#
|
||||
# Copyright (C) 2014 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# This script is designed purely to insert records into the vicidial_manager table to signal Actions to an asterisk server
|
||||
# This script depends on the server_ip being sent and also needs to have a valid user/pass from the vicidial_users table
|
||||
@@ -123,10 +123,11 @@
|
||||
# 141118-1101 - Formatting changes for QXZ output
|
||||
# 141128-0851 - Code cleanup for QXZ functions
|
||||
# 141216-2107 - Added language settings lookups and user/pass variable standardization
|
||||
# 150307-1837 - Added leave 3way custom sound context
|
||||
#
|
||||
|
||||
$version = '2.10-70';
|
||||
$build = '141216-2107';
|
||||
$version = '2.12-71';
|
||||
$build = '150307-1837';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=129;
|
||||
$one_mysql_log=0;
|
||||
@@ -262,7 +263,7 @@ if ($sl_ct > 0)
|
||||
$VUselected_language = $row[0];
|
||||
}
|
||||
|
||||
$stmt = "SELECT use_non_latin,allow_sipsak_messages,enable_languages,language_method FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,allow_sipsak_messages,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02001',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -270,10 +271,12 @@ $qm_conf_ct = mysqli_num_rows($rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$non_latin = $row[0];
|
||||
$allow_sipsak_messages = $row[1];
|
||||
$SSenable_languages = $row[2];
|
||||
$SSlanguage_method = $row[3];
|
||||
$non_latin = $row[0];
|
||||
$allow_sipsak_messages = $row[1];
|
||||
$SSenable_languages = $row[2];
|
||||
$SSlanguage_method = $row[3];
|
||||
$meetme_enter_login_filename = $row[4];
|
||||
$meetme_enter_leave3way_filename = $row[5];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
@@ -284,6 +287,10 @@ if ($non_latin < 1)
|
||||
$secondS = preg_replace("/[^0-9]/","",$secondS);
|
||||
}
|
||||
|
||||
$threeway_context = $ext_context;
|
||||
if (strlen($meetme_enter_leave3way_filename) > 0)
|
||||
{$threeway_context = 'meetme-enter-leave3way';}
|
||||
|
||||
$auth=0;
|
||||
$auth_message = user_authorization($user,$pass,'',0,1,0);
|
||||
if ($auth_message == 'GOOD')
|
||||
@@ -1540,7 +1547,7 @@ if ($ACTION=="RedirectXtraCXNeW")
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtE,'02033',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$queryCID = "CXAR24$NOWnum";
|
||||
$stmtF="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $agentchannel','Context: $ext_context','Exten: $exten','Priority: 1','CallerID: $queryCID','','','','','');";
|
||||
$stmtF="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $agentchannel','Context: $threeway_context','Exten: $exten','Priority: 1','CallerID: $queryCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmtF -->";}
|
||||
$rslt=mysql_to_mysqli($stmtF, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmtF,'02034',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -1758,7 +1765,7 @@ if ($ACTION=="RedirectXtraNeW")
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02049',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$queryCID = "CXAR23$NOWnum";
|
||||
$stmtB="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $agentchannel','Context: $ext_context','Exten: $exten','Priority: 1','CallerID: $queryCID','','','','','');";
|
||||
$stmtB="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Redirect','$queryCID','Channel: $agentchannel','Context: $threeway_context','Exten: $exten','Priority: 1','CallerID: $queryCID','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmtB, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02050',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
+33
-25
@@ -481,10 +481,11 @@
|
||||
# 150218-1356 - Fixes for QXZ enclosed in single-quotes
|
||||
# 150220-1533 - Fix for leave page confirmation after logout and QXZ fixes
|
||||
# 150302-0950 - Release of 2.11 stable branch and raising trunk to 2.12
|
||||
# 150309-0315 - Added custom agent login prompt option
|
||||
#
|
||||
|
||||
$version = '2.12-453c';
|
||||
$build = '150302-0950';
|
||||
$version = '2.12-454c';
|
||||
$build = '150309-0315';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=85;
|
||||
$one_mysql_log=0;
|
||||
@@ -581,7 +582,7 @@ if ($sl_ct > 0)
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration,outbound_autodial_active,enable_second_webform,user_territories_active,static_agent_url,custom_fields_enabled,pllb_grouping_limit,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration,outbound_autodial_active,enable_second_webform,user_territories_active,static_agent_url,custom_fields_enabled,pllb_grouping_limit,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01001',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -589,25 +590,27 @@ $qm_conf_ct = mysqli_num_rows($rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$non_latin = $row[0];
|
||||
$vdc_header_date_format = $row[1];
|
||||
$vdc_customer_date_format = $row[2];
|
||||
$vdc_header_phone_format = $row[3];
|
||||
$WeBRooTWritablE = $row[4];
|
||||
$timeclock_end_of_day = $row[5];
|
||||
$vtiger_url = $row[6];
|
||||
$enable_vtiger_integration = $row[7];
|
||||
$outbound_autodial_active = $row[8];
|
||||
$enable_second_webform = $row[9];
|
||||
$user_territories_active = $row[10];
|
||||
$static_agent_url = $row[11];
|
||||
$custom_fields_enabled = $row[12];
|
||||
$SSpllb_grouping_limit = $row[13];
|
||||
$qc_enabled = $row[14];
|
||||
$email_enabled = $row[15];
|
||||
$callback_time_24hour = $row[16];
|
||||
$SSenable_languages = $row[17];
|
||||
$SSlanguage_method = $row[18];
|
||||
$non_latin = $row[0];
|
||||
$vdc_header_date_format = $row[1];
|
||||
$vdc_customer_date_format = $row[2];
|
||||
$vdc_header_phone_format = $row[3];
|
||||
$WeBRooTWritablE = $row[4];
|
||||
$timeclock_end_of_day = $row[5];
|
||||
$vtiger_url = $row[6];
|
||||
$enable_vtiger_integration = $row[7];
|
||||
$outbound_autodial_active = $row[8];
|
||||
$enable_second_webform = $row[9];
|
||||
$user_territories_active = $row[10];
|
||||
$static_agent_url = $row[11];
|
||||
$custom_fields_enabled = $row[12];
|
||||
$SSpllb_grouping_limit = $row[13];
|
||||
$qc_enabled = $row[14];
|
||||
$email_enabled = $row[15];
|
||||
$callback_time_24hour = $row[16];
|
||||
$SSenable_languages = $row[17];
|
||||
$SSlanguage_method = $row[18];
|
||||
$meetme_enter_login_filename = $row[19];
|
||||
$meetme_enter_leave3way_filename = $row[20];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2578,6 +2581,10 @@ else
|
||||
$on_hook_agent=$row[78];
|
||||
$webphone_auto_answer=$row[79];
|
||||
|
||||
$login_context = $ext_context;
|
||||
if (strlen($meetme_enter_login_filename) > 0)
|
||||
{$login_context = 'meetme-enter-login';}
|
||||
|
||||
$no_empty_session_warnings=0;
|
||||
if ( ($phone_login == 'nophone') or ($on_hook_agent == 'Y') )
|
||||
{
|
||||
@@ -2881,8 +2888,8 @@ else
|
||||
if ($on_hook_agent == 'Y')
|
||||
{$TEMP_SIP_user_DiaL = 'Local/8300@default';}
|
||||
### insert a NEW record to the vicidial_manager table to be processed
|
||||
$agent_login_data="||$NOW_TIME|NEW|N|$server_ip||Originate|$SIqueryCID|Channel: $TEMP_SIP_user_DiaL|Context: $ext_context|Exten: $session_id|Priority: 1|Callerid: \"$SIqueryCID\" <$campaign_cid>|||||";
|
||||
$agent_login_stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $TEMP_SIP_user_DiaL','Context: $ext_context','Exten: $session_id','Priority: 1','Callerid: \"$SIqueryCID\" <$campaign_cid>','','','','','');";
|
||||
$agent_login_data="||$NOW_TIME|NEW|N|$server_ip||Originate|$SIqueryCID|Channel: $TEMP_SIP_user_DiaL|Context: $login_context|Exten: $session_id|Priority: 1|Callerid: \"$SIqueryCID\" <$campaign_cid>|||||";
|
||||
$agent_login_stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$SIqueryCID','Channel: $TEMP_SIP_user_DiaL','Context: $login_context','Exten: $session_id','Priority: 1','Callerid: \"$SIqueryCID\" <$campaign_cid>','','','','','');";
|
||||
if ( ($is_webphone != 'Y') and ($is_webphone != 'Y_API_LAUNCH') )
|
||||
{
|
||||
if ($DB) {echo "$agent_login_stmt\n";}
|
||||
@@ -3639,6 +3646,7 @@ $CCAL_OUT .= "</table>";
|
||||
var extension_xfer = '<?php echo $extension ?>';
|
||||
var dialplan_number = '<?php echo $dialplan_number ?>';
|
||||
var ext_context = '<?php echo $ext_context ?>';
|
||||
var login_context = '<?php echo $login_context ?>';
|
||||
var protocol = '<?php echo $protocol ?>';
|
||||
var agentchannel = '';
|
||||
var local_gmt ='<?php echo $local_gmt ?>';
|
||||
@@ -11694,7 +11702,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
}
|
||||
if (xmlhttp)
|
||||
{
|
||||
VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=OriginateVDRelogin&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + ext_context + "&ext_priority=1" + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages + "&allow_sipsak_messages=" + allow_sipsak_messages + "&campaign=" + campaign + "&outbound_cid=" + campaign_cid;
|
||||
VMCoriginate_query = "server_ip=" + server_ip + "&session_name=" + session_name + "&user=" + user + "&pass=" + pass + "&ACTION=OriginateVDRelogin&format=text&channel=" + originatevalue + "&queryCID=" + queryCID + "&exten=" + session_id + "&ext_context=" + login_context + "&ext_priority=1" + "&extension=" + extension + "&protocol=" + protocol + "&phone_ip=" + phone_ip + "&enable_sipsak_messages=" + enable_sipsak_messages + "&allow_sipsak_messages=" + allow_sipsak_messages + "&campaign=" + campaign + "&outbound_cid=" + campaign_cid;
|
||||
xmlhttp.open('POST', 'manager_send.php');
|
||||
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');
|
||||
xmlhttp.send(VMCoriginate_query);
|
||||
|
||||
+27
-8
File diff suppressed because one or more lines are too long
@@ -41,6 +41,7 @@
|
||||
# 150217-0657 - Added vmail show on login option
|
||||
# 150218-0800 - Added Callbacks Bulk Move help
|
||||
# 150223-1548 - Added DYN option to am_message_exten
|
||||
# 150307-2317 - Added custom meetme enter options
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -4562,6 +4563,16 @@ FR_SPAC 00 00 00 00 00 - <?php echo _QXZ("France space separated phone number");
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Sounds Web Directory"); ?> -</B><?php echo _QXZ("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."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-meetme_enter_login_filename">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Custom Agent Login Sound"); ?> -</B><?php echo _QXZ("This is a systemwide feature that only works on Asterisk 1.8 servers or higher. This allows you to set an audio file for your agents to hear after their phone has connected to the server after they have logged in to the agent screen. If you want to have this audio prompt be the only prompt that the agent hears, then you will need to copy the sip-silence audio files over the only-person audio files. If you want the agent to hear no prompt when they login then also set this field to sip-silence. Default is EMPTY."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-meetme_enter_leave3way_filename">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Custom Agent Leave 3way Sound"); ?> -</B><?php echo _QXZ("This is a systemwide feature that only works on Asterisk 1.8 servers or higher. This allows you to set an audio file for your agents to hear after they have left a 3way conferencce in the agent screen. If you want to have this audio prompt be the only prompt that the agent hears, then you will need to copy the sip-silence audio files over the only-person audio files. If you want the agent to hear no prompt after they leave a 3way call then also set this field to sip-silence. Default is EMPTY."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-admin_web_directory">
|
||||
<BR>
|
||||
|
||||
@@ -93,10 +93,11 @@
|
||||
# 140812-0939 - Added phone_number and vendor_lead_code to agent_status function output
|
||||
# 150123-1611 - Fixed issue with list local call times and add_lead
|
||||
# 150217-1404 - archive deleted callbacks to vicidial_callbacks_archive table
|
||||
# 150309-0250 - Added ability to use urlencoded web form addresses
|
||||
#
|
||||
|
||||
$version = '2.10-69';
|
||||
$build = '150217-1404';
|
||||
$version = '2.12-70';
|
||||
$build = '150309-0250';
|
||||
$api_url_log = 0;
|
||||
|
||||
$startMS = microtime();
|
||||
@@ -483,8 +484,8 @@ if ($non_latin < 1)
|
||||
$script=preg_replace('/[^-_0-9a-zA-Z]/','',$script);
|
||||
$am_message=preg_replace('/[^-_0-9a-zA-Z]/','',$am_message);
|
||||
$drop_inbound_group=preg_replace('/[^-_0-9a-zA-Z]/','',$drop_inbound_group);
|
||||
$web_form_address=preg_replace('/[^- \+\.\:\/\@\?\&\_0-9a-zA-Z]/','',$web_form_address);
|
||||
$web_form_address_two=preg_replace('/[^- \+\.\:\/\@\?\&\_0-9a-zA-Z]/','',$web_form_address_two);
|
||||
$web_form_address=preg_replace('/[^- %=\+\.\:\/\@\?\&\_0-9a-zA-Z]/','',$web_form_address);
|
||||
$web_form_address_two=preg_replace('/[^- %=\+\.\:\/\@\?\&\_0-9a-zA-Z]/','',$web_form_address_two);
|
||||
$reset_list=preg_replace('/[^A-Z]/','',$reset_list);
|
||||
$delete_list=preg_replace('/[^A-Z]/','',$delete_list);
|
||||
$delete_leads=preg_replace('/[^A-Z]/','',$delete_leads);
|
||||
@@ -3644,6 +3645,11 @@ if ($function == 'update_list')
|
||||
}
|
||||
if (strlen($web_form_address) > 0)
|
||||
{
|
||||
if (preg_match("/%3A%2F%2F/",$web_form_address))
|
||||
{
|
||||
$web_form_address = urldecode($web_form_address);
|
||||
$web_form_address = preg_replace("/ /",'+',$web_form_address);
|
||||
}
|
||||
if ($web_form_address == '--BLANK--')
|
||||
{$webformSQL = " ,web_form_address=''";}
|
||||
else
|
||||
@@ -3651,6 +3657,11 @@ if ($function == 'update_list')
|
||||
}
|
||||
if (strlen($web_form_address_two) > 0)
|
||||
{
|
||||
if (preg_match("/%3A%2F%2F/",$web_form_address_two))
|
||||
{
|
||||
$web_form_address_two = urldecode($web_form_address_two);
|
||||
$web_form_address_two = preg_replace("/ /",'+',$web_form_address_two);
|
||||
}
|
||||
if ($web_form_address_two == '--BLANK--')
|
||||
{$webformtwoSQL = " ,web_form_address_two=''";}
|
||||
else
|
||||
@@ -3969,10 +3980,36 @@ if ($function == 'add_list')
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
$webformSQL='';
|
||||
$webformtwoSQL='';
|
||||
if (strlen($web_form_address) > 0)
|
||||
{
|
||||
if (preg_match("/%3A%2F%2F/",$web_form_address))
|
||||
{
|
||||
$web_form_address = urldecode($web_form_address);
|
||||
$web_form_address = preg_replace("/ /",'+',$web_form_address);
|
||||
}
|
||||
if ($web_form_address == '--BLANK--')
|
||||
{$webformSQL = " ,web_form_address=''";}
|
||||
else
|
||||
{$webformSQL = " ,web_form_address='$web_form_address'";}
|
||||
}
|
||||
if (strlen($web_form_address_two) > 0)
|
||||
{
|
||||
if (preg_match("/%3A%2F%2F/",$web_form_address_two))
|
||||
{
|
||||
$web_form_address_two = urldecode($web_form_address_two);
|
||||
$web_form_address_two = preg_replace("/ /",'+',$web_form_address_two);
|
||||
}
|
||||
if ($web_form_address_two == '--BLANK--')
|
||||
{$webformtwoSQL = " ,web_form_address_two=''";}
|
||||
else
|
||||
{$webformtwoSQL = " ,web_form_address_two='$web_form_address_two'";}
|
||||
}
|
||||
if (strlen($active)<1) {$active='N';}
|
||||
if (strlen($expiration_date)<10) {$expiration_date='2099-12-31';}
|
||||
|
||||
$stmt="INSERT INTO vicidial_lists SET list_id='$list_id', list_name='$list_name', campaign_id='$campaign_id', active='$active', campaign_cid_override='$outbound_cid', agent_script_override='$script', am_message_exten_override='$am_message', drop_inbound_group_override='$drop_inbound_group', web_form_address='$web_form_address', web_form_address_two='$web_form_address_two', reset_time='$reset_time', expiration_date='$expiration_date';";
|
||||
$stmt="INSERT INTO vicidial_lists SET list_id='$list_id', list_name='$list_name', campaign_id='$campaign_id', active='$active', campaign_cid_override='$outbound_cid', agent_script_override='$script', am_message_exten_override='$am_message', drop_inbound_group_override='$drop_inbound_group', reset_time='$reset_time', expiration_date='$expiration_date' $webformSQL $webformtwoSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user