More changes related to inbound answer configuration

git-svn-id: svn://192.168.202.10@3260 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2020-06-25 03:50:59 +00:00
parent 6b90fbea52
commit 51b25a5984
5 changed files with 371 additions and 45 deletions
+85 -26
View File
@@ -952,6 +952,7 @@ $sthA->finish();
if ( ($inbound_answer_config > 0) and ($answer_signal !~ /NONE|ROUTE/i) )
{
$AGI->answer();
if ($AGILOG) {$agi_string = " Answering call: - $channel|$answer_signal"; &agi_output;}
}
# When VID or VIDPROMPT, methods are not used, no Vendor Lead Code can be supplied. Fill it with inbound_number
@@ -1161,8 +1162,15 @@ if ( ($channel_group =~ /AGENTDIRECT/i) && (length($agent_only) < 1) )
$LOGuser='VDCL';
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /NONE|ROUTE/i) )
{
if ($AGILOG) {$agi_string = " skipping sip-silence playback: $channel|"; &agi_output;}
}
else
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
}
if ($call_handle_method =~ /DIGITID$/)
{
@@ -1809,6 +1817,7 @@ if ( ( ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $c
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
if ($AGILOG) {$agi_string = " Answering call: - $channel|$answer_signal"; &agi_output;}
}
if ($no_delay_call_route =~ /N/)
@@ -1819,10 +1828,17 @@ if ( ( ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $c
usleep(1*990*1000);
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /NONE/i) )
{
if ($AGILOG) {$agi_string = " skipping sip-silence playback: $channel|"; &agi_output;}
}
else
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
}
if ($AGILOG) {$agi_string = "exiting the VDAD app after hours, transferring call to $DROPexten"; &agi_output;}
print "SET CONTEXT $ext_context\n";
@@ -2099,6 +2115,7 @@ if ( ( ($no_agent_no_queue =~ /Y|NO_PAUSED|NO_READY/) || ($MCnanque_override > 0
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
if ($AGILOG) {$agi_string = " Answering call: - $channel|$answer_signal"; &agi_output;}
}
if ($no_delay_call_route =~ /N/)
@@ -2109,10 +2126,17 @@ if ( ( ($no_agent_no_queue =~ /Y|NO_PAUSED|NO_READY/) || ($MCnanque_override > 0
usleep(1*990*1000);
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /NONE/i) )
{
if ($AGILOG) {$agi_string = " skipping sip-silence playback: $channel|"; &agi_output;}
}
else
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
}
if ($AGILOG) {$agi_string = "exiting the VDAD app no agent no queue, transferring call to $DROPexten"; &agi_output;}
print "SET CONTEXT $ext_context\n";
@@ -4237,12 +4261,20 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
if ($AGILOG) {$agi_string = " Answering call: - $channel|$answer_signal"; &agi_output;}
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /NONE/i) )
{
if ($AGILOG) {$agi_string = " skipping sip-silence playback: $channel|"; &agi_output;}
}
else
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
}
print "SET CONTEXT $ext_context\n";
$result = <STDIN>;
@@ -4396,12 +4428,20 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
if ($AGILOG) {$agi_string = " Answering call: - $channel|$answer_signal"; &agi_output;}
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /NONE/i) )
{
if ($AGILOG) {$agi_string = " skipping sip-silence playback: $channel|"; &agi_output;}
}
else
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
}
if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $DROPexten"; &agi_output;}
print "SET CONTEXT $ext_context\n";
@@ -4982,6 +5022,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
if ($AGILOG) {$agi_string = " Answering call: - $channel|$answer_signal"; &agi_output;}
}
if ($no_delay_call_route =~ /N/)
@@ -4992,10 +5033,17 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
usleep(1*990*1000);
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /NONE/i) )
{
if ($AGILOG) {$agi_string = " skipping sip-silence playback: $channel|"; &agi_output;}
}
else
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
}
if ($AGILOG) {$agi_string = "exiting the VDAD app areacode filter, transferring call to $DROPexten"; &agi_output;}
print "SET CONTEXT $ext_context\n";
@@ -5553,6 +5601,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
if ($AGILOG) {$agi_string = " Answering call: - $channel|$answer_signal"; &agi_output;}
}
$AGI->stream_file('sip-silence');
@@ -6102,6 +6151,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) && ($MCdrop_override
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
if ($AGILOG) {$agi_string = " Answering call: - $channel|$answer_signal"; &agi_output;}
}
$AGI->stream_file('sip-silence');
@@ -6646,6 +6696,7 @@ if ($closing_check > 0)
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
if ($AGILOG) {$agi_string = " Answering call: - $channel|$answer_signal"; &agi_output;}
}
$AGI->stream_file('sip-silence');
@@ -6917,6 +6968,7 @@ if ( ($drop_timer > $DROP_TIME) || ($MCdrop_override > 0) )
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /ROUTE/i) )
{
$AGI->answer();
if ($AGILOG) {$agi_string = " Answering call: - $channel|$answer_signal"; &agi_output;}
}
if ($no_delay_call_route =~ /N/)
@@ -6927,10 +6979,17 @@ if ( ($drop_timer > $DROP_TIME) || ($MCdrop_override > 0) )
usleep(1*990*1000);
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ( ($inbound_answer_config > 0) and ($answer_signal =~ /NONE/i) )
{
if ($AGILOG) {$agi_string = " skipping sip-silence playback: $channel|"; &agi_output;}
}
else
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
}
if ($AGILOG) {$agi_string = "exiting the VDAD app, transferring call to $DROPexten"; &agi_output;}
print "SET CONTEXT $ext_context\n";
+27 -12
View File
@@ -24,14 +24,15 @@
# ; * only works with lead_id-populated calleridname phone calls.
# ; This option allows you to specify a SQL fragment used to do a count(*)
# ; against the vicidial_list table for the lead and other field values
# ; This feature will look for the qualify_sql in the cacll menu record
# ; This feature will look for the qualify_sql in the call menu record
# ; 9. play sip-silence audio, YES/NO, default is YES
# ;
# ;inbound calls check calltime:
#exten => 1234,1,Answer ; Answer the line
#exten => 1234,2,AGI(agi-VDAD_inbound_calltime_check.agi,INBOUND-----YES-----START-----24hours-----EXTENSION-----101-----default-----NO)
#exten => 1234,2,AGI(agi-VDAD_inbound_calltime_check.agi,INBOUND-----YES-----START-----24hours-----EXTENSION-----101-----default-----NO-----YES)
#exten => 1234,3,Hangup
#
# Copyright (C) 2018 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# changes:
# 80525-0144 - First Build
@@ -54,6 +55,7 @@
# 140126-1141 - Added VMAIL_NO_INST options
# 161102-1038 - Fixed QM partition problem
# 180213-0935 - Fixed issues with VMAIL_NO_INST timecheck route
# 200624-2302 - Added play sip-silence audio option
#
$script = 'agi-VDAD_inbound_calltime_check.agi';
@@ -205,6 +207,7 @@ if (length($ARGV[0])>1)
$route_value_override = $ARGV_vars[5];
$route_context_override = $ARGV_vars[6];
$query_qualification = $ARGV_vars[7];
$sip_silence_playback = $ARGV_vars[8];
}
$|=1;
@@ -301,6 +304,7 @@ else
if (length($callerid)<8) {$callerid = $parked_by;}
if (length($pin)>0) {$callerid = $pin;}
if ($sip_silence_playback !~ /YES|NO/i) {$sip_silence_playback='YES';}
foreach $i (sort keys %AGI)
{
@@ -518,8 +522,11 @@ if (length($ct_holidays) > 2)
}
}
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ($sip_silence_playback =~ /YES/i)
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
}
##### BEGIN AFTER HOURS CHECK #####
$ct_stop_overflow=0; # allow for overflow time, past midnight
@@ -590,9 +597,11 @@ if ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $ct_st
}
if (length($DROPexten)>0)
{ ### if DROP extension is defined then send the dropped call there instead of hangup
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
if ($sip_silence_playback =~ /YES/i)
{
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
}
sleep(1);
@@ -611,8 +620,11 @@ if ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $ct_st
if ($after_hours_action =~ /MESSAGE|HANGUP/)
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
if ($sip_silence_playback =~ /YES/i)
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
}
$AGI->stream_file("$after_hours_message_filename");
sleep(1);
@@ -666,8 +678,11 @@ if ( ($call_menu_qualify_enabled > 0) && ($query_qualification =~ /YES/) && ( ($
if ($qualify_count < 1)
{
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
if ($sip_silence_playback =~ /YES/i)
{
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
}
# sleep for one tenth of a second
usleep(1*100*1000);
+231
View File
@@ -0,0 +1,231 @@
#!/usr/bin/perl
#
# cm_wait.agi version 2.14
#
# Designed to make a call wait for X milliseconds before exiting
#
# Flag Options:
# 1- milliseconds to wait, default 1000
#
# example of what to set in the Call Menu:
# Set the prompt to "cm_wait.agi,1000"
#
# Copyright (C) 2020 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
#
# changes:
# 200624-2235 - First build
#
$script = 'cm_wait.agi';
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year = ($year + 1900);
$mon++;
if ($mon < 10) {$mon = "0$mon";}
if ($mday < 10) {$mday = "0$mday";}
if ($hour < 10) {$hour = "0$hour";}
if ($min < 10) {$min = "0$min";}
if ($sec < 10) {$sec = "0$sec";}
$now_date_epoch = time();
$now_date = "$year-$mon-$mday $hour:$min:$sec";
$start_time=$now_date;
$CIDdate = "$mon$mday$hour$min$sec";
$tsSQLdate = "$year$mon$mday$hour$min$sec";
$SQLdate = "$year-$mon-$mday $hour:$min:$sec";
$SQLdateBEGIN = $SQLdate;
# default path to astguiclient configuration file:
$PATHconf = '/etc/astguiclient.conf';
open(conf, "$PATHconf") || die "can't open $PATHconf: $!\n";
@conf = <conf>;
close(conf);
$i=0;
foreach(@conf)
{
$line = $conf[$i];
$line =~ s/ |>|\n|\r|\t|\#.*|;.*//gi;
if ( ($line =~ /^PATHhome/) && ($CLIhome < 1) )
{$PATHhome = $line; $PATHhome =~ s/.*=//gi;}
if ( ($line =~ /^PATHlogs/) && ($CLIlogs < 1) )
{$PATHlogs = $line; $PATHlogs =~ s/.*=//gi;}
if ( ($line =~ /^PATHagi/) && ($CLIagi < 1) )
{$PATHagi = $line; $PATHagi =~ s/.*=//gi;}
if ( ($line =~ /^PATHweb/) && ($CLIweb < 1) )
{$PATHweb = $line; $PATHweb =~ s/.*=//gi;}
if ( ($line =~ /^PATHsounds/) && ($CLIsounds < 1) )
{$PATHsounds = $line; $PATHsounds =~ s/.*=//gi;}
if ( ($line =~ /^PATHmonitor/) && ($CLImonitor < 1) )
{$PATHmonitor = $line; $PATHmonitor =~ s/.*=//gi;}
if ( ($line =~ /^VARserver_ip/) && ($CLIserver_ip < 1) )
{$VARserver_ip = $line; $VARserver_ip =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_server/) && ($CLIDB_server < 1) )
{$VARDB_server = $line; $VARDB_server =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_database/) && ($CLIDB_database < 1) )
{$VARDB_database = $line; $VARDB_database =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_user/) && ($CLIDB_user < 1) )
{$VARDB_user = $line; $VARDB_user =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_pass/) && ($CLIDB_pass < 1) )
{$VARDB_pass = $line; $VARDB_pass =~ s/.*=//gi;}
if ( ($line =~ /^VARDB_port/) && ($CLIDB_port < 1) )
{$VARDB_port = $line; $VARDB_port =~ s/.*=//gi;}
$i++;
}
if (!$VARDB_port) {$VARDB_port='3306';}
if (!$AGILOGfile) {$AGILOGfile = "$PATHlogs/agiout.$year-$mon-$mday";}
use DBI;
use Asterisk::AGI;
$AGI = new Asterisk::AGI;
$dbhA = DBI->connect("DBI:mysql:$VARDB_database:$VARDB_server:$VARDB_port", "$VARDB_user", "$VARDB_pass")
or die "Couldn't connect to database: " . DBI->errstr;
### Grab Server values from the database
$stmtA = "SELECT agi_output FROM servers where server_ip = '$VARserver_ip';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
$rec_count=0;
while ($sthArows > $rec_count)
{
$AGILOG = '0';
@aryA = $sthA->fetchrow_array;
$DBagi_output = $aryA[0];
if ($DBagi_output =~ /STDERR/) {$AGILOG = '1';}
if ($DBagi_output =~ /FILE/) {$AGILOG = '2';}
if ($DBagi_output =~ /BOTH/) {$AGILOG = '3';}
$rec_count++;
}
$sthA->finish();
### begin parsing run-time options ###
if (length($ARGV[0])>1)
{
if ($AGILOG) {$agi_string = "Perl Environment Dump:"; &agi_output;}
$i=0;
while ($#ARGV >= $i)
{
$args = "$args $ARGV[$i]";
if ($AGILOG) {$agi_string = "$i|$ARGV[$i]"; &agi_output;}
$i++;
}
### list of command-line array arguments:
@ARGV_vars = split(/---/, $ARGV[0]);
$wait_milliseconds = $ARGV_vars[0];
}
if (length($wait_milliseconds) < 1)
{$wait_milliseconds = 1000;}
$|=1;
while(<STDIN>)
{
chomp;
last unless length($_);
if ($AGILOG)
{
if (/^agi_(\w+)\:\s+(.*)$/)
{
$AGI{$1} = $2;
}
}
if (/^agi_context\:\s+(.*)$/) {$context = $1;}
if (/^agi_uniqueid\:\s+(.*)$/) {$unique_id = $1; $uniqueid = $unique_id;}
if (/^agi_channel\:\s+(.*)$/) {$channel = $1;}
if (/^agi_extension\:\s+(.*)$/) {$extension = $1;}
if (/^agi_type\:\s+(.*)$/) {$type = $1;}
if (/^agi_callerid\:\s+(.*)$/) {$callerid = $1;}
if (/^agi_calleridname\:\s+(.*)$/) {$calleridname = $1;}
$callerid =~ s/\'|\\\\|\\\|\\|\\;|\\\;|\;|;//gi;
$calleridname =~ s/\'|\\\\|\\\|\\|\\;|\\\;|\;|;//gi;
$extension =~ s/\'|\"|\\\\|\\\|\\|\\;|\\\;|\;|;//gi;
if ( ($callerid =~ /\".*\"/) && ( (!$calleridname) or ($calleridname =~ /unknown/) ) )
{
$calleridname = $callerid;
$calleridname =~ s/\<\d\d\d\d\d\d\d\d\d\d\>//gi;
$calleridname =~ s/\"|\" //gi;
}
$callerid =~ s/\D//gi;
$calleridname =~ s/unknown//gi;
if ( (!$callerid) or ($callerid =~ /unknown/) )
{$callerid = $calleridname;}
if (length($callerid)>0) {$phone_number = $callerid;}
else {$phone_number = '';}
if (length($calleridname)>0) {$VLcomments = $calleridname;}
else {$VLcomments = '';}
if (length($callerid)<10) {$callerid = $parked_by;}
if (length($pin)>0) {$callerid = $pin;}
$phone_ac = substr($phone_number, 0, $ac_length);
}
foreach $i (sort keys %AGI)
{
if ($AGILOG) {$agi_string = " -- $i = $AGI{$i}"; &agi_output;}
}
if ($AGILOG) {$agi_string = "AGI Variables: |$unique_id|$channel|$extension|$type|$callerid| |Wait milli-seconds: $wait_milliseconds|"; &agi_output;}
use Time::HiRes ('gettimeofday','usleep','sleep'); # necessary to have perl sleep command of less than one second
usleep(1*$wait_milliseconds*1000);
exit;
##### SUBROUTINES #####
sub agi_output
{
if ($AGILOG >=2)
{
### open the log file for writing ###
open(Lout, ">>$AGILOGfile")
|| die "Can't open $AGILOGfile: $!\n";
print Lout "$now_date|$script|$agi_string\n";
close(Lout);
}
### send to STDERR writing ###
if ( ($AGILOG == '1') || ($AGILOG == '3') )
{print STDERR "$now_date|$script|$agi_string\n";}
$agi_string='';
}
sub checkresult
{
my ($res) = @_;
my $retval;
$tests++;
chomp $res;
if ($res =~ /^200/)
{
$res =~ /result=(-?\d+)/;
if (!length($1))
{
# print STDERR "FAIL ($res)\n";
$fail++;
}
else
{
# print STDERR "PASS ($1)\n";
$pass++;
}
}
else
{
# print STDERR "FAIL (unexpected result '$res')\n";
$fail++;
}
}
+26 -5
View File
@@ -3657,7 +3657,15 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
}
else
{
$menu_prompt_ext .= "exten => s,n,Background($menu_prompts_array[$w])\n";
if ($menu_prompts_array[$w] =~ /^NOPLAY/)
{
$menu_prompts_array[$w] =~ s/^NOPLAY//g;
$menu_prompt_ext .= "exten => s,n,NoOp($menu_prompts_array[$w])\n";
}
else
{
$menu_prompt_ext .= "exten => s,n,Background($menu_prompts_array[$w])\n";
}
}
}
}
@@ -3679,7 +3687,15 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
}
else
{
$menu_prompt_ext .= "exten => s,n,Background($menu_prompt[$i])\n";
if ($menu_prompt[$i] =~ /^NOPLAY/)
{
$menu_prompt[$i] =~ s/^NOPLAY//g;
$menu_prompt_ext .= "exten => s,n,NoOp($menu_prompt[$i])\n";
}
else
{
$menu_prompt_ext .= "exten => s,n,Background($menu_prompt[$i])\n";
}
}
}
}
@@ -3709,11 +3725,16 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$call_menu_ext .= "; $menu_name[$i]\n";
$call_menu_ext .= "[$menu_id[$i]]\n";
if ( ($SSinbound_answer_config > 0) && ($answer_signal[$i] =~ /N/i) )
{$call_menu_ext .= "exten => s,1,NoOp(NoAnswer-Call-Menu-Start)\n";}
{
$call_menu_ext .= "exten => s,1,NoOp(NoAnswer-Call-Menu-Start)\n";
$call_menu_ext .= "exten => s,n,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-----$qualify_sql_active[$i]-----NO)\n";
}
else
{$call_menu_ext .= "exten => s,1,Answer\n";}
{
$call_menu_ext .= "exten => s,1,Answer\n";
$call_menu_ext .= "exten => s,n,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-----$qualify_sql_active[$i]-----YES)\n";
}
$call_menu_ext .= "exten => s,n,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-----$qualify_sql_active[$i])\n";
$call_menu_ext .= "exten => s,n,Set(INVCOUNT=0) \n";
$call_menu_ext .= "$menu_prompt_ext";
if ($menu_timeout[$i] > 0)
+2 -2
View File
@@ -1,4 +1,4 @@
# version: 202000623213201
# version: 202000624232501
users-user User ID <QXZ>This field is where you put the users ID number, can be up to 8 digits in length, Must be at least 2 characters in length.</QXZ>
users-pass Password <QXZ>This field is where you put the users password. Must be at least 2 characters in length. A medium strength user password will be at least 10 characters in length, and a strong user password will be at least 20 characters in length and have letters as well as at least one number. It is recommended that you use a longer password if possible, stringing together several unrelated words with no spaces, and a number somewhere in the string. The maximum size of a password is 100 characters.</QXZ>
users-force_change_password Force Change Password <QXZ>If this option is set to Y then the user will be prompted to change their password the next time they log in to the administration webpage. Default is N.</QXZ>
@@ -648,7 +648,7 @@ inbound_dids-custom_one Custom DID Fields <QXZ>These five fields can be used for
did_ra_extensions DID Remote Agent Extension Overrides <QXZ>This section allows you to enable DIDs to have extension overrides for remote agent routed calls through in-groups. The User Start must be a valid Remote Agent User Start or if you want the Extension Override entry to work for all calls then you can use ---ALL--- in the User Start field. If there are multiple entries for the same DID and User Start then the active entries will be used in a round robin method.</QXZ>
call_menu-menu_id Menu ID <QXZ>This is the ID for this step of the call menu. This will also show up as the context that is used in the dialplan for this call menu. Here is a list of reserved phrases that cannot be used as menu IDs: vicidial, vicidial-auto, general, globals, default, trunkinbound, loopback-no-log, monitor_exit, monitor.</QXZ>
call_menu-menu_name Menu Name <QXZ>This field is the descriptive name for the call menu.</QXZ>
call_menu-menu_prompt Menu Prompt <QXZ>This field contains the file name of the audio prompt to play at the beginning of this menu. You can enter multiple prompts in this field and the other prompt fields by separating them with a pipe character. You can add NOINT directly in front of an audio file name to make it so the playback cannot be interrupted with a key press by the caller, the NOINT should not be a part of the filename, it is a special flag for the system. You may also use special purpose .agi scripts in this field as well like the cm_date.agi script, discuss with your administrator for more details.</QXZ>
call_menu-menu_prompt Menu Prompt <QXZ>This field contains the file name of the audio prompt to play at the beginning of this menu. You can enter multiple prompts in this field and the other prompt fields by separating them with a pipe character. You can add NOINT directly in front of an audio file name to make it so the playback cannot be interrupted with a key press by the caller, the NOINT should not be a part of the filename, it is a special flag for the system. You may also use special purpose .agi scripts in this field as well like the cm_date.agi script, discuss with your administrator for more details. Another special prefix flag is NOPLAY, which can be used for debug purposes or if you are using Answer configuration on your system for inbound calls.</QXZ>
call_menu-user_group Admin User Group <QXZ>This is the administrative user group for this record, this allows admin viewing of this record restricted by user group. Default is --ALL-- which allows any admin user to view this record.</QXZ>
call_menu-menu_timeout Menu Timeout <QXZ>This field is where you set the timeout in seconds that the menu will wait for the caller to enter in a DTMF choice. Setting this field to zero 0 will mean that there will be no wait time after the prompt is played.</QXZ>
call_menu-menu_timeout_prompt Menu Timeout Prompt <QXZ>This field contains the file name of the audio prompt to play when the timeout has been reached. Default is NONE to play no audio at timeout.</QXZ>