Added the ability for customers to be able to enter a new phone number to be
called back on for the CallerID CallBack Queue feature Added the new Callmenu Survey Report(linked as "Callmenu Agent" in Reports) git-svn-id: svn://192.168.202.10@3011 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -329,6 +329,11 @@ OTHER CHANGES:
|
||||
sent to an agent and/or a back-end URL to be submitted when an agent has
|
||||
been in a dead call for X number of seconds.
|
||||
|
||||
90. Added the ability for customers to be able to enter a new phone number to be
|
||||
called back on for the CallerID CallBack Queue feature.
|
||||
|
||||
91. Added the new Callmenu Survey Report(linked as "Callmenu Agent" in Reports).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -228,6 +228,7 @@
|
||||
# 180520-1802 - Added enter_ingroup_url feature
|
||||
# 180521-0736 - Changed closer logs for AGENTDIRECT calls to log destination user
|
||||
# 180601-0932 - Added user variable sending option on enter_ingroup_url feature
|
||||
# 180806-0809 - Added CID callback number validation and change features
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||
@@ -239,7 +240,7 @@ $wait_prompt_runs=0;
|
||||
$at='@';
|
||||
$S='*';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=247;
|
||||
$mysql_log_count=256;
|
||||
$one_mysql_log=0;
|
||||
$dial_ingroup_flag=0;
|
||||
$called_count=1;
|
||||
@@ -760,7 +761,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,routing_initiated_recordings,on_hook_cid_number,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit,closing_time_action,closing_time_now_trigger,closing_time_filename,closing_time_end_filename,closing_time_lead_reset,closing_time_option_exten,closing_time_option_callmenu,closing_time_option_voicemail,closing_time_option_xfer_group,closing_time_option_callback_list_id,add_lead_timezone,populate_lead_source,populate_lead_vendor,enter_ingroup_url 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,on_hook_cid_number,populate_lead_province,areacode_filter,areacode_filter_seconds,areacode_filter_action,areacode_filter_action_value,populate_state_areacode,inbound_survey,inbound_survey_filename,inbound_survey_accept_digit,closing_time_action,closing_time_now_trigger,closing_time_filename,closing_time_end_filename,closing_time_lead_reset,closing_time_option_exten,closing_time_option_callmenu,closing_time_option_voicemail,closing_time_option_xfer_group,closing_time_option_callback_list_id,add_lead_timezone,populate_lead_source,populate_lead_vendor,enter_ingroup_url,cid_cb_confirm_number, cid_cb_invalid_filter_phone_group, cid_cb_valid_length, cid_cb_valid_filename, cid_cb_confirmed_filename, cid_cb_enter_filename, cid_cb_you_entered_filename, cid_cb_press_to_confirm_filename, cid_cb_invalid_filename, cid_cb_reenter_filename, cid_cb_error_filename 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;
|
||||
@@ -883,6 +884,17 @@ if ($sthArows > 0)
|
||||
$populate_lead_source = $aryA[105];
|
||||
$populate_lead_vendor = $aryA[106];
|
||||
$enter_ingroup_url = $aryA[107];
|
||||
$cid_cb_confirm_number = $aryA[108];
|
||||
$cid_cb_invalid_filter_phone_group = $aryA[109];
|
||||
$cid_cb_valid_length = $aryA[110];
|
||||
$cid_cb_valid_filename = $aryA[111];
|
||||
$cid_cb_confirmed_filename = $aryA[112];
|
||||
$cid_cb_enter_filename = $aryA[113];
|
||||
$cid_cb_you_entered_filename = $aryA[114];
|
||||
$cid_cb_press_to_confirm_filename = $aryA[115];
|
||||
$cid_cb_invalid_filename = $aryA[116];
|
||||
$cid_cb_reenter_filename = $aryA[117];
|
||||
$cid_cb_error_filename = $aryA[118];
|
||||
|
||||
$custom_call_id='';
|
||||
if ($uniqueid_status_display =~ /ENABLED/)
|
||||
@@ -5146,10 +5158,17 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
}
|
||||
if ( ($wait_time_option =~ /CALLERID_CALLBACK/) && ($wait_in_queue < 2) )
|
||||
{
|
||||
##### CID Callback Number Validation if enabled #####
|
||||
$cid_cb_number = $phone_number;
|
||||
|
||||
if ( ($cid_cb_confirm_number !~ /^NO/i) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_filename) > 0) && (length($cid_cb_confirmed_filename) > 0) && (length($cid_cb_enter_filename) > 0) && (length($cid_cb_you_entered_filename) > 0) && (length($cid_cb_press_to_confirm_filename) > 0) && (length($cid_cb_invalid_filename) > 0) && (length($cid_cb_reenter_filename) > 0) && (length($cid_cb_error_filename) > 0) )
|
||||
{
|
||||
&cid_cb_number_validation;
|
||||
}
|
||||
if (length($wait_time_option_exten)>0)
|
||||
{$DROPexten = "$wait_time_option_exten";}
|
||||
# if callerid is not valid do not execute
|
||||
if ( ( length($phone_number) > 6 ) && ( $phone_number > 0) )
|
||||
if ( ( length($cid_cb_number) > 6 ) && ( $cid_cb_number > 0) )
|
||||
{
|
||||
$entry_list_idSQLa=''; $entry_list_idSQLb='';
|
||||
if ( ($enable_did_entry_list_id > 0) && ($entry_list_id > 0) )
|
||||
@@ -5165,7 +5184,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
||||
{&lead_timezone_process;}
|
||||
### insert a record into the vicidial_list table
|
||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$wait_time_option_callback_list_id','N','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$wait_time_option_callback_list_id','N','$phone_code','$cid_cb_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02089'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||
@@ -5186,7 +5205,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
$launch = $PATHhome . "/AST_send_URL.pl";
|
||||
$launch .= " --SYSLOG" if ($SYSLOG);
|
||||
$launch .= " --lead_id=" . $CALLBACK_insert_lead_id;
|
||||
$launch .= " --phone_number=" . $phone_number;
|
||||
$launch .= " --phone_number=" . $cid_cb_number;
|
||||
$launch .= " --user=";
|
||||
$launch .= " --call_type=IN";
|
||||
$launch .= " --campaign=" . $channel_group;
|
||||
@@ -5211,17 +5230,30 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
else
|
||||
{
|
||||
$wait_in_queue = 2; #continue waiting
|
||||
|
||||
### Set the call time back to original call time
|
||||
$stmtA = "UPDATE vicidial_auto_calls set call_time='$ORIGINAL_call_time' where callerid='$callerid' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02152'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- Reset original call time: |$affected_rows|$ORIGINAL_call_time|$callerid|"; &agi_output;}
|
||||
}
|
||||
}
|
||||
if ( ($wait_time_option =~ /CALLBACK_QUEUE/) && ($wait_in_queue < 2) )
|
||||
{
|
||||
##### CID Callback Number Validation if enabled #####
|
||||
$cid_cb_number = $phone_number;
|
||||
|
||||
if ( ($cid_cb_confirm_number !~ /^NO/i) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_filename) > 0) && (length($cid_cb_confirmed_filename) > 0) && (length($cid_cb_enter_filename) > 0) && (length($cid_cb_you_entered_filename) > 0) && (length($cid_cb_press_to_confirm_filename) > 0) && (length($cid_cb_invalid_filename) > 0) && (length($cid_cb_reenter_filename) > 0) && (length($cid_cb_error_filename) > 0) )
|
||||
{
|
||||
&cid_cb_number_validation;
|
||||
}
|
||||
if (length($wait_time_option_exten)>0)
|
||||
{$DROPexten = "$wait_time_option_exten";}
|
||||
# if callerid is not valid do not execute
|
||||
if ( ( length($phone_number) > 6 ) && ( $phone_number > 0) )
|
||||
if ( ( length($cid_cb_number) > 6 ) && ( $cid_cb_number > 0) )
|
||||
{
|
||||
### insert a record into the vicidial_inbound_callback_queue table
|
||||
$stmtC = "INSERT INTO vicidial_inbound_callback_queue SET icbq_date=NOW(),icbq_status='NEW',icbq_phone_number='$phone_number',icbq_phone_code='$phone_code',icbq_nextday_choice='U',lead_id='$insert_lead_id',group_id='$channel_group',queue_priority='$queue_priority',call_date='$SQLdateBEGIN',gmt_offset_now='$local_gmt';";
|
||||
$stmtC = "INSERT INTO vicidial_inbound_callback_queue SET icbq_date=NOW(),icbq_status='NEW',icbq_phone_number='$cid_cb_number',icbq_phone_code='$phone_code',icbq_nextday_choice='U',lead_id='$insert_lead_id',group_id='$channel_group',queue_priority='$queue_priority',call_date='$SQLdateBEGIN',gmt_offset_now='$local_gmt';";
|
||||
$affected_rows = $dbhA->do($stmtC);
|
||||
$dbhP=$dbhA; $stmtA=$stmtC; $mysql_count='02228'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||
@@ -5236,7 +5268,20 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($AGILOG) {$agi_string = "VDAD vicidial_inbound_callback_queue insert |$CALLBACK_insert_icbq_id|$stmtC|"; &agi_output;}
|
||||
$affected_rowsD=0; $affected_rowsE=0;
|
||||
if ($cid_cb_number ne $phone_number)
|
||||
{
|
||||
### update the vicidial_list phone_number if different
|
||||
$stmtD = "UPDATE vicidial_list SET phone_number='$cid_cb_number' where lead_id='$insert_lead_id';";
|
||||
$affected_rowsD = $dbhA->do($stmtD);
|
||||
$dbhP=$dbhA; $stmtA=$stmtD; $mysql_count='02248'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
|
||||
$stmtE = "INSERT INTO vicidial_call_notes SET lead_id='$insert_lead_id', call_date='$SQLdateBEGIN', vicidial_id='$insert_close_id', call_notes='CID Callback new number: $cid_cb_number old number: $phone_number';";
|
||||
$affected_rowsE = $dbhA->do($stmtE);
|
||||
$dbhP=$dbhA; $stmtA=$stmtE; $mysql_count='02249'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
}
|
||||
|
||||
if ($AGILOG) {$agi_string = "VDAD vicidial_inbound_callback_queue insert |$CALLBACK_insert_icbq_id|$stmtC|$affected_rowsD|$stmtD|$affected_rowsE|$stmtE|"; &agi_output;}
|
||||
|
||||
$DROPexten = "8300";
|
||||
|
||||
@@ -5245,6 +5290,12 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
else
|
||||
{
|
||||
$wait_in_queue = 2; #continue waiting
|
||||
|
||||
### Set the call time back to original call time
|
||||
$stmtA = "UPDATE vicidial_auto_calls set call_time='$ORIGINAL_call_time' where callerid='$callerid' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02152'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- Reset original call time: |$affected_rows|$ORIGINAL_call_time|$callerid|"; &agi_output;}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5647,10 +5698,17 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
}
|
||||
if ( ($hold_time_option =~ /CALLERID_CALLBACK/) && ($wait_in_queue < 2) )
|
||||
{
|
||||
##### CID Callback Number Validation if enabled #####
|
||||
$cid_cb_number = $phone_number;
|
||||
|
||||
if ( ($cid_cb_confirm_number !~ /^NO/i) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_filename) > 0) && (length($cid_cb_confirmed_filename) > 0) && (length($cid_cb_enter_filename) > 0) && (length($cid_cb_you_entered_filename) > 0) && (length($cid_cb_press_to_confirm_filename) > 0) && (length($cid_cb_invalid_filename) > 0) && (length($cid_cb_reenter_filename) > 0) && (length($cid_cb_error_filename) > 0) )
|
||||
{
|
||||
&cid_cb_number_validation;
|
||||
}
|
||||
if (length($hold_time_option_exten)>0)
|
||||
{$DROPexten = "$hold_time_option_exten";}
|
||||
# if callerid is not valid do not execute
|
||||
if ( ( length($phone_number) > 6 ) && ( $phone_number > 0) )
|
||||
if ( ( length($cid_cb_number) > 6 ) && ( $cid_cb_number > 0) )
|
||||
{
|
||||
$entry_list_idSQLa=''; $entry_list_idSQLb='';
|
||||
if ( ($enable_did_entry_list_id > 0) && ($entry_list_id > 0) )
|
||||
@@ -5666,7 +5724,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
||||
{&lead_timezone_process;}
|
||||
### insert a record into the vicidial_list table
|
||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$hold_time_option_callback_list_id','N','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$hold_time_option_callback_list_id','N','$phone_code','$cid_cb_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02089'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||
@@ -5687,7 +5745,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
$launch = $PATHhome . "/AST_send_URL.pl";
|
||||
$launch .= " --SYSLOG" if ($SYSLOG);
|
||||
$launch .= " --lead_id=" . $CALLBACK_insert_lead_id;
|
||||
$launch .= " --phone_number=" . $phone_number;
|
||||
$launch .= " --phone_number=" . $cid_cb_number;
|
||||
$launch .= " --user=";
|
||||
$launch .= " --call_type=IN";
|
||||
$launch .= " --campaign=" . $channel_group;
|
||||
@@ -5712,17 +5770,30 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
else
|
||||
{
|
||||
$wait_in_queue = 2; #continue waiting
|
||||
|
||||
### Set the call time back to original call time
|
||||
$stmtA = "UPDATE vicidial_auto_calls set call_time='$ORIGINAL_call_time' where callerid='$callerid' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02152'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- Reset original call time: |$affected_rows|$ORIGINAL_call_time|$callerid|"; &agi_output;}
|
||||
}
|
||||
}
|
||||
if ( ($hold_time_option =~ /CALLBACK_QUEUE/) && ($wait_in_queue < 2) )
|
||||
{
|
||||
##### CID Callback Number Validation if enabled #####
|
||||
$cid_cb_number = $phone_number;
|
||||
|
||||
if ( ($cid_cb_confirm_number !~ /^NO/i) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_filename) > 0) && (length($cid_cb_confirmed_filename) > 0) && (length($cid_cb_enter_filename) > 0) && (length($cid_cb_you_entered_filename) > 0) && (length($cid_cb_press_to_confirm_filename) > 0) && (length($cid_cb_invalid_filename) > 0) && (length($cid_cb_reenter_filename) > 0) && (length($cid_cb_error_filename) > 0) )
|
||||
{
|
||||
&cid_cb_number_validation;
|
||||
}
|
||||
if (length($hold_time_option_exten)>0)
|
||||
{$DROPexten = "$hold_time_option_exten";}
|
||||
# if callerid is not valid do not execute
|
||||
if ( ( length($phone_number) > 6 ) && ( $phone_number > 0) )
|
||||
if ( ( length($cid_cb_number) > 6 ) && ( $cid_cb_number > 0) )
|
||||
{
|
||||
### insert a record into the vicidial_inbound_callback_queue table
|
||||
$stmtC = "INSERT INTO vicidial_inbound_callback_queue SET icbq_date=NOW(),icbq_status='NEW',icbq_phone_number='$phone_number',icbq_phone_code='$phone_code',icbq_nextday_choice='U',lead_id='$insert_lead_id',group_id='$channel_group',queue_priority='$queue_priority',call_date='$SQLdateBEGIN',gmt_offset_now='$local_gmt';";
|
||||
$stmtC = "INSERT INTO vicidial_inbound_callback_queue SET icbq_date=NOW(),icbq_status='NEW',icbq_phone_number='$cid_cb_number',icbq_phone_code='$phone_code',icbq_nextday_choice='U',lead_id='$insert_lead_id',group_id='$channel_group',queue_priority='$queue_priority',call_date='$SQLdateBEGIN',gmt_offset_now='$local_gmt';";
|
||||
$affected_rows = $dbhA->do($stmtC);
|
||||
$dbhP=$dbhA; $stmtA=$stmtC; $mysql_count='02230'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||
@@ -5737,7 +5808,20 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($AGILOG) {$agi_string = "VDAD vicidial_inbound_callback_queue insert |$CALLBACK_insert_icbq_id|$stmtC|"; &agi_output;}
|
||||
$affected_rowsD=0;
|
||||
if ($cid_cb_number ne $phone_number)
|
||||
{
|
||||
### update the vicidial_list phone_number if different
|
||||
$stmtD = "UPDATE vicidial_list SET phone_number='$cid_cb_number' where lead_id='$insert_lead_id';";
|
||||
$affected_rowsD = $dbhA->do($stmtD);
|
||||
$dbhP=$dbhA; $stmtA=$stmtD; $mysql_count='02250'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
|
||||
$stmtE = "INSERT INTO vicidial_call_notes SET lead_id='$insert_lead_id', call_date='$SQLdateBEGIN', vicidial_id='$insert_close_id', call_notes='CID Callback new number: $cid_cb_number old number: $phone_number';";
|
||||
$affected_rowsE = $dbhA->do($stmtE);
|
||||
$dbhP=$dbhA; $stmtA=$stmtE; $mysql_count='02251'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
}
|
||||
|
||||
if ($AGILOG) {$agi_string = "VDAD vicidial_inbound_callback_queue insert |$CALLBACK_insert_icbq_id|$stmtC|$affected_rowsD|$stmtD|$affected_rowsE|$stmtE|"; &agi_output;}
|
||||
|
||||
$DROPexten = "8300";
|
||||
|
||||
@@ -5746,6 +5830,12 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
||||
else
|
||||
{
|
||||
$wait_in_queue = 2; #continue waiting
|
||||
|
||||
### Set the call time back to original call time
|
||||
$stmtA = "UPDATE vicidial_auto_calls set call_time='$ORIGINAL_call_time' where callerid='$callerid' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02152'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- Reset original call time: |$affected_rows|$ORIGINAL_call_time|$callerid|"; &agi_output;}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6165,10 +6255,17 @@ if ($closing_check > 0)
|
||||
}
|
||||
if ($closing_time_action =~ /CALLERID_CALLBACK/)
|
||||
{
|
||||
##### CID Callback Number Validation if enabled #####
|
||||
$cid_cb_number = $phone_number;
|
||||
|
||||
if ( ($cid_cb_confirm_number !~ /^NO/i) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_filename) > 0) && (length($cid_cb_confirmed_filename) > 0) && (length($cid_cb_enter_filename) > 0) && (length($cid_cb_you_entered_filename) > 0) && (length($cid_cb_press_to_confirm_filename) > 0) && (length($cid_cb_invalid_filename) > 0) && (length($cid_cb_reenter_filename) > 0) && (length($cid_cb_error_filename) > 0) )
|
||||
{
|
||||
&cid_cb_number_validation;
|
||||
}
|
||||
if (length($closing_time_option_exten)>0)
|
||||
{$DROPexten = "$closing_time_option_exten";}
|
||||
# if callerid is not valid do not execute
|
||||
if ( ( length($phone_number) > 6 ) && ( $phone_number > 0) )
|
||||
if ( ( length($cid_cb_number) > 6 ) && ( $cid_cb_number > 0) )
|
||||
{
|
||||
$entry_list_idSQLa=''; $entry_list_idSQLb='';
|
||||
if ( ($enable_did_entry_list_id > 0) && ($entry_list_id > 0) )
|
||||
@@ -6184,7 +6281,7 @@ if ($closing_check > 0)
|
||||
if ($add_lead_timezone =~ /PHONE_CODE_AREACODE/)
|
||||
{&lead_timezone_process;}
|
||||
### insert a record into the vicidial_list table
|
||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$closing_time_option_callback_list_id','N','$phone_code','$phone_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||
$stmtA = "INSERT INTO vicidial_list (entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,called_since_last_reset,phone_code,phone_number,security_phrase,called_count,gmt_offset_now,comments$entry_list_idSQLa$INSERTstateSQLa$INSERTpostal_codeSQLa$populate_provinceA) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','$source_id','$closing_time_option_callback_list_id','N','$phone_code','$cid_cb_number','$ingroup_insert','$called_count','$local_gmt','$VLcomments'$entry_list_idSQLb$INSERTstateSQLb$INSERTpostal_codeSQLb$populate_provinceB);";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02237'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||
@@ -6205,7 +6302,7 @@ if ($closing_check > 0)
|
||||
$launch = $PATHhome . "/AST_send_URL.pl";
|
||||
$launch .= " --SYSLOG" if ($SYSLOG);
|
||||
$launch .= " --lead_id=" . $CALLBACK_insert_lead_id;
|
||||
$launch .= " --phone_number=" . $phone_number;
|
||||
$launch .= " --phone_number=" . $cid_cb_number;
|
||||
$launch .= " --user=";
|
||||
$launch .= " --call_type=IN";
|
||||
$launch .= " --campaign=" . $channel_group;
|
||||
@@ -6230,13 +6327,20 @@ if ($closing_check > 0)
|
||||
}
|
||||
if ($closing_time_action =~ /CALLBACK_QUEUE/)
|
||||
{
|
||||
##### CID Callback Number Validation if enabled #####
|
||||
$cid_cb_number = $phone_number;
|
||||
|
||||
if ( ($cid_cb_confirm_number !~ /^NO/i) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_length) > 0) && (length($cid_cb_valid_filename) > 0) && (length($cid_cb_confirmed_filename) > 0) && (length($cid_cb_enter_filename) > 0) && (length($cid_cb_you_entered_filename) > 0) && (length($cid_cb_press_to_confirm_filename) > 0) && (length($cid_cb_invalid_filename) > 0) && (length($cid_cb_reenter_filename) > 0) && (length($cid_cb_error_filename) > 0) )
|
||||
{
|
||||
&cid_cb_number_validation;
|
||||
}
|
||||
if (length($closing_time_option_exten)>0)
|
||||
{$DROPexten = "$closing_time_option_exten";}
|
||||
# if callerid is not valid do not execute
|
||||
if ( ( length($phone_number) > 6 ) && ( $phone_number > 0) )
|
||||
if ( ( length($cid_cb_number) > 6 ) && ( $cid_cb_number > 0) )
|
||||
{
|
||||
### insert a record into the vicidial_inbound_callback_queue table
|
||||
$stmtC = "INSERT INTO vicidial_inbound_callback_queue SET icbq_date=NOW(),icbq_status='NEW',icbq_phone_number='$phone_number',icbq_phone_code='$phone_code',icbq_nextday_choice='U',lead_id='$insert_lead_id',group_id='$channel_group',queue_priority='$queue_priority',call_date='$SQLdateBEGIN',gmt_offset_now='$local_gmt';";
|
||||
$stmtC = "INSERT INTO vicidial_inbound_callback_queue SET icbq_date=NOW(),icbq_status='NEW',icbq_phone_number='$cid_cb_number',icbq_phone_code='$phone_code',icbq_nextday_choice='U',lead_id='$insert_lead_id',group_id='$channel_group',queue_priority='$queue_priority',call_date='$SQLdateBEGIN',gmt_offset_now='$local_gmt';";
|
||||
$affected_rows = $dbhA->do($stmtC);
|
||||
$dbhP=$dbhA; $stmtA=$stmtC; $mysql_count='02239'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
$stmtB = "SELECT LAST_INSERT_ID() LIMIT 1;";
|
||||
@@ -6251,7 +6355,20 @@ if ($closing_check > 0)
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($AGILOG) {$agi_string = "VDAD vicidial_inbound_callback_queue insert |$CALLBACK_insert_icbq_id|$stmtC|"; &agi_output;}
|
||||
$affected_rowsD=0;
|
||||
if ($cid_cb_number ne $phone_number)
|
||||
{
|
||||
### update the vicidial_list phone_number if different
|
||||
$stmtD = "UPDATE vicidial_list SET phone_number='$cid_cb_number' where lead_id='$insert_lead_id';";
|
||||
$affected_rowsD = $dbhA->do($stmtD);
|
||||
$dbhP=$dbhA; $stmtA=$stmtD; $mysql_count='02252'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
|
||||
$stmtE = "INSERT INTO vicidial_call_notes SET lead_id='$insert_lead_id', call_date='$SQLdateBEGIN', vicidial_id='$insert_close_id', call_notes='CID Callback new number: $cid_cb_number old number: $phone_number';";
|
||||
$affected_rowsE = $dbhA->do($stmtE);
|
||||
$dbhP=$dbhA; $stmtA=$stmtE; $mysql_count='02253'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
}
|
||||
|
||||
if ($AGILOG) {$agi_string = "VDAD vicidial_inbound_callback_queue insert |$CALLBACK_insert_icbq_id|$stmtC|$affected_rowsD|$stmtD|$affected_rowsE|$stmtE|"; &agi_output;}
|
||||
|
||||
$DROPexten = "8300";
|
||||
|
||||
@@ -6948,6 +7065,401 @@ sub press_one_hold_time_option_prompt
|
||||
|
||||
|
||||
|
||||
sub temp_12_choice_entry($)
|
||||
{
|
||||
$temp_prompt = $temp_12_choice_prompt;
|
||||
|
||||
$digits_to_collect = 1;
|
||||
|
||||
# press 1 or press 2 ...
|
||||
|
||||
$AGI->stream_file('sip-silence');
|
||||
$AGI->stream_file('sip-silence');
|
||||
|
||||
$digit='';
|
||||
undef $digit;
|
||||
$interrupt_digit='';
|
||||
undef $interrupt_digit;
|
||||
$digit_loop_counter=0;
|
||||
|
||||
$interrupt_digit = $AGI->stream_file('sip-silence',"12");
|
||||
|
||||
$interrupt_digit='';
|
||||
undef $interrupt_digit;
|
||||
|
||||
if ($temp_prompt =~ /\|/)
|
||||
{
|
||||
@temp_prompt_array = split(/\|/,$temp_prompt);
|
||||
$w=0;
|
||||
foreach(@temp_prompt_array)
|
||||
{
|
||||
if ( (length($temp_prompt_array[$w])>0) && ($interrupt_digit < 2) )
|
||||
{
|
||||
$interrupt_digit = $AGI->stream_file("$temp_prompt_array[$w]","12");
|
||||
}
|
||||
$w++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{$interrupt_digit = $AGI->stream_file("$temp_prompt","12");} # this prompt should be less than 10 seconds long
|
||||
|
||||
if ($AGILOG) {$agi_string = "interrupt_digit |$interrupt_digit| |$temp_prompt|"; &agi_output;}
|
||||
|
||||
$digits_being_entered=1;
|
||||
$totalDTMF='';
|
||||
if ($interrupt_digit > 1)
|
||||
{
|
||||
if ($interrupt_digit == 48) {$interrupt_digit=0;}
|
||||
if ($interrupt_digit == 49) {$interrupt_digit=1;}
|
||||
if ($interrupt_digit == 50) {$interrupt_digit=2;}
|
||||
if ($interrupt_digit == 51) {$interrupt_digit=3;}
|
||||
if ($interrupt_digit == 52) {$interrupt_digit=4;}
|
||||
if ($interrupt_digit == 53) {$interrupt_digit=5;}
|
||||
if ($interrupt_digit == 54) {$interrupt_digit=6;}
|
||||
if ($interrupt_digit == 55) {$interrupt_digit=7;}
|
||||
if ($interrupt_digit == 56) {$interrupt_digit=8;}
|
||||
if ($interrupt_digit == 57) {$interrupt_digit=9;}
|
||||
|
||||
$totalDTMF=$interrupt_digit;
|
||||
$digit_loop_counter++;
|
||||
}
|
||||
|
||||
|
||||
while ( ($digit_loop_counter < $digits_to_collect) )
|
||||
{
|
||||
$digit = chr($AGI->wait_for_digit('4000')); # wait 4 seconds for input or until the key is pressed
|
||||
if ($digit =~ /\d/)
|
||||
{
|
||||
$totalDTMF = "$totalDTMF$digit";
|
||||
if ($AGILOG) {$agi_string = "digit |$digit| TotalDTMF |$totalDTMF|"; &agi_output;}
|
||||
# $AGI->say_digits("$digit");
|
||||
undef $digit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$digit_loop_counter=$digits_to_collect;
|
||||
}
|
||||
|
||||
$digit_loop_counter++;
|
||||
}
|
||||
|
||||
$totalDTMF =~ s/\D//gi;
|
||||
$temp_12_value = $totalDTMF;
|
||||
if ($totalDTMF) {if ($AGILOG) {$agi_string = "digit |$digit| TotalDTMF |$totalDTMF|$temp_12_value|"; &agi_output;}}
|
||||
}
|
||||
|
||||
|
||||
|
||||
### BEGIN Enter CID CB phone number section ###
|
||||
sub enter_cid_cb_number
|
||||
{
|
||||
# PROMPTS USED:
|
||||
# cid_cb_enter_filename - "Please enter the phone number you want to be called back on followed by the # key
|
||||
# cid_cb_you_entered_filename - "You have entered"
|
||||
# cid_cb_press_to_confirm_filename - "Press 1 if it is correct. Press 2 to repeat entry"
|
||||
# cid_cb_invalid_filename - "We are sorry but we cannot recognize the number that you have entered"
|
||||
# cid_cb_reenter_filename - "Okay, lets try again"
|
||||
# cid_cb_error_filename - "It looks like we are having some difficulty, please hold and we will transfer you to one of our team members as soon as possible"
|
||||
$cid_cb_number='';
|
||||
|
||||
if ($AGILOG) {$agi_string = "Enter CID CB number started: |$cid_cb_enter_filename|"; &agi_output;}
|
||||
|
||||
$confirmation=0;
|
||||
$confirmation_chances=0;
|
||||
while ( ($confirmation_chances < 3) && ($confirmation < 1) )
|
||||
{
|
||||
$entry_chances=0;
|
||||
$digits_being_entered=1;
|
||||
|
||||
if ($AGILOG) {$agi_string = "DEBUG------------------ $entry_chances"; &agi_output;}
|
||||
|
||||
while ( ($entry_chances < 3) && ($digits_being_entered > 0) )
|
||||
{
|
||||
$entry_chances++;
|
||||
$digits_being_entered=1;
|
||||
$id_number='';
|
||||
$interrupt_digit='';
|
||||
$interrupt_digit = $AGI->stream_file("$cid_cb_enter_filename",'0123456789');
|
||||
|
||||
if ($AGILOG) {$agi_string = "interrupt_digit |$interrupt_digit|"; &agi_output;}
|
||||
if ($interrupt_digit > 0)
|
||||
{
|
||||
# if ($interrupt_digit == 35) {$interrupt_digit='#';}
|
||||
# if ($interrupt_digit == 42) {$interrupt_digit='*';}
|
||||
if ($interrupt_digit == 48) {$interrupt_digit=0;}
|
||||
if ($interrupt_digit == 49) {$interrupt_digit=1;}
|
||||
if ($interrupt_digit == 50) {$interrupt_digit=2;}
|
||||
if ($interrupt_digit == 51) {$interrupt_digit=3;}
|
||||
if ($interrupt_digit == 52) {$interrupt_digit=4;}
|
||||
if ($interrupt_digit == 53) {$interrupt_digit=5;}
|
||||
if ($interrupt_digit == 54) {$interrupt_digit=6;}
|
||||
if ($interrupt_digit == 55) {$interrupt_digit=7;}
|
||||
if ($interrupt_digit == 56) {$interrupt_digit=8;}
|
||||
if ($interrupt_digit == 57) {$interrupt_digit=9;}
|
||||
|
||||
$id_number=$interrupt_digit;
|
||||
}
|
||||
|
||||
$digit_loop_counter=0;
|
||||
while ($digits_being_entered > 0)
|
||||
{
|
||||
$digit = chr($AGI->wait_for_digit('5000')); # wait 5 seconds for input or until the pound key is pressed
|
||||
if ($digit =~ /\d/)
|
||||
{
|
||||
$id_number = "$id_number$digit";
|
||||
if ($AGILOG) {$agi_string = "digit |$digit| id_number |$id_number|"; &agi_output;}
|
||||
undef $digit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$digits_being_entered=0;
|
||||
}
|
||||
$Lid_number = length($id_number);
|
||||
if ($Lid_number >= 20)
|
||||
{
|
||||
$digits_being_entered=0;
|
||||
}
|
||||
|
||||
$digit_loop_counter++;
|
||||
}
|
||||
|
||||
$id_number =~ s/\D//gi;
|
||||
$cid_cb_number = $id_number;
|
||||
}
|
||||
|
||||
$AGI->stream_file("$cid_cb_you_entered_filename");
|
||||
$AGI->say_digits("$cid_cb_number");
|
||||
|
||||
### if CID CB number has been set, ask to confirm it
|
||||
if (length($cid_cb_number) > 0)
|
||||
{
|
||||
$interrupt_digit = $AGI->stream_file("$cid_cb_press_to_confirm_filename",'12');
|
||||
|
||||
if ($AGILOG) {$agi_string = "interrupt_digit |$interrupt_digit|"; &agi_output;}
|
||||
$digits_being_entered=1;
|
||||
$ANSWER_confirm='';
|
||||
if ($interrupt_digit > 0)
|
||||
{
|
||||
if ($interrupt_digit == 49) {$interrupt_digit=1;}
|
||||
if ($interrupt_digit == 50) {$interrupt_digit=2;}
|
||||
$ANSWER_confirm=$interrupt_digit;
|
||||
}
|
||||
|
||||
if (length($ANSWER_confirm) < 1)
|
||||
{
|
||||
$digit_loop_counter=0;
|
||||
while ( ($digits_being_entered > 0) && ($digit_loop_counter < 1) )
|
||||
{
|
||||
$digit = chr($AGI->wait_for_digit('5000')); # wait 5 seconds for input
|
||||
if ($digit =~ /\d/)
|
||||
{
|
||||
$ANSWER_confirm = "$ANSWER_confirm$digit";
|
||||
if ($AGILOG) {$agi_string = "digit |$digit| ANSWER_confirm |$ANSWER_confirm|"; &agi_output;}
|
||||
undef $digit;
|
||||
}
|
||||
else
|
||||
{
|
||||
$digits_being_entered=0;
|
||||
}
|
||||
|
||||
$digit_loop_counter++;
|
||||
}
|
||||
}
|
||||
|
||||
$ANSWER_confirm =~ s/\D//gi;
|
||||
|
||||
if ($ANSWER_confirm > 1)
|
||||
{$cid_cb_number='';}
|
||||
if ( ($ANSWER_confirm > 0) && ($ANSWER_confirm < 2) )
|
||||
{$confirmation=1;}
|
||||
}
|
||||
if ($confirmation < 1)
|
||||
{
|
||||
$AGI->stream_file('buzz');
|
||||
}
|
||||
else
|
||||
{
|
||||
$cid_cb_length_is_valid=0;
|
||||
$cid_cb_FPG_phone_found=0;
|
||||
### check for valid length and invalid filter phone group entry
|
||||
&cid_cb_length_and_fpg;
|
||||
|
||||
if ($cid_cb_length_is_valid < 1)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "EN CID Callback Number Length is Invalid |$cid_cb_number(phone_number_length)|$cid_cb_valid_length|"; &agi_output;}
|
||||
}
|
||||
if ($cid_cb_FPG_phone_found > 0)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "EN CID Callback Number found in the Invalid Filter Phone Group |$cid_cb_number|$cid_cb_invalid_filter_phone_group|"; &agi_output;}
|
||||
}
|
||||
if ( ($cid_cb_length_is_valid < 1) || ($cid_cb_FPG_phone_found > 0) )
|
||||
{
|
||||
$confirmation=0;
|
||||
$AGI->stream_file("$cid_cb_invalid_filename");
|
||||
if ($confirmation_chances < 2)
|
||||
{$AGI->stream_file("$cid_cb_reenter_filename");}
|
||||
else
|
||||
{$AGI->stream_file("$cid_cb_error_filename");}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "EN CID Callback Number is valid: |$cid_cb_number|$confirmation|"; &agi_output;}
|
||||
}
|
||||
}
|
||||
$confirmation_chances++;
|
||||
}
|
||||
}
|
||||
### END Enter CID CB phone number section ###
|
||||
|
||||
|
||||
### BEGIN subroutine for number validation and option of entering new one ###
|
||||
sub cid_cb_number_validation
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "CID Callback Number Validation Enabled |$phone_number|$cid_cb_confirm_number|$cid_cb_valid_length|$cid_cb_invalid_filter_phone_group|"; &agi_output;}
|
||||
|
||||
$FDtarget = ($now_date_epoch + 360);
|
||||
($Fsec,$Fmin,$Fhour,$Fmday,$Fmon,$Fyear,$Fwday,$Fyday,$Fisdst) = localtime($FDtarget);
|
||||
$Fyear = ($Fyear + 1900);
|
||||
$Fmon++;
|
||||
if ($Fmon < 10) {$Fmon = "0$Fmon";}
|
||||
if ($Fmday < 10) {$Fmday = "0$Fmday";}
|
||||
if ($Fhour < 10) {$Fhour = "0$Fhour";}
|
||||
if ($Fmin < 10) {$Fmin = "0$Fmin";}
|
||||
if ($Fsec < 10) {$Fsec = "0$Fsec";}
|
||||
$FDtsSQLdate = "$Fyear$Fmon$Fmday$Fhour$Fmin$Fsec";
|
||||
|
||||
$stmtA = "UPDATE vicidial_auto_calls set last_update_time='$FDtsSQLdate' where callerid='$callerid' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02254'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
|
||||
if ($AGILOG) {$agi_string = "-- VDAC posttime record for CID CB Confirmation: |$affected_rows|$FDtsSQLdate|$callerid|"; &agi_output;}
|
||||
|
||||
$cid_cb_length_is_valid=0;
|
||||
$cid_cb_FPG_phone_found=0;
|
||||
$cid_cb_play_confirmed=0;
|
||||
### check for valid length and invalid filter phone group entry
|
||||
&cid_cb_length_and_fpg;
|
||||
|
||||
if ($cid_cb_length_is_valid < 1)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "CID Callback Number Length is Invalid |$cid_cb_number(phone_number_length)|$cid_cb_valid_length|"; &agi_output;}
|
||||
}
|
||||
if ($cid_cb_FPG_phone_found > 0)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "CID Callback Number found in the Invalid Filter Phone Group |$cid_cb_number|$cid_cb_invalid_filter_phone_group|"; &agi_output;}
|
||||
}
|
||||
$enter_cid_cb_process=1;
|
||||
if ( ($cid_cb_length_is_valid > 0) && ($cid_cb_FPG_phone_found < 1) )
|
||||
{
|
||||
if ($cid_cb_confirm_number !~ /IF_INVALID/i)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "CID Callback Number is valid, continuing... |$cid_cb_number|"; &agi_output;}
|
||||
# number is valid, play valid prompt (press 1 to be called back on this number or press 2 to enter a different number)
|
||||
$AGI->stream_file('sip-silence'); # stop music-on-hold process
|
||||
$AGI->stream_file('sip-silence'); # stop music-on-hold process
|
||||
$temp_12_choice_prompt = $cid_cb_valid_filename;
|
||||
if ($cid_cb_valid_filename =~ /\|/)
|
||||
{
|
||||
@cid_cb_valid_filename_array = split(/\|/,$cid_cb_valid_filename);
|
||||
$ct_cid_cb_valid_filename = ($#cid_cb_valid_filename_array + 0);
|
||||
$w=0;
|
||||
foreach(@cid_cb_valid_filename_array)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "DEBUG: CID CB valid: |$w($ct_cid_cb_valid_filename)|$cid_cb_valid_filename_array[$w]|"; &agi_output;}
|
||||
if ($ct_cid_cb_valid_filename == $w)
|
||||
{
|
||||
$temp_12_choice_prompt = $cid_cb_valid_filename_array[$w];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (length($cid_cb_valid_filename_array[$w])>0)
|
||||
{
|
||||
if ($cid_cb_valid_filename_array[$w] =~ /--PHONE--/i)
|
||||
{
|
||||
$AGI->say_digits("$cid_cb_number");
|
||||
}
|
||||
else
|
||||
{
|
||||
$AGI->stream_file("$cid_cb_valid_filename_array[$w]");
|
||||
}
|
||||
}
|
||||
}
|
||||
$w++;
|
||||
}
|
||||
}
|
||||
# offer option 1 or 2
|
||||
&temp_12_choice_entry($temp_12_choice_prompt);
|
||||
|
||||
if ($AGILOG) {$agi_string = "CID Callback option response |$temp_12_value|$temp_12_choice_prompt|"; &agi_output;}
|
||||
|
||||
if ($temp_12_value == '1')
|
||||
{
|
||||
$enter_cid_cb_process=0;
|
||||
$cid_cb_play_confirmed=1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$enter_cid_cb_process=0;
|
||||
$cid_cb_play_confirmed=1;
|
||||
}
|
||||
}
|
||||
if ($enter_cid_cb_process > 0)
|
||||
{
|
||||
# play number entry prompt (enter the number you want to be called back at)
|
||||
&enter_cid_cb_number;
|
||||
|
||||
if ( ($confirmation_chances > 2) && ($confirmation < 1) )
|
||||
{
|
||||
$cid_cb_number='';
|
||||
}
|
||||
else
|
||||
{
|
||||
$cid_cb_play_confirmed=1;
|
||||
}
|
||||
}
|
||||
if ($cid_cb_play_confirmed > 0)
|
||||
{
|
||||
### BEGIN Play the confirmed message ###
|
||||
# cid_cb_confirmed_filename - we will keep your place in the queue and call you back as soon as one of our team members is available
|
||||
if ($cid_cb_confirmed_filename =~ /\|/)
|
||||
{
|
||||
@cid_cb_confirmed_filename_array = split(/\|/,$cid_cb_confirmed_filename);
|
||||
$ct_cid_cb_confirmed_filename = ($#cid_cb_confirmed_filename_array + 0);
|
||||
$w=0;
|
||||
foreach(@cid_cb_confirmed_filename_array)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "DEBUG: CID CB confirm: |$w($ct_cid_cb_confirmed_filename)|$cid_cb_confirmed_filename_array[$w]|"; &agi_output;}
|
||||
if ($ct_cid_cb_confirmed_filename == $w)
|
||||
{
|
||||
$temp_12_choice_prompt = $cid_cb_confirmed_filename_array[$w];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (length($cid_cb_confirmed_filename_array[$w])>0)
|
||||
{
|
||||
if ($cid_cb_confirmed_filename_array[$w] =~ /--PHONE--/i)
|
||||
{
|
||||
$AGI->say_digits("$cid_cb_number");
|
||||
}
|
||||
else
|
||||
{
|
||||
$AGI->stream_file("$cid_cb_confirmed_filename_array[$w]");
|
||||
}
|
||||
}
|
||||
}
|
||||
$w++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$AGI->stream_file("$cid_cb_confirmed_filename");
|
||||
}
|
||||
### END Play the confirmed message ###
|
||||
}
|
||||
}
|
||||
### END subroutine for number validation and option of entering new one ###
|
||||
|
||||
|
||||
sub populate_lead_province_process
|
||||
{
|
||||
$stmtA = "SELECT did_id FROM vicidial_did_log where uniqueid='$uniqueid' order by call_date desc limit 1;";
|
||||
@@ -7819,6 +8331,67 @@ sub BZL_dstcalc {
|
||||
} # end of subroutine dstcalc
|
||||
|
||||
|
||||
### check for valid length and invalid filter phone group entry
|
||||
sub cid_cb_length_and_fpg
|
||||
{
|
||||
### BEGIN check for valid length of customer phone number ###
|
||||
$phone_number_length = length($cid_cb_number);
|
||||
$cid_cb_length_is_valid=0;
|
||||
if ($cid_cb_valid_length =~ /-/)
|
||||
{
|
||||
@cid_cb_valid_lengths = split(/-/,$cid_cb_valid_length);
|
||||
$w=0;
|
||||
foreach(@cid_cb_valid_lengths)
|
||||
{
|
||||
if (length($cid_cb_valid_lengths[$w])>0)
|
||||
{
|
||||
if ($phone_number_length eq $cid_cb_valid_lengths[$w]) {$cid_cb_length_is_valid++;}
|
||||
}
|
||||
$w++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($phone_number_length eq $cid_cb_valid_length) {$cid_cb_length_is_valid++;}
|
||||
}
|
||||
### END check for valid length of customer phone number ###
|
||||
|
||||
### BEGIN check for invalid customer phone number in filter phone group, if defined ###
|
||||
$cid_cb_FPG_phone_found=0;
|
||||
if ( (length($cid_cb_invalid_filter_phone_group) > 0) && ($cid_cb_invalid_filter_phone_group !~ /^NONE$/i) )
|
||||
{
|
||||
$cid_cb_FPGvalid=0;
|
||||
$stmtA = "SELECT count(*) FROM vicidial_filter_phone_groups where filter_phone_group_id='$cid_cb_invalid_filter_phone_group';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02255'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$cid_cb_FPGvalid = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($cid_cb_FPGvalid > 0)
|
||||
{
|
||||
$stmtA = "SELECT count(*) FROM vicidial_filter_phone_numbers where filter_phone_group_id='$cid_cb_invalid_filter_phone_group' and phone_number='$cid_cb_number';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02256'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$cid_cb_FPG_phone_found = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
### END check for invalid customer phone number in filter phone group, if defined ###
|
||||
|
||||
|
||||
sub checkresult
|
||||
{
|
||||
my ($res) = @_;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
CELLPHONE FILTERING DOC Started: 2013-09-20 Updated: 2015-06-26
|
||||
CELLPHONE FILTERING DOC Started: 2013-09-20 Updated: 2018-08-05
|
||||
|
||||
On October 16th, 2013 the FCC issued a rule change to not allow auto-dialing cellphones in the USA unless you have "express consent" from the person you are calling. This document is a summary of what this rule change means to businesses and organizations, and goes over how they can make sure they are in compliance with the TCPA(Telephone Consumer Protection Act of 1991) depending on their interpretation of the regulatory language.
|
||||
|
||||
@@ -69,6 +69,7 @@ Here is a list of scripts that we have added in order to integrate with DNC.COM'
|
||||
bin/nanpa_type_populate.pl -
|
||||
Requires "Net::SFTP::Foreign" and "IO::Pty" CPAN modules to run. Automatically goes to DNC.COM SFTP server and downloads the 3 required data files(Prefixes, Wired-to-wireless, Wireless-to-wired), then loads that data into database tables on the vicidial system to be used by the other scripts. This process should be set to run in the crontab every morning. There is an "--adminlog" run time option you can use to log the results of this process to the admin log under the server that it is run on, these log entries are viewable in the Administration web interface.
|
||||
NOTE: before you can run this script, you will need to sftp into the dnc.com server first on the Linux command line, (sftp XXXX@sftp.dncscrub.com)
|
||||
NOTE: you may need to edit the "/etc/ssh/ssh_config" file to include a line like this "Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr,aes256-cbc"
|
||||
|
||||
bin/nanpa_type_preload.pl -
|
||||
This script is designed to load all of the prefixes and portability data into RAM and run against your entire database to scrub it for cellphone numbers every night after the data is refreshed. It takes several minutes to initialize, but runs very fast after that. This process should be set to run in the crontab every morning AFTER the populate script is finished running. The results of this process log to the admin log under the server that it is run on, these log entries are viewable in the Administration web interface.
|
||||
|
||||
@@ -1270,7 +1270,18 @@ park_file_name VARCHAR(100) default '',
|
||||
waiting_call_url_on TEXT,
|
||||
waiting_call_url_off TEXT,
|
||||
waiting_call_count SMALLINT(5) UNSIGNED default '0',
|
||||
enter_ingroup_url TEXT
|
||||
enter_ingroup_url TEXT,
|
||||
cid_cb_confirm_number VARCHAR(20) default 'NO',
|
||||
cid_cb_invalid_filter_phone_group VARCHAR(20) default '',
|
||||
cid_cb_valid_length VARCHAR(30) default '10',
|
||||
cid_cb_valid_filename TEXT,
|
||||
cid_cb_confirmed_filename TEXT,
|
||||
cid_cb_enter_filename TEXT,
|
||||
cid_cb_you_entered_filename TEXT,
|
||||
cid_cb_press_to_confirm_filename TEXT,
|
||||
cid_cb_invalid_filename TEXT,
|
||||
cid_cb_reenter_filename TEXT,
|
||||
cid_cb_error_filename TEXT
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_stations (
|
||||
@@ -2146,7 +2157,7 @@ country VARCHAR(2) default '',
|
||||
lata_type VARCHAR(1) default ''
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE INDEX areaprefix on vicidial_nanpa_prefix_codes (areacode,prefix);
|
||||
CREATE UNIQUE INDEX areaprefix on vicidial_nanpa_prefix_codes (areacode,prefix);
|
||||
|
||||
CREATE TABLE vicidial_cpd_log (
|
||||
cpd_id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
|
||||
@@ -4175,6 +4186,9 @@ ALTER TABLE vicidial_inbound_callback_queue_archive MODIFY icbq_id INT(9) UNSIGN
|
||||
CREATE TABLE vicidial_agent_function_log_archive LIKE vicidial_agent_function_log;
|
||||
ALTER TABLE vicidial_agent_function_log_archive MODIFY agent_function_log_id INT(9) UNSIGNED NOT NULL;
|
||||
|
||||
CREATE TABLE vicidial_did_log_archive LIKE vicidial_did_log;
|
||||
CREATE UNIQUE INDEX vdidla_key on vicidial_did_log_archive(uniqueid, call_date, server_ip);
|
||||
|
||||
GRANT RELOAD ON *.* TO cron@'%';
|
||||
GRANT RELOAD ON *.* TO cron@localhost;
|
||||
|
||||
@@ -4251,4 +4265,4 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_
|
||||
|
||||
UPDATE system_settings set vdc_agent_api_active='1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1549',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1550',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -678,3 +678,20 @@ index (lead_id)
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1549',db_schema_update_date=NOW() where db_schema_version < 1549;
|
||||
|
||||
CREATE TABLE vicidial_did_log_archive LIKE vicidial_did_log;
|
||||
CREATE UNIQUE INDEX vdidla_key on vicidial_did_log_archive(uniqueid, call_date, server_ip);
|
||||
|
||||
ALTER TABLE vicidial_inbound_groups ADD cid_cb_confirm_number VARCHAR(20) default 'NO';
|
||||
ALTER TABLE vicidial_inbound_groups ADD cid_cb_invalid_filter_phone_group VARCHAR(20) default '';
|
||||
ALTER TABLE vicidial_inbound_groups ADD cid_cb_valid_length VARCHAR(30) default '10';
|
||||
ALTER TABLE vicidial_inbound_groups ADD cid_cb_valid_filename TEXT;
|
||||
ALTER TABLE vicidial_inbound_groups ADD cid_cb_confirmed_filename TEXT;
|
||||
ALTER TABLE vicidial_inbound_groups ADD cid_cb_enter_filename TEXT;
|
||||
ALTER TABLE vicidial_inbound_groups ADD cid_cb_you_entered_filename TEXT;
|
||||
ALTER TABLE vicidial_inbound_groups ADD cid_cb_press_to_confirm_filename TEXT;
|
||||
ALTER TABLE vicidial_inbound_groups ADD cid_cb_invalid_filename TEXT;
|
||||
ALTER TABLE vicidial_inbound_groups ADD cid_cb_reenter_filename TEXT;
|
||||
ALTER TABLE vicidial_inbound_groups ADD cid_cb_error_filename TEXT;
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1550',db_schema_update_date=NOW() where db_schema_version < 1550;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,888 @@
|
||||
<?php
|
||||
# AST_CMstats.php
|
||||
#
|
||||
# Copyright (C) 2018 Matt Florell <vicidial@gmail.com>, Joe Johnson <freewermadmin@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 180724-2109 - First build
|
||||
#
|
||||
|
||||
$startMS = microtime();
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
require("functions.php");
|
||||
|
||||
$PHP_AUTH_USER=$_SERVER['PHP_AUTH_USER'];
|
||||
$PHP_AUTH_PW=$_SERVER['PHP_AUTH_PW'];
|
||||
$PHP_SELF=$_SERVER['PHP_SELF'];
|
||||
if (isset($_GET["group"])) {$group=$_GET["group"];}
|
||||
elseif (isset($_POST["group"])) {$group=$_POST["group"];}
|
||||
if (isset($_GET["query_date"])) {$query_date=$_GET["query_date"];}
|
||||
elseif (isset($_POST["query_date"])) {$query_date=$_POST["query_date"];}
|
||||
if (isset($_GET["end_date"])) {$end_date=$_GET["end_date"];}
|
||||
elseif (isset($_POST["end_date"])) {$end_date=$_POST["end_date"];}
|
||||
if (isset($_GET["users"])) {$users=$_GET["users"];}
|
||||
elseif (isset($_POST["users"])) {$users=$_POST["users"];}
|
||||
if (isset($_GET["user"])) {$user=$_GET["user"];}
|
||||
elseif (isset($_POST["user"])) {$user=$_POST["user"];}
|
||||
if (isset($_GET["callmenus"])) {$callmenus=$_GET["callmenus"];}
|
||||
elseif (isset($_POST["callmenus"])) {$callmenus=$_POST["callmenus"];}
|
||||
if (isset($_GET["type"])) {$type=$_GET["type"];}
|
||||
elseif (isset($_POST["type"])) {$type=$_POST["type"];}
|
||||
if (isset($_GET["submit"])) {$submit=$_GET["submit"];}
|
||||
elseif (isset($_POST["submit"])) {$submit=$_POST["submit"];}
|
||||
if (isset($_GET["SUBMIT"])) {$SUBMIT=$_GET["SUBMIT"];}
|
||||
elseif (isset($_POST["SUBMIT"])) {$SUBMIT=$_POST["SUBMIT"];}
|
||||
if (isset($_GET["DB"])) {$DB=$_GET["DB"];}
|
||||
elseif (isset($_POST["DB"])) {$DB=$_POST["DB"];}
|
||||
if (isset($_GET["file_download"])) {$file_download=$_GET["file_download"];}
|
||||
elseif (isset($_POST["file_download"])) {$file_download=$_POST["file_download"];}
|
||||
if (isset($_GET["report_type"])) {$report_type=$_GET["report_type"];}
|
||||
elseif (isset($_POST["report_type"])) {$report_type=$_POST["report_type"];}
|
||||
if (isset($_GET["search_archived_data"])) {$search_archived_data=$_GET["search_archived_data"];}
|
||||
elseif (isset($_POST["search_archived_data"])) {$search_archived_data=$_POST["search_archived_data"];}
|
||||
|
||||
$report_name = 'Callmenu Survey Report';
|
||||
$db_source = 'M';
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,outbound_autodial_active,slave_db_server,reports_use_slave_db,enable_languages,language_method,report_default_format FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$qm_conf_ct = mysqli_num_rows($rslt);
|
||||
if ($qm_conf_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$non_latin = $row[0];
|
||||
$outbound_autodial_active = $row[1];
|
||||
$slave_db_server = $row[2];
|
||||
$reports_use_slave_db = $row[3];
|
||||
$SSenable_languages = $row[4];
|
||||
$SSlanguage_method = $row[5];
|
||||
$SSreport_default_format = $row[6];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
|
||||
### ARCHIVED DATA CHECK CONFIGURATION
|
||||
$archives_available="N";
|
||||
$log_tables_array=array("vicidial_outbound_ivr_log", "vicidial_closer_log", "live_inbound_log", "vicidial_agent_log");
|
||||
for ($t=0; $t<count($log_tables_array); $t++)
|
||||
{
|
||||
$table_name=$log_tables_array[$t];
|
||||
$archive_table_name=use_archive_table($table_name);
|
||||
if ($archive_table_name!=$table_name) {$archives_available="Y";}
|
||||
}
|
||||
|
||||
if ($search_archived_data)
|
||||
{
|
||||
$vicidial_outbound_ivr_log_table=use_archive_table("vicidial_outbound_ivr_log");
|
||||
$vicidial_closer_log_table=use_archive_table("vicidial_closer_log");
|
||||
$live_inbound_log_table=use_archive_table("live_inbound_log");
|
||||
$vicidial_agent_log_table=use_archive_table("vicidial_agent_log");
|
||||
}
|
||||
else
|
||||
{
|
||||
$vicidial_outbound_ivr_log_table="vicidial_outbound_ivr_log";
|
||||
$vicidial_closer_log_table="vicidial_closer_log";
|
||||
$live_inbound_log_table="live_inbound_log";
|
||||
$vicidial_agent_log_table="vicidial_agent_log";
|
||||
}
|
||||
#############
|
||||
|
||||
if ($non_latin < 1)
|
||||
{
|
||||
$PHP_AUTH_USER = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_USER);
|
||||
$PHP_AUTH_PW = preg_replace('/[^-_0-9a-zA-Z]/', '', $PHP_AUTH_PW);
|
||||
}
|
||||
else
|
||||
{
|
||||
$PHP_AUTH_PW = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_PW);
|
||||
$PHP_AUTH_USER = preg_replace("/'|\"|\\\\|;/","",$PHP_AUTH_USER);
|
||||
}
|
||||
|
||||
$stmt="SELECT selected_language from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$sl_ct = mysqli_num_rows($rslt);
|
||||
if ($sl_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$VUselected_language = $row[0];
|
||||
}
|
||||
|
||||
$auth=0;
|
||||
$reports_auth=0;
|
||||
$admin_auth=0;
|
||||
$auth_message = user_authorization($PHP_AUTH_USER,$PHP_AUTH_PW,'REPORTS',1,0);
|
||||
if ($auth_message == 'GOOD')
|
||||
{$auth=1;}
|
||||
|
||||
if ($auth > 0)
|
||||
{
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7 and view_reports='1';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$admin_auth=$row[0];
|
||||
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports='1';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$reports_auth=$row[0];
|
||||
|
||||
if ($reports_auth < 1)
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("You are not allowed to view reports");
|
||||
Header ("Content-type: text/html; charset=utf-8");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
if ( ($reports_auth > 0) and ($admin_auth < 1) )
|
||||
{
|
||||
$ADD=999999;
|
||||
$reports_only_user=1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
|
||||
if ($auth_message == 'LOCK')
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
|
||||
Header ("Content-type: text/html; charset=utf-8");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
if ($auth_message == 'IPBLOCK')
|
||||
{
|
||||
$VDdisplayMESSAGE = _QXZ("Your IP Address is not allowed") . ": $ip";
|
||||
Header ("Content-type: text/html; charset=utf-8");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
##### BEGIN log visit to the vicidial_report_log table #####
|
||||
$LOGip = getenv("REMOTE_ADDR");
|
||||
$LOGbrowser = getenv("HTTP_USER_AGENT");
|
||||
$LOGscript_name = getenv("SCRIPT_NAME");
|
||||
$LOGserver_name = getenv("SERVER_NAME");
|
||||
$LOGserver_port = getenv("SERVER_PORT");
|
||||
$LOGrequest_uri = getenv("REQUEST_URI");
|
||||
$LOGhttp_referer = getenv("HTTP_REFERER");
|
||||
$LOGbrowser=preg_replace("/\'|\"|\\\\/","",$LOGbrowser);
|
||||
$LOGrequest_uri=preg_replace("/\'|\"|\\\\/","",$LOGrequest_uri);
|
||||
$LOGhttp_referer=preg_replace("/\'|\"|\\\\/","",$LOGhttp_referer);
|
||||
if (preg_match("/443/i",$LOGserver_port)) {$HTTPprotocol = 'https://';}
|
||||
else {$HTTPprotocol = 'http://';}
|
||||
if (($LOGserver_port == '80') or ($LOGserver_port == '443') ) {$LOGserver_port='';}
|
||||
else {$LOGserver_port = ":$LOGserver_port";}
|
||||
$LOGfull_url = "$HTTPprotocol$LOGserver_name$LOGserver_port$LOGrequest_uri";
|
||||
|
||||
$LOGhostname = php_uname('n');
|
||||
if (strlen($LOGhostname)<1) {$LOGhostname='X';}
|
||||
if (strlen($LOGserver_name)<1) {$LOGserver_name='X';}
|
||||
|
||||
$stmt="SELECT webserver_id FROM vicidial_webservers where webserver='$LOGserver_name' and hostname='$LOGhostname' LIMIT 1;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$webserver_id_ct = mysqli_num_rows($rslt);
|
||||
if ($webserver_id_ct > 0)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$webserver_id = $row[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
##### insert webserver entry
|
||||
$stmt="INSERT INTO vicidial_webservers (webserver,hostname) values('$LOGserver_name','$LOGhostname');";
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$affected_rows = mysqli_affected_rows($link);
|
||||
$webserver_id = mysqli_insert_id($link);
|
||||
}
|
||||
|
||||
$stmt="INSERT INTO vicidial_report_log set event_date=NOW(), user='$PHP_AUTH_USER', ip_address='$LOGip', report_name='$report_name', browser='$LOGbrowser', referer='$LOGhttp_referer', notes='$LOGserver_name:$LOGserver_port $LOGscript_name |$group[0], $query_date, $end_date, $shift, $file_download, $report_type|', url='$LOGfull_url', webserver='$webserver_id';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$report_log_id = mysqli_insert_id($link);
|
||||
##### END log visit to the vicidial_report_log table #####
|
||||
|
||||
if ( (strlen($slave_db_server)>5) and (preg_match("/$report_name/",$reports_use_slave_db)) )
|
||||
{
|
||||
mysqli_close($link);
|
||||
$use_slave_server=1;
|
||||
$db_source = 'S';
|
||||
require("dbconnect_mysqli.php");
|
||||
$MAIN.="<!-- Using slave server $slave_db_server $db_source -->\n";
|
||||
}
|
||||
|
||||
$stmt="SELECT user_group from vicidial_users where user='$PHP_AUTH_USER';";
|
||||
if ($DB) {$MAIN.="|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGuser_group = $row[0];
|
||||
|
||||
$stmt="SELECT allowed_campaigns,allowed_reports,admin_viewable_groups,admin_viewable_call_times from vicidial_user_groups where user_group='$LOGuser_group';";
|
||||
if ($DB) {$MAIN.="|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LOGallowed_campaigns = $row[0];
|
||||
$LOGallowed_reports = $row[1];
|
||||
$LOGadmin_viewable_groups = $row[2];
|
||||
$LOGadmin_viewable_call_times = $row[3];
|
||||
|
||||
$LOGallowed_campaignsSQL='';
|
||||
$whereLOGallowed_campaignsSQL='';
|
||||
if ( (!preg_match('/\-ALL/i', $LOGallowed_campaigns)) )
|
||||
{
|
||||
$rawLOGallowed_campaignsSQL = preg_replace("/ -/",'',$LOGallowed_campaigns);
|
||||
$rawLOGallowed_campaignsSQL = preg_replace("/ /","','",$rawLOGallowed_campaignsSQL);
|
||||
$LOGallowed_campaignsSQL = "and campaign_id IN('$rawLOGallowed_campaignsSQL')";
|
||||
$whereLOGallowed_campaignsSQL = "where campaign_id IN('$rawLOGallowed_campaignsSQL')";
|
||||
}
|
||||
|
||||
$LOGadmin_viewable_groupsSQL='';
|
||||
$whereLOGadmin_viewable_groupsSQL='';
|
||||
if ( (!preg_match('/\-\-ALL\-\-/i',$LOGadmin_viewable_groups)) and (strlen($LOGadmin_viewable_groups) > 3) )
|
||||
{
|
||||
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ -/",'',$LOGadmin_viewable_groups);
|
||||
$rawLOGadmin_viewable_groupsSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_groupsSQL);
|
||||
$LOGadmin_viewable_groupsSQL = "and user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||
$whereLOGadmin_viewable_groupsSQL = "where user_group IN('---ALL---','$rawLOGadmin_viewable_groupsSQL')";
|
||||
}
|
||||
|
||||
$LOGadmin_viewable_call_timesSQL='';
|
||||
$whereLOGadmin_viewable_call_timesSQL='';
|
||||
if ( (!preg_match('/\-\-ALL\-\-/i', $LOGadmin_viewable_call_times)) and (strlen($LOGadmin_viewable_call_times) > 3) )
|
||||
{
|
||||
$rawLOGadmin_viewable_call_timesSQL = preg_replace("/ -/",'',$LOGadmin_viewable_call_times);
|
||||
$rawLOGadmin_viewable_call_timesSQL = preg_replace("/ /","','",$rawLOGadmin_viewable_call_timesSQL);
|
||||
$LOGadmin_viewable_call_timesSQL = "and call_time_id IN('---ALL---','$rawLOGadmin_viewable_call_timesSQL')";
|
||||
$whereLOGadmin_viewable_call_timesSQL = "where call_time_id IN('---ALL---','$rawLOGadmin_viewable_call_timesSQL')";
|
||||
}
|
||||
|
||||
if ( (!preg_match("/$report_name/",$LOGallowed_reports)) and (!preg_match("/ALL REPORTS/",$LOGallowed_reports)) )
|
||||
{
|
||||
Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
|
||||
Header("HTTP/1.0 401 Unauthorized");
|
||||
echo _QXZ("You are not allowed to view this report").": |$PHP_AUTH_USER|$report_name|\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$NOW_DATE = date("Y-m-d");
|
||||
$NOW_TIME = date("Y-m-d H:i:s");
|
||||
$STARTtime = date("U");
|
||||
if (!isset($group)) {$group = array();}
|
||||
if (!isset($query_date)) {$query_date = "$NOW_DATE 00:00:00";}
|
||||
if (!isset($end_date)) {$end_date = "$NOW_DATE 23:23:59";}
|
||||
|
||||
|
||||
##### BEGIN Generate select list for which in-groups or campaigns to display #####
|
||||
|
||||
$stmt="select menu_id, menu_name From vicidial_call_menu order by menu_id asc;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$callmenus_to_print = mysqli_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $callmenus_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LISTcallmenus[$i] = $row[0];
|
||||
$LISTcallmenus_names[$i] = $row[1];
|
||||
$i++;
|
||||
}
|
||||
|
||||
$stmt="select campaign_id,campaign_name from vicidial_campaigns $whereLOGallowed_campaignsSQL order by campaign_id;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$groups_to_print = mysqli_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $groups_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$LISTgroups[$i] = $row[0];
|
||||
$LISTgroups_names[$i] = $row[1];
|
||||
$i++;
|
||||
}
|
||||
|
||||
##### END Generate select list for which in-groups or campaigns to display #####
|
||||
|
||||
$i=0;
|
||||
$group_string='|';
|
||||
$group_ct = count($group);
|
||||
while($i < $group_ct)
|
||||
{
|
||||
$group_string .= "$group[$i]|";
|
||||
$group_SQL .= "'$group[$i]',";
|
||||
$groupQS .= "&group[]=$group[$i]";
|
||||
$i++;
|
||||
}
|
||||
if ( (preg_match('/\s\-\-NONE\-\-\s/',$group_string) ) or ($group_ct < 1) )
|
||||
{
|
||||
$group_SQL = "''";
|
||||
# $group_SQL = "group_id IN('')";
|
||||
}
|
||||
else
|
||||
{
|
||||
$group_SQL = preg_replace('/,$/i', '',$group_SQL);
|
||||
# $group_SQL = "group_id IN($group_SQL)";
|
||||
}
|
||||
if (strlen($group_SQL)<3) {$group_SQL="''";}
|
||||
|
||||
|
||||
$i=0;
|
||||
$callmenu_string='|';
|
||||
$callmenu_ct = count($callmenus);
|
||||
while($i < $callmenu_ct)
|
||||
{
|
||||
$callmenu_string .= "$callmenus[$i]|";
|
||||
$callmenu_SQL .= "'$callmenus[$i]',";
|
||||
$callmenuQS .= "&callmenus[]=$callmenus[$i]";
|
||||
$i++;
|
||||
}
|
||||
if ( (preg_match('/\s\-\-NONE\-\-\s/',$callmenu_string) ) or ($callmenu_ct < 1) )
|
||||
{
|
||||
$callmenu_SQL = "''";
|
||||
# $group_SQL = "group_id IN('')";
|
||||
}
|
||||
else
|
||||
{
|
||||
$callmenu_SQL = preg_replace('/,$/i', '',$callmenu_SQL);
|
||||
# $group_SQL = "group_id IN($group_SQL)";
|
||||
}
|
||||
if (strlen($callmenu_SQL)<3) {$callmenu_SQL="''";}
|
||||
|
||||
|
||||
$stmt="select vsc_id,vsc_name from vicidial_status_categories;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($DB) {$MAIN.="$stmt\n";}
|
||||
$statcats_to_print = mysqli_num_rows($rslt);
|
||||
$i=0;
|
||||
while ($i < $statcats_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$vsc_id[$i] = $row[0];
|
||||
$vsc_name[$i] = $row[1];
|
||||
$vsc_count[$i] = 0;
|
||||
$i++;
|
||||
}
|
||||
|
||||
require("screen_colors.php");
|
||||
|
||||
# $NWB = " <a href=\"javascript:openNewWindow('help.php?ADD=99999";
|
||||
# $NWE = "')\"><IMG SRC=\"help.png\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP></A>";
|
||||
|
||||
$NWB = "<IMG SRC=\"help.png\" onClick=\"FillAndShowHelpDiv(event, '";
|
||||
$NWE = "')\" WIDTH=20 HEIGHT=20 BORDER=0 ALT=\"HELP\" ALIGN=TOP>";
|
||||
|
||||
$HEADER.="<HTML>\n";
|
||||
$HEADER.="<HEAD>\n";
|
||||
$HEADER.="<STYLE type=\"text/css\">\n";
|
||||
$HEADER.="<!--\n";
|
||||
$HEADER.=" .green {color: white; background-color: green}\n";
|
||||
$HEADER.=" .red {color: white; background-color: red}\n";
|
||||
$HEADER.=" .blue {color: white; background-color: blue}\n";
|
||||
$HEADER.=" .purple {color: white; background-color: purple}\n";
|
||||
$HEADER.="-->\n";
|
||||
$HEADER.=" </STYLE>\n";
|
||||
|
||||
if ($shift == 'RANGE')
|
||||
{
|
||||
$query_date_BEGIN = "$query_date";
|
||||
$query_date_END = "$end_date";
|
||||
}
|
||||
else
|
||||
{
|
||||
$EXquery_date = explode(' ',$query_date);
|
||||
$query_date = "$EXquery_date[0]";
|
||||
$EXend_date = explode(' ',$end_date);
|
||||
$end_date = "$EXend_date[0]";
|
||||
|
||||
if ($shift == 'AM')
|
||||
{
|
||||
$time_BEGIN=$AM_shift_BEGIN;
|
||||
$time_END=$AM_shift_END;
|
||||
if (strlen($time_BEGIN) < 6) {$time_BEGIN = "03:45:00";}
|
||||
if (strlen($time_END) < 6) {$time_END = "15:14:59";}
|
||||
}
|
||||
if ($shift == 'PM')
|
||||
{
|
||||
$time_BEGIN=$PM_shift_BEGIN;
|
||||
$time_END=$PM_shift_END;
|
||||
if (strlen($time_BEGIN) < 6) {$time_BEGIN = "15:15:00";}
|
||||
if (strlen($time_END) < 6) {$time_END = "23:15:00";}
|
||||
}
|
||||
if ($shift == 'ALL')
|
||||
{
|
||||
if (strlen($time_BEGIN) < 6) {$time_BEGIN = "00:00:00";}
|
||||
if (strlen($time_END) < 6) {$time_END = "23:59:59";}
|
||||
}
|
||||
$query_date_BEGIN = "$query_date $time_BEGIN";
|
||||
$query_date_END = "$end_date $time_END";
|
||||
}
|
||||
|
||||
|
||||
|
||||
$HEADER.="<script language=\"JavaScript\" src=\"calendar_db.js\"></script>\n";
|
||||
$HEADER.="<link rel=\"stylesheet\" href=\"calendar.css\">\n";
|
||||
$HEADER.="<link rel=\"stylesheet\" href=\"horizontalbargraph.css\">\n";
|
||||
require("chart_button.php");
|
||||
$HEADER.="<script src='chart/Chart.js'></script>\n";
|
||||
$HEADER.="<script language=\"JavaScript\" src=\"vicidial_chart_functions.js\"></script>\n";
|
||||
|
||||
$HEADER.="<link rel=\"stylesheet\" type=\"text/css\" href=\"vicidial_stylesheet.php\">\n";
|
||||
$HEADER.="<script language=\"JavaScript\" src=\"help.js\"></script>\n";
|
||||
$HEADER.="<div id='HelpDisplayDiv' class='help_info' style='display:none;'></div>";
|
||||
|
||||
$HEADER.="<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=utf-8\">\n";
|
||||
$HEADER.="<TITLE>"._QXZ("$report_name")."</TITLE></HEAD><BODY BGCOLOR=WHITE marginheight=0 marginwidth=0 leftmargin=0 topmargin=0>\n";
|
||||
|
||||
$short_header=1;
|
||||
|
||||
$JS_text="<script language='Javascript'>\n";
|
||||
|
||||
$MAIN.="<b>"._QXZ("$report_name")."</b> $NWB#CMstats$NWE\n";
|
||||
$MAIN.="<TABLE CELLPADDING=3 CELLSPACING=0><TR><TD>";
|
||||
|
||||
if ($DB > 0)
|
||||
{
|
||||
$MAIN.="<BR>\n";
|
||||
$MAIN.="$callmenu_ct|$callmenu_string|$callmenu_SQL\n";
|
||||
$MAIN.="<BR>\n";
|
||||
$MAIN.="$shift|$query_date|$end_date\n";
|
||||
$MAIN.="<BR>\n";
|
||||
}
|
||||
|
||||
$MAIN.="<FORM ACTION=\"$PHP_SELF\" METHOD=GET name=vicidial_report id=vicidial_report>\n";
|
||||
$MAIN.="<TABLE CELLPADDING=3 CELLSPACING=0 border='0' BGCOLOR=\"#".$SSframe_background."\"><TR><TD VALIGN='TOP'>";
|
||||
$MAIN.="<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
|
||||
$MAIN.="<INPUT TYPE=HIDDEN NAME=type VALUE=\"$type\">\n";
|
||||
$MAIN.=_QXZ("Date Range").":<BR>\n";
|
||||
|
||||
#$MAIN.="<INPUT TYPE=hidden NAME=query_date ID=query_date VALUE=\"$query_date\">\n";
|
||||
#$MAIN.="<INPUT TYPE=hidden NAME=end_date ID=end_date VALUE=\"$end_date\">\n";
|
||||
$MAIN.="<INPUT TYPE=TEXT NAME=query_date SIZE=11 MAXLENGTH=10 VALUE=\"$query_date\">";
|
||||
|
||||
$MAIN.="<script language=\"JavaScript\">\n";
|
||||
$MAIN.="function openNewWindow(url)\n";
|
||||
$MAIN.=" {\n";
|
||||
$MAIN.=" window.open (url,\"\",'width=620,height=300,scrollbars=yes,menubar=yes,address=yes');\n";
|
||||
$MAIN.=" }\n";
|
||||
$MAIN.="var o_cal = new tcal ({\n";
|
||||
$MAIN.=" // form name\n";
|
||||
$MAIN.=" 'formname': 'vicidial_report',\n";
|
||||
$MAIN.=" // input name\n";
|
||||
$MAIN.=" 'controlname': 'query_date'\n";
|
||||
$MAIN.="});\n";
|
||||
$MAIN.="o_cal.a_tpl.yearscroll = false;\n";
|
||||
$MAIN.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
|
||||
$MAIN.="</script>\n";
|
||||
|
||||
$MAIN.="<BR> "._QXZ("to")." <BR><INPUT TYPE=TEXT NAME=end_date SIZE=11 MAXLENGTH=10 VALUE=\"$end_date\">";
|
||||
|
||||
$MAIN.="<script language=\"JavaScript\">\n";
|
||||
$MAIN.="var o_cal = new tcal ({\n";
|
||||
$MAIN.=" // form name\n";
|
||||
$MAIN.=" 'formname': 'vicidial_report',\n";
|
||||
$MAIN.=" // input name\n";
|
||||
$MAIN.=" 'controlname': 'end_date'\n";
|
||||
$MAIN.="});\n";
|
||||
$MAIN.="o_cal.a_tpl.yearscroll = false;\n";
|
||||
$MAIN.="// o_cal.a_tpl.weekstart = 1; // Monday week start\n";
|
||||
$MAIN.="</script>\n";
|
||||
|
||||
$MAIN.="</TD><TD VALIGN=TOP>\n";
|
||||
|
||||
|
||||
$MAIN.=_QXZ("Campaigns").": \n";
|
||||
$MAIN.="</TD><TD ROWSPAN=2 VALIGN=TOP>\n";
|
||||
$MAIN.="<SELECT SIZE=5 NAME=group[] multiple>\n";
|
||||
$o=0;
|
||||
while ($groups_to_print > $o)
|
||||
{
|
||||
if (preg_match("/\|$LISTgroups[$o]\|/",$group_string))
|
||||
{$MAIN.="<option selected value=\"$LISTgroups[$o]\">$LISTgroups[$o] - $LISTgroups_names[$o]</option>\n";}
|
||||
else
|
||||
{$MAIN.="<option value=\"$LISTgroups[$o]\">$LISTgroups[$o] - $LISTgroups_names[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
$MAIN.="</SELECT>\n";
|
||||
$MAIN.="</TD><TD ROWSPAN=2 VALIGN=TOP>\n";
|
||||
|
||||
/*
|
||||
$MAIN.=_QXZ("Callmenus").": \n";
|
||||
$MAIN.="</TD><TD VALIGN=TOP>\n";
|
||||
$MAIN.="<SELECT SIZE=5 NAME=callmenus[] multiple>\n";
|
||||
$o=0;
|
||||
|
||||
while ($callmenus_to_print > $o)
|
||||
{
|
||||
if (preg_match("/\|$LISTcallmenus\|/",$callmenu_string))
|
||||
{$MAIN.="<option value='$LISTcallmenus[$o]' selected>$LISTcallmenus[$o] - $LISTcallmenus_names[$o]</option>\n";}
|
||||
else
|
||||
{$MAIN.="<option value='$LISTcallmenus[$o]'>$LISTcallmenus[$o] - $LISTcallmenus_names[$o]</option>\n";}
|
||||
$o++;
|
||||
}
|
||||
|
||||
$MAIN.="</SELECT>\n";
|
||||
$MAIN.="</TD><TD VALIGN=TOP>\n";
|
||||
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2> ";
|
||||
$MAIN.="<a href=\"$PHP_SELF?DB=$DB&type=$type&query_date=$query_date&end_date=$end_date&query_date_D=$query_date_D&query_date_T=$query_date_T&end_date_D=$end_date_D&end_date_T=$end_date_T$callmenuQS&shift=$shift&file_download=1&search_archived_data=$search_archived_data\">"._QXZ("DOWNLOAD")."</a> | ";
|
||||
$MAIN.="<a href=\"./admin.php?ADD=3111&group_id=$group[0]\">"._QXZ("MODIFY")."</a> | ";
|
||||
$MAIN.="<a href=\"./admin.php?ADD=999999\">"._QXZ("REPORTS")."</a> | ";
|
||||
$MAIN.="<a href=\"./AST_CLOSERstats.php?query_date=$query_date&end_date=$end_date&shift=$shift$groupQS\">"._QXZ("CLOSER REPORT")."</a> \n";
|
||||
$MAIN.="</FONT>\n";
|
||||
|
||||
$MAIN.="<SCRIPT LANGUAGE=\"JavaScript\">\n";
|
||||
|
||||
$MAIN.="function submit_form()\n";
|
||||
$MAIN.=" {\n";
|
||||
$MAIN.=" document.vicidial_report.end_date.value = document.vicidial_report.end_date_D.value + \" \" + document.vicidial_report.end_date_T.value;\n";
|
||||
$MAIN.=" document.vicidial_report.query_date.value = document.vicidial_report.query_date_D.value + \" \" + document.vicidial_report.query_date_T.value;\n";
|
||||
$MAIN.=" document.vicidial_report.submit();\n";
|
||||
$MAIN.=" }\n";
|
||||
|
||||
$MAIN.="</SCRIPT>\n";
|
||||
*/
|
||||
|
||||
$MAIN.=_QXZ("Report type").": ";
|
||||
$MAIN.="<select name='report_type'>";
|
||||
if ($report_type) {$MAIN.="<option value='$report_type' selected>$report_type</option>";}
|
||||
$MAIN.="<option value=''>"._QXZ("Select report type")."</option><option value='SINGLE_AGENT'>"._QXZ("SINGLE_AGENT")."</option><option value='ALL_AGENTS'>"._QXZ("ALL_AGENTS")."</option></select>\n<BR>";
|
||||
$MAIN.="<BR>"._QXZ("User ID").": \n";
|
||||
$MAIN.="<input type='text' name='user' value='$user' size='10' maxlength='10'><BR><font size='1'><B>("._QXZ("Single agent only").")</B></font>\n";
|
||||
|
||||
$MAIN.="</TD><TD ROWSPAN=2 VALIGN=TOP>\n";
|
||||
$MAIN.="<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
|
||||
$MAIN.="<a href=\"$PHP_SELF?DB=$DB&type=$type&query_date=$query_date&end_date=$end_date$groupQS&shift=$shift&file_download=1&search_archived_data=$search_archived_data&user=$user&report_type=$report_type\">"._QXZ("DOWNLOAD")."</a> | ";
|
||||
$MAIN.="<a href=\"./admin.php?ADD=31&campaign_id=$group[0]\">"._QXZ("MODIFY")."</a> | ";
|
||||
$MAIN.="<a href=\"./admin.php?ADD=999999\">"._QXZ("REPORTS")."</a> | ";
|
||||
$MAIN.="<a href=\"./AST_VDADstats.php?query_date=$query_date&end_date=$end_date&shift=$shift$groupQS\">"._QXZ("OUTBOUND REPORT")."</a> \n";
|
||||
$MAIN.="<BR><BR>";
|
||||
if ($archives_available=="Y")
|
||||
{
|
||||
$MAIN.="<input type='checkbox' name='search_archived_data' value='checked' $search_archived_data>"._QXZ("Search archived data")."<BR><BR>\n";
|
||||
}
|
||||
$MAIN.=" <input type=submit value=\""._QXZ("SUBMIT")."\" name=submit id=submit>\n";
|
||||
$MAIN.="</FONT>\n";
|
||||
$MAIN.="</TD></TR></TABLE>\n";
|
||||
$MAIN.="</FORM>\n\n";
|
||||
|
||||
$MAIN.="<PRE><FONT SIZE=2>\n\n";
|
||||
|
||||
|
||||
if ($callmenus_to_print < 1 || ($report_type=="SINGLE_AGENT" && !$user) || !$report_type || !$submit)
|
||||
{
|
||||
$MAIN.="\n\n";
|
||||
$MAIN.=_QXZ("PLEASE ENTER A USER ID, SELECT CALLMENUS AND DATE RANGE ABOVE AND CLICK SUBMIT")."\n";
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
$MAIN.=_QXZ("Callmenu Report").": $query_date_BEGIN "._QXZ("to")." $query_date_END $NOW_TIME\n";
|
||||
$MAIN.=" "._QXZ("Report").": $report_type\n";
|
||||
$MAIN.=" "._QXZ("Campaigns").": $group_string\n";
|
||||
|
||||
$CSV_text="\""._QXZ("Callmenu Report").": $query_date_BEGIN "._QXZ("to")." $query_date_END\",\"$NOW_TIME\"\n";
|
||||
|
||||
$TOTALcalls=0;
|
||||
$NOCALLERIDcalls=0;
|
||||
$UNIQUEcallers=0;
|
||||
$totFLOWivr_time=0;
|
||||
$totFLOWtotal_time=0;
|
||||
|
||||
##### Grab all records for the IVR for the specified time period
|
||||
/*
|
||||
# $stmt="select ".$live_inbound_log_table.".uniqueid,extension,start_time,comment_a,comment_b,comment_d,UNIX_TIMESTAMP(start_time),phone_ext from ".$live_inbound_log_table.", ".$vicidial_agent_log_table." where start_time >= '$query_date_BEGIN' and start_time <= '$query_date_END' and comment_b in ($callmenu_SQL) and ".$vicidial_agent_log_table.".uniqueid=".$live_inbound_log_table.".uniqueid and ".$vicidial_agent_log_table.".user='$user' and ".$vicidial_agent_log_table.".campaign_id in ($campaign_SQL) order by uniqueid,start_time;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$logs_to_print = mysqli_num_rows($rslt);
|
||||
$p=0;
|
||||
while ($p < $logs_to_print)
|
||||
{
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$uniqueid[$p] = $row[0];
|
||||
$extension[$p] = $row[1];
|
||||
$start_time[$p] = $row[2];
|
||||
$comment_a[$p] = $row[3];
|
||||
$comment_b[$p] = $row[4];
|
||||
$comment_d[$p] = $row[5];
|
||||
$epoch[$p] = $row[6];
|
||||
$phone_ext[$p] = $row[7];
|
||||
$p++;
|
||||
}
|
||||
*/
|
||||
|
||||
if ($report_type=="SINGLE_AGENT") {
|
||||
$MAIN.=" "._QXZ("Agent").": $user\n";
|
||||
$al_stmt="select uniqueid from ".$vicidial_agent_log_table." where uniqueid is not null and uniqueid!='' and event_time>='$query_date_BEGIN 00:00:00' and event_time<='$query_date_END 23:59:59' and campaign_id in ($group_SQL) and user='$user' order by uniqueid asc";
|
||||
if ($DB) {$MAIN.="$al_stmt\n";}
|
||||
$al_rslt=mysql_to_mysqli($al_stmt, $link);
|
||||
$max_prompts=0;
|
||||
$prompts_array=array();
|
||||
$calls_array=array();
|
||||
$HTML_text="";
|
||||
while ($al_row=mysqli_fetch_row($al_rslt))
|
||||
{
|
||||
$uniqueid=$al_row[0];
|
||||
$vl_stmt="select phone_ext, comment_b, comment_d, start_time from ".$live_inbound_log_table." where uniqueid='$uniqueid' and comment_d like '%>%' order by start_time";
|
||||
if ($DB) {$MAIN.="$vl_stmt\n";}
|
||||
$vl_rslt=mysql_to_mysqli($vl_stmt, $link);
|
||||
$call_rslt="";
|
||||
$total_points=0;
|
||||
$sq=0;
|
||||
$prompts=0;
|
||||
while ($vl_row=mysqli_fetch_row($vl_rslt))
|
||||
{
|
||||
$phone_ext=$vl_row[0];
|
||||
$comment_b=$vl_row[1];
|
||||
$comment_d=$vl_row[2];
|
||||
$start_time=$vl_row[3];
|
||||
$calls_array["$uniqueid"]["start_time"]="$start_time";
|
||||
$calls_array["$uniqueid"]["phone"]="$phone_ext";
|
||||
if (preg_match('/\>[0-9]$/', $comment_d))
|
||||
{
|
||||
$qa_array=explode(">", $comment_d);
|
||||
$total_points+=$qa_array[1];
|
||||
$prompts_array["$qa_array[0]"]+=$qa_array[1];
|
||||
$calls_array["$uniqueid"]["$qa_array[0]"]=($qa_array[1]+0);
|
||||
}
|
||||
}
|
||||
if ($prompts>$max_prompts) {$max_prompts=$prompts;}
|
||||
}
|
||||
|
||||
$CSV_text="\""._QXZ("PHONE")."\",\""._QXZ("START TIME")."\",";
|
||||
$CSV_text_end="\"\",\""._QXZ("GRAND TOTAL").":\",";
|
||||
|
||||
$HTML_text="<table border='0' cellpadding='2' cellspacing='1'>";
|
||||
$HTML_text.="<tr bgcolor='".$SSmenu_background."'><th><font color='#FFF'>PHONE</font></th><th><font color='#FFF'>"._QXZ("START TIME")."</font></th>";
|
||||
$HTML_text_end="<tr bgcolor='".$SSmenu_background."'><td colspan='2' align='right'><font color='#FFF'>"._QXZ("GRAND TOTAL").":</font></td>";
|
||||
|
||||
ksort($prompts_array);
|
||||
$grand_total=0;
|
||||
while (list($key, $val)=each($prompts_array))
|
||||
{
|
||||
$val+=0;
|
||||
$grand_total+=$val;
|
||||
$CSV_text.="\"$key\",";
|
||||
$CSV_text_end.="\"$val\",";
|
||||
$HTML_text.="<th><font color='#FFF'>$key</font></th>";
|
||||
$HTML_text_end.="<th><font color='#FFF'>$val</font></th>";
|
||||
}
|
||||
$HTML_text_end.="<th><font color='#FFF'>$grand_total</font></th></tr>";
|
||||
$CSV_text_end.="\"$grand_total\"\n";
|
||||
$HTML_text.="<th><font color='#FFF'>"._QXZ("TOTAL POINTS").":</font></th></tr>";
|
||||
$CSV_text.="\""._QXZ("TOTAL POINTS")."\"\n";
|
||||
|
||||
ksort($calls_array);
|
||||
while (list($key, $val)=each($calls_array))
|
||||
{
|
||||
$CSV_text.="\"".$calls_array[$key]["phone"]."\",\"".$calls_array[$key]["start_time"]."\",";
|
||||
$HTML_text.="<tr bgcolor='".$SSstd_row1_background."'><th>".$calls_array[$key]["phone"]."</th><th>".$calls_array[$key]["start_time"]."</th>";
|
||||
reset($prompts_array);
|
||||
$call_points=0;
|
||||
while (list($key2, $val2)=each($prompts_array))
|
||||
{
|
||||
$CSV_text.="\"".($calls_array[$key][$key2]+0)."\",";
|
||||
$HTML_text.="<th>".($calls_array[$key][$key2]+0)."</th>";
|
||||
$call_points+=($calls_array[$key][$key2]+0);
|
||||
}
|
||||
$CSV_text.="\"".($call_points+0)."\"\n";
|
||||
$HTML_text.="<th>".($call_points+0)."</th></tr>";
|
||||
}
|
||||
|
||||
$CSV_text.=$CSV_text_end;
|
||||
|
||||
$HTML_text.=$HTML_text_end;
|
||||
$HTML_text.="</table>";
|
||||
} else {
|
||||
$al_stmt="select uniqueid,user from ".$vicidial_agent_log_table." where uniqueid is not null and uniqueid!='' and event_time>='$query_date_BEGIN 00:00:00' and event_time<='$query_date_END 23:59:59' and campaign_id in ($group_SQL) order by uniqueid asc";
|
||||
if ($DB) {$MAIN.="$al_stmt\n";}
|
||||
$al_rslt=mysql_to_mysqli($al_stmt, $link);
|
||||
$max_prompts=0;
|
||||
$prompts_array=array();
|
||||
$agents_array=array();
|
||||
$HTML_text="";
|
||||
$CSV_text="";
|
||||
while ($al_row=mysqli_fetch_row($al_rslt))
|
||||
{
|
||||
$uniqueid=$al_row[0];
|
||||
$agent=$al_row[1];
|
||||
$user_stmt="select full_name from vicidial_users where user='$agent'";
|
||||
$user_rslt=mysql_to_mysqli($user_stmt, $link);
|
||||
if (mysqli_num_rows($user_rslt)>0) {
|
||||
$user_row=mysqli_fetch_row($user_rslt);
|
||||
$full_name=$user_row[0];
|
||||
} else {
|
||||
$full_name=$agent;
|
||||
}
|
||||
$agent_array["$agent"]["AGENT"]=$full_name;
|
||||
$vl_stmt="select phone_ext, comment_b, comment_d, start_time from ".$live_inbound_log_table." where uniqueid='$uniqueid' and comment_d like '%>%' order by start_time";
|
||||
if ($DB) {$MAIN.="$vl_stmt\n";}
|
||||
$vl_rslt=mysql_to_mysqli($vl_stmt, $link);
|
||||
$call_rslt="";
|
||||
$total_points=0;
|
||||
$sq=0;
|
||||
$prompts=0;
|
||||
while ($vl_row=mysqli_fetch_row($vl_rslt))
|
||||
{
|
||||
$phone_ext=$vl_row[0];
|
||||
$comment_b=$vl_row[1];
|
||||
$comment_d=$vl_row[2];
|
||||
$start_time=$vl_row[3];
|
||||
if (preg_match('/\>[0-9]$/', $comment_d))
|
||||
{
|
||||
$qa_array=explode(">", $comment_d);
|
||||
$total_points+=$qa_array[1];
|
||||
$prompts_array["$qa_array[0]"]+=$qa_array[1];
|
||||
$agent_array["$agent"]["$qa_array[0]"]+=$qa_array[1];
|
||||
$agent_array["$agent"]["TOTAL"]+=$qa_array[1];
|
||||
}
|
||||
}
|
||||
if ($prompts>$max_prompts) {$max_prompts=$prompts;}
|
||||
}
|
||||
|
||||
$CSV_text="\""._QXZ("AGENT")."\",";
|
||||
$CSV_text_end="\""._QXZ("TOTALS").":\",";
|
||||
|
||||
|
||||
$HTML_text="<table border='0' cellpadding='2' cellspacing='1'>";
|
||||
$HTML_text.="<tr bgcolor='".$SSmenu_background."'><th><font color='#FFF'>"._QXZ("AGENT")."</font></th>";
|
||||
$HTML_text_end="<tr bgcolor='".$SSmenu_background."'><td align='right'><font color='#FFF'>"._QXZ("TOTALS").":</font></td>";
|
||||
|
||||
|
||||
|
||||
ksort($prompts_array);
|
||||
$grand_total=0;
|
||||
while (list($key, $val)=each($prompts_array))
|
||||
{
|
||||
$val+=0;
|
||||
$grand_total+=$val;
|
||||
$CSV_text.="\"$key\",";
|
||||
$CSV_text_end.="\"$val\",";
|
||||
$HTML_text.="<th><font color='#FFF'>$key</font></th>";
|
||||
$HTML_text_end.="<th><font color='#FFF'>$val</font></th>";
|
||||
}
|
||||
$HTML_text.="<th><font color='#FFF'>"._QXZ("TOTAL POINTS").":</font></th></tr>";
|
||||
$CSV_text.="\""._QXZ("TOTAL POINTS")."\"\n";
|
||||
|
||||
$HTML_text_end.="<th><font color='#FFF'>$grand_total</font></th></tr>";
|
||||
$CSV_text_end.="\"$grand_total\"\n";
|
||||
|
||||
|
||||
uasort($agent_array, function ($i, $j)
|
||||
{
|
||||
$a = $i['TOTAL'];
|
||||
$b = $j['TOTAL'];
|
||||
if ($a == $b) return 0;
|
||||
elseif ($a > $b) return -1;
|
||||
else return 1;
|
||||
});
|
||||
|
||||
while (list($key, $val)=each($agent_array))
|
||||
{
|
||||
$CSV_text.="\"".$agent_array[$key]["AGENT"]."\",";
|
||||
$HTML_text.="<tr bgcolor='".$SSstd_row1_background."'><th>".$agent_array[$key]["AGENT"]."</th>";
|
||||
reset($prompts_array);
|
||||
while (list($key2, $val2)=each($prompts_array))
|
||||
{
|
||||
$CSV_text.="\"".($agent_array[$key][$key2]+0)."\",";
|
||||
$HTML_text.="<th>".($agent_array[$key][$key2]+0)."</th>";
|
||||
$call_points+=($agent_array[$key][$key2]+0);
|
||||
}
|
||||
$CSV_text.="\"".($agent_array[$key]["TOTAL"]+0)."\"\n";
|
||||
$HTML_text.="<th>".($agent_array[$key]["TOTAL"]+0)."</th></tr>";
|
||||
}
|
||||
|
||||
$CSV_text.=$CSV_text_end;
|
||||
|
||||
$HTML_text.=$HTML_text_end;
|
||||
$HTML_text.="</table>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
$MAIN.=$HTML_text;
|
||||
$ENDtime = date("U");
|
||||
$RUNtime = ($ENDtime - $STARTtime);
|
||||
$MAIN.="\n"._QXZ("Run Time").": $RUNtime "._QXZ("seconds")."|$db_source\n";
|
||||
$MAIN.="</PRE>\n";
|
||||
$MAIN.="</TD></TR></TABLE>\n";
|
||||
|
||||
$MAIN.="</BODY></HTML>\n";
|
||||
}
|
||||
|
||||
if ($file_download>0) {
|
||||
$FILE_TIME = date("Ymd-His");
|
||||
$CSVfilename = "AST_CMstats_$US$FILE_TIME.csv";
|
||||
$CSV_text=preg_replace('/ +\"/', '"', $CSV_text);
|
||||
$CSV_text=preg_replace('/\" +/', '"', $CSV_text);
|
||||
// We'll be outputting a TXT file
|
||||
header('Content-type: application/octet-stream');
|
||||
|
||||
// It will be called LIST_101_20090209-121212.txt
|
||||
header("Content-Disposition: attachment; filename=\"$CSVfilename\"");
|
||||
header('Expires: 0');
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Pragma: public');
|
||||
ob_clean();
|
||||
flush();
|
||||
|
||||
echo "$CSV_text";
|
||||
|
||||
if ($db_source == 'S')
|
||||
{
|
||||
mysqli_close($link);
|
||||
$use_slave_server=0;
|
||||
$db_source = 'M';
|
||||
require("dbconnect_mysqli.php");
|
||||
}
|
||||
|
||||
$endMS = microtime();
|
||||
$startMSary = explode(" ",$startMS);
|
||||
$endMSary = explode(" ",$endMS);
|
||||
$runS = ($endMSary[0] - $startMSary[0]);
|
||||
$runM = ($endMSary[1] - $startMSary[1]);
|
||||
$TOTALrun = ($runS + $runM);
|
||||
|
||||
$stmt="UPDATE vicidial_report_log set run_time='$TOTALrun' where report_log_id='$report_log_id';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
exit;
|
||||
} else {
|
||||
|
||||
echo $HEADER;
|
||||
require("admin_header.php");
|
||||
echo $MAIN;
|
||||
}
|
||||
|
||||
if ($db_source == 'S')
|
||||
{
|
||||
mysqli_close($link);
|
||||
$use_slave_server=0;
|
||||
$db_source = 'M';
|
||||
require("dbconnect_mysqli.php");
|
||||
}
|
||||
|
||||
$endMS = microtime();
|
||||
$startMSary = explode(" ",$startMS);
|
||||
$endMSary = explode(" ",$endMS);
|
||||
$runS = ($endMSary[0] - $startMSary[0]);
|
||||
$runM = ($endMSary[1] - $startMSary[1]);
|
||||
$TOTALrun = ($runS + $runM);
|
||||
|
||||
$stmt="UPDATE vicidial_report_log set run_time='$TOTALrun' where report_log_id='$report_log_id';";
|
||||
if ($DB) {echo "|$stmt|\n";}
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
# version: 201806102040
|
||||
# version: 201807130928
|
||||
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
|
||||
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
|
||||
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage. Default is N.</QXZ>
|
||||
@@ -506,6 +506,17 @@ inbound_groups-hold_time_option_callback_list_id Hold Time Option Callback List
|
||||
inbound_groups-icbq_expiration_hours Callback Queue Expire Hours <QXZ>If a Hold Time or Wait Time Option is set to PRESS_CALLBACK_QUEUE, this is the maximum number of hours that an entry can stay in the inbound callback queue before it is removed without dialing it. Default is 96 hours.</QXZ>
|
||||
inbound_groups-icbq_call_time_id Callback Queue Call Time <QXZ>For any inbound callback queue outbound calls to be placed, this is the local call time used to determine if the number can be dialed right now or not.</QXZ>
|
||||
inbound_groups-icbq_dial_filter Callback Queue Dial Filter <QXZ>This option allows you to remove DNC numbers from your Callback Queue. You can use any combination of: Internal DNC List, Campaign DNC List tied to campaign of the list where the lead is, and Areacode DNC wildcard</QXZ>
|
||||
inbound_groups-cid_cb_confirm_number CID Callback Number Validation <QXZ>If this option is enabled, the Caller ID Number of the customer will be checked for valid length, and optionally checked against a Filter Phone Group to determine if it is valid. This option will also play back the phone number to the customer and ask them to confirm that they want to use this number to be called back at. The customer will also have the option of entering in a different phone number to be called back at. The ONLY_IF_INVALID option will not ask the customer to confirm if the Caller ID number is valid. Default is NO for disabled.</QXZ>
|
||||
inbound_groups-cid_cb_invalid_filter_phone_group CID Callback Number Invalid Filter Phone Group <QXZ>If CID Callback Number Validation is enabled, then this optional setting will check to see if the customer Caller ID Number is in the selected Filter Phone Group, and if it is the number will be considered invalid and the customer will be asked to enter in a phone number to be called back at. Default is empty, for disabled.</QXZ>
|
||||
inbound_groups-cid_cb_valid_length CID Callback Number Length <QXZ>If CID Callback Number Validation is enabled, then this setting is where the length of a valid Caller ID number is input. You can enter more than one length number by separating them with a dash, so 10-11 would consider both ten and eleven digits to be valid Caller ID phone numbers. Default is 10.</QXZ>
|
||||
inbound_groups-cid_cb_valid_filename CID Callback Number Valid Filename <QXZ>This is the audio prompt or prompts that the customer will hear if CID Callback Number Validation is set to YES and they have a valid Caller ID phone number. You can optionally have multiple prompts in this setting separated by a pipe character, and you can also optionally have the phone number spoken by using --PHONE-- as a part of the value for this setting. An example script for this audio prompt might look something like this - To receive a call back on this number 9876543210, please press 1, or press 2 if you want us to call you back on a different number. - Default is blank, for disabled.</QXZ>
|
||||
inbound_groups-cid_cb_confirmed_filename CID Callback Number Confirmed Filename <QXZ>This is the audio prompt or prompts that the customer will hear if they have confirmed the phone number that they are to be called back on. You can optionally have multiple prompts in this setting separated by a pipe character, and you can also optionally have the phone number spoken by using --PHONE-- as a part of the value for this setting. An example script for this audio prompt might look something like this - That is great, we will keep your place in the queue and call you back on 9876543210 as soon as one of our team members is available. Thank you for calling. - Default is blank.</QXZ>
|
||||
inbound_groups-cid_cb_enter_filename CID Callback Number Enter Filename <QXZ>This is the audio prompt that the customer will hear when they have been asked to enter the phone number that they want to be called back on. An example script for this audio prompt might look something like this - Using the keypad on your telephone, please enter the number you wish to be called back on including local area code or full mobile number followed by the pound key. - Default is blank.</QXZ>
|
||||
inbound_groups-cid_cb_you_entered_filename CID Callback Number You Entered Filename <QXZ>This is the audio prompt that the customer will hear immediately after they have entered the phone number that they want to be called back on. An example script for this audio prompt might look something like this - Thanks, you have entered - Default is blank.</QXZ>
|
||||
inbound_groups-cid_cb_press_to_confirm_filename CID Callback Number Confirm Filename <QXZ>This is the audio prompt that the customer will hear after the CID Callback Number You Entered Filename prompt and the number they have entered have both played after they have entered the phone number that they want to be called back on. An example script for this audio prompt might look something like this - Please press 1 to confirm this number or press 2 if this is incorrect and to enter the number again. - Default is blank.</QXZ>
|
||||
inbound_groups-cid_cb_invalid_filename CID Callback Number Invalid Filename <QXZ>This is the audio prompt that the customer will hear if they have entered an invalid phone number to be called back at. After this prompt plays, the customer will be sent back to the CID Callback Number Enter Filename prompt. After entering an invalid number 2 times, the customer will be sent to the CID Callback Number Error prompt mentioned below. An example script for this audio prompt might look something like this - We are sorry but we cannot recognize the number that you have entered. - Default is blank.</QXZ>
|
||||
inbound_groups-cid_cb_reenter_filename CID Callback Number Reenter Filename <QXZ>This is the audio prompt that the customer will hear if they have entered in a phone number but pressed 2 to not confirm the number they just entered. After this prompt plays, the customer will be sent back to the CID Callback Number Enter Filename prompt. An example script for this audio prompt might look something like this - Okay, lets try again. - Default is blank.</QXZ>
|
||||
inbound_groups-cid_cb_error_filename CID Callback Number Error Filename <QXZ>This is the audio prompt that the customer will hear if they have entered in an invalid phone number twice. After this prompt plays, the customer will be sent back to queue. An example script for this audio prompt might look something like this - It looks like we are having some difficulty, so please hold and we will transfer you to one of our team members as soon as possible. - Default is blank.</QXZ>
|
||||
inbound_groups-closing_time_action Closing Time Action <QXZ>This allows you to specify the routing of the call if the closing time of the in-group is reached while the call is still waiting for an agent, Closing time is the end of the Call Time that is defined for this in-group. Default is DISABLED. If one of the PRESS_ options is selected, it will play the Press Filename defined below and give the customer the option to press 1 on their phone to leave the queue and run the selected option. The PRESS_CALLBACK_QUEUE option will preserve the caller place in line and will call the customer back when their place is the next one to go to an agent, this inbound callback queue entry will last until the call is placed back to the customer or as long as the Callback Queue Expire Hours setting above.</QXZ>
|
||||
inbound_groups-closing_time_now_trigger Closing Time Now Trigger <QXZ>If Closing Time Action is enabled, this flag allows you to send all customers waiting in the queue to the Closing Time Action as defined above, before the actual closing time is reached for the day.</QXZ>
|
||||
inbound_groups-closing_time_filename Closing Time Press Filename <QXZ>If Closing Time Option is set to one of the PRESS_ options, this is the filename prompt that is played if the in-group has reached the closing time for the day. It is very important that this audio file is 10 seconds or less or there will be problems.</QXZ>
|
||||
@@ -1172,6 +1183,7 @@ agentDIDstats Agent DID Report <QXZ>This report breaks down agent call handling
|
||||
email_log_report Email Log Report <QXZ>This report gives a detailed log report of any emails handled by the dialer, including links to the full text of received emails. It will display the date the email was received, the address and name of the sender, a bit of the beginning of the emails text (with a link to the full text), and the status that the agent dispositioned the email as.</QXZ>
|
||||
inbound_daily_report Inbound Daily Report <QXZ>This report will give a daily or hourly, weekly, monthly, and quarterly count on all calls received by the in-groups selected for the given date range.</QXZ><BR><QXZ><U>TOTAL CALLS OFFERED</U> = Total calls taken by the in-group.</QXZ><BR><QXZ><U>TOTAL CALLS ANSWERED</U> = Total calls answered by the in-group.</QXZ><BR><QXZ><U>TOTAL AGENTS ANSWERED</U> = Total number of distinct agents who fielded calls to this in-group.</QXZ><BR><QXZ><U>TOTAL CALLS ABANDONED</U> = Total calls ended in queue (dropped).</QXZ><BR><QXZ><U>TOTAL ABANDON PERCENT</U> = Percentage of calls abandoned (<U>TOTAL CALLS ABANDONED</U> / <U>TOTAL CALLS OFFERED</U>).</QXZ><BR><QXZ><U>AVG ABANDON TIME</U> = Average amount of time a caller waited in queue before abandoning the call.</QXZ><BR><QXZ><U>AVG ANSWER SPEED</U> = Average amount of time a caller waited in queue before an agent answered.</QXZ><BR><QXZ><U>AVG TALK TIME</U> = Average amount of time an agent remained on the line with the caller before the call was hung up - does not include caller queue time.</QXZ><BR><QXZ><U>TOTAL TALK TIME</U> = Total amount of time agents remained on the line with callers before calls ended - does not include caller queue time.</QXZ><BR><QXZ><U>TOTAL WRAP TIME</U> = Total amount of time agents used to -wrap- the call - assumed to be 15 second per answered call.</QXZ><BR><QXZ><U>TOTAL CALL TIME</U> = Total talk time plus total wrap time.</QXZ>
|
||||
IVRstats Inbound IVR Report <QXZ>This report shows a breakdown of IVR paths followed by callers on selected IVRs based on the date range.</QXZ><BR><QXZ><U>IVR CALLS</U> = Total calls taken by or made through the selected IVRs that follow the -CALL PATH-.</QXZ><BR><QXZ><U>QUEUE CALLS</U> = Total inbound calls taken by the selected IVRs that follow the -CALL PATH-.</QXZ><BR><QXZ><U>QUEUE DROP CALLS</U> = Total inbound calls taken by the selected IVRs that follow the -CALL PATH- that were dropped.</QXZ><BR><QXZ><U>QUEUE DROP PERCENT</U> = Percentage of dropped inbound calls taken by the selected IVRs (QUEUE DROP CALLS / QUEUE CALLS).</QXZ><BR><QXZ><U>IVR AVG TIME</U> = Average amount of time spent in-call, taken by dividing IVR CALLS by the total time spent in the selected IVRs.</QXZ><BR><QXZ><U>TOTAL AVG TIME</U> = Total call time spent in the selected IVRs.</QXZ><BR><QXZ><U>CALL PATH</U> = The specific call path followed on the IVR - report will display each distinct path followed by all the selected IVRs for the selected date range.</QXZ>
|
||||
CMstats Callmenu Survey Report <QXZ>This report shows one of two report types. The first displays all responses to callmenu prompts on calls handled by a given agent, within a list of selected campaigns, for a given time frame. Each call is displayed in chronological order, and for each call, the prompts and responses given are displayed. Each prompt response is treated as its numerical value to create a point total for the call, and total points per prompt and call are given at the bottom of the report. The second report is a multiple agent report, which utilizes the dates given and campaigns selected (the value in the agent field is ignored). The resulting report gives a summary per agent of the prompts met and total value of the responses given. The results for this report are sorted in descending order based on the total points the agent accrued.</QXZ><BR><BR><QXZ><U>SINGLE AGENT REPORT</U> </QXZ><BR><QXZ><U>PHONE</U> = The customer's phone number on the call.</QXZ><BR><QXZ><U>START TIME</U> = The call time from the live_inbound_log table.</QXZ><BR><QXZ><U>TOTAL POINTS</U> = The sum of the numeric values given for all callmenu survey prompts reached on the call.</QXZ><BR><BR><QXZ><U>ALL AGENT REPORT</U> </QXZ><BR><QXZ><U>AGENT</U> = The name of the agent.</QXZ><BR><QXZ><U>TOTAL POINTS</U> = The sum of the numeric values given for all callmenu survey prompts for calls the agent handled within the report parameters.</QXZ>
|
||||
LISTS_campaign_stats Lists Campaign Statuses Report <QXZ><U>LIST ID SUMMARY</U> = Shows each list in the campaign(s) selected by the user, the count of leads in each list, and whether the list is active or inactive.</QXZ><BR><QXZ><U>STATUS FLAGS SUMMARY</U> = Shows a breakdown of the status flags for all the selected lists in all the selected campaigns combined. Status flags are set in the -Statuses- section of a campaign or the -System Statuses-.</QXZ><BR><QXZ><U>CUSTOM STATUS CATEGORY STATS</U> = Shows a breakdown of the custom status categories for all the selected lists in all the selected campaigns combined. Categories can be defined under the -System Statuses- in the admin section.</QXZ><BR><QXZ><U>PER LIST DETAIL STATS</U> = Shows each list in the campaign(s) selected by the user, with a breakdown of each status flag (and percentage of each flag) and status within that list.</QXZ>
|
||||
LISTS_pass_report Lists Pass Report <QXZ>This is a list inventory report, not a calling report. This report will show statistics for all of the lists in the selected campaigns</QXZ><BR><QXZ><U>FIRST LOAD DATE</U> = Date list first had leads loaded.</QXZ><BR><QXZ><U>LIST ID and NAME</U> = List ID number and name of list.</QXZ><BR><QXZ><U>CAMPAIGN</U> = Campaign that the list currently belongs to.</QXZ><BR><QXZ><U>LEAD COUNT</U> = Number of leads in the list.</QXZ><BR><QXZ><U>ACTIVE</U> = Whether or not the lead was active.</QXZ><BR><QXZ><U>CONTACTS 1st-5th,LIFE PASS</U> = Leads that were -human answered- (dispoed a status where HUMAN ANSWER is set to -Y- on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>CNT RATE 1st-5th PASS</U> = Percentage of leads on the list that were -human answered- on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>SALE 1st-5th,LIFE PASS</U> = Leads that were sold to (dispoed a status where SALE is set to -Y- on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>CNV RATE 1st-5th PASS</U> = Percentage of leads on the list that were sold to on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>DNC 1st-5th,LIFE PASS</U> = Leads that were dispositioned -do not call- (dispoed a status where DNC is set to -Y- on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>DNC RATE 1st-5th,LIFE PASS</U> = Percentage of leads on the list that were -do not call- on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>CUST CONTACT 1st-5th,LIFE PASS</U> = Leads that were -customer contacted- (dispoed a status where CUSTOMER CONTACT is set to -Y- on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>CUCT RATE 1st-5th,LIFE PASS</U> = Percentage of leads on the list that were -customer contacted- on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>UNWORKABL 1st-5th,LIFE PASS</U> = Leads that were -unworkable- (dispoed a status where UNWORKABLE is set to -Y- on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>UNWK RATE 1st-5th,LIFE PASS</U> = Percentage of leads on the list that were -unworkable- on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>SCHEDL CB 1st-5th,LIFE PASS</U> = Leads that were -scheduled callbacks- (dispoed a status where SCHEDULED CALLBACK is set to -Y- on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>SHCB RATE 1st-5th,LIFE PASS</U> = Percentage of leads on the list that were -scheduled callbacks- on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>COMPLETED 1st-5th,LIFE PASS</U> = Leads that were -completed- (dispoed a status where COMPLETED is set to -Y- on the statuses section) on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ><BR><QXZ><U>COMP RATE 1st-5th,LIFE PASS</U> = Percentage of leads on the list that were -completed- on or after the first-fifth call attempt, or LIFE if contacted as such at any point ever.</QXZ>
|
||||
LISTS_stats Lists Statuses Report <QXZ>This report gives a detailed breakdown of the contents of a list or lists.</QXZ><BR><QXZ><U>TOTAL LIST ID SUMMARY</U> = Shows each list selected by the user, the count of leads in the list, and whether the list is active or inactive.</QXZ><BR><QXZ><U>TOTAL STATUS FLAGS SUMMARY</U> = Shows a breakdown of the status flags for all the selected lists combined. Status flags are set in the -Statuses- section of a campaign or the -System Statuses-.</QXZ><BR><QXZ><U>LIST ID SUMMARY</U> = Each list selected in the report will be listed separately after the TOTALS summaries. The list summary gives specific information about each particular list.</QXZ><BR><QXZ><U>STATUS FLAGS BREAKDOWN</U> = Same as <U>TOTAL STATUS FLAGS SUMMARY</U>, but only for one list.</QXZ><BR><QXZ><U>STATUS BREAKDOWN</U> = A breakdown of each status in the individual list, along with the status description, number of leads, and percentage relative to the total leads in the list.</QXZ>
|
||||
|
||||
Reference in New Issue
Block a user