In In-groups, changed agent alert extension to a filename, changed other prompts to allow more than one audio file with a pipe separating audio files

git-svn-id: svn://192.168.202.10@1163 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-06-23 12:08:56 +00:00
parent ef2e87f0a6
commit 69d996ce77
10 changed files with 275 additions and 87 deletions
+5
View File
@@ -91,6 +91,11 @@ NOTE: Upgrading from 1.1.12-3 to 2.0.1 is at the bottom
UK telemarketing regulations that state you may not auto-dial a customer
back within 72 hours of an abandon.
25. Changed In-Group and Call Menu prompts to allow for multiple audio files per
prompt by separating them by pipes |. Also, changed the Agent Alert
Extention to a Filename in In-Groups
+83 -8
View File
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# agi-VDAD_ALL_inbound.agi version 2.0.5 *DBI-version*
# agi-VDAD_ALL_inbound.agi version 2.2.0 *DBI-version*
#
# runs when a call comes in from an inbound call. This script will
# send the calls out to the closers that are logged in.
@@ -93,6 +93,7 @@
# 90103-0311 - Added sip-silences before transfers to fix rare MoH issues
# 90115-0601 - Added AGENTDIRECT functionality
# 90607-1717 - Fix for AGENTDIRECT bug under certain configurations
# 90623-0724 - Changed prompts to multi-file prompts, changed agent alert exten to a prompt
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -769,7 +770,21 @@ if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) )
{
$AGI->stream_file('sip-silence');
$AGI->stream_file('sip-silence');
$AGI->stream_file("$after_hours_message_filename");
if ($after_hours_message_filename =~ /\|/)
{
@after_hours_message_filename_array = split(/\|/,$after_hours_message_filename);
$w=0;
foreach(@after_hours_message_filename_array)
{
if (length($after_hours_message_filename_array[$w])>0)
{
$AGI->stream_file("$after_hours_message_filename_array[$w]");
}
$w++;
}
}
else
{$AGI->stream_file("$after_hours_message_filename");}
sleep(1);
### insert a NEW record to the vicidial_manager table to hangup the channel
@@ -792,7 +807,21 @@ if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) )
##### PLAY WELCOME MESSAGE #####
if ( ($welcome_message_filename !~ /---NONE---/) && ( ($play_welcome_message =~ /ALWAYS/) || ( ($no_delay_call_route =~ /N/) && ($play_welcome_message =~ /YES_UNLESS_NODELAY/) ) ) )
{
$AGI->stream_file("$welcome_message_filename");
if ($welcome_message_filename =~ /\|/)
{
@welcome_message_filename_array = split(/\|/,$welcome_message_filename);
$w=0;
foreach(@welcome_message_filename_array)
{
if (length($welcome_message_filename_array[$w])>0)
{
$AGI->stream_file("$welcome_message_filename_array[$w]");
}
$w++;
}
}
else
{$AGI->stream_file("$welcome_message_filename");}
}
if ($play_welcome_message =~ /IF_WAIT_ONLY/)
{$if_wait_play_welcome=1;}
@@ -1234,10 +1263,12 @@ if ( ($agent_search_method =~ /^SO|^LO/) && ($skipLOSO < 1) )
### if agent alert exten is not disabled, then trigger the alert and wait
if ( ($agent_alert_exten !~ /X/i) && ($no_delay_call_route !~ /Y/i) )
{
if ($agent_alert_exten =~ /^8304$/)
{$agent_alert_exten = 'ding';}
$VHqueryCID = "VH$CIDdate$VDADconf_exten";
### insert a NEW record to the vicidial_manager table to play the alert message to the agent
$stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: $agent_alert_exten','Context: $ext_context','Channel: Local/$dtmf_silent_prefix$VDADconf_exten$at$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: 10','','','','')";
$stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: 83047777777777','Context: vicidial-auto','Channel: Local/$dtmf_silent_prefix$VDADconf_exten$at$ext_context','Priority: 1','Callerid: $agent_alert_exten','Timeout: 10','','','','')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02048'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL agent alert: |$VHqueryCID|7$VDADconf_exten|$channel|insert to vicidial_manager"; &agi_output;}
@@ -1566,10 +1597,12 @@ if ($agent_search_method =~ /^LO|^LB/)
### if agent alert exten is not disabled, then trigger the alert and wait
if ( ($agent_alert_exten !~ /X/i) && ($no_delay_call_route !~ /Y/i) )
{
if ($agent_alert_exten =~ /^8304$/)
{$agent_alert_exten = 'ding';}
$VHqueryCID = "VH$CIDdate$VDADconf_exten";
### insert a NEW record to the vicidial_manager table to play the alert message to the agent
$stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: $agent_alert_exten','Context: $ext_context','Channel: Local/$alertVDADremDIALstr$at$ext_context','Priority: 1','Callerid: $CIDstring','Timeout: 10','','','','')";
$stmtA = "INSERT INTO vicidial_manager values('','','$SQLdate','NEW','N','$VARserver_ip','','Originate','$VHqueryCID','Exten: 83047777777777','Context: vicidial-auto','Channel: Local/$alertVDADremDIALstr$at$ext_context','Priority: 1','Callerid: $agent_alert_exten','Timeout: 10','','','','')";
$affected_rows = $dbhA->do($stmtA);
$dbhP=$dbhA; $mysql_count='02068'; $MEL_aff_rows=$affected_rows; &mysql_error_logging;
if ($AGILOG) {$agi_string = "-- VDCL agent alert: |$VHqueryCID|$alertVDADremDIALstr|$channel|insert to vicidial_manager"; &agi_output;}
@@ -1812,7 +1845,21 @@ if ($if_wait_play_welcome > 0)
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file("$welcome_message_filename");
if ($welcome_message_filename =~ /\|/)
{
@welcome_message_filename_array = split(/\|/,$welcome_message_filename);
$w=0;
foreach(@welcome_message_filename_array)
{
if (length($welcome_message_filename_array[$w])>0)
{
$AGI->stream_file("$welcome_message_filename_array[$w]");
}
$w++;
}
}
else
{$AGI->stream_file("$welcome_message_filename");}
}
@@ -1837,7 +1884,21 @@ if ( ($hold_message_counter > $prompt_interval) && ($prompt_interval > 0) )
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file("$onhold_prompt_filename"); # this prompt must be less than 10 seconds long
if ($onhold_prompt_filename =~ /\|/)
{
@onhold_prompt_filename_array = split(/\|/,$onhold_prompt_filename);
$w=0;
foreach(@onhold_prompt_filename_array)
{
if (length($onhold_prompt_filename_array[$w])>0)
{
$AGI->stream_file("$onhold_prompt_filename_array[$w]");
}
$w++;
}
}
else
{$AGI->stream_file("$onhold_prompt_filename");} # this prompt must be less than 10 seconds long
$hold_message_counter = 0;
$start_moh=1;
$moh_delay=1;
@@ -2117,7 +2178,21 @@ if ($hold_time_option =~ /CALLERID_CALLBACK/)
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file('sip-silence'); # stop music-on-hold process
$AGI->stream_file("$hold_time_option_callback_filename");
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
}
else
{
+10
View File
@@ -27,6 +27,7 @@
# 90617-0821 - Added phone ring timeout and call menu custom dialplan entry
# 90621-0823 - Added phones conf file secret field use
# 90621-1425 - Added tracking group for call menus
# 90622-2146 - Added 83047777777777 for dynamic agent alert extension
#
$DB=0; # Debug flag
@@ -691,6 +692,15 @@ if ( ($active_asterisk_server =~ /Y/) && ($generate_vicidial_conf =~ /Y/) && ($r
$Vext .= "exten => 8310,4,Hangup\n";
$Vext .= "\n; agent alert extension\n";
$Vext .= "exten => 83047777777777,1,Answer\n";
if ($asterisk_version =~ /^1.2/)
{$Vext .= "exten => 83047777777777,2,Playback(\${CALLERIDNAME})\n";}
else
{$Vext .= "exten => 83047777777777,2,Playback(\${CALLERID(name)})\n";}
$Vext .= "exten => 83047777777777,3,Hangup\n";
##### Get the IAX carriers for this server_ip #####
$stmtA = "SELECT carrier_id,carrier_name,registration_string,template_id,account_entry,globals_string,dialplan_entry FROM vicidial_server_carriers where server_ip='$server_ip' and active='Y' and protocol='IAX2' order by carrier_id;";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
+2 -2
View File
@@ -610,11 +610,11 @@ if ($ftp_transfer > 0)
if ($ftp_audio_transfer > 0)
{
use Net::FTP;
if (!$Q) {print "Sending File Over FTP: $outfile\n";}
opendir(FILE, "$tempdir/");
@FILES = readdir(FILE);
if (!$Q) {print "Sending Audio Over FTP: $$#FILES\n";}
$i=0;
foreach(@FILES)
{
@@ -1,6 +1,6 @@
#!/usr/bin/perl
#
# Vtiger_IN_notes_activities_file.pl version 2.2.0 *DBI-version*
# Vtiger_IN_notes_activities_file.pl version 2.2.0
#
# DESCRIPTION:
# script lets you insert notes and activities into the vtiger system from a
@@ -14,6 +14,7 @@
#
# CHANGES
# 90327-1148 - First build
# 90623-0605 - Added duplicate check
#
$secX = time();
@@ -104,6 +105,7 @@ if (length($ARGV[0])>1)
print " [-q] = quiet\n";
print " [-t] = test\n";
print " [--debug] = debug output\n";
print " [--duplicate-check] = check whether the record exists before attempting to insert it\n";
print " [--format=notes] = select whether you are importing notes or activities\n";
print " [--ftp-pull] = grabs lead files from a remote FTP server, uses REPORTS FTP login information\n";
print " [--ftp-dir=leads_in] = remote FTP server directory to grab files from, should have a DONE sub-directory\n";
@@ -193,6 +195,11 @@ if (length($ARGV[0])>1)
else
{$email_sender = 'vicidial@localhost';}
if ($args =~ /--duplicate-check/i)
{
$dup_check=1;
print "\n----- DUPLICATE CHECK -----\n\n";
}
}
}
else
@@ -454,78 +461,153 @@ foreach(@FILES)
$user='6666';
#Get logged in user ID
$stmtB="SELECT id from vtiger_users where user_name='$user';";
if($DBX){print STDERR "\n|$stmtA|\n";}
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
if ($sthBrows > 0)
##### BEGIN Duplicate Check #####
$duplicate=0;
if ($dup_check)
{
@aryB = $sthB->fetchrow_array;
$user_id = $aryB[0];
if ($format =~ /activities/)
{
$first_duplicate=0;
# Check for duplicate activities entry
$stmtB="SELECT count(*) from vtiger_activity where subject='Old Call: $status' and activitytype='Call' and date_start='$date' and time_start='$time' and time_end='$end_time';";
if($DBX){print STDERR "\n|$stmtA|\n";}
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
if ($sthBrows > 0)
{
@aryB = $sthB->fetchrow_array;
$first_duplicate = $aryB[0];
}
$sthB->finish();
if ($first_duplicate > 0)
{
$stmtB="SELECT count(*) from vtiger_seactivityrel vs, vtiger_activity va where vs.crmid='$vendor_id' and vs.activityid=va.activityid and subject='Old Call: $status' and activitytype='Call' and date_start='$date' and time_start='$time' and time_end='$end_time';";
if($DBX){print STDERR "\n|$stmtA|\n";}
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
if ($sthBrows > 0)
{
@aryB = $sthB->fetchrow_array;
$duplicate = $aryB[0];
}
$sthB->finish();
}
}
else # notes dup check
{
$first_duplicate=0;
# Check for duplicate activities entry
$stmtB="SELECT count(*) from vtiger_crmentity where setype='Notes' and description='Old Notes: $status' and createdtime='$date $time';";
if($DBX){print STDERR "\n|$stmtA|\n";}
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
if ($sthBrows > 0)
{
@aryB = $sthB->fetchrow_array;
$first_duplicate = $aryB[0];
}
$sthB->finish();
if ($first_duplicate > 0)
{
$stmtB="SELECT count(*) from vtiger_senotesrel vn, vtiger_crmentity vc where vn.crmid='$vendor_id' and vn.notesid=vc.crmid and subject='Old Call: $status' and activitytype='Call' and date_start='$date' and time_start='$time' and time_end='$end_time';";
if($DBX){print STDERR "\n|$stmtA|\n";}
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
if ($sthBrows > 0)
{
@aryB = $sthB->fetchrow_array;
$duplicate = $aryB[0];
}
$sthB->finish();
}
}
}
$sthB->finish();
# Get current ID from vtiger_crmentity_seq
$stmtB="SELECT id from vtiger_crmentity_seq;";
if($DBX){print STDERR "\n|$stmtB|\n";}
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
if ($sthBrows > 0)
##### END Duplicate Check #####
if ($duplicate < 1)
{
@aryB = $sthB->fetchrow_array;
$crm_id = ($aryB[0] + 1);
}
$sthB->finish();
#Get logged in user ID
$stmtB="SELECT id from vtiger_users where user_name='$user';";
if($DBX){print STDERR "\n|$stmtA|\n";}
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
if ($sthBrows > 0)
{
@aryB = $sthB->fetchrow_array;
$user_id = $aryB[0];
}
$sthB->finish();
# Get current ID from vtiger_crmentity_seq
$stmtB="SELECT id from vtiger_crmentity_seq;";
if($DBX){print STDERR "\n|$stmtB|\n";}
$sthB = $dbhB->prepare($stmtB) or die "preparing: ",$dbhB->errstr;
$sthB->execute or die "executing: $stmtB ", $dbhB->errstr;
$sthBrows=$sthB->rows;
if ($sthBrows > 0)
{
@aryB = $sthB->fetchrow_array;
$crm_id = ($aryB[0] + 1);
}
$sthB->finish();
### update the crm ID ###
$stmtB = "UPDATE vtiger_crmentity_seq SET id = '$crm_id';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
if ($format =~ /activities/)
{
### insert record into vtiger_salesmanactivityrel table ###
$stmtB = "INSERT INTO vtiger_salesmanactivityrel SET smid='$user_id',activityid='$crm_id';";
### update the crm ID ###
$stmtB = "UPDATE vtiger_crmentity_seq SET id = '$crm_id';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
### insert record into vtiger_seactivityrel table ###
$stmtB = "INSERT INTO vtiger_seactivityrel SET crmid='$vendor_id',activityid='$crm_id';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
if ($format =~ /activities/)
{
### insert record into vtiger_salesmanactivityrel table ###
$stmtB = "INSERT INTO vtiger_salesmanactivityrel SET smid='$user_id',activityid='$crm_id';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
### insert record into crmentity table ###
$stmtB = "INSERT INTO vtiger_crmentity SET crmid='$crm_id',smcreatorid='$user_id',smownerid='$user_id',modifiedby='$user_id',setype='Calendar',description='Old Call: $status',createdtime='$date $time',modifiedtime='$date $time', viewedtime='$date $time';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
### insert record into vtiger_seactivityrel table ###
$stmtB = "INSERT INTO vtiger_seactivityrel SET crmid='$vendor_id',activityid='$crm_id';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
### insert record into vtiger_activity table ###
$stmtB = "INSERT INTO vtiger_activity SET activityid='$crm_id',subject='Old Call: $status',activitytype='Call',date_start='$date',due_date='$date',time_start='$time',time_end='$end_time',sendnotification='0',duration_hours='0',duration_minutes='$session_length',status='',eventstatus='Held',priority='Medium',location='VICIDIAL User $user',notime='0',visibility='Public',recurringtype='--None--';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
### insert record into crmentity table ###
$stmtB = "INSERT INTO vtiger_crmentity SET crmid='$crm_id',smcreatorid='$user_id',smownerid='$user_id',modifiedby='$user_id',setype='Calendar',description='Old Call: $status',createdtime='$date $time',modifiedtime='$date $time', viewedtime='$date $time';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
### insert record into vtiger_activity table ###
$stmtB = "INSERT INTO vtiger_activity SET activityid='$crm_id',subject='Old Call: $status',activitytype='Call',date_start='$date',due_date='$date',time_start='$time',time_end='$end_time',sendnotification='0',duration_hours='0',duration_minutes='$session_length',status='',eventstatus='Held',priority='Medium',location='VICIDIAL User $user',notime='0',visibility='Public',recurringtype='--None--';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
}
else
{
### insert record into crmentity table ###
$stmtB = "INSERT INTO vtiger_crmentity SET crmid='$crm_id',smcreatorid='$user_id',smownerid='$user_id',modifiedby='$user_id',setype='Notes',description='Old Notes: $status',createdtime='$date $time',modifiedtime='$date $time', viewedtime='$date $time';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
### insert record into vtiger_notes table ###
$stmtB = "INSERT INTO vtiger_notes SET notesid='$crm_id',title='Old Notes: $status',notecontent='$notes';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
### insert record into vtiger_senotesrel table ###
$stmtB = "INSERT INTO vtiger_senotesrel SET crmid='$vendor_id',notesid='$crm_id';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
}
$b++;
}
else
{
### insert record into crmentity table ###
$stmtB = "INSERT INTO vtiger_crmentity SET crmid='$crm_id',smcreatorid='$user_id',smownerid='$user_id',modifiedby='$user_id',setype='Notes',description='Old Notes: $status',createdtime='$date $time',modifiedtime='$date $time', viewedtime='$date $time';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
### insert record into vtiger_notes table ###
$stmtB = "INSERT INTO vtiger_notes SET notesid='$crm_id',title='Old Notes: $status',notecontent='$notes';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
### insert record into vtiger_senotesrel table ###
$stmtB = "INSERT INTO vtiger_senotesrel SET crmid='$vendor_id',notesid='$crm_id';";
if (!$T) {$affected_rows = $dbhB->do($stmtB); } # or die "Couldn't execute query: |$stmtB|\n";
if($DB){print STDERR "\n|$affected_rows|$stmtB|\n";}
print "BAD duplicate: $web1|$revenue|$status|$date $time|$a\n"; $h++;
}
$b++;
}
}
else
@@ -544,7 +626,7 @@ foreach(@FILES)
if ($a =~ /700$/i) {print STDERR "| $a\r";}
if ($a =~ /800$/i) {print STDERR "+ $a\r";}
if ($a =~ /900$/i) {print STDERR "0 $a\r";}
if ($a =~ /000$/i) {print "$a|$b|$c|$d|$e|$f|$g|$phone_number|\n";}
if ($a =~ /000$/i) {print "$a|$b|$c|$d|$e|$f|$g|$h|$phone_number|\n";}
}
@@ -562,6 +644,7 @@ foreach(@FILES)
$Falert .= "ERROR: $e\n";
$Falert .= "NOT FOUND: $f\n";
$Falert .= "MULTI-ALT-PHONE: $g\n";
$Falert .= "DUPLICATE: $h\n";
print "$Falert";
print Sout "$Falert";
+12
View File
@@ -201,3 +201,15 @@ UPDATE system_settings SET db_schema_version='1154';
ALTER TABLE vicidial_call_menu ADD tracking_group VARCHAR(20) default 'CALLMENU';
UPDATE system_settings SET db_schema_version='1155';
ALTER TABLE vicidial_inbound_groups MODIFY after_hours_message_filename VARCHAR(255) default 'vm-goodbye';
ALTER TABLE vicidial_inbound_groups MODIFY welcome_message_filename VARCHAR(255) default '---NONE---';
ALTER TABLE vicidial_inbound_groups MODIFY onhold_prompt_filename VARCHAR(255) default 'generic_hold';
ALTER TABLE vicidial_inbound_groups MODIFY hold_time_option_callback_filename VARCHAR(255) default 'vm-hangup';
ALTER TABLE vicidial_inbound_groups MODIFY agent_alert_exten VARCHAR(100) default 'ding';
UPDATE system_settings SET db_schema_version='1155';
@@ -177,6 +177,9 @@ Conf File Secret||
This is the secret, or password, for the phone in the iax or sip auto-generated conf file for this phone. Limit is 20 characters alphanumeric dash and underscore accepted. Default is test||
Tracking Group||
This is the ID that you can use to track calls to this Call Menu when looking at the IVR Report. The list includes CALLMENU as the default as well as all of the In-Groups||
Agent Alert Filename||
The audio file to play to an agent to announce that a call is coming to the agent. To not use this function set this to X. Default is ding||
This field as with the other audio fields in In-Groups, with the exception of the Agent Alert Filename, can have multiple audio files played if you put a pipe-separated list of audio files into the field||
add-file: user_territories.php
+12 -12
View File
@@ -1420,7 +1420,6 @@ if ($non_latin < 1)
$category = ereg_replace("[^-_0-9a-zA-Z]","",$category);
$vsc_id = ereg_replace("[^-_0-9a-zA-Z]","",$vsc_id);
$moh_context = ereg_replace("[^-_0-9a-zA-Z]","",$moh_context);
$agent_alert_exten = ereg_replace("[^-_0-9a-zA-Z]","",$agent_alert_exten);
$source_campaign_id = ereg_replace("[^-_0-9a-zA-Z]","",$source_campaign_id);
$source_user_id = ereg_replace("[^-_0-9a-zA-Z]","",$source_user_id);
$source_group_id = ereg_replace("[^-_0-9a-zA-Z]","",$source_group_id);
@@ -1451,7 +1450,6 @@ if ($non_latin < 1)
$call_handle_method = ereg_replace("[^-_0-9a-zA-Z]","",$call_handle_method);
$agent_search_method = ereg_replace("[^-_0-9a-zA-Z]","",$agent_search_method);
$hold_time_option_voicemail = ereg_replace("[^-_0-9a-zA-Z]","",$hold_time_option_voicemail);
$hold_time_option_callback_filename = ereg_replace("[^-_0-9a-zA-Z]","",$hold_time_option_callback_filename);
$exten_context = ereg_replace("[^-_0-9a-zA-Z]","",$exten_context);
$three_way_call_cid = ereg_replace("[^-_0-9a-zA-Z]","",$three_way_call_cid);
$web_form_target = ereg_replace("[^-_0-9a-zA-Z]","",$web_form_target);
@@ -1479,6 +1477,11 @@ if ($non_latin < 1)
$menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt);
$menu_timeout_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_timeout_prompt);
$menu_invalid_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_invalid_prompt);
$after_hours_message_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$after_hours_message_filename);
$welcome_message_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$welcome_message_filename);
$onhold_prompt_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$onhold_prompt_filename);
$hold_time_option_callback_filename = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$hold_time_option_callback_filename);
$agent_alert_exten = ereg_replace("[^-\/\._0-9a-zA-Z]","",$agent_alert_exten);
### ALPHA-NUMERIC and underscore and dash and comma
$logins_list = ereg_replace("[^-\,\_0-9a-zA-Z]","",$logins_list);
@@ -1552,9 +1555,6 @@ if ($non_latin < 1)
$queuemetrics_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_dbname);
$queuemetrics_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_login);
$queuemetrics_pass = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$queuemetrics_pass);
$after_hours_message_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$after_hours_message_filename);
$welcome_message_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$welcome_message_filename);
$onhold_prompt_filename = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$onhold_prompt_filename);
$email = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$email);
$vtiger_dbname = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$vtiger_dbname);
$vtiger_login = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$vtiger_login);
@@ -3836,7 +3836,7 @@ if ($SSqc_features_active > 0)
<BR>
<A NAME="vicidial_inbound_groups-welcome_message_filename">
<BR>
<B>Welcome Message Filename -</B> The audio file located on the server to be played when the call comes in. If set to ---NONE--- then no message will be played. Default is ---NONE---
<B>Welcome Message Filename -</B> The audio file located on the server to be played when the call comes in. If set to ---NONE--- then no message will be played. Default is ---NONE---. This field as with the other audio fields in In-Groups, with the exception of the Agent Alert Filename, can have multiple audio files played if you put a pipe-separated list of audio files into the field.
<BR>
<A NAME="vicidial_inbound_groups-play_welcome_message">
@@ -3906,7 +3906,7 @@ if ($SSqc_features_active > 0)
<BR>
<A NAME="vicidial_inbound_groups-agent_alert_exten">
<BR>
<B>Agent Alert Extension -</B> The extension to send into the agent session to announce that a call is coming to the agent. This extension should have a Playback of an audio file. To not use this function set this to X. Default is X.
<B>Agent Alert Filename -</B> The audio file to play to an agent to announce that a call is coming to the agent. To not use this function set this to X. Default is ding.
<BR>
<A NAME="vicidial_inbound_groups-agent_alert_delay">
@@ -17489,7 +17489,7 @@ if ($ADD==3111)
echo "<tr bgcolor=#CCFFFF><td align=right>After Hours Action: </td><td align=left><select size=1 name=after_hours_action><option>HANGUP</option><option>MESSAGE</option><option>EXTENSION</option><option>VOICEMAIL</option><option>IN_GROUP</option><option SELECTED>$after_hours_action</option></select>$NWB#vicidial_inbound_groups-after_hours_action$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>After Hours Message Filename: </td><td align=left><input type=text name=after_hours_message_filename id=after_hours_message_filename size=20 maxlength=50 value=\"$after_hours_message_filename\"> <a href=\"javascript:launch_chooser('after_hours_message_filename','date',400);\">audio chooser</a> $NWB#vicidial_inbound_groups-after_hours_message_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>After Hours Message Filename: </td><td align=left><input type=text name=after_hours_message_filename id=after_hours_message_filename size=50 maxlength=255 value=\"$after_hours_message_filename\"> <a href=\"javascript:launch_chooser('after_hours_message_filename','date',400);\">audio chooser</a> $NWB#vicidial_inbound_groups-after_hours_message_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#CCFFFF><td align=right>After Hours Extension: </td><td align=left><input type=text name=after_hours_exten size=10 maxlength=20 value=\"$after_hours_exten\">$NWB#vicidial_inbound_groups-after_hours_exten$NWE</td></tr>\n";
@@ -17499,13 +17499,13 @@ if ($ADD==3111)
echo "$Agroups_menu";
echo "</select>$NWB#vicidial_inbound_groups-afterhours_xfer_group$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Welcome Message Filename: </td><td align=left><input type=text name=welcome_message_filename id=welcome_message_filename size=20 maxlength=50 value=\"$welcome_message_filename\"> <a href=\"javascript:launch_chooser('welcome_message_filename','date',500);\">audio chooser</a> $NWB#vicidial_inbound_groups-welcome_message_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Welcome Message Filename: </td><td align=left><input type=text name=welcome_message_filename id=welcome_message_filename size=50 maxlength=255 value=\"$welcome_message_filename\"> <a href=\"javascript:launch_chooser('welcome_message_filename','date',500);\">audio chooser</a> $NWB#vicidial_inbound_groups-welcome_message_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Play Welcome Message: </td><td align=left><select size=1 name=play_welcome_message><option>ALWAYS</option><option>NEVER</option><option>IF_WAIT_ONLY</option><option>YES_UNLESS_NODELAY</option><option SELECTED>$play_welcome_message</option></select>$NWB#vicidial_inbound_groups-play_welcome_message$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Music On Hold Context: </td><td align=left><input type=text name=moh_context size=10 maxlength=20 value=\"$moh_context\">$NWB#vicidial_inbound_groups-moh_context$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>On Hold Prompt Filename: </td><td align=left><input type=text name=onhold_prompt_filename id=onhold_prompt_filename size=20 maxlength=50 value=\"$onhold_prompt_filename\"> <a href=\"javascript:launch_chooser('onhold_prompt_filename','date',600);\">audio chooser</a> $NWB#vicidial_inbound_groups-onhold_prompt_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>On Hold Prompt Filename: </td><td align=left><input type=text name=onhold_prompt_filename id=onhold_prompt_filename size=50 maxlength=255 value=\"$onhold_prompt_filename\"> <a href=\"javascript:launch_chooser('onhold_prompt_filename','date',600);\">audio chooser</a> $NWB#vicidial_inbound_groups-onhold_prompt_filename$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>On Hold Prompt Interval: </td><td align=left><input type=text name=prompt_interval size=5 maxlength=5 value=\"$prompt_interval\">$NWB#vicidial_inbound_groups-prompt_interval$NWE</td></tr>\n";
@@ -17525,11 +17525,11 @@ if ($ADD==3111)
echo "$Tgroups_menu";
echo "</select>$NWB#vicidial_inbound_groups-hold_time_option_xfer_group$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=20 maxlength=20 value=\"$hold_time_option_callback_filename\"> <a href=\"javascript:launch_chooser('hold_time_option_callback_filename','date',900);\">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 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',900);\">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";
echo "<tr bgcolor=#B6D3FC><td align=right>Agent Alert Extension: </td><td align=left><input type=text name=agent_alert_exten size=10 maxlength=20 value=\"$agent_alert_exten\">$NWB#vicidial_inbound_groups-agent_alert_exten$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Agent Alert Extension: </td><td align=left><input type=text name=agent_alert_exten id=agent_alert_exten size=40 maxlength=100 value=\"$agent_alert_exten\"> <a href=\"javascript:launch_chooser('agent_alert_exten','date',1000);\">audio chooser</a> $NWB#vicidial_inbound_groups-agent_alert_exten$NWE</td></tr>\n";
echo "<tr bgcolor=#B6D3FC><td align=right>Agent Alert Delay: </td><td align=left><input type=text name=agent_alert_delay size=6 maxlength=6 value=\"$agent_alert_delay\">$NWB#vicidial_inbound_groups-agent_alert_delay$NWE</td></tr>\n";
+2 -2
View File
@@ -383,10 +383,10 @@ else
{
var audiolistURL = "./non_agent_api.php";
var audiolistQuery = "source=admin&function=sounds_list&user=" + user + "&pass=" + pass + "&format=selectframe&stage=" + stage + "&comments=" + fieldname;
var Iframe_content = '<IFRAME SRC="' + audiolistURL + '?' + audiolistQuery + '" style="width:560;height:440;background-color:white;" scrolling="NO" frameborder="0" allowtransparency="true" id="audio_chooser_frame' + epoch + '" name="audio_chooser_frame" width="560" height="460" STYLE="z-index:2"> </iframe>';
var Iframe_content = '<IFRAME SRC="' + audiolistURL + '?' + audiolistQuery + '" style="width:660;height:440;background-color:white;" scrolling="NO" frameborder="0" allowtransparency="true" id="audio_chooser_frame' + epoch + '" name="audio_chooser_frame" width="660" height="460" STYLE="z-index:2"> </iframe>';
document.getElementById("audio_chooser_span").style.position = "absolute";
document.getElementById("audio_chooser_span").style.left = "300px";
document.getElementById("audio_chooser_span").style.left = "250px";
document.getElementById("audio_chooser_span").style.top = vposition + "px";
document.getElementById("audio_chooser_span").style.visibility = 'visible';
document.getElementById("audio_chooser_span").innerHTML = Iframe_content;
+2 -2
View File
@@ -409,8 +409,8 @@ if ($function == 'sounds_list')
echo "<body>\n";
echo "<a href=\"javascript:close_file();\"><font size=1 face=\"Arial,Helvetica\">close frame</font></a>\n";
echo "<div id='selectframe' style=\"height:400px;width:520px;overflow:scroll;\">\n";
echo "<table border=0 cellpadding=1 cellspacing=2 width=500 bgcolor=white><tr>\n";
echo "<div id='selectframe' style=\"height:400px;width:620px;overflow:scroll;\">\n";
echo "<table border=0 cellpadding=1 cellspacing=2 width=600 bgcolor=white><tr>\n";
echo "<td>#</td>\n";
echo "<td><a href=\"$PHP_SELF?source=admin&function=sounds_list&user=$user&pass=$pass&format=selectframe&comments=$comments&stage=name\"><font color=black>FILENAME</td>\n";
echo "<td><a href=\"$PHP_SELF?source=admin&function=sounds_list&user=$user&pass=$pass&format=selectframe&comments=$comments&stage=date\"><font color=black>DATE</td>\n";