Added options in In-Groups and Campaigns to allow for the agent recordings
to be initiated by the routing process instead of at the agent screen Fixed issues with non-ascii leads loading git-svn-id: svn://192.168.202.10@2453 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -221,6 +221,11 @@ OTHER CHANGES:
|
||||
55. Added Agent Allowed Chat Groups to User Groups to allow restriction of only
|
||||
agent to agent chatting by itself.
|
||||
|
||||
56. Added options in In-Groups and Campaigns to allow for the agent recordings
|
||||
to be initiated by the routing process instead of at the agent screen.
|
||||
This only works for inbound and auto-dial outbound calls for in-groups
|
||||
and campaigns that are set to ALLCALLS or ALLFORCE recording.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
#exten => _99909*.,2,AGI(agi-VDAD_ALL_inbound.agi)
|
||||
#exten => _99909*.,3,Hangup
|
||||
#
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 70828-0924 - First Build
|
||||
@@ -200,6 +200,7 @@
|
||||
# 150804-1718 - Added _lead_reset options
|
||||
# 150812-2004 - Changed maximum time since last agent update to route a call to and agent from 5 to 7 seconds
|
||||
# 151004-0815 - Fixed issue with recording vicidial_id for remote agent calls, now set to closecallid
|
||||
# 160101-1525 - Added routing_initiated_recordings
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||
@@ -724,7 +725,7 @@ $affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
### Grab inbound groups values from the database
|
||||
$cbc=0;
|
||||
$stmtA = "SELECT 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,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,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,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_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,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,ingroup_recording_override,ingroup_rec_filename,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,max_calls_method,max_calls_count,max_calls_action,populate_lead_ingroup,na_call_url,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset FROM vicidial_inbound_groups where group_id = '$channel_group';";
|
||||
$stmtA = "SELECT 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,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,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,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_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,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,ingroup_recording_override,ingroup_rec_filename,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu,max_calls_method,max_calls_count,max_calls_action,populate_lead_ingroup,na_call_url,drop_lead_reset,after_hours_lead_reset,nanq_lead_reset,wait_time_lead_reset,hold_time_lead_reset,routing_initiated_recordings FROM vicidial_inbound_groups where group_id = '$channel_group';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -822,6 +823,7 @@ if ($sthArows > 0)
|
||||
$nanq_lead_reset = $aryA[80];
|
||||
$wait_time_lead_reset = $aryA[81];
|
||||
$hold_time_lead_reset = $aryA[82];
|
||||
$routing_initiated_recordings = $aryA[83];
|
||||
|
||||
$custom_call_id='';
|
||||
if ($uniqueid_status_display =~ /ENABLED/)
|
||||
@@ -1480,7 +1482,7 @@ if ( ( ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $c
|
||||
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$VARserver_ip' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02019'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- AH VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- AH VDCL vac record deleted: |$affected_rows| $channel_group|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- AH action: |$after_hours_action|$after_hours_exten|$after_hours_message_filename|$after_hours_voicemail|"; &agi_output;}
|
||||
|
||||
if ($after_hours_action =~ /EXTENSION|VOICEMAIL|IN_GROUP|CALLMENU|VMAIL_NO_INST/)
|
||||
@@ -1717,7 +1719,7 @@ if ( ( ($no_agent_no_queue =~ /Y|NO_PAUSED/) || ($MCnanque_override > 0) ) && ($
|
||||
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$VARserver_ip' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02107'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- NA VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- NA VDCL vac record deleted: |$affected_rows| $channel_group|"; &agi_output;}
|
||||
|
||||
if ($no_agent_action =~ /CALLMENU|INGROUP|DID|EXTENSION|VOICEMAIL|VMAIL_NO_INST/)
|
||||
{
|
||||
@@ -2642,6 +2644,138 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
$stmtA = "UNLOCK TABLES;";
|
||||
my $LOCKaffected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02060'; $MEL_aff_rows=$LOCKaffected_rows; &mysql_error_logging;
|
||||
|
||||
if ( ($routing_initiated_recordings =~ /Y/) && ($found_agents > 0) && ($VDADon_hook_agent !~ /Y/) && ($CAMP_callorder !~ /ring_all$/i) && ($VDADextension !~ /^R\//))
|
||||
{
|
||||
### BEGIN routing-initiated agent call recording for ALLCALLS/ALLFORCE ###
|
||||
|
||||
### get the recording settings for the campaign that this user is logged into
|
||||
if (length($log_campaign) > 0)
|
||||
{
|
||||
$stmtA = "SELECT campaign_recording,campaign_rec_filename,campaign_rec_exten FROM vicidial_campaigns where campaign_id='$log_campaign';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$CAMPingroup_recording_override = $aryA[0];
|
||||
$CAMPcampaign_rec_filename = $aryA[1];
|
||||
$recording_exten = $aryA[2];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
if ( (length($log_campaign) > 0) && ($ingroup_recording_override =~ /DISABLED/) )
|
||||
{$ingroup_recording_override = $CAMPingroup_recording_override;}
|
||||
if ( (length($log_campaign) > 0) && (length($campaign_rec_filename) < 8) )
|
||||
{$campaign_rec_filename = $CAMPcampaign_rec_filename;}
|
||||
### look for the recording settings for the start user of this user
|
||||
if (length($VDADuser) > 0)
|
||||
{
|
||||
$stmtA = "SELECT vicidial_recording_override,vicidial_recording FROM vicidial_users where user='$VDADuser';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArowsVUrec=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$sthArowsVUrec; &mysql_error_logging;
|
||||
if ($sthArowsVUrec > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
if ($aryA[0] !~ /DISABLED/)
|
||||
{$ingroup_recording_override = $aryA[0];}
|
||||
if ($aryA[1] < 1)
|
||||
{$ingroup_recording_override = 'NONE';}
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
### if recording is enabled then start recording on this call before sending to a remote agent
|
||||
if ($ingroup_recording_override =~ /ALLCALLS|ALLFORCE/)
|
||||
{
|
||||
$stmtA = "SELECT vendor_lead_code FROM vicidial_list where lead_id='$insert_lead_id';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$vendor_lead_code = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
# get date/time
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
$Tyear = ($year - 2000);
|
||||
$mon++;
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
|
||||
$now_date_epoch = time();
|
||||
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
||||
$recdate = "$year$mon$mday-$hour$min$sec";
|
||||
$tinydate = "$Tyear$mon$mday$hour$min$sec";
|
||||
|
||||
$campaign_rec_filename =~ s/CAMPAIGN/$log_campaign/gi;
|
||||
$campaign_rec_filename =~ s/INGROUP/$channel_group/gi;
|
||||
$campaign_rec_filename =~ s/CUSTPHONE/$phone_number/gi;
|
||||
$campaign_rec_filename =~ s/FULLDATE/$recdate/gi;
|
||||
$campaign_rec_filename =~ s/TINYDATE/$tinydate/gi;
|
||||
$campaign_rec_filename =~ s/EPOCH/$now_date_epoch/gi;
|
||||
$campaign_rec_filename =~ s/AGENT/$VDADuser/gi;
|
||||
$campaign_rec_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
|
||||
$campaign_rec_filename =~ s/LEADID/$insert_lead_id/gi;
|
||||
$campaign_rec_filename =~ s/CALLID/$callerid/gi;
|
||||
$campaign_rec_filename =~ s/\"|\'//gi;
|
||||
|
||||
$conf_silent_prefix='5';
|
||||
$channelrec = "Local/" . $conf_silent_prefix . '' . $VDADconf_exten . "@" . $ext_context;
|
||||
|
||||
### insert a record into the recording_log table
|
||||
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channelrec','$VDADserver_ip','$recording_exten','$now_date','$now_date_epoch','$campaign_rec_filename','$insert_lead_id','$VDADuser','$insert_close_id')";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$recording_id = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($campaign_rec_filename =~ /RECID/)
|
||||
{
|
||||
$campaign_rec_filename =~ s/RECID/$recording_id/gi;
|
||||
|
||||
$stmtA = "UPDATE recording_log SET filename='$campaign_rec_filename' where recording_id='$recording_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
}
|
||||
|
||||
$stmtA="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','Originate','$campaign_rec_filename','Channel: $channelrec','Context: $ext_context','Exten: $recording_exten','Priority: 1','Callerid: $campaign_rec_filename','','','','','');";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
|
||||
$stmtB = "INSERT INTO routing_initiated_recordings (recording_id,filename,launch_time,lead_id,vicidial_id,user,processed) values('$recording_id','$campaign_rec_filename','$now_date','$insert_lead_id','$insert_close_id','$VDADuser','0')";
|
||||
$affected_rowsB = $dbhA->do($stmtB);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsB; &mysql_error_logging;
|
||||
|
||||
$stmtC = "UPDATE vicidial_live_agents SET external_recording='$recording_id' where user='$VDADuser';";
|
||||
$affected_rowsC = $dbhA->do($stmtC);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsC; &mysql_error_logging;
|
||||
|
||||
if ($AGILOG) {$agi_string = "-- ROUTING INITIATED RECORDING STARTED : |$affected_rows|$recording_id|$campaign_rec_filename|$stmtA| |$affected_rowsB|$stmtB| |$affected_rowsC|$stmtC|"; &agi_output;}
|
||||
}
|
||||
### END routing-initiated agent call recording for ALLCALLS/ALLFORCE ###
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3424,7 +3558,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
$recdate = "$year$mon$mday-$hour$min$sec";
|
||||
$tinydate = "$Tyear$mon$mday$hour$min$sec";
|
||||
|
||||
$campaign_rec_filename =~ s/CAMPAIGN/$VDADcampaign/gi;
|
||||
$campaign_rec_filename =~ s/CAMPAIGN/$log_campaign/gi;
|
||||
$campaign_rec_filename =~ s/INGROUP/$channel_group/gi;
|
||||
$campaign_rec_filename =~ s/CUSTPHONE/$phone_number/gi;
|
||||
$campaign_rec_filename =~ s/FULLDATE/$recdate/gi;
|
||||
@@ -3582,7 +3716,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$VARserver_ip' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02075'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $channel_group|"; &agi_output;}
|
||||
|
||||
if ($drop_seconds < 1) {$drop_seconds = $drop_timer;}
|
||||
|
||||
@@ -4334,7 +4468,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$VARserver_ip' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02090'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $channel_group|"; &agi_output;}
|
||||
|
||||
$called_since_last_resetSQL='';
|
||||
if ( ($wait_time_option =~ /VOICEMAIL|HANGUP|MESSAGE|VMAIL_NO_INST/) && ($wait_time_lead_reset =~ /Y/) )
|
||||
@@ -4777,7 +4911,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$VARserver_ip' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02090'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $channel_group|"; &agi_output;}
|
||||
|
||||
$called_since_last_resetSQL='';
|
||||
if ( ($hold_time_option =~ /VOICEMAIL|HANGUP|MESSAGE|VMAIL_NO_INST/) && ($hold_time_lead_reset =~ /Y/) )
|
||||
@@ -5148,7 +5282,7 @@ if ( ($drop_timer > $DROP_TIME) || ($MCdrop_override > 0) )
|
||||
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$VARserver_ip' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02099'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $channel_group|"; &agi_output;}
|
||||
|
||||
$stmtA = "UPDATE vicidial_closer_log set status='$DRstatus',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds',term_reason='$DRterm' where lead_id='$insert_lead_id' order by start_epoch desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#exten => 8366,4,AGI(agi-VDAD_ALL_outbound.agi,SURVEY-----LB-----US_pol_survey_hello-----1238-----8-----US_pol_survey_transfer-----US_thanks_no_contact-----OPTOUT-----DNC)
|
||||
#exten => 8366,5,Hangup
|
||||
#
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 80218-2027 - First Build
|
||||
@@ -113,6 +113,7 @@
|
||||
# 141211-1635 - Added cpd_unknown_action campaign option and list_id added to AST_send_URL calls
|
||||
# 141219-1219 - Fixed issue related to QM logging
|
||||
# 150928-1822 - Added dnc logging
|
||||
# 160101-1528 - Added routing_initiated_recordings
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_outbound.agi';
|
||||
@@ -630,7 +631,7 @@ if ($VDACaffected_rows > 0)
|
||||
##### END - Max call stats
|
||||
|
||||
### Grab campaign values from the database
|
||||
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc,cpd_amd_action,am_message_exten,three_way_call_cid,campaign_cid,survey_first_audio_file,survey_opt_in_audio_file,survey_ni_audio_file,survey_third_audio_file,survey_fourth_audio_file,extension_appended_cidname,queue_priority,closer_campaigns,queuemetrics_phone_environment,campaign_recording,campaign_rec_filename,safe_harbor_audio,safe_harbor_menu_id,survey_recording,safe_harbor_audio_field,use_other_campaign_dnc,cpd_unknown_action FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
|
||||
$stmtA = "SELECT drop_call_seconds,drop_action,safe_harbor_exten,concurrent_transfers,next_agent_call,voicemail_ext,drop_inbound_group,use_internal_dnc,use_campaign_dnc,cpd_amd_action,am_message_exten,three_way_call_cid,campaign_cid,survey_first_audio_file,survey_opt_in_audio_file,survey_ni_audio_file,survey_third_audio_file,survey_fourth_audio_file,extension_appended_cidname,queue_priority,closer_campaigns,queuemetrics_phone_environment,campaign_recording,campaign_rec_filename,safe_harbor_audio,safe_harbor_menu_id,survey_recording,safe_harbor_audio_field,use_other_campaign_dnc,cpd_unknown_action,routing_initiated_recordings,campaign_rec_exten FROM vicidial_campaigns where campaign_id = '$VDADcampaign';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -671,6 +672,8 @@ if ($VDACaffected_rows > 0)
|
||||
$safe_harbor_audio_field = $aryA[27];
|
||||
$use_other_campaign_dnc = $aryA[28];
|
||||
$cpd_unknown_action = $aryA[29];
|
||||
$routing_initiated_recordings = $aryA[30];
|
||||
$campaign_rec_exten = $aryA[31];
|
||||
if (length($closer_campaigns) > 2)
|
||||
{
|
||||
$closer_campaigns =~ s/^ | -$//gi;
|
||||
@@ -2375,6 +2378,7 @@ while ($drop_timer <= $DROP_TIME)
|
||||
$VDADuser = $aryA[1];
|
||||
$VDADextension = $aryA[2];
|
||||
$ra_user = $aryA[3];
|
||||
$VDADserver_ip = $VARserver_ip;
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
@@ -2403,6 +2407,7 @@ while ($drop_timer <= $DROP_TIME)
|
||||
$VDADuser = $aryA[1];
|
||||
$VDADextension = $aryA[2];
|
||||
$ra_user = $aryA[3];
|
||||
$VDADserver_ip = $VARserver_ip;
|
||||
$rec_count++;
|
||||
}
|
||||
$sthA->finish();
|
||||
@@ -2575,6 +2580,115 @@ while ($drop_timer <= $DROP_TIME)
|
||||
### END REMOTE AGENT SECTION
|
||||
else
|
||||
{
|
||||
if ($routing_initiated_recordings =~ /Y/)
|
||||
{
|
||||
### BEGIN routing-initiated agent call recording for ALLCALLS/ALLFORCE ###
|
||||
|
||||
### look for the recording settings for the user
|
||||
if (length($VDADuser) > 0)
|
||||
{
|
||||
$stmtA = "SELECT vicidial_recording_override,vicidial_recording FROM vicidial_users where user='$VDADuser';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArowsVUrec=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$sthArowsVUrec; &mysql_error_logging;
|
||||
if ($sthArowsVUrec > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
if ($aryA[0] !~ /DISABLED/)
|
||||
{$campaign_recording = $aryA[0];}
|
||||
if ($aryA[1] < 1)
|
||||
{$campaign_recording = 'NONE';}
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
### if recording is enabled then start recording on this call before sending to a remote agent
|
||||
if ($campaign_recording =~ /ALLCALLS|ALLFORCE/)
|
||||
{
|
||||
$stmtA = "SELECT vendor_lead_code FROM vicidial_list where lead_id='$CIDlead_id';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$vendor_lead_code = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
# get date/time
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
$Tyear = ($year - 2000);
|
||||
$mon++;
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
|
||||
$now_date_epoch = time();
|
||||
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
||||
$recdate = "$year$mon$mday-$hour$min$sec";
|
||||
$tinydate = "$Tyear$mon$mday$hour$min$sec";
|
||||
|
||||
$campaign_rec_filename =~ s/CAMPAIGN/$VDADcampaign/gi;
|
||||
$campaign_rec_filename =~ s/CUSTPHONE/$VDADphone/gi;
|
||||
$campaign_rec_filename =~ s/FULLDATE/$recdate/gi;
|
||||
$campaign_rec_filename =~ s/TINYDATE/$tinydate/gi;
|
||||
$campaign_rec_filename =~ s/EPOCH/$now_date_epoch/gi;
|
||||
$campaign_rec_filename =~ s/AGENT/$VDADuser/gi;
|
||||
$campaign_rec_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
|
||||
$campaign_rec_filename =~ s/LEADID/$CIDlead_id/gi;
|
||||
$campaign_rec_filename =~ s/CALLID/$callerid/gi;
|
||||
$campaign_rec_filename =~ s/\"|\'//gi;
|
||||
|
||||
$conf_silent_prefix='5';
|
||||
$channelrec = "Local/" . $conf_silent_prefix . '' . $VDADconf_exten . "@" . $ext_context;
|
||||
|
||||
### insert a record into the recording_log table
|
||||
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channelrec','$VDADserver_ip','$campaign_rec_exten','$now_date','$now_date_epoch','$campaign_rec_filename','$CIDlead_id','$VDADuser','$uniqueid')";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$recording_id = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($campaign_rec_filename =~ /RECID/)
|
||||
{
|
||||
$campaign_rec_filename =~ s/RECID/$recording_id/gi;
|
||||
|
||||
$stmtA = "UPDATE recording_log SET filename='$campaign_rec_filename' where recording_id='$recording_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
}
|
||||
|
||||
$stmtA="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','Originate','$campaign_rec_filename','Channel: $channelrec','Context: $ext_context','Exten: $campaign_rec_exten','Priority: 1','Callerid: $campaign_rec_filename','','','','','');";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
|
||||
$stmtB = "INSERT INTO routing_initiated_recordings (recording_id,filename,launch_time,lead_id,vicidial_id,user,processed) values('$recording_id','$campaign_rec_filename','$now_date','$CIDlead_id','$uniqueid','$VDADuser','0')";
|
||||
$affected_rowsB = $dbhA->do($stmtB);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsB; &mysql_error_logging;
|
||||
|
||||
$stmtC = "UPDATE vicidial_live_agents SET external_recording='$recording_id' where user='$VDADuser';";
|
||||
$affected_rowsC = $dbhA->do($stmtC);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsC; &mysql_error_logging;
|
||||
|
||||
if ($AGILOG) {$agi_string = "-- ROUTING INITIATED RECORDING STARTED : |$affected_rows|$recording_id|$campaign_rec_filename|$stmtA| |$affected_rowsB|$stmtB| |$affected_rowsC|$stmtC|"; &agi_output;}
|
||||
}
|
||||
### END routing-initiated agent call recording for ALLCALLS/ALLFORCE ###
|
||||
}
|
||||
if ($extension_appended_cidname =~ /Y/)
|
||||
{
|
||||
$eac_cbc=0;
|
||||
@@ -3004,7 +3118,7 @@ while ($drop_timer <= $DROP_TIME)
|
||||
}
|
||||
}
|
||||
|
||||
### format the remote server dialstring to get the call to the overflow agent meetme room
|
||||
### format the server dialstring to get the call to the agent meetme room on that server
|
||||
$S='*';
|
||||
$VDADremDIALstr='';
|
||||
if( $VDADserver_ip =~ m/(\S+)\.(\S+)\.(\S+)\.(\S+)/ )
|
||||
@@ -3180,6 +3294,116 @@ while ($drop_timer <= $DROP_TIME)
|
||||
### END REMOTE AGENT SECTION
|
||||
else
|
||||
{
|
||||
if ($routing_initiated_recordings =~ /Y/)
|
||||
{
|
||||
### BEGIN routing-initiated agent call recording for ALLCALLS/ALLFORCE ###
|
||||
|
||||
### look for the recording settings for the user
|
||||
if (length($VDADuser) > 0)
|
||||
{
|
||||
$stmtA = "SELECT vicidial_recording_override,vicidial_recording FROM vicidial_users where user='$VDADuser';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArowsVUrec=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$sthArowsVUrec; &mysql_error_logging;
|
||||
if ($sthArowsVUrec > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
if ($aryA[0] !~ /DISABLED/)
|
||||
{$campaign_recording = $aryA[0];}
|
||||
if ($aryA[1] < 1)
|
||||
{$campaign_recording = 'NONE';}
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
### if recording is enabled then start recording on this call before sending to a remote agent
|
||||
if ($campaign_recording =~ /ALLCALLS|ALLFORCE/)
|
||||
{
|
||||
$stmtA = "SELECT vendor_lead_code FROM vicidial_list where lead_id='$CIDlead_id';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='01XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$vendor_lead_code = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
# get date/time
|
||||
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year = ($year + 1900);
|
||||
$Tyear = ($year - 2000);
|
||||
$mon++;
|
||||
if ($mon < 10) {$mon = "0$mon";}
|
||||
if ($mday < 10) {$mday = "0$mday";}
|
||||
if ($hour < 10) {$hour = "0$hour";}
|
||||
if ($min < 10) {$min = "0$min";}
|
||||
if ($sec < 10) {$sec = "0$sec";}
|
||||
|
||||
$now_date_epoch = time();
|
||||
$now_date = "$year-$mon-$mday $hour:$min:$sec";
|
||||
$recdate = "$year$mon$mday-$hour$min$sec";
|
||||
$tinydate = "$Tyear$mon$mday$hour$min$sec";
|
||||
|
||||
$campaign_rec_filename =~ s/CAMPAIGN/$VDADcampaign/gi;
|
||||
$campaign_rec_filename =~ s/CUSTPHONE/$VDADphone/gi;
|
||||
$campaign_rec_filename =~ s/FULLDATE/$recdate/gi;
|
||||
$campaign_rec_filename =~ s/TINYDATE/$tinydate/gi;
|
||||
$campaign_rec_filename =~ s/EPOCH/$now_date_epoch/gi;
|
||||
$campaign_rec_filename =~ s/AGENT/$VDADuser/gi;
|
||||
$campaign_rec_filename =~ s/VENDORLEADCODE/$vendor_lead_code/gi;
|
||||
$campaign_rec_filename =~ s/LEADID/$CIDlead_id/gi;
|
||||
$campaign_rec_filename =~ s/CALLID/$callerid/gi;
|
||||
$campaign_rec_filename =~ s/\"|\'//gi;
|
||||
|
||||
$conf_silent_prefix='5';
|
||||
$channelrec = "Local/" . $conf_silent_prefix . '' . $VDADconf_exten . "@" . $ext_context;
|
||||
|
||||
### insert a record into the recording_log table
|
||||
$stmtA = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user,vicidial_id) values('$channelrec','$VDADserver_ip','$campaign_rec_exten','$now_date','$now_date_epoch','$campaign_rec_filename','$CIDlead_id','$VDADuser','$uniqueid')";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$recording_id = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($campaign_rec_filename =~ /RECID/)
|
||||
{
|
||||
$campaign_rec_filename =~ s/RECID/$recording_id/gi;
|
||||
|
||||
$stmtA = "UPDATE recording_log SET filename='$campaign_rec_filename' where recording_id='$recording_id';";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
}
|
||||
|
||||
$stmtA="INSERT INTO vicidial_manager values('','','$now_date','NEW','N','$VDADserver_ip','','Originate','$campaign_rec_filename','Channel: $channelrec','Context: $ext_context','Exten: $campaign_rec_exten','Priority: 1','Callerid: $campaign_rec_filename','','','','','');";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
|
||||
$stmtB = "INSERT INTO routing_initiated_recordings (recording_id,filename,launch_time,lead_id,vicidial_id,user,processed) values('$recording_id','$campaign_rec_filename','$now_date','$CIDlead_id','$uniqueid','$VDADuser','0')";
|
||||
$affected_rowsB = $dbhA->do($stmtB);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsB; &mysql_error_logging;
|
||||
|
||||
$stmtC = "UPDATE vicidial_live_agents SET external_recording='$recording_id' where user='$VDADuser';";
|
||||
$affected_rowsC = $dbhA->do($stmtC);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$affected_rowsC; &mysql_error_logging;
|
||||
|
||||
if ($AGILOG) {$agi_string = "-- ROUTING INITIATED RECORDING STARTED : |$affected_rows|$recording_id|$campaign_rec_filename|$stmtA| |$affected_rowsB|$stmtB| |$affected_rowsC|$stmtC|"; &agi_output;}
|
||||
}
|
||||
### END routing-initiated agent call recording for ALLCALLS/ALLFORCE ###
|
||||
}
|
||||
|
||||
if ($extension_appended_cidname =~ /Y/)
|
||||
{
|
||||
$eac_cbc=0;
|
||||
@@ -3993,7 +4217,7 @@ sub trigger_transfer_process
|
||||
# $BEGIN='BEGIN';
|
||||
#
|
||||
# $CLI = "/usr/bin/date >> $PRSTESTfile &";
|
||||
# $CLI = "/root/phone.pl $insert_lead_id$DS$insert_close_id$DS$CLInow_date$DS$VDADuser$DS$phone_number$DS$DS$BEGIN$DS >> $PRSTESTfile &";
|
||||
# $CLI = "/root/phone.pl $CIDlead_id$DS$uniqueid$DS$CLInow_date$DS$VDADuser$DS$phone_number$DS$DS$BEGIN$DS >> $PRSTESTfile &";
|
||||
#
|
||||
# `$CLI`;
|
||||
#
|
||||
@@ -4002,7 +4226,7 @@ sub trigger_transfer_process
|
||||
# ### open the log file for writing ###
|
||||
# open(Pout, ">>$PRSLOGfile")
|
||||
# || die "Can't open $AGILOGfile: $!\n";
|
||||
# print Pout "$now_date|$VDADconf_exten|$VDADuser|$VDADextension|$insert_lead_id|$phone_number|$insert_close_id|$channel_group|$drop_timer|$CLI|\n";
|
||||
# print Pout "$now_date|$VDADconf_exten|$VDADuser|$VDADextension|$CIDlead_id|$phone_number|$uniqueid|$channel_group|$drop_timer|$CLI|\n";
|
||||
# close(Pout);
|
||||
# }
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
# !!!!!!!! IMPORTANT !!!!!!!!!!!!!!!!!!
|
||||
# THIS SCRIPT SHOULD ONLY BE RUN ON ONE SERVER ON YOUR CLUSTER
|
||||
#
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 60717-1214 - changed to DBI by Marin Blu
|
||||
@@ -20,6 +20,7 @@
|
||||
# 120404-1315 - Changed to run only on DB server<you should remove from other servers' crontabs>
|
||||
# 120411-1637 - Added --seconds option
|
||||
# 150710-0907 - Added flush of vicidial_dtmf_log table
|
||||
# 160101-1124 - Added flush of routing_initiated_recordings table
|
||||
#
|
||||
|
||||
### begin parsing run-time options ###
|
||||
@@ -196,12 +197,17 @@ else
|
||||
$stmtA = "DELETE from vicidial_manager where entry_date < '$flush_time';";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
if (!$T) { $affected_rows = $dbhA->do($stmtA);}
|
||||
if (!$Q) {print " - vicidial_manager flush\n";}
|
||||
if (!$Q) {print " - vicidial_manager flush: $affected_rows rows\n";}
|
||||
|
||||
$stmtA = "DELETE from vicidial_dtmf_log where dtmf_time < '$flush_time';";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
if (!$T) { $affected_rows = $dbhA->do($stmtA);}
|
||||
if (!$Q) {print " - vicidial_dtmf_log flush\n";}
|
||||
if (!$Q) {print " - vicidial_dtmf_log flush: $affected_rows rows\n";}
|
||||
|
||||
$stmtA = "DELETE from routing_initiated_recordings where launch_time < '$flush_time';";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
if (!$T) { $affected_rows = $dbhA->do($stmtA);}
|
||||
if (!$Q) {print " - routing_initiated_recordings flush: $affected_rows rows\n";}
|
||||
|
||||
$stmtA = "OPTIMIZE table vicidial_manager;";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
@@ -231,6 +237,20 @@ if (!$T)
|
||||
if (!$Q) {print " - OPTIMIZE vicidial_dtmf_log \n";}
|
||||
|
||||
|
||||
$stmtA = "OPTIMIZE table routing_initiated_recordings;";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
if (!$T)
|
||||
{
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
|
||||
$sthA->finish();
|
||||
}
|
||||
if (!$Q) {print " - OPTIMIZE routing_initiated_recordings \n";}
|
||||
|
||||
|
||||
$stmtA = "OPTIMIZE table vicidial_live_agents;";
|
||||
if($DB){print STDERR "\n|$stmtA|\n";}
|
||||
if (!$T)
|
||||
|
||||
@@ -946,7 +946,8 @@ status_display_ingroup ENUM('ENABLED','DISABLED') default 'ENABLED',
|
||||
customer_gone_seconds SMALLINT(5) UNSIGNED default '30',
|
||||
agent_display_fields VARCHAR(50) default '',
|
||||
am_message_wildcards ENUM('Y','N') default 'N',
|
||||
manual_dial_timeout VARCHAR(3) default ''
|
||||
manual_dial_timeout VARCHAR(3) default '',
|
||||
routing_initiated_recordings ENUM('Y','N') default 'N'
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_lists (
|
||||
@@ -1167,7 +1168,8 @@ after_hours_lead_reset ENUM('Y','N') default 'N',
|
||||
nanq_lead_reset ENUM('Y','N') default 'N',
|
||||
wait_time_lead_reset ENUM('Y','N') default 'N',
|
||||
hold_time_lead_reset ENUM('Y','N') default 'N',
|
||||
status_group_id VARCHAR(20) default ''
|
||||
status_group_id VARCHAR(20) default '',
|
||||
routing_initiated_recordings ENUM('Y','N') default 'N'
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_stations (
|
||||
@@ -3424,6 +3426,19 @@ update_date DATETIME,
|
||||
unique index(server_ip)
|
||||
)ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
CREATE TABLE routing_initiated_recordings (
|
||||
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
|
||||
filename VARCHAR(100),
|
||||
launch_time DATETIME,
|
||||
lead_id INT(9) UNSIGNED,
|
||||
vicidial_id VARCHAR(20),
|
||||
user VARCHAR(20) DEFAULT NULL,
|
||||
processed TINYINT(1) default '0',
|
||||
index(lead_id),
|
||||
index(user),
|
||||
index(processed)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
|
||||
ALTER TABLE vicidial_email_list MODIFY message text character set utf8;
|
||||
|
||||
@@ -3673,4 +3688,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='1445',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1446',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -446,3 +446,22 @@ ALTER TABLE vicidial_user_groups ADD agent_allowed_chat_groups TEXT;
|
||||
UPDATE vicidial_user_groups INNER JOIN system_settings ON system_settings.db_schema_version = 1444 SET agent_allowed_chat_groups=agent_status_viewable_groups;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1445',db_schema_update_date=NOW() where db_schema_version < 1445;
|
||||
|
||||
ALTER TABLE vicidial_campaigns ADD routing_initiated_recordings ENUM('Y','N') default 'N';
|
||||
|
||||
ALTER TABLE vicidial_inbound_groups ADD routing_initiated_recordings ENUM('Y','N') default 'N';
|
||||
|
||||
CREATE TABLE routing_initiated_recordings (
|
||||
recording_id INT(10) UNSIGNED PRIMARY KEY NOT NULL,
|
||||
filename VARCHAR(100),
|
||||
launch_time DATETIME,
|
||||
lead_id INT(9) UNSIGNED,
|
||||
vicidial_id VARCHAR(20),
|
||||
user VARCHAR(20) DEFAULT NULL,
|
||||
processed TINYINT(1) default '0',
|
||||
index(lead_id),
|
||||
index(user),
|
||||
index(processed)
|
||||
) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1446',db_schema_update_date=NOW() where db_schema_version < 1446;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# manager_send.php version 2.12
|
||||
#
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2016 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
|
||||
@@ -128,12 +128,13 @@
|
||||
# 150723-1643 - Added ajax logging
|
||||
# 150915-2039 - Added option for RECID as variable in recording filename
|
||||
# 151230-0910 - Fixed transfer of parked call logging issue #901
|
||||
# 160101-1130 - Added code to handle routing initiated recordings
|
||||
#
|
||||
|
||||
$version = '2.12-75';
|
||||
$build = '151230-0910';
|
||||
$version = '2.12-76';
|
||||
$build = '160101-1130';
|
||||
$php_script = 'manager_send.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mel=2; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=138;
|
||||
$one_mysql_log=0;
|
||||
$SSagent_debug_logging=0;
|
||||
@@ -2197,96 +2198,114 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
|
||||
if ($ACTION=="MonitorConf")
|
||||
{
|
||||
if (preg_match("/RECID/",$filename) )
|
||||
$stmt="SELECT recording_id,filename FROM routing_initiated_recordings where user='$user' and processed='0' order by launch_time desc limit 1;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rir_ct = mysqli_num_rows($rslt);
|
||||
if ($rir_ct > 0)
|
||||
{
|
||||
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename','$lead_id','$user')";
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$recording_id = $row[0];
|
||||
$filename = $row[1];
|
||||
|
||||
$stmt = "UPDATE routing_initiated_recordings SET processed='1' where recording_id='$recording_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02133',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$RLaffected_rows = mysqli_affected_rows($link);
|
||||
if ($RLaffected_rows > 0)
|
||||
{
|
||||
$recording_id = mysqli_insert_id($link);
|
||||
}
|
||||
|
||||
$filename = preg_replace("/RECID/","$recording_id",$filename);
|
||||
|
||||
$stmt = "UPDATE recording_log SET filename='$filename' where recording_id='$recording_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02134',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02135',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02XXX',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02072',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename','$lead_id','$user')";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02073',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$RLaffected_rows = mysqli_affected_rows($link);
|
||||
if ($RLaffected_rows > 0)
|
||||
if (preg_match("/RECID/",$filename) )
|
||||
{
|
||||
$recording_id = mysqli_insert_id($link);
|
||||
}
|
||||
}
|
||||
if ($FROMvdc=='YES')
|
||||
{
|
||||
##### update vla record with recording_id
|
||||
$stmt = "UPDATE vicidial_live_agents SET external_recording='$recording_id' where user='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02117',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename','$lead_id','$user')";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02133',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$RLaffected_rows = mysqli_affected_rows($link);
|
||||
if ($RLaffected_rows > 0)
|
||||
{
|
||||
$recording_id = mysqli_insert_id($link);
|
||||
}
|
||||
|
||||
##### get call type from vicidial_live_agents table
|
||||
$VLA_inOUT='NONE';
|
||||
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02074',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VLA_inOUT_ct = mysqli_num_rows($rslt);
|
||||
if ($VLA_inOUT_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$VLA_inOUT = $row[0];
|
||||
}
|
||||
if ($VLA_inOUT == 'INBOUND')
|
||||
{
|
||||
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
|
||||
$filename = preg_replace("/RECID/","$recording_id",$filename);
|
||||
|
||||
##### look for the vicidial ID in the vicidial_closer_log table
|
||||
$stmt="SELECT closecallid FROM vicidial_closer_log where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by closecallid desc limit 1;";
|
||||
$stmt = "UPDATE recording_log SET filename='$filename' where recording_id='$recording_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02134',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02135',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
else
|
||||
{
|
||||
##### look for the vicidial ID in the vicidial_log table
|
||||
$stmt="SELECT uniqueid FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';";
|
||||
}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02075',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VM_mancall_ct = mysqli_num_rows($rslt);
|
||||
if ($VM_mancall_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$VDvicidial_id = $row[0];
|
||||
|
||||
$stmt = "UPDATE recording_log SET vicidial_id='$VDvicidial_id' where recording_id='$recording_id';";
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Originate','$filename','Channel: $channel','Context: $ext_context','Exten: $exten','Priority: $ext_priority','Callerid: $filename','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02076',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02072',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
$stmt = "INSERT INTO recording_log (channel,server_ip,extension,start_time,start_epoch,filename,lead_id,user) values('$channel','$server_ip','$exten','$NOW_TIME','$StarTtime','$filename','$lead_id','$user')";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02073',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
$RLaffected_rows = mysqli_affected_rows($link);
|
||||
if ($RLaffected_rows > 0)
|
||||
{
|
||||
$recording_id = mysqli_insert_id($link);
|
||||
}
|
||||
}
|
||||
if ($FROMvdc=='YES')
|
||||
{
|
||||
##### update vla record with recording_id
|
||||
$stmt = "UPDATE vicidial_live_agents SET external_recording='$recording_id' where user='$user';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02117',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
|
||||
##### get call type from vicidial_live_agents table
|
||||
$VLA_inOUT='NONE';
|
||||
$stmt="SELECT comments FROM vicidial_live_agents where user='$user' order by last_update_time desc limit 1;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02074',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VLA_inOUT_ct = mysqli_num_rows($rslt);
|
||||
if ($VLA_inOUT_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$VLA_inOUT = $row[0];
|
||||
}
|
||||
if ($VLA_inOUT == 'INBOUND')
|
||||
{
|
||||
$four_hours_ago = date("Y-m-d H:i:s", mktime(date("H")-4,date("i"),date("s"),date("m"),date("d"),date("Y")));
|
||||
|
||||
##### look for the vicidial ID in the vicidial_closer_log table
|
||||
$stmt="SELECT closecallid FROM vicidial_closer_log where lead_id='$lead_id' and user='$user' and call_date > \"$four_hours_ago\" order by closecallid desc limit 1;";
|
||||
}
|
||||
else
|
||||
{
|
||||
##### look for the vicidial ID in the vicidial_log table
|
||||
$stmt="SELECT uniqueid FROM vicidial_log where uniqueid='$uniqueid' and lead_id='$lead_id';";
|
||||
}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02075',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$VM_mancall_ct = mysqli_num_rows($rslt);
|
||||
if ($VM_mancall_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$VDvicidial_id = $row[0];
|
||||
|
||||
$stmt = "UPDATE recording_log SET vicidial_id='$VDvicidial_id' where recording_id='$recording_id';";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02076',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
##### StopMonitorConf steps #####
|
||||
else
|
||||
{
|
||||
@@ -2319,8 +2338,16 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02118',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
}
|
||||
|
||||
$stmt="SELECT recording_id,start_epoch FROM recording_log where filename='$filename'";
|
||||
|
||||
$rec_searchSQL = "filename='$filename'";
|
||||
if (preg_match("/^ID:/",$filename))
|
||||
{
|
||||
$recording_id = $filename;
|
||||
$recording_id = preg_replace("/^ID:/",'',$recording_id);
|
||||
$rec_searchSQL = "recording_id='$recording_id'";
|
||||
}
|
||||
|
||||
$stmt="SELECT recording_id,start_epoch,filename FROM recording_log where $rec_searchSQL;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02078',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -2328,13 +2355,14 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
if ($rec_count>0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$recording_id = $row[0];
|
||||
$start_time = $row[1];
|
||||
$recording_id = $row[0];
|
||||
$start_time = $row[1];
|
||||
$filename = $row[2];
|
||||
$length_in_sec = ($StarTtime - $start_time);
|
||||
$length_in_min = ($length_in_sec / 60);
|
||||
$length_in_min = sprintf("%8.2f", $length_in_min);
|
||||
|
||||
$stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' $uniqueidSQL where filename='$filename'";
|
||||
$stmt = "UPDATE recording_log set end_time='$NOW_TIME',end_epoch='$StarTtime',length_in_sec=$length_in_sec,length_in_min='$length_in_min' $uniqueidSQL where $rec_searchSQL;";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'02079',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
@@ -2348,14 +2376,14 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
# $rec_count = intval(mysqli_num_rows($rslt) / 2);
|
||||
$rec_count = mysqli_num_rows($rslt);
|
||||
$h=0;
|
||||
while ($rec_count>$h)
|
||||
while ($rec_count>$h)
|
||||
{
|
||||
$rowx=mysqli_fetch_row($rslt);
|
||||
$HUchannel[$h] = $rowx[0];
|
||||
$h++;
|
||||
}
|
||||
$i=0;
|
||||
while ($h>$i)
|
||||
while ($h>$i)
|
||||
{
|
||||
$stmt="INSERT INTO vicidial_manager values('','','$NOW_TIME','NEW','N','$server_ip','','Hangup','RH12345$StarTtime$i','Channel: $HUchannel[$i]','','','','','','','','','');";
|
||||
if ($format=='debug') {echo "\n<!-- $stmt -->";}
|
||||
@@ -2364,7 +2392,7 @@ if ( ($ACTION=="MonitorConf") || ($ACTION=="StopMonitorConf") )
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
echo _QXZ("%1s command sent for Channel %2s on %3s",0,'',$ACTION,$channel,$server_ip)."\nFilename: $filename\nRecorDing_ID: $recording_id\n RECORDING WILL LAST UP TO 60 MINUTES\n";
|
||||
echo _QXZ("%1s command sent for Channel %2s on %3s",0,'',$ACTION,$channel,$server_ip)."\nFilename: $filename\nRecorDing_ID: $recording_id\n RECORDING WILL LAST UP TO 60 MINUTES\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# vicidial.php - the web-based version of the astVICIDIAL client application
|
||||
#
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# Other scripts that this application depends on:
|
||||
# - vdc_db_query.php: Updates information in the database
|
||||
@@ -513,10 +513,11 @@
|
||||
# 151229-2240 - Fixed issue #907, script reload after canceling manual 3way call
|
||||
# 151229-2331 - Added campaign setting for manual_dial_timeout, Issue #903
|
||||
# 151230-0911 - Fixed transfer of parked call logging issue #901
|
||||
# 160101-1131 - Added code to handle routing initiated recordings
|
||||
#
|
||||
|
||||
$version = '2.12-482c';
|
||||
$build = '151230-0911';
|
||||
$version = '2.12-483c';
|
||||
$build = '160101-1131';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=85;
|
||||
$one_mysql_log=0;
|
||||
@@ -2889,6 +2890,13 @@ else
|
||||
$vliaLIaffected_rows = mysqli_affected_rows($link);
|
||||
echo "<!-- old vicidial_live_inbound_agents records cleared: |$vliaLIaffected_rows| -->\n";
|
||||
|
||||
$stmt="UPDATE routing_initiated_recordings set processed='2' where user='$VD_login' and processed='0';";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01XXX',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
$RIRaffected_rows = mysqli_affected_rows($link);
|
||||
echo "<!-- routing_initiated_recordings invalidated: |$RIRaffected_rows| -->\n";
|
||||
|
||||
$VULhostname = php_uname('n');
|
||||
$VULservername = $_SERVER['SERVER_NAME'];
|
||||
if (strlen($VULhostname)<1) {$VULhostname='X';}
|
||||
@@ -5931,6 +5939,7 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
{
|
||||
var RClookResponse = null;
|
||||
// document.getElementById("busycallsdebug").innerHTML = confmonitor_query;
|
||||
// alert(confmonitor_query);
|
||||
// alert(xmlhttp.responseText);
|
||||
RClookResponse = xmlhttp.responseText;
|
||||
var RClookResponse_array=RClookResponse.split("\n");
|
||||
@@ -5958,6 +5967,19 @@ function set_length(SLnumber,SLlength_goal,SLdirection)
|
||||
}
|
||||
document.getElementById("RecorDingFilename").innerHTML = RecDispNamE;
|
||||
document.getElementById("RecorDID").innerHTML = RClookID_array[1];
|
||||
|
||||
if (taskconfrectype == 'MonitorConf')
|
||||
{
|
||||
var conf_rec_start_html = "<a href=\"#\" onclick=\"conf_send_recording('StopMonitorConf','" + taskconfrec + "','ID:" + recording_id + "','','','YES');return false;\"><img src=\"./images/<?php echo _QXZ("vdc_LB_stoprecording.gif") ?>\" border=\"0\" alt=\"Stop Recording\" /></a>";
|
||||
if (LIVE_campaign_recording == 'ALLFORCE')
|
||||
{
|
||||
document.getElementById("RecorDControl").innerHTML = "<img src=\"./images/<?php echo _QXZ("vdc_LB_startrecording_OFF.gif") ?>\" border=\"0\" alt=\"Start Recording\" />";
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("RecorDControl").innerHTML = conf_rec_start_html;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -2,7 +2,7 @@
|
||||
# admin_listloader_fourth_gen.php - version 2.12
|
||||
# (based upon - new_listloader_superL.php script)
|
||||
#
|
||||
# Copyright (C) 2015 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2016 Matt Florell,Joe Johnson <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# ViciDial web-based lead loader from formatted file
|
||||
#
|
||||
@@ -63,10 +63,11 @@
|
||||
# 150516-1136 - Fixed conflict with functions.php
|
||||
# 150728-0732 - Added state fullname to abbreviation conversion feature (state_conversion)
|
||||
# 150810-0750 - Added compatibility for custom fields data option
|
||||
# 160102-1039 - Better special characters support
|
||||
#
|
||||
|
||||
$version = '2.12-61';
|
||||
$build = '150810-0750';
|
||||
$version = '2.12-62';
|
||||
$build = '160102-1039';
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
@@ -224,6 +225,7 @@ $date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
|
||||
$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
@@ -361,9 +363,11 @@ while ($stat_num_rows > $snr_count)
|
||||
|
||||
#if ($DB) {print "SEED TIME $secX : $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF\n";}
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
echo "<html>\n";
|
||||
echo "<head>\n";
|
||||
echo "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
|
||||
echo "<!-- VERSION: $version BUILD: $build -->\n";
|
||||
echo "<!-- SEED TIME $secX: $year-$mon-$mday $hour:$min:$sec LOCAL GMT OFFSET NOW: $LOCAL_GMT_OFF DST: $isdst -->\n";
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# just needs to enter the leadID and then they can view and modify the
|
||||
# information in the record for that lead
|
||||
#
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
#
|
||||
@@ -73,6 +73,7 @@
|
||||
# 150908-1531 - Fixed input lengths for several standard fields to match DB
|
||||
# 150917-1301 - Added dynamic default field maxlengths based on DB schema
|
||||
# 150923-0700 - Fixed security issues with user access, issue #894
|
||||
# 160102-1238 - Fixed issues with special characters, added $htmlconvert option
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -201,6 +202,7 @@ $date = date("r");
|
||||
$ip = getenv("REMOTE_ADDR");
|
||||
$browser = getenv("HTTP_USER_AGENT");
|
||||
|
||||
$htmlconvert=1;
|
||||
$nonselectable_statuses=0;
|
||||
if (file_exists('options.php'))
|
||||
{
|
||||
@@ -269,6 +271,7 @@ if ($auth < 1)
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
|
||||
$rights_stmt = "SELECT modify_leads,selected_language from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rights_rslt=mysql_to_mysqli($rights_stmt, $link);
|
||||
@@ -469,6 +472,8 @@ $vdc_form_display = 'vdc_form_display.php';
|
||||
if (preg_match("/cf_encrypt/",$active_modules))
|
||||
{$vdc_form_display = 'vdc_form_display_encrypt.php';}
|
||||
|
||||
header ("Content-type: text/html; charset=utf-8");
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
@@ -607,7 +612,7 @@ if ($end_call > 0)
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
echo _QXZ("information modified")."<BR><BR>\n";
|
||||
echo "<a href=\"$PHP_SELF?lead_id=$lead_id&DB=$DB&archive_search=$archive_search&archive_log=$archive_log\">Go back to the lead modification page</a><BR><BR>\n";
|
||||
echo "<a href=\"$PHP_SELF?lead_id=$lead_id&DB=$DB&archive_search=$archive_search&archive_log=$archive_log\">"._QXZ("Go back to the lead modification page")."</a><BR><BR>\n";
|
||||
echo "<form><input type=button value=\""._QXZ("Close This Window")."\" onClick=\"javascript:window.close();\"></form>\n";
|
||||
|
||||
### LOG INSERTION Admin Log Table ###
|
||||
@@ -1272,28 +1277,28 @@ else
|
||||
else
|
||||
{
|
||||
echo "<tr><td align=right>$label_title: </td><td align=left><input type=text name=title size=4 maxlength=$MAXtitle value=\"$title\"> \n";
|
||||
echo "$label_first_name: <input type=text name=first_name size=15 maxlength=$MAXfirst_name value=\"".htmlentities($first_name)."\"> </td></tr>\n";
|
||||
echo "<tr><td align=right>$label_middle_initial: </td><td align=left><input type=text name=middle_initial size=4 maxlength=$MAXmiddle_initial value=\"".htmlentities($middle_initial)."\"> \n";
|
||||
echo " $label_last_name: <input type=text name=last_name size=15 maxlength=$MAXlast_name value=\"".htmlentities($last_name)."\"> </td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address1 : </td><td align=left><input type=text name=address1 size=40 maxlength=$MAXaddress1 value=\"".htmlentities($address1)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address2 : </td><td align=left><input type=text name=address2 size=40 maxlength=$MAXaddress2 value=\"".htmlentities($address2)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address3 : </td><td align=left><input type=text name=address3 size=40 maxlength=$MAXaddress3 value=\"".htmlentities($address3)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_city : </td><td align=left><input type=text name=city size=40 maxlength=$MAXcity value=\"".htmlentities($city)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_state: </td><td align=left><input type=text name=state size=2 maxlength=$MAXstate value=\"".htmlentities($state)."\"> \n";
|
||||
echo " $label_postal_code: <input type=text name=postal_code size=10 maxlength=$MAXpostal_code value=\"".htmlentities($postal_code)."\"> </td></tr>\n";
|
||||
echo "$label_first_name: <input type=text name=first_name size=15 maxlength=$MAXfirst_name value=\"".htmlparse($first_name)."\"> </td></tr>\n";
|
||||
echo "<tr><td align=right>$label_middle_initial: </td><td align=left><input type=text name=middle_initial size=4 maxlength=$MAXmiddle_initial value=\"".htmlparse($middle_initial)."\"> \n";
|
||||
echo " $label_last_name: <input type=text name=last_name size=15 maxlength=$MAXlast_name value=\"".htmlparse($last_name)."\"> </td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address1 : </td><td align=left><input type=text name=address1 size=40 maxlength=$MAXaddress1 value=\"".htmlparse($address1)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address2 : </td><td align=left><input type=text name=address2 size=40 maxlength=$MAXaddress2 value=\"".htmlparse($address2)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_address3 : </td><td align=left><input type=text name=address3 size=40 maxlength=$MAXaddress3 value=\"".htmlparse($address3)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_city : </td><td align=left><input type=text name=city size=40 maxlength=$MAXcity value=\"".htmlparse($city)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_state: </td><td align=left><input type=text name=state size=2 maxlength=$MAXstate value=\"".htmlparse($state)."\"> \n";
|
||||
echo " $label_postal_code: <input type=text name=postal_code size=10 maxlength=$MAXpostal_code value=\"".htmlparse($postal_code)."\"> </td></tr>\n";
|
||||
|
||||
echo "<tr><td align=right>$label_province : </td><td align=left><input type=text name=province size=40 maxlength=$MAXprovince value=\"".htmlentities($province)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>"._QXZ("Country")." : </td><td align=left><input type=text name=country_code size=3 maxlength=$MAXcountry_code value=\"".htmlentities($country_code)."\"> \n";
|
||||
echo " "._QXZ("Date of Birth").": <input type=text name=date_of_birth size=12 maxlength=10 value=\"".htmlentities($date_of_birth)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_phone_number : </td><td align=left><input type=text name=phone_number size=18 maxlength=$MAXphone_number value=\"".htmlentities($phone_number)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_phone_code : </td><td align=left><input type=text name=phone_code size=10 maxlength=$MAXphone_code value=\"".htmlentities($phone_code)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_alt_phone : </td><td align=left><input type=text name=alt_phone size=12 maxlength=$MAXalt_phone value=\"".htmlentities($alt_phone)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_email : </td><td align=left><input type=text name=email size=40 maxlength=$MAXemail value=\"".htmlentities($email)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_security_phrase : </td><td align=left><input type=text name=security size=30 maxlength=$MAXsecurity_phrase value=\"".htmlentities($security)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_vendor_lead_code : </td><td align=left><input type=text name=vendor_id size=30 maxlength=$MAXvendor_lead_code value=\"".htmlentities($vendor_id)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>"._QXZ("Rank")." : </td><td align=left><input type=text name=rank size=7 maxlength=5 value=\"".htmlentities($rank)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>"._QXZ("Owner")." : </td><td align=left><input type=text name=owner size=22 maxlength=$MAXowner value=\"".htmlentities($owner)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_comments : </td><td align=left><TEXTAREA name=comments ROWS=3 COLS=65>".htmlentities($comments)."</TEXTAREA></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_province : </td><td align=left><input type=text name=province size=40 maxlength=$MAXprovince value=\"".htmlparse($province)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>"._QXZ("Country")." : </td><td align=left><input type=text name=country_code size=3 maxlength=$MAXcountry_code value=\"".htmlparse($country_code)."\"> \n";
|
||||
echo " "._QXZ("Date of Birth").": <input type=text name=date_of_birth size=12 maxlength=10 value=\"".htmlparse($date_of_birth)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_phone_number : </td><td align=left><input type=text name=phone_number size=18 maxlength=$MAXphone_number value=\"".htmlparse($phone_number)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_phone_code : </td><td align=left><input type=text name=phone_code size=10 maxlength=$MAXphone_code value=\"".htmlparse($phone_code)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_alt_phone : </td><td align=left><input type=text name=alt_phone size=12 maxlength=$MAXalt_phone value=\"".htmlparse($alt_phone)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_email : </td><td align=left><input type=text name=email size=40 maxlength=$MAXemail value=\"".htmlparse($email)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_security_phrase : </td><td align=left><input type=text name=security size=30 maxlength=$MAXsecurity_phrase value=\"".htmlparse($security)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_vendor_lead_code : </td><td align=left><input type=text name=vendor_id size=30 maxlength=$MAXvendor_lead_code value=\"".htmlparse($vendor_id)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>"._QXZ("Rank")." : </td><td align=left><input type=text name=rank size=7 maxlength=5 value=\"".htmlparse($rank)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>"._QXZ("Owner")." : </td><td align=left><input type=text name=owner size=22 maxlength=$MAXowner value=\"".htmlparse($owner)."\"></td></tr>\n";
|
||||
echo "<tr><td align=right>$label_comments : </td><td align=left><TEXTAREA name=comments ROWS=3 COLS=65>".htmlparse($comments)."</TEXTAREA></td></tr>\n";
|
||||
}
|
||||
|
||||
if ($lead_id != 'NEW')
|
||||
@@ -1830,7 +1835,6 @@ else
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level >= 9 and modify_leads='1';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
if ($non_latin > 0) {$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$admin_display=$row[0];
|
||||
@@ -1893,5 +1897,18 @@ echo "<font size=0>\n\n\n<br><br><br>\n"._QXZ("script runtime").": $RUNtime "._Q
|
||||
|
||||
exit;
|
||||
|
||||
function htmlparse($text)
|
||||
{
|
||||
global $htmlconvert;
|
||||
if ($htmlconvert > 0)
|
||||
{
|
||||
return htmlentities($text);
|
||||
}
|
||||
else
|
||||
{
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
# 151229-1659 - Added servers-gather_asterisk_output entry
|
||||
# 151229-2302 - Added campaigns-manual_dial_timeout entry
|
||||
# 151231-0839 - Added user_groups-agent_allowed_chat_groups entry
|
||||
# 160101-0933 - Added entries for routing_initiated_recordings in campaigns and in-groups
|
||||
#
|
||||
|
||||
|
||||
@@ -1337,6 +1338,11 @@ if ($SSoutbound_autodial_active > 0)
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Recording Delay"); ?> -</B><?php echo _QXZ("For ALLCALLS and ALLFORCE recording only. This setting will delay the starting of the recording on all calls for the number of seconds specified in this field. Default is 0."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="campaigns-routing_initiated_recordings">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Routing Initiated Recording"); ?> -</B><?php echo _QXZ("This option, if enabled, allows you to have the call routing script for Outbound auto-dial calls trigger the agent call recording instead of the agent screen. This option will only work if the recording option is set to ALLCALLS or ALLFORCE. This will not work with agent manual dialed calls. Default is N for disabled."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="campaigns-per_call_notes">
|
||||
<BR>
|
||||
@@ -2627,6 +2633,11 @@ if ($SSqc_features_active > 0)
|
||||
<BR>
|
||||
<B><?php echo _QXZ("In-Group Recording Override"); ?> -</B><?php echo _QXZ("This field allows for the overriding of the campaign call recording setting. This setting can be overridden by the user recording override setting. DISABLED will not override the campaign recording setting. NEVER will disable recording on the client. ONDEMAND is the default and allows the agent to start and stop recording as needed. ALLCALLS will start recording on the client whenever a call is sent to an agent. ALLFORCE will start recording on the client whenever a call is sent to an agent giving the agent no option to stop recording."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="inbound_groups-routing_initiated_recordings">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Routing Initiated Recording"); ?> -</B><?php echo _QXZ("This option, if enabled, allows you to have the call routing script for Inbound calls trigger the agent call recording instead of the agent screen. This option will only work if the recording option is set to ALLCALLS or ALLFORCE. This will not work with inbound on-hook agents. Default is N for disabled."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="inbound_groups-ingroup_rec_filename">
|
||||
<BR>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
# options.php - manually defined options for vicidial admin scripts
|
||||
#
|
||||
# Copyright (C) 2015 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2016 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# rename this file to options.php for the settings here to go into effect
|
||||
#
|
||||
@@ -18,6 +18,7 @@
|
||||
# 140624-1422 - Added droppedOFtotal options.php option
|
||||
# 150619-0135 - Added DROPANSWERpercent_adjustment options.php option for AST_VDADstats.php
|
||||
# 150909-1417 - Added $active_only_default_campaigns option for admin.php
|
||||
# 160102-1249 - Added htmlconvert option for modify lead pages
|
||||
#
|
||||
|
||||
# used by the realtime_report.php script
|
||||
@@ -88,4 +89,8 @@ $DROPANSWERpercent_adjustment = 0;
|
||||
|
||||
# Display only active campaigns by default in admin.php Campaigns Listings page
|
||||
$active_only_default_campaigns = 0;
|
||||
|
||||
# convert data to html readable in modify lead page fields
|
||||
$htmlconvert=1;
|
||||
|
||||
?>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# sheet2tab.pl - Convert spreadsheet to tab-delimited text file version 2.12
|
||||
#
|
||||
# Copyright (C) 2015 Matt Florell & Michael Cargile <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2016 Matt Florell & Michael Cargile <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# Lead file conversion and scrubbing script. This is the first stage in the lead loading process.
|
||||
#
|
||||
@@ -34,6 +34,7 @@
|
||||
# 110927-1750 - Fixed issue with improperly CSV files locking up servers <mikec>
|
||||
# 130619-2310 - Fixed missing XLSX perl module declaration
|
||||
# 150312-1547 - Allow for single quotes in vicidial_list data fields
|
||||
# 160102-0958 - Fix for special characters, issue #792
|
||||
#
|
||||
|
||||
# disable when not debugging
|
||||
@@ -43,6 +44,7 @@
|
||||
use Spreadsheet::Read;
|
||||
use Spreadsheet::XLSX;
|
||||
use File::Basename;
|
||||
use open ':std', ':encoding(UTF-8)';
|
||||
|
||||
|
||||
sub scrub_lead_field
|
||||
|
||||
Reference in New Issue
Block a user