Added Wait Time options to in-groups. This is different from the Estimated Hold Time options because this is based only on the customer wait time. Also, second and third options were added for both allow the offering of a press 1, 2 and 3 option in the wait/hold time option features

git-svn-id: svn://192.168.202.10@1481 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-07-19 18:12:41 +00:00
parent 2f2e5dc01c
commit 8b0825fd5e
9 changed files with 791 additions and 103 deletions
+4
View File
@@ -224,6 +224,10 @@ OTHER CHANGES:
Works with custom fields as well.
For more information, look in the docs/NON-AGENT_API.txt doc
49. Added Wait Time options to in-groups. This is different from the Estimated
Hold Time options because this is based only on the customer wait time.
Also, second and third options were added for both allow the offering of
a press 1, 2 and 3 option in the wait/hold time option features.
+521 -91
View File
@@ -136,6 +136,7 @@
# 100518-0710 - Added call time after hours override options
# 100527-0111 - Added on-hold and hold-time-option no-block options and message seconds, NA CID cleaning
# 100616-1600 - Added VID filename and digit validation options
# 100718-1822 - Added second hold time option and wait time options
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -143,6 +144,7 @@ $dtmf_silent_prefix = '7';
$DROP_TIME = 720; ### default number of seconds to wait until you drop a waiting call
$start_moh=1;
$wait_prompt_runs=0;
$at='@';
$S='*';
$mel=1; # Mysql Error Log enabled = 1
@@ -566,7 +568,7 @@ $sthA->finish();
### 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 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 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;
@@ -623,6 +625,22 @@ while ($sthArows > $cbc)
$onhold_prompt_seconds = $aryA[41];
$hold_time_option_no_block = $aryA[42];
$hold_time_option_prompt_seconds = $aryA[43];
$hold_time_second_option = $aryA[44];
$hold_time_third_option = $aryA[45];
$wait_hold_option_priority = $aryA[46];
$wait_time_option = $aryA[47];
$wait_time_second_option = $aryA[48];
$wait_time_third_option = $aryA[49];
$wait_time_option_seconds = $aryA[50];
$wait_time_option_exten = $aryA[51];
$wait_time_option_voicemail = $aryA[52];
$wait_time_option_xfer_group = $aryA[53];
$wait_time_option_callmenu = $aryA[54];
$wait_time_option_callback_filename = $aryA[55];
$wait_time_option_callback_list_id = $aryA[56];
$wait_time_option_press_filename = $aryA[57];
$wait_time_option_no_block = $aryA[58];
$wait_time_option_prompt_seconds = $aryA[59];
$custom_call_id='';
if ($uniqueid_status_display =~ /ENABLED/)
@@ -1822,7 +1840,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$dbhP=$dbhA; $mysql_count='02041'; $MEL_aff_rows=$Faffected_rows; &mysql_error_logging;
$found_agents=$Faffected_rows;
}
if ($AGILOG) {$agi_string = "-- VDAD get agent: |$DROP_TIME|$drop_timer|$hold_message_counter|$prompt_interval|$Faffected_rows|$channel_group|$found_agents|$stmtA|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- VDAD get agent: |$DROP_TIME|$drop_timer|$hold_message_counter|$prompt_interval|$Faffected_rows|$channel_group|$found_agents|$moh_delay|$wait_prompt_runs|$stmtA|"; &agi_output;}
if ($found_agents > 0)
{
if ($aco_sub<1)
@@ -2310,7 +2328,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$found_agents=$Faffected_rows;
if ($AGILOG) {$agi_string = "$Faffected_rows|$stmtA|"; &agi_output;}
}
if ($AGILOG) {$agi_string = "-- VDAD get agent: |$DROP_TIME|$drop_timer|$hold_message_counter|$prompt_interval|$Faffected_rows|$found_agents|update of vla table: $channel_group|\n|$stmtA|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- VDAD get agent: |$DROP_TIME|$drop_timer|$hold_message_counter|$prompt_interval|$Faffected_rows|$found_agents|$moh_delay|$wait_prompt_runs|update of vla table: $channel_group|\n|$stmtA|"; &agi_output;}
if ($found_agents > 0)
{
if ($aco_sub<1)
@@ -2851,8 +2869,9 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$moh_delay=1;
if ($play_place_in_line =~ /Y/i) {$start_place_in_line=1; $moh_delay=2;}
if ($play_estimate_hold_time =~ /Y/i) {$start_hold_estimate=1; $moh_delay=2;}
if ($hold_time_option !~ /NONE/) {$start_hold_estimate=1; $moh_delay=2;};
if ($hold_time_option !~ /NONE/) {$start_hold_estimate=1; $moh_delay=2;}
if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 5);} # add prompt play time to total queue time
if ($wait_time_option !~ /NONE/) {$wait_in_queue=1; $moh_delay=2;}
}
else {$hold_message_counter++;}
if ($hold_tone_counter > 3)
@@ -2905,7 +2924,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
}
##### calculate hold time estimate if needed
$holdtime_estimate=1; $holdtime_estimate_sec=0; $livetime_estimate_sec=0; # Make hold time estimate available to other sections
$holdtime_estimate=1; $holdtime_estimate_sec=0; $livetime_estimate_sec=0; $hold_wait_in_queue=0; # Make hold time estimate available to other sections
if ( ($start_hold_estimate > 0) && ($moh_delay == '1') )
{
$now_date_epoch = time();
@@ -3010,44 +3029,38 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$start_hold_estimate=0;
$wait_in_queue = 1; # trigger hold-time-option is applicable
$hold_wait_in_queue = 1;
}
##### check if hold_time_option is set to leave Queue
if ( ($hold_time_option !~ /NONE/ ) && ( $holdtime_estimate_sec_diff > $hold_time_option_seconds ) && ($wait_in_queue < 2) )
{
if ($drop_timer < $hold_time_option_minimum)
{
if ($AGILOG) {$agi_string = "-- HOLD OPTION NO-TRIGGER: |$drop_timer|$hold_time_option_minimum| |$holdtime_estimate_sec_diff|$hold_time_option_seconds| |$callerid|"; &agi_output;}
}
else
$last_wait_run++;
### BEGIN wait time option press-123 options ###
if ( ($wait_time_option !~ /NONE/ ) && ($drop_timer > $wait_time_option_seconds) && ( ( ($wait_in_queue < 2) && ($last_wait_run > 5) ) || ($wait_prompt_runs < 1) ) )
{
$wait_prompt_runs++;
$wait_in_queue=0; # exits wait loop
$DROPexten = '';
$exitwithkey=0;
$play_post_press_audio=0;
$hold_message_counter = 0;
$wait_message_counter = 0;
$last_wait_run=0;
### Available hold time options:
# - EXTENSION
# - CALL_MENU
# - VOICEMAIL
# - IN_GROUP
# - CALLERID_CALLBACK
# - DROP_ACTION
### Available wait time options:
# - PRESS_STAY
# - PRESS_VMAIL
# - PRESS_EXTEN
# - PRESS_CALLMENU
# - PRESS_CID_CALLBACK
# - PRESS_INGROUP
### BEGIN hold time option press-1 options ###
if ($hold_time_option =~ /PRESS_/)
if ($wait_time_option =~ /PRESS_/)
{
$now_date_epoch = time();
$HTO_no_block_SQL = '';
### if No-Block is enabled, then set the call time to right now
if ($hold_time_option_no_block =~ /Y/)
if ($wait_time_option_no_block =~ /Y/)
{
$NBDtarget = $now_date_epoch;
($NBsec,$NBmin,$NBhour,$NBmday,$NBmon,$NByear,$NBwday,$NByday,$NBisdst) = localtime($NBDtarget);
@@ -3062,9 +3075,9 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$HTO_no_block_SQL = ",call_time='$NB_SQLdate'";
}
if ($hold_time_option_prompt_seconds < 0) {$hold_time_option_prompt_seconds=0;}
if ($hold_time_option_prompt_seconds > 1000) {$hold_time_option_prompt_seconds=1000;}
$FDtarget = ($now_date_epoch + $hold_time_option_prompt_seconds);
if ($wait_time_option_prompt_seconds < 0) {$wait_time_option_prompt_seconds=0;}
if ($wait_time_option_prompt_seconds > 1000) {$wait_time_option_prompt_seconds=1000;}
$FDtarget = ($now_date_epoch + $wait_time_option_prompt_seconds);
($Fsec,$Fmin,$Fhour,$Fmday,$Fmon,$Fyear,$Fwday,$Fyday,$Fisdst) = localtime($FDtarget);
$Fyear = ($Fyear + 1900);
$Fmon++;
@@ -3078,7 +3091,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$stmtA = "UPDATE vicidial_auto_calls set last_update_time='$FDtsSQLdate' $HTO_no_block_SQL where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02086'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDAC posttime record for Hold-Time-Option-Press: |$affected_rows|$FDtsSQLdate|$callerid|$HTO_no_block_SQL|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- VDAC posttime record for Wait-Time-Option-Press: |$affected_rows|$FDtsSQLdate|$callerid|$HTO_no_block_SQL|"; &agi_output;}
if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 10);} # add prompt play time to total queue time
@@ -3086,52 +3099,83 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$HTO_digits="1";
$HTO_filename=$wait_time_option_press_filename;
if ($wait_time_second_option !~ /NONE/ ) {$HTO_digits .= "2";}
if ($wait_time_third_option !~ /NONE/ ) {$HTO_digits .= "3";}
&press_one_hold_time_option_prompt;
### if No-Block is enabled, then set the call time back to original call time
if ($hold_time_option_no_block =~ /Y/)
if ($wait_time_option_no_block =~ /Y/)
{
$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='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- No-Block HTO Prompt Set: |$affected_rows|$ORIGINAL_call_time|$callerid|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- No-Block WTO Prompt Set: |$affected_rows|$ORIGINAL_call_time|$callerid|"; &agi_output;}
}
if ($pin =~ /1/)
if ($pin =~ /1|2|3/)
{
$now_date_epoch = time();
$drop_timer = ($now_date_epoch - $start_epoch);
if ($hold_time_option =~ /PRESS_VMAIL/) {$hold_time_option = 'VOICEMAIL'; $HT_status='QVMAIL';}
if ($hold_time_option =~ /PRESS_EXTEN/) {$hold_time_option = 'EXTENSION'; $HT_status='HOLDTO';}
if ($hold_time_option =~ /PRESS_CALLMENU/) {$hold_time_option = 'CALL_MENU'; $HT_status='HOLDTO';}
if ($hold_time_option =~ /PRESS_CID_CALLBACK/) {$hold_time_option = 'CALLERID_CALLBACK'; $HT_status='HOLDTO';}
if ($hold_time_option =~ /PRESS_INGROUP/) {$hold_time_option = 'IN_GROUP'; $HT_status='HOLDTO';}
if ($AGILOG) {$agi_string = "HOLD TIME OPTION PRESSED $pin: $hold_time_option|$HT_status"; &agi_output;}
$play_post_press_audio=1;
if ($enable_queuemetrics_logging > 0)
if ($pin =~ /1/)
{
$dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass")
or die "Couldn't connect to database: " . DBI->errstr;
if ($wait_time_option =~ /PRESS_STAY/) {$wait_time_option = 'STAY_IN_QUEUE'; $wait_in_queue = 2; $DROPexten='';}
if ($wait_time_option =~ /PRESS_VMAIL/) {$wait_time_option = 'VOICEMAIL'; $HT_status='QVMAIL';}
if ($wait_time_option =~ /PRESS_EXTEN/) {$wait_time_option = 'EXTENSION'; $HT_status='WAITTO';}
if ($wait_time_option =~ /PRESS_CALLMENU/) {$wait_time_option = 'CALL_MENU'; $HT_status='WAITTO';}
if ($wait_time_option =~ /PRESS_CID_CALLBACK/) {$wait_time_option = 'CALLERID_CALLBACK'; $HT_status='WAITTO';}
if ($wait_time_option =~ /PRESS_INGROUP/) {$wait_time_option = 'IN_GROUP'; $HT_status='WAITTO';}
}
if ($pin =~ /2/)
{
if ($wait_time_second_option =~ /PRESS_STAY/) {$wait_time_option = 'STAY_IN_QUEUE'; $wait_in_queue = 2; $DROPexten='';}
if ($wait_time_second_option =~ /PRESS_VMAIL/) {$wait_time_option = 'VOICEMAIL'; $HT_status='QVMAIL';}
if ($wait_time_second_option =~ /PRESS_EXTEN/) {$wait_time_option = 'EXTENSION'; $HT_status='WAITTO';}
if ($wait_time_second_option =~ /PRESS_CALLMENU/) {$wait_time_option = 'CALL_MENU'; $HT_status='WAITTO';}
if ($wait_time_second_option =~ /PRESS_CID_CALLBACK/) {$wait_time_option = 'CALLERID_CALLBACK'; $HT_status='WAITTO';}
if ($wait_time_second_option =~ /PRESS_INGROUP/) {$wait_time_option = 'IN_GROUP'; $HT_status='WAITTO';}
}
if ($pin =~ /3/)
{
if ($wait_time_third_option =~ /PRESS_STAY/) {$wait_time_option = 'STAY_IN_QUEUE'; $wait_in_queue = 2; $DROPexten='';}
if ($wait_time_third_option =~ /PRESS_VMAIL/) {$wait_time_option = 'VOICEMAIL'; $HT_status='QVMAIL';}
if ($wait_time_third_option =~ /PRESS_EXTEN/) {$wait_time_option = 'EXTENSION'; $HT_status='WAITTO';}
if ($wait_time_third_option =~ /PRESS_CALLMENU/) {$wait_time_option = 'CALL_MENU'; $HT_status='WAITTO';}
if ($wait_time_third_option =~ /PRESS_CID_CALLBACK/) {$wait_time_option = 'CALLERID_CALLBACK'; $HT_status='WAITTO';}
if ($wait_time_third_option =~ /PRESS_INGROUP/) {$wait_time_option = 'IN_GROUP'; $HT_status='WAITTO';}
}
$place=0;
if ($rec_countWAIT > 0) {$place = $rec_countWAIT;}
if ($rec_countWAITrem > 0) {$place = $rec_countWAITrem;}
$place++;
if ($AGILOG) {$agi_string = "WAIT TIME OPTION PRESSED $pin: $wait_time_option|$HT_status"; &agi_output;}
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='EXITWITHKEY',data1='1',data2='$place',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02087'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
if ($wait_time_option !~ /STAY_IN_QUEUE/)
{
$play_post_press_audio=1;
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='QVMAIL',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02088'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
if ($enable_queuemetrics_logging > 0)
{
$dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass")
or die "Couldn't connect to database: " . DBI->errstr;
$exitwithkey++;
$place=0;
if ($rec_countWAIT > 0) {$place = $rec_countWAIT;}
if ($rec_countWAITrem > 0) {$place = $rec_countWAITrem;}
$place++;
$dbhB->disconnect();
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='EXITWITHKEY',data1='1',data2='$place',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02087'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='QVMAIL',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02088'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$exitwithkey++;
$dbhB->disconnect();
}
}
}
else
@@ -3140,14 +3184,14 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$wait_in_queue = 2; #continue waiting on hold
}
}
### END hold time option press 1 options ###
### END wait time option press 1 options ###
if ($hold_time_option =~ /EXTENSION/)
if ($wait_time_option =~ /EXTENSION/)
{
if (length($hold_time_option_exten)>0)
if (length($wait_time_option_exten)>0)
{
$DROPexten = "$hold_time_option_exten";
$DROPexten = "$wait_time_option_exten";
$CIDcampaign_cid='0000000000';
### Grab ID values from the database
@@ -3172,9 +3216,9 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
}
}
if ($hold_time_option =~ /VOICEMAIL/)
if ($wait_time_option =~ /VOICEMAIL/)
{
if ( ($channel_group =~ /AGENTDIRECT/) && (length($agent_only) > 1) && ($hold_time_option_voicemail =~ /AGENTVMAIL/) )
if ( ($channel_group =~ /AGENTDIRECT/) && (length($agent_only) > 1) && ($wait_time_option_voicemail =~ /AGENTVMAIL/) )
{
### Grab user's voicemail ID from the database
$stmtA = "SELECT voicemail_id FROM vicidial_users where user='$agent_only';";
@@ -3185,7 +3229,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$hold_time_option_voicemail = $aryA[0];
$wait_time_option_voicemail = $aryA[0];
}
$sthA->finish();
}
@@ -3194,35 +3238,35 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
if (length($hold_time_option_voicemail)>0)
{$DROPexten = "$voicemail_dump_exten$hold_time_option_voicemail";}
if (length($wait_time_option_voicemail)>0)
{$DROPexten = "$voicemail_dump_exten$wait_time_option_voicemail";}
}
if ($hold_time_option =~ /CALL_MENU/)
if ($wait_time_option =~ /CALL_MENU/)
{
$newcallerid = "\"$VCcallerid <$originalCID>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
if ( (length($hold_time_option_callmenu)>0) && ($hold_time_option_callmenu !~ /---NONE---/) )
if ( (length($wait_time_option_callmenu)>0) && ($wait_time_option_callmenu !~ /---NONE---/) )
{
$DROPexten = "s";
$ext_context = "$hold_time_option_callmenu";
$ext_context = "$wait_time_option_callmenu";
}
}
if ($hold_time_option =~ /IN_GROUP/)
if ($wait_time_option =~ /IN_GROUP/)
{ # 90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*"
$DROPexten = "90009*$hold_time_option_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
$DROPexten = "90009*$wait_time_option_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
}
if ($hold_time_option =~ /CALLERID_CALLBACK/)
if ($wait_time_option =~ /CALLERID_CALLBACK/)
{
if (length($hold_time_option_exten)>0)
{$DROPexten = "$hold_time_option_exten";}
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) )
{
### 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) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','VDCL','$hold_time_option_callback_list_id','N','$phone_code','$phone_number','$channel_group','1','$local_gmt','$VLcomments');";
$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) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','VDCL','$wait_time_option_callback_list_id','N','$phone_code','$phone_number','$channel_group','1','$local_gmt','$VLcomments');";
$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;";
@@ -3250,7 +3294,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
}
if ($AGILOG) {$agi_string = "-- VDCL HOLD TIME OPT: |$hold_time_option|$DROPexten|$wait_in_queue|"; &agi_output;}
if ($AGILOG) {$agi_string = "-- VDCL WAIT TIME OPT: |$wait_time_option|$DROPexten|$wait_in_queue|"; &agi_output;}
if ($wait_in_queue < 1)
{
@@ -3275,14 +3319,14 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$dbhP=$dbhA; $mysql_count='02090'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
$stmtA = "UPDATE vicidial_list set status='HOLDTO' where lead_id = '$insert_lead_id';";
$stmtA = "UPDATE vicidial_list set status='WAITTO' where lead_id = '$insert_lead_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02092'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL vl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
if ($drop_seconds < 1) {$drop_seconds = $drop_timer;}
if (length($HT_status)<1) {$HT_status='HOLDTO';}
if (length($HT_status)<1) {$HT_status='WAITTO';}
$stmtA = "UPDATE vicidial_closer_log set status='$HT_status',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds',term_reason='HOLDTIME' where lead_id = '$insert_lead_id' order by start_epoch desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02091'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
@@ -3304,7 +3348,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02093'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='HOLDTO',serverid='$queuemetrics_log_id';";
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='WAITTO',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02094'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
@@ -3314,25 +3358,25 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ( (length($hold_time_option_callback_filename) > 0) && ($play_post_press_audio > 0) )
if ( (length($wait_time_option_callback_filename) > 0) && ($play_post_press_audio > 0) )
{
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
if ($hold_time_option_callback_filename =~ /\|/)
if ($wait_time_option_callback_filename =~ /\|/)
{
@hold_time_option_callback_filename_array = split(/\|/,$hold_time_option_callback_filename);
@wait_time_option_callback_filename_array = split(/\|/,$wait_time_option_callback_filename);
$w=0;
foreach(@hold_time_option_callback_filename_array)
foreach(@wait_time_option_callback_filename_array)
{
if (length($hold_time_option_callback_filename_array[$w])>0)
if (length($wait_time_option_callback_filename_array[$w])>0)
{
$AGI->stream_file("$hold_time_option_callback_filename_array[$w]");
$AGI->stream_file("$wait_time_option_callback_filename_array[$w]");
}
$w++;
}
}
else
{$AGI->stream_file("$hold_time_option_callback_filename");}
{$AGI->stream_file("$wait_time_option_callback_filename");}
}
if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $DROPexten"; &agi_output;}
@@ -3349,9 +3393,394 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
}
}
$start_moh=1;
$moh_delay=1;
# $moh_delay=1;
}
}
### END wait time option press-123 options ###
if ( ($wait_hold_option_priority =~ /WAIT/) && ($wait_prompt_runs > 0) )
{
if ($AGILOG) {$agi_string = "-- WAIT OPTION PRIORITY, HOLD NO RUN: |$drop_timer|$wait_hold_option_priority| |$wait_prompt_runs| |$callerid|"; &agi_output;}
$wait_in_queue=2;
}
else
{
if ($AGILOG) {$agi_string = "-- DEBUUUUUUUUUUUUUUUUUUUUUUUUUUUUUG: |$hold_wait_in_queue|$hold_time_option|$holdtime_estimate_sec_diff|$wait_in_queue|$last_wait_run|"; &agi_output;}
##### check if hold_time_option is set to leave Queue
if ( ($hold_time_option !~ /NONE/ ) && ($holdtime_estimate_sec_diff > $hold_time_option_seconds) && ($wait_in_queue < 2) )
{
if ($drop_timer < $hold_time_option_minimum)
{
if ($AGILOG) {$agi_string = "-- HOLD OPTION NO-TRIGGER: |$drop_timer|$hold_time_option_minimum| |$holdtime_estimate_sec_diff|$hold_time_option_seconds| |$callerid|"; &agi_output;}
}
else
{
$wait_in_queue=0; # exits wait loop
$DROPexten = '';
$exitwithkey=0;
$play_post_press_audio=0;
$hold_message_counter = 0;
### Available hold time options:
# - EXTENSION
# - CALL_MENU
# - VOICEMAIL
# - IN_GROUP
# - CALLERID_CALLBACK
# - DROP_ACTION
# - PRESS_STAY
# - PRESS_VMAIL
# - PRESS_EXTEN
# - PRESS_CALLMENU
# - PRESS_CID_CALLBACK
# - PRESS_INGROUP
### BEGIN hold time option press-123 options ###
if ($hold_time_option =~ /PRESS_/)
{
$now_date_epoch = time();
$HTO_no_block_SQL = '';
### if No-Block is enabled, then set the call time to right now
if ($hold_time_option_no_block =~ /Y/)
{
$NBDtarget = $now_date_epoch;
($NBsec,$NBmin,$NBhour,$NBmday,$NBmon,$NByear,$NBwday,$NByday,$NBisdst) = localtime($NBDtarget);
$NByear = ($NByear + 1900);
$NBmon++;
if ($NBmon < 10) {$NBmon = "0$NBmon";}
if ($NBmday < 10) {$NBmday = "0$NBmday";}
if ($NBhour < 10) {$NBhour = "0$NBhour";}
if ($NBmin < 10) {$NBmin = "0$NBmin";}
if ($NBsec < 10) {$NBsec = "0$NBsec";}
$NB_SQLdate = "$NByear-$NBmon-$NBmday $NBhour:$NBmin:$NBsec";
$HTO_no_block_SQL = ",call_time='$NB_SQLdate'";
}
if ($hold_time_option_prompt_seconds < 0) {$hold_time_option_prompt_seconds=0;}
if ($hold_time_option_prompt_seconds > 1000) {$hold_time_option_prompt_seconds=1000;}
$FDtarget = ($now_date_epoch + $hold_time_option_prompt_seconds);
($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' $HTO_no_block_SQL where callerid='$callerid' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02086'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDAC posttime record for Hold-Time-Option-Press: |$affected_rows|$FDtsSQLdate|$callerid|$HTO_no_block_SQL|"; &agi_output;}
if ($drop_timer >= 2) {$drop_timer = ($drop_timer + 10);} # add prompt play time to total queue time
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$HTO_digits="1";
$HTO_filename=$hold_time_option_press_filename;
if ($hold_time_second_option !~ /NONE/ ) {$HTO_digits .= "2";}
if ($hold_time_third_option !~ /NONE/ ) {$HTO_digits .= "3";}
&press_one_hold_time_option_prompt;
### if No-Block is enabled, then set the call time back to original call time
if ($hold_time_option_no_block =~ /Y/)
{
$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='02XXX'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- No-Block HTO Prompt Set: |$affected_rows|$ORIGINAL_call_time|$callerid|"; &agi_output;}
}
if ($pin =~ /1|2|3/)
{
$now_date_epoch = time();
$drop_timer = ($now_date_epoch - $start_epoch);
if ($pin =~ /1/)
{
if ($hold_time_option =~ /PRESS_STAY/) {$hold_time_option = 'STAY_IN_QUEUE'; $hold_in_queue = 2; $DROPexten='';}
if ($hold_time_option =~ /PRESS_VMAIL/) {$hold_time_option = 'VOICEMAIL'; $HT_status='QVMAIL';}
if ($hold_time_option =~ /PRESS_EXTEN/) {$hold_time_option = 'EXTENSION'; $HT_status='WAITTO';}
if ($hold_time_option =~ /PRESS_CALLMENU/) {$hold_time_option = 'CALL_MENU'; $HT_status='WAITTO';}
if ($hold_time_option =~ /PRESS_CID_CALLBACK/) {$hold_time_option = 'CALLERID_CALLBACK'; $HT_status='WAITTO';}
if ($hold_time_option =~ /PRESS_INGROUP/) {$hold_time_option = 'IN_GROUP'; $HT_status='WAITTO';}
}
if ($pin =~ /2/)
{
if ($hold_time_second_option =~ /PRESS_STAY/) {$hold_time_option = 'STAY_IN_QUEUE'; $hold_in_queue = 2; $DROPexten='';}
if ($hold_time_second_option =~ /PRESS_VMAIL/) {$hold_time_option = 'VOICEMAIL'; $HT_status='QVMAIL';}
if ($hold_time_second_option =~ /PRESS_EXTEN/) {$hold_time_option = 'EXTENSION'; $HT_status='WAITTO';}
if ($hold_time_second_option =~ /PRESS_CALLMENU/) {$hold_time_option = 'CALL_MENU'; $HT_status='WAITTO';}
if ($hold_time_second_option =~ /PRESS_CID_CALLBACK/) {$hold_time_option = 'CALLERID_CALLBACK'; $HT_status='WAITTO';}
if ($hold_time_second_option =~ /PRESS_INGROUP/) {$hold_time_option = 'IN_GROUP'; $HT_status='WAITTO';}
}
if ($pin =~ /3/)
{
if ($hold_time_third_option =~ /PRESS_STAY/) {$hold_time_option = 'STAY_IN_QUEUE'; $hold_in_queue = 2; $DROPexten='';}
if ($hold_time_third_option =~ /PRESS_VMAIL/) {$hold_time_option = 'VOICEMAIL'; $HT_status='QVMAIL';}
if ($hold_time_third_option =~ /PRESS_EXTEN/) {$hold_time_option = 'EXTENSION'; $HT_status='WAITTO';}
if ($hold_time_third_option =~ /PRESS_CALLMENU/) {$hold_time_option = 'CALL_MENU'; $HT_status='WAITTO';}
if ($hold_time_third_option =~ /PRESS_CID_CALLBACK/) {$hold_time_option = 'CALLERID_CALLBACK'; $HT_status='WAITTO';}
if ($hold_time_third_option =~ /PRESS_INGROUP/) {$hold_time_option = 'IN_GROUP'; $HT_status='WAITTO';}
}
if ($AGILOG) {$agi_string = "HOLD TIME OPTION PRESSED $pin: $hold_time_option|$HT_status"; &agi_output;}
if ($hold_time_option !~ /STAY_IN_QUEUE/)
{
$play_post_press_audio=1;
if ($enable_queuemetrics_logging > 0)
{
$dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass")
or die "Couldn't connect to database: " . DBI->errstr;
$place=0;
if ($rec_countWAIT > 0) {$place = $rec_countWAIT;}
if ($rec_countWAITrem > 0) {$place = $rec_countWAITrem;}
$place++;
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='EXITWITHKEY',data1='1',data2='$place',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02087'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='QVMAIL',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02088'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$exitwithkey++;
$dbhB->disconnect();
}
}
}
else
{
$DROPexten='';
$wait_in_queue = 2; #continue waiting on hold
}
}
### END hold time option press 1 options ###
if ($hold_time_option =~ /EXTENSION/)
{
if (length($hold_time_option_exten)>0)
{
$DROPexten = "$hold_time_option_exten";
$CIDcampaign_cid='0000000000';
### Grab ID values from the database
$stmtA = "SELECT campaign_id,campaign_cid FROM vicidial_campaigns where closer_campaigns LIKE \"% $channel_group %\" and active='Y';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02119'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$CIDcampaign_id = $aryA[0];
$CIDcampaign_cid = $aryA[1];
}
$sthA->finish();
$newcallerid = "\"$callerid <$CIDcampaign_cid>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$CIDcampaign_cid\> from $CIDcampaign_id"; &agi_output;}
}
}
if ($hold_time_option =~ /VOICEMAIL/)
{
if ( ($channel_group =~ /AGENTDIRECT/) && (length($agent_only) > 1) && ($hold_time_option_voicemail =~ /AGENTVMAIL/) )
{
### Grab user's voicemail ID from the database
$stmtA = "SELECT voicemail_id FROM vicidial_users where user='$agent_only';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $mysql_count='02128'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$hold_time_option_voicemail = $aryA[0];
}
$sthA->finish();
}
$newcallerid = "\"$VCcallerid <$originalCID>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
if (length($hold_time_option_voicemail)>0)
{$DROPexten = "$voicemail_dump_exten$hold_time_option_voicemail";}
}
if ($hold_time_option =~ /CALL_MENU/)
{
$newcallerid = "\"$VCcallerid <$originalCID>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
if ( (length($hold_time_option_callmenu)>0) && ($hold_time_option_callmenu !~ /---NONE---/) )
{
$DROPexten = "s";
$ext_context = "$hold_time_option_callmenu";
}
}
if ($hold_time_option =~ /IN_GROUP/)
{ # 90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*"
$DROPexten = "90009*$hold_time_option_xfer_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
}
if ($hold_time_option =~ /CALLERID_CALLBACK/)
{
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) )
{
### 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) values('$SQLdate','$tsSQLdate','INBND','$fronter','$vendor_id','VDCL','$hold_time_option_callback_list_id','N','$phone_code','$phone_number','$channel_group','1','$local_gmt','$VLcomments');";
$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;";
$sthA = $dbhA->prepare($stmtB) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$dbhP=$dbhA; $stmtA=$stmtB; $mysql_count='02103'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
if ($sthArows > 0)
{
@aryA = $sthA->fetchrow_array;
$CALLBACK_insert_lead_id = $aryA[0];
}
$sthA->finish();
if ($AGILOG) {$agi_string = "VDAD vicidial_list insert |$CALLBACK_insert_lead_id|$stmtA|"; &agi_output;}
$DROPexten = "8300";
$play_post_press_audio=1;
}
else
{
$wait_in_queue = 2; #continue waiting
}
}
if ($AGILOG) {$agi_string = "-- VDCL HOLD TIME OPT: |$hold_time_option|$DROPexten|$wait_in_queue|"; &agi_output;}
if ($wait_in_queue < 1)
{
if (length($DROPexten)>0)
{ ### if DROP extension is defined then send the dropped call there instead of hangup
### use STDOUT to send call to proper DROP location
$VHqueryCID = "VH$CIDdate$VDADconf_exten";
if ($no_delay_call_route =~ /N/)
{
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence');
### sleep for 99 hundredths of a second
usleep(1*990*1000);
}
$now_date_epoch = time();
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$VARserver_ip' order by call_time desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02090'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
$stmtA = "UPDATE vicidial_list set status='HOLDTO' where lead_id = '$insert_lead_id';";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02092'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL vl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
if ($drop_seconds < 1) {$drop_seconds = $drop_timer;}
if (length($HT_status)<1) {$HT_status='HOLDTO';}
$stmtA = "UPDATE vicidial_closer_log set status='$HT_status',end_epoch='$now_date_epoch',length_in_sec='$drop_seconds',queue_seconds='$drop_seconds',term_reason='HOLDTIME' where lead_id = '$insert_lead_id' order by start_epoch desc limit 1;";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02091'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL vcl update: |$affected_rows|$insert_lead_id|\n|$stmtA|"; &agi_output;}
if ( ($enable_queuemetrics_logging > 0) && ($exitwithkey < 1) )
{
$dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass")
or die "Couldn't connect to database: " . DBI->errstr;
if ($DBX) {print "CONNECTED TO DATABASE: $queuemetrics_server_ip|$queuemetrics_dbname\n";}
$place=0;
if ($rec_countWAIT > 0) {$place = $rec_countWAIT;}
if ($rec_countWAITrem > 0) {$place = $rec_countWAITrem;}
$place++;
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='EXITWITHKEY',data1='2',data2='$place',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02093'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$stmtB = "INSERT INTO queue_log SET partition='P01',time_id='$now_date_epoch',call_id='$YqueryCID',queue='$channel_group',agent='NONE',verb='CALLSTATUS',data1='HOLDTO',serverid='$queuemetrics_log_id';";
$Baffected_rows = $dbhB->do($stmtB);
$dbhP=$dbhB; $stmtA=$stmtB; $mysql_count='02094'; $MEL_aff_rows=$Baffected_rows; &mysql_error_logging;
$dbhB->disconnect();
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ( (length($hold_time_option_callback_filename) > 0) && ($play_post_press_audio > 0) )
{
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
if ($hold_time_option_callback_filename =~ /\|/)
{
@hold_time_option_callback_filename_array = split(/\|/,$hold_time_option_callback_filename);
$w=0;
foreach(@hold_time_option_callback_filename_array)
{
if (length($hold_time_option_callback_filename_array[$w])>0)
{
$AGI->stream_file("$hold_time_option_callback_filename_array[$w]");
}
$w++;
}
}
else
{$AGI->stream_file("$hold_time_option_callback_filename");}
}
if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $DROPexten"; &agi_output;}
print "SET CONTEXT $ext_context\n";
checkresult($result);
print "SET EXTENSION $DROPexten\n";
checkresult($result);
print "SET PRIORITY 1\n";
checkresult($result);
$dbhA->disconnect();
exit;
}
}
$start_moh=1;
$moh_delay=1;
}
}
}
### END hold time options ###
@@ -3826,6 +4255,7 @@ sub enter_id_number
### END VIDPROMPT gather of ID section ###
sub press_one_hold_time_option_prompt
{
$digits_to_collect = 1;
@@ -3841,26 +4271,26 @@ sub press_one_hold_time_option_prompt
undef $interrupt_digit;
$digit_loop_counter=0;
$interrupt_digit = $AGI->stream_file('sip-silence','1');
$interrupt_digit = $AGI->stream_file('sip-silence',"$HTO_digits");
$interrupt_digit='';
undef $interrupt_digit;
if ($hold_time_option_press_filename =~ /\|/)
if ($HTO_filename =~ /\|/)
{
@hold_time_option_press_filename_array = split(/\|/,$hold_time_option_press_filename);
@hold_time_option_press_filename_array = split(/\|/,$HTO_filename);
$w=0;
foreach(@hold_time_option_press_filename_array)
{
if ( (length($hold_time_option_press_filename_array[$w])>0) && ($interrupt_digit < 2) )
{
$interrupt_digit = $AGI->stream_file("$hold_time_option_press_filename_array[$w]",'1');
$interrupt_digit = $AGI->stream_file("$hold_time_option_press_filename_array[$w]","$HTO_digits");
}
$w++;
}
}
else
{$interrupt_digit = $AGI->stream_file("$hold_time_option_press_filename",'1');} # this prompt must be less than 10 seconds long
{$interrupt_digit = $AGI->stream_file("$HTO_filename","$HTO_digits");} # this prompt should be less than 10 seconds long
if ($AGILOG) {$agi_string = "interrupt_digit |$interrupt_digit| |$hold_time_option_press_filename|"; &agi_output;}
+1
View File
@@ -55,3 +55,4 @@ NANQUE - Inbound no agent no queue drop, no agent logged in
RAXFER - Remote Agent API transfer
ALTNUM - Agent manual Dial Alternate number dialing, number dialed before final disposition
DISPO - Agent in disposition screen when they closed their web browser wiithout selecting dispisition
WAITTO - Wait time option call termination on inbound call
@@ -911,7 +911,23 @@ hold_time_option_callmenu VARCHAR(50) default '',
hold_time_option_no_block ENUM('N','Y') default 'N',
hold_time_option_prompt_seconds SMALLINT(5) default '10',
onhold_prompt_no_block ENUM('N','Y') default 'N',
onhold_prompt_seconds SMALLINT(5) default '10'
onhold_prompt_seconds SMALLINT(5) default '10',
hold_time_second_option VARCHAR(30) default 'NONE',
hold_time_third_option VARCHAR(30) default 'NONE',
wait_hold_option_priority ENUM('WAIT','HOLD','BOTH') default 'WAIT',
wait_time_option VARCHAR(30) default 'NONE',
wait_time_second_option VARCHAR(30) default 'NONE',
wait_time_third_option VARCHAR(30) default 'NONE',
wait_time_option_seconds SMALLINT(5) default '120',
wait_time_option_exten VARCHAR(20) default '8300',
wait_time_option_voicemail VARCHAR(20) default '',
wait_time_option_xfer_group VARCHAR(20) default '---NONE---',
wait_time_option_callmenu VARCHAR(50) default '',
wait_time_option_callback_filename VARCHAR(255) default 'vm-hangup',
wait_time_option_callback_list_id BIGINT(14) UNSIGNED default '999',
wait_time_option_press_filename VARCHAR(255) default 'to-be-called-back|digits/1',
wait_time_option_no_block ENUM('N','Y') default 'N',
wait_time_option_prompt_seconds SMALLINT(5) default '10'
);
CREATE TABLE vicidial_stations (
@@ -2276,7 +2292,7 @@ ALTER TABLE vicidial_agent_log_archive MODIFY agent_log_id INT(9) UNSIGNED NOT N
CREATE TABLE vicidial_carrier_log_archive LIKE vicidial_carrier_log;
UPDATE system_settings SET db_schema_version='1234',db_schema_update_date=NOW();
UPDATE system_settings SET db_schema_version='1235',db_schema_update_date=NOW();
GRANT RELOAD ON *.* TO cron@'%';
GRANT RELOAD ON *.* TO cron@localhost;
+1 -1
View File
@@ -195,7 +195,7 @@ ALTER TABLE vicidial_call_menu_options MODIFY option_route_value VARCHAR(255);
UPDATE system_settings SET db_schema_version='1153';
ALTER TABLE phones ADD conf_secret VARCHAR(20) default 'test';
UPDATE phones set conf_secret=pass;
UPDATE phones set conf_secret=pass where ( (conf_secret IS NULL) or (conf_secret='') );
UPDATE system_settings SET db_schema_version='1154';
+20
View File
@@ -414,3 +414,23 @@ ALTER TABLE system_settings ADD reports_use_slave_db VARCHAR(2000) default '';
ALTER TABLE vicidial_list ADD entry_list_id BIGINT(14) UNSIGNED NOT NULL DEFAULT '0';
UPDATE system_settings SET db_schema_version='1234',db_schema_update_date=NOW();
ALTER TABLE vicidial_inbound_groups ADD hold_time_second_option VARCHAR(30) default 'NONE';
ALTER TABLE vicidial_inbound_groups ADD hold_time_third_option VARCHAR(30) default 'NONE';
ALTER TABLE vicidial_inbound_groups ADD wait_hold_option_priority ENUM('WAIT','HOLD','BOTH') default 'WAIT';
ALTER TABLE vicidial_inbound_groups ADD wait_time_option VARCHAR(30) default 'NONE';
ALTER TABLE vicidial_inbound_groups ADD wait_time_second_option VARCHAR(30) default 'NONE';
ALTER TABLE vicidial_inbound_groups ADD wait_time_third_option VARCHAR(30) default 'NONE';
ALTER TABLE vicidial_inbound_groups ADD wait_time_option_seconds SMALLINT(5) default '120';
ALTER TABLE vicidial_inbound_groups ADD wait_time_option_exten VARCHAR(20) default '8300';
ALTER TABLE vicidial_inbound_groups ADD wait_time_option_voicemail VARCHAR(20) default '';
ALTER TABLE vicidial_inbound_groups ADD wait_time_option_xfer_group VARCHAR(20) default '---NONE---';
ALTER TABLE vicidial_inbound_groups ADD wait_time_option_callmenu VARCHAR(50) default '';
ALTER TABLE vicidial_inbound_groups ADD wait_time_option_callback_filename VARCHAR(255) default 'vm-hangup';
ALTER TABLE vicidial_inbound_groups ADD wait_time_option_callback_list_id BIGINT(14) UNSIGNED default '999';
ALTER TABLE vicidial_inbound_groups ADD wait_time_option_press_filename VARCHAR(255) default 'to-be-called-back|digits/1';
ALTER TABLE vicidial_inbound_groups ADD wait_time_option_no_block ENUM('N','Y') default 'N';
ALTER TABLE vicidial_inbound_groups ADD wait_time_option_prompt_seconds SMALLINT(5) default '10';
UPDATE system_settings SET db_schema_version='1235',db_schema_update_date=NOW();
@@ -253,6 +253,39 @@ Reports to use Slave DB||
This option allows you to select the reports that you want to have use the MySQL slave database as defined in the option above instead of the master database that your live ViciDial system is running on. You must set up the MySQL slave replication before you can enable this option. Default is empty for disabled||
Custom fields defined for this list||
Go to the list modification page for this list||
Estimated Hold Time Option||
Hold Time Second Option||
Same as the first Hold Time Option field above, except this one will check for the customer pressing the 2 key. Default is NONE. If no first Hold Time Option is selected then this option will not be offered||
Hold Time Third Option||
Same as the first Hold Time Option field above, except this one will check for the customer pressing the 3 key. Default is NONE. If no Second Hold Time Option is selected then this option will not be offered||
Wait Time Option||
This allows you to give customers options to leave the queue if their wait time is over the amount of seconds specified below. Default is NONE. 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_STAY option will send the customer back to the queue without loosing their place in line||
Wait Time Second Option||
Same as the first Wait Time Option field above, except this one will check for the customer pressing the 2 key. Default is NONE. If no first Wait Time Option is selected then this option will not be offered||
Wait Time Third Option||
Same as the first Wait Time Option field above, except this one will check for the customer pressing the 3 key. Default is NONE. If no Second Wait Time Option is selected then this option will not be offered||
Wait Time Option Seconds||
If Wait Time Option is set to anything but NONE, this is the number of seconds that the customer has been waiting in queue that will trigger the wait time options. Default is 120 seconds||
Wait Time Option Extension||
If Wait Time Option is set to PRESS_EXTEN, this is the dialplan extension that the call will be sent to if the customer presses the option key when presented with the option||
Wait Time Option Callmenu||
If Wait Time Option is set to PRESS_CALLMENU, this is the Call Menu that the call will be sent to if the customer presses the option key when presented with the option||
Wait Time Option Voicemail||
If Wait Time Option is set to PRESS_VMAIL, this is the voicemail box that the call will be sent to if the customer presses the option key when presented with the option. In an AGENTDIRECT in-group, setting this to AGENTVMAIL will select the User voicemail ID to use||
Wait Time Option Transfer In-Group||
If Wait Time Option is set to PRESS_INGROUP, this is the inbound group that the call will be sent to if the customer presses the option key when presented with the option||
Wait Time Option Press Filename||
If Wait Time Option is set to one of the PRESS_ options, this is the filename prompt that is played if the customer wait time exceeds the Wait Time Option Seconds to give the customer the option to press 1, 2 or 3 on their phone to run the selected Wait Time Press options. It is very important that you include options in the audio file for all of your selected Wait Time Options, and that the audio file length in seconds is properly defined in the Filename Seconds field below or there will be problems. Default is to-be-called-back||
Wait Time Option Press No Block||
Setting this option to Y will allow calls in line behind a call where the Wait Time Option Press Filename prompt is playing to go to an agent if one becomes available while the message is playing. While the Wait Time Option Press Filename message is playing to a customer they cannot be sent to an agent. Default is N||
Wait Time Option Press Filename Seconds||
This field needs to be set to the number of seconds that the Wait Time Option Press Filename plays for. Default is 10||
Wait Time Option After Press Filename||
If Wait Time Option is set to one of the PRESS_ options, this is the filename prompt that is played after the customer has pressed 1, 2 or 3||
Wait Time Option Callback List ID||
If Wait Time Option is set to PRESS_CID_CALLBACK, this is the List ID the call is added to as a new lead if the customer presses the option key when presented with the option||
Wait Hold Option Priority||
If both Estimated Hold Time options and Wait Time options are active, this setting will define whether one, the other or both of these features are active. For example, if the Estimated Hold Time Option is set to 360, the Wait Time option is set to 120 and the customer has been waiting for 120 seconds and there are still 400 seconds estimated hold time, then they are both active at the same time and this setting will be checked to see what options will be offered. Default is WAIT only||
AST_VICIDIAL_ingrouplist.php
+192 -8
View File
@@ -1333,6 +1333,38 @@ if (isset($_GET["slave_db_server"])) {$slave_db_server=$_GET["slave_db_server
elseif (isset($_POST["slave_db_server"])) {$slave_db_server=$_POST["slave_db_server"];}
if (isset($_GET["reports_use_slave_db"])) {$reports_use_slave_db=$_GET["reports_use_slave_db"];}
elseif (isset($_POST["reports_use_slave_db"])) {$reports_use_slave_db=$_POST["reports_use_slave_db"];}
if (isset($_GET["hold_time_second_option"])) {$hold_time_second_option=$_GET["hold_time_second_option"];}
elseif (isset($_POST["hold_time_second_option"])) {$hold_time_second_option=$_POST["hold_time_second_option"];}
if (isset($_GET["hold_time_third_option"])) {$hold_time_third_option=$_GET["hold_time_third_option"];}
elseif (isset($_POST["hold_time_third_option"])) {$hold_time_third_option=$_POST["hold_time_third_option"];}
if (isset($_GET["wait_hold_option_priority"])) {$wait_hold_option_priority=$_GET["wait_hold_option_priority"];}
elseif (isset($_POST["wait_hold_option_priority"])) {$wait_hold_option_priority=$_POST["wait_hold_option_priority"];}
if (isset($_GET["wait_time_option"])) {$wait_time_option=$_GET["wait_time_option"];}
elseif (isset($_POST["wait_time_option"])) {$wait_time_option=$_POST["wait_time_option"];}
if (isset($_GET["wait_time_second_option"])) {$wait_time_second_option=$_GET["wait_time_second_option"];}
elseif (isset($_POST["wait_time_second_option"])) {$wait_time_second_option=$_POST["wait_time_second_option"];}
if (isset($_GET["wait_time_third_option"])) {$wait_time_third_option=$_GET["wait_time_third_option"];}
elseif (isset($_POST["wait_time_third_option"])) {$wait_time_third_option=$_POST["wait_time_third_option"];}
if (isset($_GET["wait_time_option_seconds"])) {$wait_time_option_seconds=$_GET["wait_time_option_seconds"];}
elseif (isset($_POST["wait_time_option_seconds"])) {$wait_time_option_seconds=$_POST["wait_time_option_seconds"];}
if (isset($_GET["wait_time_option_exten"])) {$wait_time_option_exten=$_GET["wait_time_option_exten"];}
elseif (isset($_POST["wait_time_option_exten"])) {$wait_time_option_exten=$_POST["wait_time_option_exten"];}
if (isset($_GET["wait_time_option_voicemail"])) {$wait_time_option_voicemail=$_GET["wait_time_option_voicemail"];}
elseif (isset($_POST["wait_time_option_voicemail"])) {$wait_time_option_voicemail=$_POST["wait_time_option_voicemail"];}
if (isset($_GET["wait_time_option_xfer_group"])) {$wait_time_option_xfer_group=$_GET["wait_time_option_xfer_group"];}
elseif (isset($_POST["wait_time_option_xfer_group"])) {$wait_time_option_xfer_group=$_POST["wait_time_option_xfer_group"];}
if (isset($_GET["wait_time_option_callmenu"])) {$wait_time_option_callmenu=$_GET["wait_time_option_callmenu"];}
elseif (isset($_POST["wait_time_option_callmenu"])) {$wait_time_option_callmenu=$_POST["wait_time_option_callmenu"];}
if (isset($_GET["wait_time_option_callback_filename"])) {$wait_time_option_callback_filename=$_GET["wait_time_option_callback_filename"];}
elseif (isset($_POST["wait_time_option_callback_filename"])) {$wait_time_option_callback_filename=$_POST["wait_time_option_callback_filename"];}
if (isset($_GET["wait_time_option_callback_list_id"])) {$wait_time_option_callback_list_id=$_GET["wait_time_option_callback_list_id"];}
elseif (isset($_POST["wait_time_option_callback_list_id"])) {$wait_time_option_callback_list_id=$_POST["wait_time_option_callback_list_id"];}
if (isset($_GET["wait_time_option_press_filename"])) {$wait_time_option_press_filename=$_GET["wait_time_option_press_filename"];}
elseif (isset($_POST["wait_time_option_press_filename"])) {$wait_time_option_press_filename=$_POST["wait_time_option_press_filename"];}
if (isset($_GET["wait_time_option_no_block"])) {$wait_time_option_no_block=$_GET["wait_time_option_no_block"];}
elseif (isset($_POST["wait_time_option_no_block"])) {$wait_time_option_no_block=$_POST["wait_time_option_no_block"];}
if (isset($_GET["wait_time_option_prompt_seconds"])) {$wait_time_option_prompt_seconds=$_GET["wait_time_option_prompt_seconds"];}
elseif (isset($_POST["wait_time_option_prompt_seconds"])) {$wait_time_option_prompt_seconds=$_POST["wait_time_option_prompt_seconds"];}
if (isset($script_id)) {$script_id= strtoupper($script_id);}
@@ -1549,6 +1581,9 @@ if ($non_latin < 1)
$onhold_prompt_seconds = ereg_replace("[^0-9]","",$onhold_prompt_seconds);
$hold_time_option_prompt_seconds = ereg_replace("[^0-9]","",$hold_time_option_prompt_seconds);
$custom_fields_enabled = ereg_replace("[^0-9]","",$custom_fields_enabled);
$wait_time_option_seconds = ereg_replace("[^0-9]","",$wait_time_option_seconds);
$wait_time_option_callback_list_id = ereg_replace("[^0-9]","",$wait_time_option_callback_list_id);
$wait_time_option_prompt_seconds = ereg_replace("[^0-9]","",$wait_time_option_prompt_seconds);
$drop_call_seconds = ereg_replace("[^-0-9]","",$drop_call_seconds);
@@ -1630,6 +1665,7 @@ if ($non_latin < 1)
$extension_appended_cidname = ereg_replace("[^NY]","",$extension_appended_cidname);
$onhold_prompt_no_block = ereg_replace("[^NY]","",$onhold_prompt_no_block);
$hold_time_option_no_block = ereg_replace("[^NY]","",$hold_time_option_no_block);
$wait_time_option_no_block = ereg_replace("[^NY]","",$wait_time_option_no_block);
$qc_enabled = ereg_replace("[^0-9NY]","",$qc_enabled);
$active = ereg_replace("[^0-9NY]","",$active);
@@ -1844,6 +1880,18 @@ if ($non_latin < 1)
$uniqueid_status_display = ereg_replace("[^-_0-9a-zA-Z]","",$uniqueid_status_display);
$hold_time_option_callmenu = ereg_replace("[^-_0-9a-zA-Z]","",$hold_time_option_callmenu);
$inbound_queue_no_dial = ereg_replace("[^-_0-9a-zA-Z]","",$inbound_queue_no_dial);
$hold_time_second_option = ereg_replace("[^-_0-9a-zA-Z]","",$hold_time_second_option);
$hold_time_third_option = ereg_replace("[^-_0-9a-zA-Z]","",$hold_time_third_option);
$wait_hold_option_priority = ereg_replace("[^-_0-9a-zA-Z]","",$wait_hold_option_priority);
$wait_time_option = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_option);
$wait_time_second_option = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_second_option);
$wait_time_third_option = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_third_option);
$wait_time_option_xfer_group = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_option_xfer_group);
$wait_time_option_callmenu = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_option_callmenu);
$wait_time_option_voicemail = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_option_voicemail);
$wait_time_third_option = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_third_option);
$wait_time_third_option = ereg_replace("[^-_0-9a-zA-Z]","",$wait_time_third_option);
### ALPHA-NUMERIC and underscore and dash and slash and dot
$menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt);
@@ -1870,6 +1918,8 @@ if ($non_latin < 1)
$saturday_afterhours_filename_override = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$saturday_afterhours_filename_override);
$admin_web_directory = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$admin_web_directory);
$tts_voice = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$tts_voice);
$wait_time_option_callback_filename = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$wait_time_option_callback_filename);
$wait_time_option_press_filename = ereg_replace("[^-\|\/\._0-9a-zA-Z]","",$wait_time_option_press_filename);
### ALPHA-NUMERIC and underscore and dash and comma
$logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list);
@@ -1888,6 +1938,7 @@ if ($non_latin < 1)
$voicemail_ext = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$voicemail_ext);
$phone = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$phone);
$phone_code = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$phone_code);
$wait_time_option_exten = ereg_replace("[^\*\#\.\_0-9a-zA-Z]","",$wait_time_option_exten);
### ALPHA-NUMERIC and spaces dots, commas, dashes, underscores
$adaptive_dl_diff_target = ereg_replace("[^ \.\,-\_0-9a-zA-Z]","",$adaptive_dl_diff_target);
@@ -2327,11 +2378,12 @@ else
# 100702-1142 - Added FORM get_call_launch option for custom list fields tab in agent interface
# 100703-1322 - Added LEADS ability to admin log display
# 100709-1025 - Added option for slave DB server to be used for selected reports
# 100718-2318 - Added Wait Time options to in-groups
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time
$admin_version = '2.4-262';
$build = '100709-1025';
$admin_version = '2.4-263';
$build = '100718-2318';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -4698,10 +4750,90 @@ if ($ADD==99999)
<BR>
<B>Play Estimated Hold Time -</B> This defines whether the caller will hear the estimated hold time before they are transferred to an agent. Default is N. If the customer is on hold and hears this estimated hold time message, the minimum time that will be played is 15 seconds.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_option">
<BR>
<B>Wait Time Option -</B> This allows you to give customers options to leave the queue if their wait time is over the amount of seconds specified below. Default is NONE. 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_STAY option will send the customer back to the queue without loosing their place in line.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_second_option">
<BR>
<B>Wait Time Second Option -</B> Same as the first Wait Time Option field above, except this one will check for the customer pressing the 2 key. Default is NONE. If no first Wait Time Option is selected then this option will not be offered.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_third_option">
<BR>
<B>Wait Time Third Option -</B> Same as the first Wait Time Option field above, except this one will check for the customer pressing the 3 key. Default is NONE. If no Second Wait Time Option is selected then this option will not be offered.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_option_seconds">
<BR>
<B>Wait Time Option Seconds -</B> If Wait Time Option is set to anything but NONE, this is the number of seconds that the customer has been waiting in queue that will trigger the wait time options. Default is 120 seconds.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_option_exten">
<BR>
<B>Wait Time Option Extension -</B> If Wait Time Option is set to PRESS_EXTEN, this is the dialplan extension that the call will be sent to if the customer presses the option key when presented with the option.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_option_callmenu">
<BR>
<B>Wait Time Option Callmenu -</B> If Wait Time Option is set to PRESS_CALLMENU, this is the Call Menu that the call will be sent to if the customer presses the option key when presented with the option.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_option_voicemail">
<BR>
<B>Wait Time Option Voicemail -</B> If Wait Time Option is set to PRESS_VMAIL, this is the voicemail box that the call will be sent to if the customer presses the option key when presented with the option. In an AGENTDIRECT in-group, setting this to AGENTVMAIL will select the User voicemail ID to use.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_option_xfer_group">
<BR>
<B>Wait Time Option Transfer In-Group -</B> If Wait Time Option is set to PRESS_INGROUP, this is the inbound group that the call will be sent to if the customer presses the option key when presented with the option.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_option_press_filename">
<BR>
<B>Wait Time Option Press Filename -</B> If Wait Time Option is set to one of the PRESS_ options, this is the filename prompt that is played if the customer wait time exceeds the Wait Time Option Seconds to give the customer the option to press 1, 2 or 3 on their phone to run the selected Wait Time Press options. It is very important that you include options in the audio file for all of your selected Wait Time Options, and that the audio file length in seconds is properly defined in the Filename Seconds field below or there will be problems. Default is to-be-called-back.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_option_no_block">
<BR>
<B>Wait Time Option Press No Block -</B> Setting this option to Y will allow calls in line behind a call where the Wait Time Option Press Filename prompt is playing to go to an agent if one becomes available while the message is playing. While the Wait Time Option Press Filename message is playing to a customer they cannot be sent to an agent. Default is N.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_option_prompt_seconds">
<BR>
<B>Wait Time Option Press Filename Seconds -</B> This field needs to be set to the number of seconds that the Wait Time Option Press Filename plays for. Default is 10.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_option_callback_filename">
<BR>
<B>Wait Time Option After Press Filename -</B> If Wait Time Option is set to one of the PRESS_ options, this is the filename prompt that is played after the customer has pressed 1, 2 or 3.
<BR>
<A NAME="vicidial_inbound_groups-wait_time_option_callback_list_id">
<BR>
<B>Wait Time Option Callback List ID -</B> If Wait Time Option is set to PRESS_CID_CALLBACK, this is the List ID the call is added to as a new lead if the customer presses the option key when presented with the option.
<BR>
<A NAME="vicidial_inbound_groups-wait_hold_option_priority">
<BR>
<B>Wait Hold Option Priority -</B> If both Estimated Hold Time options and Wait Time options are active, this setting will define whether one, the other or both of these features are active. For example, if the Estimated Hold Time Option is set to 360, the Wait Time option is set to 120 and the customer has been waiting for 120 seconds and there are still 400 seconds estimated hold time, then they are both active at the same time and this setting will be checked to see what options will be offered. Default is WAIT only.
<BR>
<A NAME="vicidial_inbound_groups-hold_time_option">
<BR>
<B>Hold Time Option -</B> This allows you to specify the routing of the call if the estimated hold time is over the amount of seconds specified below. Default is NONE. 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.
<B>Estimated Hold Time Option -</B> This allows you to specify the routing of the call if the estimated hold time is over the amount of seconds specified below. Default is NONE. 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.
<BR>
<A NAME="vicidial_inbound_groups-hold_time_second_option">
<BR>
<B>Hold Time Second Option -</B> Same as the first Hold Time Option field above, except this one will check for the customer pressing the 2 key. Default is NONE. If no first Hold Time Option is selected then this option will not be offered.
<BR>
<A NAME="vicidial_inbound_groups-hold_time_third_option">
<BR>
<B>Hold Time Third Option -</B> Same as the first Hold Time Option field above, except this one will check for the customer pressing the 3 key. Default is NONE. If no Second Hold Time Option is selected then this option will not be offered.
<BR>
<A NAME="vicidial_inbound_groups-hold_time_option_seconds">
@@ -9859,7 +9991,7 @@ if ($ADD==2011)
}
else
{
$stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds from vicidial_inbound_groups where group_id=\"$source_group_id\";";
$stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,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) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,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 from vicidial_inbound_groups where group_id=\"$source_group_id\";";
$rslt=mysql_query($stmt, $link);
echo "<br><B>GROUP ADDED: $group_id</B>\n";
@@ -12971,7 +13103,7 @@ if ($ADD==4111)
echo "<br><B>GROUP MODIFIED: $group_id</B>\n";
$stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',ignore_list_script_override='$ignore_list_script_override',extension_appended_cidname='$extension_appended_cidname',uniqueid_status_display='$uniqueid_status_display',uniqueid_status_prefix='$uniqueid_status_prefix',hold_time_option_minimum='$hold_time_option_minimum',hold_time_option_press_filename='$hold_time_option_press_filename',hold_time_option_callmenu='$hold_time_option_callmenu',onhold_prompt_no_block='$onhold_prompt_no_block',onhold_prompt_seconds='$onhold_prompt_seconds',hold_time_option_no_block='$hold_time_option_no_block',hold_time_option_prompt_seconds='$hold_time_option_prompt_seconds' where group_id='$group_id';";
$stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',ignore_list_script_override='$ignore_list_script_override',extension_appended_cidname='$extension_appended_cidname',uniqueid_status_display='$uniqueid_status_display',uniqueid_status_prefix='$uniqueid_status_prefix',hold_time_option_minimum='$hold_time_option_minimum',hold_time_option_press_filename='$hold_time_option_press_filename',hold_time_option_callmenu='$hold_time_option_callmenu',onhold_prompt_no_block='$onhold_prompt_no_block',onhold_prompt_seconds='$onhold_prompt_seconds',hold_time_option_no_block='$hold_time_option_no_block',hold_time_option_prompt_seconds='$hold_time_option_prompt_seconds',hold_time_second_option='$hold_time_second_option',hold_time_third_option='$hold_time_third_option',wait_hold_option_priority='$wait_hold_option_priority',wait_time_option='$wait_time_option',wait_time_second_option='$wait_time_second_option',wait_time_third_option='$wait_time_third_option',wait_time_option_seconds='$wait_time_option_seconds',wait_time_option_exten='$wait_time_option_exten',wait_time_option_voicemail='$wait_time_option_voicemail',wait_time_option_xfer_group='$wait_time_option_xfer_group',wait_time_option_callmenu='$wait_time_option_callmenu',wait_time_option_callback_filename='$wait_time_option_callback_filename',wait_time_option_callback_list_id='$wait_time_option_callback_list_id',wait_time_option_press_filename='$wait_time_option_press_filename',wait_time_option_no_block='$wait_time_option_no_block',wait_time_option_prompt_seconds='$wait_time_option_prompt_seconds' where group_id='$group_id';";
$rslt=mysql_query($stmt, $link);
### LOG INSERTION Admin Log Table ###
@@ -20295,7 +20427,7 @@ if ($ADD==3111)
echo "<TABLE><TR><TD>\n";
echo "<FONT FACE=\"ARIAL,HELVETICA\" COLOR=BLACK SIZE=2>";
$stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds from vicidial_inbound_groups where group_id='$group_id';";
$stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,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 from vicidial_inbound_groups where group_id='$group_id';";
$rslt=mysql_query($stmt, $link);
$row=mysql_fetch_row($rslt);
@@ -20376,7 +20508,23 @@ if ($ADD==3111)
$onhold_prompt_no_block = $row[75];
$onhold_prompt_seconds = $row[76];
$hold_time_option_no_block = $row[77];
$hold_time_option_prompt_seconds = $row[78];
$hold_time_option_prompt_seconds = $row[78];
$hold_time_second_option = $row[79];
$hold_time_third_option = $row[80];
$wait_hold_option_priority = $row[81];
$wait_time_option = $row[82];
$wait_time_second_option = $row[83];
$wait_time_third_option = $row[84];
$wait_time_option_seconds = $row[85];
$wait_time_option_exten = $row[86];
$wait_time_option_voicemail = $row[87];
$wait_time_option_xfer_group = $row[88];
$wait_time_option_callmenu = $row[89];
$wait_time_option_callback_filename = $row[90];
$wait_time_option_callback_list_id = $row[91];
$wait_time_option_press_filename = $row[92];
$wait_time_option_no_block = $row[93];
$wait_time_option_prompt_seconds = $row[94];
##### get callmenu listings for dynamic pulldown
$stmt="SELECT menu_id,menu_name from vicidial_call_menu order by menu_id";
@@ -20667,7 +20815,43 @@ if ($ADD==3111)
echo "<tr bgcolor=#B6D3FC><td align=right>Play Estimated Hold Time: </td><td align=left><select size=1 name=play_estimate_hold_time><option>Y</option><option>N</option><option SELECTED>$play_estimate_hold_time</option></select>$NWB#vicidial_inbound_groups-play_estimate_hold_time$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Hold Time Option: </td><td align=left><select size=1 name=hold_time_option><option>NONE</option><option>EXTENSION</option><option>CALL_MENU</option><option>VOICEMAIL</option><option>IN_GROUP</option><option>CALLERID_CALLBACK</option><option>DROP_ACTION</option><option>PRESS_VMAIL</option><option>PRESS_EXTEN</option><option>PRESS_CALLMENU</option><option>PRESS_CID_CALLBACK</option><option>PRESS_INGROUP</option><option SELECTED>$hold_time_option</option></select>$NWB#vicidial_inbound_groups-hold_time_option$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Option: </td><td align=left><select size=1 name=wait_time_option><option>NONE</option><option>PRESS_STAY</option><option>PRESS_VMAIL</option><option>PRESS_EXTEN</option><option>PRESS_CALLMENU</option><option>PRESS_CID_CALLBACK</option><option>PRESS_INGROUP</option><option SELECTED>$wait_time_option</option></select>$NWB#vicidial_inbound_groups-wait_time_option$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Second Option: </td><td align=left><select size=1 name=wait_time_second_option><option>NONE</option><option>PRESS_STAY</option><option>PRESS_VMAIL</option><option>PRESS_EXTEN</option><option>PRESS_CALLMENU</option><option>PRESS_CID_CALLBACK</option><option>PRESS_INGROUP</option><option SELECTED>$wait_time_second_option</option></select>$NWB#vicidial_inbound_groups-wait_time_second_option$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Third Option: </td><td align=left><select size=1 name=wait_time_third_option><option>NONE</option><option>PRESS_STAY</option><option>PRESS_VMAIL</option><option>PRESS_EXTEN</option><option>PRESS_CALLMENU</option><option>PRESS_CID_CALLBACK</option><option>PRESS_INGROUP</option><option SELECTED>$wait_time_third_option</option></select>$NWB#vicidial_inbound_groups-wait_time_third_option$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Option Seconds: </td><td align=left><input type=text name=wait_time_option_seconds size=5 maxlength=5 value=\"$wait_time_option_seconds\">$NWB#vicidial_inbound_groups-wait_time_option_seconds$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Option Extension: </td><td align=left><input type=text name=wait_time_option_exten size=20 maxlength=20 value=\"$wait_time_option_exten\">$NWB#vicidial_inbound_groups-wait_time_option_exten$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right><a href=\"$PHP_SELF?ADD=3511&menu_id=$wait_time_option_callmenu\">Wait Time Option Callmenu</a>: </td><td align=left><select size=1 name=wait_time_option_callmenu>\n";
echo "$Xmenuslist";
echo "</select>$NWB#vicidial_inbound_groups-wait_time_option_callmenu$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Option Voicemail: </td><td align=left><input type=text name=wait_time_option_voicemail id=wait_time_option_voicemail size=12 maxlength=10 value=\"$wait_time_option_voicemail\"> <a href=\"javascript:launch_vm_chooser('wait_time_option_voicemail','vm',1100);\">voicemail chooser</a> $NWB#vicidial_inbound_groups-wait_time_option_voicemail$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Option Transfer In-Group: </td><td align=left><select size=1 name=wait_time_option_xfer_group>";
echo "$Tgroups_menu";
echo "</select>$NWB#vicidial_inbound_groups-wait_time_option_xfer_group$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Option Press Filename: </td><td align=left><input type=text name=wait_time_option_press_filename id=wait_time_option_press_filename size=50 maxlength=255 value=\"$wait_time_option_press_filename\"> <a href=\"javascript:launch_chooser('wait_time_option_press_filename','date',1200);\">audio chooser</a> $NWB#vicidial_inbound_groups-wait_time_option_press_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Option Press No Block: </td><td align=left><select size=1 name=wait_time_option_no_block><option>N</option><option>Y</option><option SELECTED>$wait_time_option_no_block</option></select>$NWB#vicidial_inbound_groups-wait_time_option_no_block$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Option Press Filename Seconds: </td><td align=left><input type=text name=wait_time_option_prompt_seconds size=5 maxlength=5 value=\"$wait_time_option_prompt_seconds\">$NWB#vicidial_inbound_groups-wait_time_option_prompt_seconds$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Option After Press Filename: </td><td align=left><input type=text name=wait_time_option_callback_filename id=wait_time_option_callback_filename size=50 maxlength=255 value=\"$wait_time_option_callback_filename\"> <a href=\"javascript:launch_chooser('wait_time_option_callback_filename','date',1300);\">audio chooser</a> $NWB#vicidial_inbound_groups-wait_time_option_callback_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#99FFCC><td align=right>Wait Time Option Callback List ID: </td><td align=left><input type=text name=wait_time_option_callback_list_id size=14 maxlength=14 value=\"$wait_time_option_callback_list_id\">$NWB#vicidial_inbound_groups-wait_time_option_callback_list_id$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Wait Hold Option Priority: </td><td align=left><select size=1 name=wait_hold_option_priority><option>WAIT</option><option>BOTH</option><option SELECTED>$wait_hold_option_priority</option></select>$NWB#vicidial_inbound_groups-wait_hold_option_priority$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Estimated Hold Time Option: </td><td align=left><select size=1 name=hold_time_option><option>NONE</option><option>EXTENSION</option><option>CALL_MENU</option><option>VOICEMAIL</option><option>IN_GROUP</option><option>CALLERID_CALLBACK</option><option>DROP_ACTION</option><option>PRESS_STAY</option><option>PRESS_VMAIL</option><option>PRESS_EXTEN</option><option>PRESS_CALLMENU</option><option>PRESS_CID_CALLBACK</option><option>PRESS_INGROUP</option><option SELECTED>$hold_time_option</option></select>$NWB#vicidial_inbound_groups-hold_time_option$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Hold Time Second Option: </td><td align=left><select size=1 name=hold_time_second_option><option>NONE</option><option>PRESS_STAY</option><option>PRESS_VMAIL</option><option>PRESS_EXTEN</option><option>PRESS_CALLMENU</option><option>PRESS_CID_CALLBACK</option><option>PRESS_INGROUP</option><option SELECTED>$hold_time_second_option</option></select>$NWB#vicidial_inbound_groups-hold_time_second_option$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Hold Time Third Option: </td><td align=left><select size=1 name=hold_time_third_option><option>NONE</option><option>PRESS_STAY</option><option>PRESS_VMAIL</option><option>PRESS_EXTEN</option><option>PRESS_CALLMENU</option><option>PRESS_CID_CALLBACK</option><option>PRESS_INGROUP</option><option SELECTED>$hold_time_third_option</option></select>$NWB#vicidial_inbound_groups-hold_time_third_option$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Hold Time Option Seconds: </td><td align=left><input type=text name=hold_time_option_seconds size=5 maxlength=5 value=\"$hold_time_option_seconds\">$NWB#vicidial_inbound_groups-hold_time_option_seconds$NWE</td></tr>\n";
+1 -1
View File
@@ -1196,7 +1196,7 @@ if ($function == 'add_lead')
{
if (strlen($gender)<1) {$gender='U';}
if (strlen($rank)<1) {$rank='0';}
if (strlen($list_id)<1) {$list_id='999';}
if (strlen($list_id)<3) {$list_id='999';}
if (strlen($phone_code)<1) {$phone_code='1';}
if ( (strlen($phone_number)<6) || (strlen($phone_number)>16) )