Added Alternate IVR(Call Menu) Logging options
Added more optional logging to ADMIN_keepalive_ALL.pl script for end-of-day processes, also those processes now only run on the voicemail server of a cluster. git-svn-id: svn://192.168.202.10@2486 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -242,6 +242,8 @@ OTHER CHANGES:
|
||||
|
||||
62. Added API Log Report to Admin Utilities page
|
||||
|
||||
63. Added Alternate IVR(Call Menu) Logging options
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# cm.agi version 2.8
|
||||
# cm.agi version 2.12
|
||||
#
|
||||
# Used by Call Menus to log digit presses if enabled in the settings. You should
|
||||
# not need to manually use this script, it is used by the dialplan builder.
|
||||
@@ -10,16 +10,18 @@
|
||||
# ; 1. the in-group to take settings from
|
||||
# ; 2. digit pressed
|
||||
# ; 3. field(in vicidial_list) to update with DTMF pressed (only if lead_id populated)
|
||||
# ; 4. alt-log(enable alternate logging)
|
||||
# ; 5. question number used if alt-logging is enabled
|
||||
# ;
|
||||
# ;inbound calls check calltime:
|
||||
#exten => 1,1,AGI(cm.agi,INBOUND-----1-----province)
|
||||
#exten => 1,1,AGI(cm.agi,INBOUND-----1-----province----------)
|
||||
#exten => 1,2,...
|
||||
#
|
||||
# ;to allow for multi-digit entries, put similar entry in the Custom Dialplan Entry:
|
||||
#exten => _XXXXX,1,AGI(cm.agi,INBOUND-----${EXTEN}-----postal_code)
|
||||
#exten => _XXXXX,n,Goto(next_callmenu_here,s,1)
|
||||
#
|
||||
# Copyright (C) 2013 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 110525-2100 - First Build
|
||||
@@ -27,6 +29,7 @@
|
||||
# 120730-0729 - Changed to allow inbound logging when lead is defined
|
||||
# 130925-1822 - Added variable filter to prevent DID SQL injection attack
|
||||
# 130926-1547 - Added new queue_log IVR entries for QM
|
||||
# 160305-2244 - Added Alt IVR Logging options
|
||||
#
|
||||
|
||||
$script = 'cm.agi';
|
||||
@@ -152,6 +155,8 @@ if (length($ARGV[0])>1)
|
||||
$channel_group = $ARGV_vars[0];
|
||||
$dtmf = $ARGV_vars[1];
|
||||
$field = $ARGV_vars[2];
|
||||
$alt_logging = $ARGV_vars[3];
|
||||
$alt_question = $ARGV_vars[4];
|
||||
}
|
||||
|
||||
$|=1;
|
||||
@@ -207,6 +212,17 @@ elsif ($calleridname =~ /^Y\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d\d/)
|
||||
$phone_number = $callerid;
|
||||
$callerid = $calleridname;
|
||||
|
||||
$stmtA = "SELECT campaign_id FROM vicidial_auto_calls where callerid='$callerid';";
|
||||
$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;
|
||||
$campaign_id = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ( (length($field)>2) && ($vicidial_list_fields =~ /\|$field\|/) )
|
||||
{
|
||||
$fieldUPDATE=1;
|
||||
@@ -305,6 +321,15 @@ else
|
||||
if ($AGILOG) {$agi_string = "-- LIL insert: |$affected_rowsL|$uniqueid|$callerid|$extension|"; &agi_output;}
|
||||
}
|
||||
|
||||
if ( ($alt_logging =~ /1/) && ($alt_question =~ /\d/) )
|
||||
{
|
||||
$stmtA = "INSERT INTO vicidial_ivr_response (btn,lead_id,question,response,uniqueid,campaign) values('$phone_number','$lead_id','$alt_question','$dtmf','$uniqueid','$campaign_id');";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rowsAI = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VIR insert: |$affected_rowsAI|$uniqueid|$phone_number|$lead_id|"; &agi_output;}
|
||||
}
|
||||
|
||||
|
||||
### QueueMetrics logging if enabled
|
||||
if ($enable_queuemetrics_logging > 0)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1642,7 +1642,8 @@ usacan_phone_dialcode_fix ENUM('0','1') default '0',
|
||||
cache_carrier_stats_realtime ENUM('0','1') default '0',
|
||||
oldest_logs_date DATETIME,
|
||||
log_recording_access ENUM('0', '1') default '0',
|
||||
report_default_format ENUM('TEXT', 'HTML') default 'TEXT'
|
||||
report_default_format ENUM('TEXT', 'HTML') default 'TEXT',
|
||||
alt_ivr_logging ENUM('0', '1') default '0'
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_campaigns_list_mix (
|
||||
@@ -2104,7 +2105,9 @@ tracking_group VARCHAR(20) default 'CALLMENU',
|
||||
dtmf_log ENUM('0','1') default '0',
|
||||
dtmf_field VARCHAR(50) default 'NONE',
|
||||
user_group VARCHAR(20) default '---ALL---',
|
||||
qualify_sql TEXT
|
||||
qualify_sql TEXT,
|
||||
alt_dtmf_log ENUM('0','1') default '0',
|
||||
question INT(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_call_menu_options (
|
||||
@@ -3470,6 +3473,20 @@ index(recording_id),
|
||||
index(lead_id)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=1599 DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE vicidial_ivr_response (
|
||||
id INT(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
btn VARCHAR(10) DEFAULT NULL,
|
||||
lead_id INT(10) unsigned DEFAULT NULL,
|
||||
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
question INT(11) DEFAULT NULL,
|
||||
response VARCHAR(10) DEFAULT NULL,
|
||||
uniqueid VARCHAR(50) DEFAULT NULL,
|
||||
campaign VARCHAR(20) DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY question_created (question,uniqueid,campaign,created),
|
||||
index(lead_id)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=1599 DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
|
||||
|
||||
@@ -3720,4 +3737,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='1453',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1454',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -524,3 +524,24 @@ ALTER TABLE vicidial_chat_archive ADD user_direct_group_id VARCHAR(20);
|
||||
INSERT INTO vicidial_inbound_groups(group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,hold_time_option_no_block,hold_time_option_prompt_seconds,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,group_calldate,action_xfer_cid,drop_callmenu,after_hours_callmenu,user_group,max_calls_method,max_calls_count,max_calls_action,dial_ingroup_cid,group_handling,web_form_address_three,populate_lead_ingroup,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,status_group_id,routing_initiated_recordings,on_hook_cid_number) VALUES ('AGENTDIRECT_CHAT','Agent Direct Queue for Chats','#FFFFFF','Y','','','longest_wait_time','Y','','',NULL,NULL,NULL,NULL,360,'MESSAGE','8307','24hours','MESSAGE','vm-goodbye','8300',NULL,'---NONE---','default','generic_hold',60,'ding',1000,'---NONE---',99,'---NONE---','DISABLED','NONE','---NONE---','N',NULL,'24HRMIDNIGHT','NONE','Y',NULL,NULL,'N','N','NONE',360,'8300','','---NONE---','vm-hangup',0,'---NONE---','N','ALWAYS',20,30,'','N','MESSAGE','nbdy-avail-to-take-call|vm-goodbye','','NONE','',-1,'','','','','','N','N','DISABLED','',0,'to-be-called-back|digits/1','','N',10,'N',10,'NONE','NONE','WAIT','NONE','NONE','NONE',120,'8300','','---NONE---','','vm-hangup',999,'to-be-called-back|digits/1','N',10,'',0,'','','N',10,15,'','GENERIC',NULL,'CUSTOMER','','','---ALL---','DISABLED',0,'DROP','','CHAT','','ENABLED','N','N','N','N','N','','N','');
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1453',db_schema_update_date=NOW() where db_schema_version < 1453;
|
||||
|
||||
CREATE TABLE vicidial_ivr_response (
|
||||
id INT(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
btn VARCHAR(10) DEFAULT NULL,
|
||||
lead_id INT(10) unsigned DEFAULT NULL,
|
||||
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
question INT(11) DEFAULT NULL,
|
||||
response VARCHAR(10) DEFAULT NULL,
|
||||
uniqueid VARCHAR(50) DEFAULT NULL,
|
||||
campaign VARCHAR(20) DEFAULT NULL,
|
||||
PRIMARY KEY (id),
|
||||
KEY question_created (question,uniqueid,campaign,created),
|
||||
index(lead_id)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=1599 DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE system_settings ADD alt_ivr_logging ENUM('0', '1') default '0';
|
||||
|
||||
ALTER TABLE vicidial_call_menu ADD alt_dtmf_log ENUM('0','1') default '0';
|
||||
ALTER TABLE vicidial_call_menu ADD question INT(11) DEFAULT NULL;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1454',db_schema_update_date=NOW() where db_schema_version < 1454;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -81,6 +81,7 @@
|
||||
# 160116-1512 - Added access_recording and log_recording_access entries
|
||||
# 160121-2155 - Added settings-report_default_format entry and help text for several reports
|
||||
# 160211-2255 - Added help text for remaining reports
|
||||
# 160305-2115 - Added Alt IVR(call menu) DTMF logging
|
||||
#
|
||||
|
||||
|
||||
@@ -3072,6 +3073,16 @@ if ($SSqc_features_active > 0)
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Log Field"); ?> -</B><?php echo _QXZ("If the Log Key Press option is enabled, this optional setting can allow the response to also be stored in this list field. vendor_lead_code, source_id, phone_code, title, first_name, middle_initial, last_name, address1, address2, address3, city, state, province, postal_code, country_code, alt_phone, email, security_phrase, comments, rank, owner, status, user. Default is NONE for disabled."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="call_menu-alt_dtmf_log">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Alt DTMF Log"); ?> -</B><?php echo _QXZ("This option if enabled will log the DTMF key press by the caller in this Call Menu to a separate database table. Default is 0 for disabled."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="call_menu-question">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Question"); ?> -</B><?php echo _QXZ("If the Alt DTMF Log option is enabled, this is the question number that the response will be logged to. Default is blank for disabled."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="call_menu-option_value">
|
||||
<BR>
|
||||
@@ -5018,6 +5029,11 @@ FR_SPAC 00 00 00 00 00 - <?php echo _QXZ("France space separated phone number");
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Call Menu Qualify Enabled"); ?> -</B><?php echo _QXZ("This setting enables the option in Call Menus to put a SQL qualification on the people that hear that call menu. For more information on how that feature works, view the help for Call Menus. Default is 0 for disabled."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-alt_ivr_logging">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Call Menu Alt DTMF Logging"); ?> -</B><?php echo _QXZ("This setting enables the option in Call Menus to log the DTMF responses to an alternate database table. This can be used in addition to the default DTMF lead logging option. Default is 0 for disabled."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-level_8_disable_add">
|
||||
<BR>
|
||||
|
||||
Reference in New Issue
Block a user