Added options in Call Menus to allow for invalid action on second or third invalid selection by the caller instead of just the first
git-svn-id: svn://192.168.202.10@1715 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -690,6 +690,9 @@ OTHER CHANGES:
|
||||
that come into DIDs in a separate table that includes the in-group and
|
||||
user that the call was sent to, if applicable
|
||||
|
||||
158. Added options in Call Menus to allow for invalid action on second or third
|
||||
invalid selection by the caller instead of just the first.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
# 110525-2334 - Added cm.agi optional logging to call menus
|
||||
# 110705-2023 - Added agents_calls_reset option
|
||||
# 110725-2356 - Added new voicemail time zone option and menu gather
|
||||
# 110829-1601 - Added multiple invalid option to Call Menus
|
||||
#
|
||||
|
||||
$DB=0; # Debug flag
|
||||
@@ -1753,6 +1754,8 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
$call_menu_timeout_ext = '';
|
||||
$call_menu_invalid_ext = '';
|
||||
$call_menu_options_ext = '';
|
||||
$cm_invalid_set=0;
|
||||
$cm_timeout_set=0;
|
||||
if ($DBX>0) {print "$sthArowsJ|$stmtA\n";}
|
||||
while ($sthArowsJ > $j)
|
||||
{
|
||||
@@ -1828,13 +1831,14 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
}
|
||||
|
||||
$call_menu_line .= "$menu_timeout_prompt_ext";
|
||||
$cm_timeout_set++;
|
||||
}
|
||||
}
|
||||
if ($option_value[$j] =~ /INVALID/)
|
||||
{
|
||||
$menu_invalid_prompt_ext='';
|
||||
if ( (length($menu_invalid_prompt[$i])>0) && ($menu_invalid_prompt[$i] !~ /NONE/) )
|
||||
{
|
||||
$menu_invalid_prompt_ext='';
|
||||
if ($menu_invalid_prompt[$i] =~ /\|/)
|
||||
{
|
||||
@menu_invalid_prompts_array = split(/\|/,$menu_invalid_prompt[$i]);
|
||||
@@ -1855,8 +1859,22 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
$PRI++;
|
||||
}
|
||||
|
||||
$call_menu_line .= "$menu_invalid_prompt_ext";
|
||||
}
|
||||
if ( ($option_value[$j] =~ /INVALID_2ND/) && ($cm_invalid_set < 1) )
|
||||
{
|
||||
$menu_invalid_prompt_ext .= "exten => i,$PRI,Set(INVCOUNT=\$[\$\{INVCOUNT\} + 1]) \n"; $PRI++;
|
||||
$menu_invalid_prompt_ext .= "exten => i,$PRI,NoOp(\$\{INVCOUNT\}) \n"; $PRI++;
|
||||
$menu_invalid_prompt_ext .= "exten => i,$PRI,Gotoif(\$[0\$\{INVCOUNT\} < 2]?" . $menu_id[$i] . ",s,3) \n"; $PRI++;
|
||||
}
|
||||
if ( ($option_value[$j] =~ /INVALID_3RD/) && ($cm_invalid_set < 1) )
|
||||
{
|
||||
$menu_invalid_prompt_ext .= "exten => i,$PRI,Set(INVCOUNT=\$[\$\{INVCOUNT\} + 1]) \n"; $PRI++;
|
||||
$menu_invalid_prompt_ext .= "exten => i,$PRI,NoOp(\${INVCOUNT}) \n"; $PRI++;
|
||||
$menu_invalid_prompt_ext .= "exten => i,$PRI,Gotoif(\$[0\$\{INVCOUNT\} < 3]?" . $menu_id[$i] . ",s,3) \n"; $PRI++;
|
||||
}
|
||||
|
||||
$call_menu_line .= "$menu_invalid_prompt_ext";
|
||||
$cm_invalid_set++;
|
||||
$option_value[$j] = 'i';
|
||||
}
|
||||
if ($option_route[$j] =~ /AGI/)
|
||||
@@ -1928,7 +1946,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
}
|
||||
else
|
||||
{
|
||||
$hangup_prompt_ext .= "exten => $option_value[$j],1,Playback($option_route_value[$j])\n";
|
||||
$hangup_prompt_ext .= "exten => $option_value[$j],$PRI,Playback($option_route_value[$j])\n";
|
||||
$PRI++;
|
||||
}
|
||||
|
||||
@@ -1980,7 +1998,10 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
}
|
||||
if ($option_value[$j] =~ /i/)
|
||||
{
|
||||
$call_menu_invalid_ext = "$call_menu_line";
|
||||
if ($cm_invalid_set > 1)
|
||||
{$call_menu_invalid_ext .= "; COMMENTED OUT...\n";}
|
||||
else
|
||||
{$call_menu_invalid_ext = "$call_menu_line";}
|
||||
}
|
||||
if ($option_value[$j] !~ /i|t/)
|
||||
{
|
||||
@@ -2029,6 +2050,7 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
$call_menu_ext .= "; $menu_name[$i]\n";
|
||||
$call_menu_ext .= "[$menu_id[$i]]\n";
|
||||
$call_menu_ext .= "exten => s,1,AGI(agi-VDAD_inbound_calltime_check.agi,$tracking_group[$i]-----$track_in_vdac[$i]-----$menu_id[$i]-----$time_check_scheme-----$time_check_route-----$time_check_route_value-----$time_check_route_context)\n";
|
||||
$call_menu_ext .= "exten => s,n,Set(INVCOUNT=0) \n";
|
||||
$call_menu_ext .= "$menu_prompt_ext";
|
||||
if ($menu_timeout[$i] > 0)
|
||||
{$call_menu_ext .= "exten => s,n,WaitExten($menu_timeout[$i])\n";}
|
||||
@@ -2050,11 +2072,11 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
if ( (length($menu_timeout_prompt[$i])>0) && ($menu_timeout_prompt[$i] !~ /NONE/) )
|
||||
{
|
||||
$call_menu_ext .= "exten => t,1,Playback($menu_timeout_prompt[$i])\n";
|
||||
$call_menu_ext .= "exten => t,n,Goto(s,2)\n";
|
||||
$call_menu_ext .= "exten => t,n,Goto(s,3)\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_menu_ext .= "exten => t,1,Goto(s,2)\n";
|
||||
$call_menu_ext .= "exten => t,1,Goto(s,3)\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2066,18 +2088,17 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
|
||||
if ( (length($menu_invalid_prompt[$i])>0) && ($menu_invalid_prompt[$i] !~ /NONE/) )
|
||||
{
|
||||
$call_menu_ext .= "exten => i,1,Playback($menu_invalid_prompt[$i])\n";
|
||||
$call_menu_ext .= "exten => i,n,Goto(s,2)\n";
|
||||
$call_menu_ext .= "exten => i,n,Goto(s,3)\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_menu_ext .= "exten => i,1,Goto(s,2)\n";
|
||||
$call_menu_ext .= "exten => i,1,Goto(s,3)\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$call_menu_ext .= "$call_menu_invalid_ext";
|
||||
}
|
||||
|
||||
$call_menu_ext .= "; hangup\n";
|
||||
$call_menu_ext .= 'exten => h,1,DeadAGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----${ANSWEREDTIME})';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# /usr/share/astguiclient/AST_VDsales_export.pl --campaign=GOODB-GROUP1-GROUP3-GROUP4-SPECIALS-DNC_BEDS --output-format=fixed-as400 --sale-statuses=SALE --debug --filename=BEDSsaleMMDD.txt --date=yesterday --email-list=test@gmail.com --email-sender=test@test.com
|
||||
#
|
||||
# Copyright (C) 2010 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2011 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# CHANGES
|
||||
# 61219-1118 - First version
|
||||
@@ -27,6 +27,7 @@
|
||||
# 90902-0437 - Added outbound-calltime-ignore and ftp-norun options
|
||||
# 90909-2322 - Added totals-only option
|
||||
# 101022-1022 - Added hours minutes seconds to filename variables
|
||||
# 110829-1045 - Changed recording lookup to try to find by vicidial_id first
|
||||
#
|
||||
|
||||
$txt = '.txt';
|
||||
@@ -928,7 +929,7 @@ sub select_format_loop
|
||||
$ivr_id = '0';
|
||||
$ivr_filename = '';
|
||||
|
||||
$stmtB = "select recording_id,filename,location from recording_log where lead_id='$lead_id' and start_time > '$shipdate 00:00:01' and start_time < '$shipdate 23:59:59' order by length_in_sec desc limit 1;";
|
||||
$stmtB = "select recording_id,filename,location from recording_log where lead_id='$lead_id' and vicidial_id='$vicidial_id' and start_time > '$shipdate 00:00:01' and start_time < '$shipdate 23:59:59' order by start_time desc limit 1;";
|
||||
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
|
||||
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
|
||||
$sthBrows=$sthB->rows;
|
||||
@@ -943,6 +944,24 @@ sub select_format_loop
|
||||
}
|
||||
$sthB->finish();
|
||||
|
||||
if ($sthBrows < 1)
|
||||
{
|
||||
$stmtB = "select recording_id,filename,location from recording_log where lead_id='$lead_id' and start_time > '$shipdate 00:00:01' and start_time < '$shipdate 23:59:59' order by length_in_sec desc limit 1;";
|
||||
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
|
||||
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
|
||||
$sthBrows=$sthB->rows;
|
||||
$rec_countB=0;
|
||||
while ($sthBrows > $rec_countB)
|
||||
{
|
||||
@aryB = $sthB->fetchrow_array;
|
||||
$ivr_id = $aryB[0];
|
||||
$ivr_filename = $aryB[1];
|
||||
$ivr_location = $aryB[2];
|
||||
$rec_countB++;
|
||||
}
|
||||
$sthB->finish();
|
||||
}
|
||||
|
||||
if (length($ivr_id)<3)
|
||||
{
|
||||
$stmtB = "select recording_id,filename,location from recording_log where lead_id='$lead_id' order by length_in_sec desc limit 1;";
|
||||
|
||||
@@ -699,6 +699,7 @@ If you have static audio files that you want to use based upon the value of one
|
||||
Here is a list of the available variables||
|
||||
DID Agent Log||
|
||||
This option will log the inbound DID calls along with an in-group and user ID, if applicable, to a separate table. Default is N||
|
||||
TIMEOUT will allow you to set what happens to the call when it times out with no input from the caller. INVALID will allow you to set what happens when the caller enters an invalid option. INVALID_2ND and 3RD can only be active if INVALID is not used, it will wait until the second or third invalid entry by the caller before it executes the option||
|
||||
|
||||
|
||||
lead_report_export.php
|
||||
|
||||
@@ -2835,12 +2835,13 @@ else
|
||||
# 110809-1547 - Added no-answer log and alt-log server system settings
|
||||
# 110815-2155 - Added the Campaign Status List Report
|
||||
# 110822-1204 - Added did_agent_log System Settings option
|
||||
# 110829-1600 - Added multiple invalid option to Call Menus
|
||||
#
|
||||
|
||||
# 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-331a';
|
||||
$build = '110822-1204';
|
||||
$admin_version = '2.4-332a';
|
||||
$build = '110829-1600';
|
||||
|
||||
$STARTtime = date("U");
|
||||
$SQLdate = date("Y-m-d H:i:s");
|
||||
@@ -2862,25 +2863,27 @@ $past_month_date = date("Y-m-d H:i:s",$month_old);
|
||||
$week_old = mktime(0, 0, 0, date("m"), date("d")-7, date("Y"));
|
||||
$past_week_date = date("Y-m-d H:i:s",$week_old);
|
||||
|
||||
$dtmf[0]='0'; $dtmf_key[0]='0';
|
||||
$dtmf[1]='1'; $dtmf_key[1]='1';
|
||||
$dtmf[2]='2'; $dtmf_key[2]='2';
|
||||
$dtmf[3]='3'; $dtmf_key[3]='3';
|
||||
$dtmf[4]='4'; $dtmf_key[4]='4';
|
||||
$dtmf[5]='5'; $dtmf_key[5]='5';
|
||||
$dtmf[6]='6'; $dtmf_key[6]='6';
|
||||
$dtmf[7]='7'; $dtmf_key[7]='7';
|
||||
$dtmf[8]='8'; $dtmf_key[8]='8';
|
||||
$dtmf[9]='9'; $dtmf_key[9]='9';
|
||||
$dtmf[10]='HASH'; $dtmf_key[10]='#';
|
||||
$dtmf[11]='STAR'; $dtmf_key[11]='*';
|
||||
$dtmf[12]='A'; $dtmf_key[12]='A';
|
||||
$dtmf[13]='B'; $dtmf_key[13]='B';
|
||||
$dtmf[14]='C'; $dtmf_key[14]='C';
|
||||
$dtmf[15]='D'; $dtmf_key[15]='D';
|
||||
$dtmf[16]='TIMECHECK'; $dtmf_key[16]='TIMECHECK';
|
||||
$dtmf[17]='TIMEOUT'; $dtmf_key[17]='TIMEOUT';
|
||||
$dtmf[18]='INVALID'; $dtmf_key[18]='INVALID';
|
||||
$dtmf[0]='0'; $dtmf_key[0]='0';
|
||||
$dtmf[1]='1'; $dtmf_key[1]='1';
|
||||
$dtmf[2]='2'; $dtmf_key[2]='2';
|
||||
$dtmf[3]='3'; $dtmf_key[3]='3';
|
||||
$dtmf[4]='4'; $dtmf_key[4]='4';
|
||||
$dtmf[5]='5'; $dtmf_key[5]='5';
|
||||
$dtmf[6]='6'; $dtmf_key[6]='6';
|
||||
$dtmf[7]='7'; $dtmf_key[7]='7';
|
||||
$dtmf[8]='8'; $dtmf_key[8]='8';
|
||||
$dtmf[9]='9'; $dtmf_key[9]='9';
|
||||
$dtmf[10]='HASH'; $dtmf_key[10]='#';
|
||||
$dtmf[11]='STAR'; $dtmf_key[11]='*';
|
||||
$dtmf[12]='A'; $dtmf_key[12]='A';
|
||||
$dtmf[13]='B'; $dtmf_key[13]='B';
|
||||
$dtmf[14]='C'; $dtmf_key[14]='C';
|
||||
$dtmf[15]='D'; $dtmf_key[15]='D';
|
||||
$dtmf[16]='TIMECHECK'; $dtmf_key[16]='TIMECHECK';
|
||||
$dtmf[17]='TIMEOUT'; $dtmf_key[17]='TIMEOUT';
|
||||
$dtmf[18]='INVALID'; $dtmf_key[18]='INVALID';
|
||||
$dtmf[19]='INVALID_2ND'; $dtmf_key[19]='INVALID_2ND';
|
||||
$dtmf[20]='INVALID_3RD'; $dtmf_key[20]='INVALID_3RD';
|
||||
|
||||
if ($force_logout)
|
||||
{
|
||||
@@ -6032,7 +6035,7 @@ if ($ADD==99999)
|
||||
<BR>
|
||||
<A NAME="vicidial_call_menu-option_value">
|
||||
<BR>
|
||||
<B>Option Value -</B> This field is where you define the menu option, possible choices are: 0,1,2,3,4,5,6,7,8,9,*,#,A,B,C,D,TIMECHECK. The special option TIMECHECK can be used only if you have Menu Time Check enabled and there is a Call Time defined for the Menu. To delete an Option, just set the Route to REMOVE and the option will be deleted when you click the SUBMIT button.
|
||||
<B>Option Value -</B> This field is where you define the menu option, possible choices are: 0,1,2,3,4,5,6,7,8,9,*,#,A,B,C,D,TIMECHECK. The special option TIMECHECK can be used only if you have Menu Time Check enabled and there is a Call Time defined for the Menu. To delete an Option, just set the Route to REMOVE and the option will be deleted when you click the SUBMIT button. TIMEOUT will allow you to set what happens to the call when it times out with no input from the caller. INVALID will allow you to set what happens when the caller enters an invalid option. INVALID_2ND and 3RD can only be active if INVALID is not used, it will wait until the second or third invalid entry by the caller before it executes the option.
|
||||
|
||||
<BR>
|
||||
<A NAME="vicidial_call_menu-option_description">
|
||||
@@ -14857,7 +14860,7 @@ if ($ADD==4511)
|
||||
|
||||
$h=0;
|
||||
$option_value_list='|';
|
||||
while ($h <= 18)
|
||||
while ($h <= 20)
|
||||
{
|
||||
$option_value=''; $option_description=''; $option_route=''; $option_route_value=''; $option_route_value_context='';
|
||||
|
||||
@@ -14900,7 +14903,7 @@ if ($ADD==4511)
|
||||
{
|
||||
$option_value = ereg_replace("[^-\_0-9A-Z]","",$option_value);
|
||||
$option_description = ereg_replace("[^- \:\/\_0-9a-zA-Z]","",$option_description);
|
||||
$option_route = ereg_replace("[^-_0-9a-zA-Z]","",$option_route);
|
||||
$option_route = ereg_replace("[^-\_0-9a-zA-Z]","",$option_route);
|
||||
$option_route_value = ereg_replace("[^-\/\|\_\#\*\,\.\_0-9a-zA-Z]","",$option_route_value);
|
||||
$option_route_value_context = ereg_replace("[^,-_0-9a-zA-Z]","",$option_route_value_context);
|
||||
}
|
||||
@@ -14943,7 +14946,7 @@ if ($ADD==4511)
|
||||
$h++;
|
||||
}
|
||||
## delete existing database records that were not in the submit
|
||||
while ($h <= 18)
|
||||
while ($h <= 20)
|
||||
{
|
||||
if (!preg_match("/\|$dtmf[$h]\|/i",$option_value_list))
|
||||
{
|
||||
@@ -24509,7 +24512,7 @@ if ($ADD==3511)
|
||||
|
||||
$dtmf_list = "<select size=1 name=option_value_$j>";
|
||||
$h=0;
|
||||
while ($h <= 18)
|
||||
while ($h <= 20)
|
||||
{
|
||||
$dtmf_list .= "<option";
|
||||
if ( (preg_match("/$dtmf[$h]/",$option_value) and (strlen($option_value) == strlen($dtmf[$h])) ) )
|
||||
@@ -24621,12 +24624,12 @@ if ($ADD==3511)
|
||||
$j++;
|
||||
}
|
||||
|
||||
while ($j <= 18)
|
||||
while ($j <= 20)
|
||||
{
|
||||
$choose_height = (($j * 40) + 400);
|
||||
$dtmf_list = "<select size=1 name=option_value_$j><option value=\"\"></option>";
|
||||
$h=0;
|
||||
while ($h <= 18)
|
||||
while ($h <= 20)
|
||||
{
|
||||
$dtmf_list .= "<option value=\"$dtmf[$h]\"> $dtmf_key[$h]</option>";
|
||||
$h++;
|
||||
|
||||
Reference in New Issue
Block a user