changed hold time callback filename to hold time after press filename and it now works after all PRESS_ hold time options if customer presses 1.

changed user_login_first in vicidial.php to attempt full login in one step after gathering phone login values from user record.

git-svn-id: svn://192.168.202.10@1435 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2010-05-14 03:44:23 +00:00
parent 2ffe103858
commit cdeacb4e8d
4 changed files with 81 additions and 64 deletions
+36 -25
View File
@@ -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);
@@ -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
+41 -37
View File
@@ -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 "<title>Agent web client: Login</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0 onResize=\"browser_dimensions();\" onLoad=\"browser_dimensions();\">\n";
if ($hide_timeclock_link < 1)
{echo "<A HREF=\"./timeclock.php?referrer=agent&pl=$phone_login&pp=$phone_pass&VD_login=$VD_login&VD_pass=$VD_pass\"> Timeclock</A><BR>\n";}
echo "<TABLE WIDTH=100%><TR><TD></TD>\n";
echo "<!-- INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL -->\n";
echo "</TR></TABLE>\n";
echo "<FORM NAME=vicidial_form ID=vicidial_form ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<INPUT TYPE=HIDDEN NAME=JS_browser_height VALUE=\"\">\n";
echo "<INPUT TYPE=HIDDEN NAME=JS_browser_width VALUE=\"\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"$MAIN_COLOR\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"./images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login </TD>";
echo "</TR>\n";
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1> &nbsp; </TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>Phone Login: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=TEXT NAME=phone_login SIZE=10 MAXLENGTH=20 VALUE=\"$phone_login\"></TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>Phone Password: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=PASSWORD NAME=phone_pass SIZE=10 MAXLENGTH=20 VALUE=\"$phone_pass\"></TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>User Login: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=TEXT NAME=VD_login SIZE=10 MAXLENGTH=20 VALUE=\"$VD_login\"></TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>User Password: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=PASSWORD NAME=VD_pass SIZE=10 MAXLENGTH=20 VALUE=\"$VD_pass\"></TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>Campaign: </TD>";
echo "<TD ALIGN=LEFT><span id=\"LogiNCamPaigns\">$camp_form_code</span></TD></TR>\n";
echo "<TR><TD ALIGN=CENTER COLSPAN=2><INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT> &nbsp; \n";
echo "<span id=\"LogiNReseT\"></span></TD></TR>\n";
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1><BR>VERSION: $version &nbsp; &nbsp; &nbsp; BUILD: $build</TD></TR>\n";
echo "</TABLE>\n";
echo "</FORM>\n\n";
echo "</body>\n\n";
echo "</html>\n\n";
exit;
if ( (strlen($phone_login) < 1) or (strlen($phone_pass) < 1) )
{
echo "<title>Agent web client: Login</title>\n";
echo "</head>\n";
echo "<BODY BGCOLOR=WHITE MARGINHEIGHT=0 MARGINWIDTH=0 onResize=\"browser_dimensions();\" onLoad=\"browser_dimensions();\">\n";
if ($hide_timeclock_link < 1)
{echo "<A HREF=\"./timeclock.php?referrer=agent&pl=$phone_login&pp=$phone_pass&VD_login=$VD_login&VD_pass=$VD_pass\"> Timeclock</A><BR>\n";}
echo "<TABLE WIDTH=100%><TR><TD></TD>\n";
echo "<!-- INTERNATIONALIZATION-LINKS-PLACEHOLDER-VICIDIAL -->\n";
echo "</TR></TABLE>\n";
echo "<FORM NAME=vicidial_form ID=vicidial_form ACTION=\"$agcPAGE\" METHOD=POST>\n";
echo "<INPUT TYPE=HIDDEN NAME=DB VALUE=\"$DB\">\n";
echo "<INPUT TYPE=HIDDEN NAME=JS_browser_height VALUE=\"\">\n";
echo "<INPUT TYPE=HIDDEN NAME=JS_browser_width VALUE=\"\">\n";
echo "<BR><BR><BR><CENTER><TABLE WIDTH=460 CELLPADDING=0 CELLSPACING=0 BGCOLOR=\"$MAIN_COLOR\"><TR BGCOLOR=WHITE>";
echo "<TD ALIGN=LEFT VALIGN=BOTTOM><IMG SRC=\"./images/vdc_tab_vicidial.gif\" BORDER=0></TD>";
echo "<TD ALIGN=CENTER VALIGN=MIDDLE> Login </TD>";
echo "</TR>\n";
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1> &nbsp; </TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>Phone Login: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=TEXT NAME=phone_login SIZE=10 MAXLENGTH=20 VALUE=\"$phone_login\"></TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>Phone Password: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=PASSWORD NAME=phone_pass SIZE=10 MAXLENGTH=20 VALUE=\"$phone_pass\"></TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>User Login: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=TEXT NAME=VD_login SIZE=10 MAXLENGTH=20 VALUE=\"$VD_login\"></TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>User Password: </TD>";
echo "<TD ALIGN=LEFT><INPUT TYPE=PASSWORD NAME=VD_pass SIZE=10 MAXLENGTH=20 VALUE=\"$VD_pass\"></TD></TR>\n";
echo "<TR><TD ALIGN=RIGHT>Campaign: </TD>";
echo "<TD ALIGN=LEFT><span id=\"LogiNCamPaigns\">$camp_form_code</span></TD></TR>\n";
echo "<TR><TD ALIGN=CENTER COLSPAN=2><INPUT TYPE=SUBMIT NAME=SUBMIT VALUE=SUBMIT> &nbsp; \n";
echo "<span id=\"LogiNReseT\"></span></TD></TR>\n";
echo "<TR><TD ALIGN=LEFT COLSPAN=2><font size=1><BR>VERSION: $version &nbsp; &nbsp; &nbsp; BUILD: $build</TD></TR>\n";
echo "</TABLE>\n";
echo "</FORM>\n\n";
echo "</body>\n\n";
echo "</html>\n\n";
exit;
}
}
}
}
+2 -2
View File
@@ -4607,7 +4607,7 @@ if ($ADD==99999)
<BR>
<A NAME="vicidial_inbound_groups-hold_time_option_callback_filename">
<BR>
<B>Hold Time Option Callback Filename -</B> 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.
<B>Hold Time Option After Press Filename -</B> 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.
<BR>
<A NAME="vicidial_inbound_groups-hold_time_option_callback_list_id">
@@ -20460,7 +20460,7 @@ if ($ADD==3111)
echo "<tr bgcolor=#CCFFFF><td align=right>Hold Time Option Press Filename: </td><td align=left><input type=text name=hold_time_option_press_filename id=hold_time_option_press_filename size=50 maxlength=255 value=\"$hold_time_option_press_filename\"> <a href=\"javascript:launch_chooser('hold_time_option_press_filename','date',1200);\">audio chooser</a> $NWB#vicidial_inbound_groups-hold_time_option_press_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Hold Time Option Callback Filename: </td><td align=left><input type=text name=hold_time_option_callback_filename id=hold_time_option_callback_filename size=50 maxlength=255 value=\"$hold_time_option_callback_filename\"> <a href=\"javascript:launch_chooser('hold_time_option_callback_filename','date',1300);\">audio chooser</a> $NWB#vicidial_inbound_groups-hold_time_option_callback_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Hold Time Option After Press Filename: </td><td align=left><input type=text name=hold_time_option_callback_filename id=hold_time_option_callback_filename size=50 maxlength=255 value=\"$hold_time_option_callback_filename\"> <a href=\"javascript:launch_chooser('hold_time_option_callback_filename','date',1300);\">audio chooser</a> $NWB#vicidial_inbound_groups-hold_time_option_callback_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>Hold Time Option Callback List ID: </td><td align=left><input type=text name=hold_time_option_callback_list_id size=14 maxlength=14 value=\"$hold_time_option_callback_list_id\">$NWB#vicidial_inbound_groups-hold_time_option_callback_list_id$NWE</td></tr>\n";