|
|
|
@@ -82,7 +82,7 @@
|
|
|
|
|
#exten => _99909*.,2,AGI(agi-VDAD_ALL_inbound.agi)
|
|
|
|
|
#exten => _99909*.,3,Hangup
|
|
|
|
|
#
|
|
|
|
|
# Copyright (C) 2018 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
|
|
|
|
# Copyright (C) 2019 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
|
|
|
|
#
|
|
|
|
|
# changes:
|
|
|
|
|
# 70828-0924 - First Build
|
|
|
|
@@ -232,6 +232,7 @@
|
|
|
|
|
# 180926-2351 - Added _wait_time options for next_agent_call
|
|
|
|
|
# 190121-1505 - Added RA_USER_PHONE On-Hook CID to solve last RINGAGENT issues
|
|
|
|
|
# 190216-0812 - Fix for user-group, in-group and campaign allowed/permissions matching issues
|
|
|
|
|
# 190223-0920 - Added definable play-place-in-line static prompts
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
$script = 'agi-VDAD_ALL_inbound.agi';
|
|
|
|
@@ -764,7 +765,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,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';";
|
|
|
|
|
$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,place_in_line_caller_number_filename,place_in_line_you_next_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;
|
|
|
|
@@ -898,7 +899,13 @@ if ($sthArows > 0)
|
|
|
|
|
$cid_cb_invalid_filename = $aryA[116];
|
|
|
|
|
$cid_cb_reenter_filename = $aryA[117];
|
|
|
|
|
$cid_cb_error_filename = $aryA[118];
|
|
|
|
|
$place_in_line_caller_number_filename = $aryA[119];
|
|
|
|
|
$place_in_line_you_next_filename = $aryA[120];
|
|
|
|
|
|
|
|
|
|
if ( (length($place_in_line_caller_number_filename) < 1) || ($place_in_line_caller_number_filename =~ /^NULL$/i) )
|
|
|
|
|
{$place_in_line_caller_number_filename='queue-thereare';}
|
|
|
|
|
if ( (length($place_in_line_you_next_filename) < 1) || ($place_in_line_you_next_filename =~ /^NULL$/i) )
|
|
|
|
|
{$place_in_line_you_next_filename='queue-youarenext';}
|
|
|
|
|
$custom_call_id='';
|
|
|
|
|
if ($uniqueid_status_display =~ /ENABLED/)
|
|
|
|
|
{$custom_call_id = "$uniqueid";}
|
|
|
|
@@ -4460,19 +4467,19 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
|
|
|
|
if ($rec_countWAIT > 0) {$place = $rec_countWAIT;}
|
|
|
|
|
if ($rec_countWAITrem > 0) {$place = $rec_countWAITrem;}
|
|
|
|
|
$place++;
|
|
|
|
|
if ($AGILOG) {$agi_string = "-- PLACE IN LINE: |$campaign|$place|"; &agi_output;}
|
|
|
|
|
if ($AGILOG) {$agi_string = "-- PLACE IN LINE: |$channel_group|$place|$place_in_line_caller_number_filename|$place_in_line_you_next_filename|"; &agi_output;}
|
|
|
|
|
|
|
|
|
|
$AGI->stream_file('sip-silence'); # stop music-on-hold process
|
|
|
|
|
$AGI->stream_file('sip-silence'); # stop music-on-hold process
|
|
|
|
|
if ($place > 1)
|
|
|
|
|
{
|
|
|
|
|
$AGI->stream_file('queue-thereare'); # you are currently caller number
|
|
|
|
|
$AGI->stream_file("$place_in_line_caller_number_filename"); # you are currently caller number, -queue-thereare-
|
|
|
|
|
$AGI->say_number("$place");
|
|
|
|
|
if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 2);} # add prompt play time to total queue time
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
$AGI->stream_file('queue-youarenext'); # your call is now first in line
|
|
|
|
|
$AGI->stream_file("$place_in_line_you_next_filename"); # your call is now first in line, -queue-youarenext-
|
|
|
|
|
if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 5);} # add prompt play time to total queue time
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -4563,7 +4570,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
|
|
|
|
|
|
|
|
|
|
if ($pretend_every_call_is_next > 0)
|
|
|
|
|
{
|
|
|
|
|
$AGI->stream_file('queue-youarenext'); # you are next in line
|
|
|
|
|
$AGI->stream_file("$place_in_line_you_next_filename"); # you are next in line, -queue-youarenext-
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|