diff --git a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi index 35967312..19cc0118 100644 --- a/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi +++ b/agc_2-X/trunk/agi/agi-VDAD_ALL_inbound.agi @@ -127,6 +127,7 @@ # 100424-1234 - Added unique status options and extended logging # 100429-1457 - Remote agent fixes # 100512-2118 - Added several press-1 hold time options +# 100513-2338 - Changed hold time callback filename to after press filename and now plays after all PRESS-1 # $script = 'agi-VDAD_ALL_inbound.agi'; @@ -2952,6 +2953,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) ) $wait_in_queue=0; # exits wait loop $DROPexten = ''; $exitwithkey=0; + $play_post_press_audio=0; ### Available hold time options: # - EXTENSION @@ -2995,6 +2997,9 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) ) if ($pin =~ /1/) { + $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';} @@ -3002,6 +3007,8 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) ) 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) { $dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass") @@ -3132,26 +3139,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) ) $DROPexten = "8300"; - if (length($hold_time_option_callback_filename) > 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");} # this prompt must be less than 10 seconds long - } + $play_post_press_audio=1; } else { @@ -3178,11 +3166,18 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) ) 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';} @@ -3191,11 +3186,6 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) ) $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;} - $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 ( ($enable_queuemetrics_logging > 0) && ($exitwithkey < 1) ) { $dbhB = DBI->connect("DBI:mysql:$queuemetrics_dbname:$queuemetrics_server_ip:3306", "$queuemetrics_login", "$queuemetrics_pass") @@ -3222,6 +3212,27 @@ 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) ) + { + $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); diff --git a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt index 7e495edb..af7348c9 100644 --- a/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/agc_2-X/trunk/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -188,6 +188,8 @@ Hold Time Option Press Filename|| If Hold Time Option is set to CALL_MENU, this is the Call Menu that the call will be sent to if the estimated hold time exceeds the Hold Time Option Seconds|| If Hold Time Option is set to one of the PRESS_ options, this is the filename prompt that is played if the estimated hold time exceeds the Hold Time Option Seconds to give the customer the option to press 1 on their phone to run the selected Hold Time Press Option. It is very important that this audio file is 10 seconds or less or there will be problems. Default is to-be-called-back|| 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|| +Hold Time Option After Press Filename|| +If Hold Time Option is set to one of the PRESS_ options or CALLERID_CALLBACK, this is the filename prompt that is played after the customer has pressed 1 or the call has been added to the callback list|| AST_VICIDIAL_ingrouplist.php diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 8535dfd4..958ce50d 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -293,10 +293,11 @@ # 100423-1156 - Added more user logging data and manual_dial_override, blind monitor warnings, uniqueid display and codec features # 100428-0544 - Added uniqueid display option for PRESERVE # 100513-0714 - Added options.php option to hide the timeclock link +# 100513-2337 - Changed user_login_first to attempt full login if phone_login/pass are filled in # -$version = '2.4-271'; -$build = '100513-0714'; +$version = '2.4-272'; +$build = '100513-2337'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=66; $one_mysql_log=0; @@ -772,41 +773,44 @@ if ($user_login_first == 1) $phone_login=$row[0]; $phone_pass=$row[1]; - echo "Agent web client: Login\n"; - echo "\n"; - echo "\n"; - if ($hide_timeclock_link < 1) - {echo " Timeclock
\n";} - echo "\n"; - echo "\n"; - echo "
\n"; - echo "
\n"; - echo "\n"; - echo "\n"; - echo "\n"; - echo "


"; - echo ""; - echo ""; - echo "\n"; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo ""; - echo "\n"; - echo "\n"; - echo "\n"; - echo "
Login
 
Phone Login:
Phone Password:
User Login:
User Password:
Campaign: $camp_form_code
  \n"; - echo "

VERSION: $version       BUILD: $build
\n"; - echo "\n\n"; - echo "\n\n"; - echo "\n\n"; - exit; + if ( (strlen($phone_login) < 1) or (strlen($phone_pass) < 1) ) + { + echo "Agent web client: Login\n"; + echo "\n"; + echo "\n"; + if ($hide_timeclock_link < 1) + {echo " Timeclock
\n";} + echo "\n"; + echo "\n"; + echo "
\n"; + echo "
\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "


"; + echo ""; + echo ""; + echo "\n"; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
Login
 
Phone Login:
Phone Password:
User Login:
User Password:
Campaign: $camp_form_code
  \n"; + echo "

VERSION: $version       BUILD: $build
\n"; + echo "\n\n"; + echo "\n\n"; + echo "\n\n"; + exit; + } } } } diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 6595bfcf..fb219779 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -4607,7 +4607,7 @@ if ($ADD==99999)

- Hold Time Option Callback Filename - If Hold Time Option is set to CALLERID_CALLBACK, this is the filename prompt that is played before the call is logged as a new lead to the list ID specified below if the estimated hold time exceeds the Hold Time Option Seconds. + Hold Time Option After Press Filename - If Hold Time Option is set to one of the PRESS_ options or CALLERID_CALLBACK, this is the filename prompt that is played after the customer has pressed 1 or the call has been added to the callback list.
@@ -20460,7 +20460,7 @@ if ($ADD==3111) echo "Hold Time Option Press Filename: audio chooser $NWB#vicidial_inbound_groups-hold_time_option_press_filename$NWE\n"; - echo "Hold Time Option Callback Filename: audio chooser $NWB#vicidial_inbound_groups-hold_time_option_callback_filename$NWE\n"; + echo "Hold Time Option After Press Filename: audio chooser $NWB#vicidial_inbound_groups-hold_time_option_callback_filename$NWE\n"; echo "Hold Time Option Callback List ID: $NWB#vicidial_inbound_groups-hold_time_option_callback_list_id$NWE\n";