Added In-Group option to override the Park Music-on-Hold.
git-svn-id: svn://192.168.202.10@2975 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -303,6 +303,8 @@ OTHER CHANGES:
|
||||
|
||||
81. Added populate_lead_vendor and populate_lead_source options for In-Groups.
|
||||
|
||||
82. Added In-Group option to override the Park Music-on-Hold.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+37
-2
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# park_CID.agi version 2.6
|
||||
# park_CID.agi version 2.14
|
||||
#
|
||||
# runs before the park extension to populate the parked_channels entry with the channel's callerid
|
||||
#
|
||||
@@ -12,7 +12,7 @@
|
||||
# exten => 8301,3,Playback(park)
|
||||
# exten => 8301,4,Hangup
|
||||
#
|
||||
# Copyright (C) 2013 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
# Copyright (C) 2018 Matt Florell <vicidial@gmail.com> LICENSE: AGPLv2
|
||||
#
|
||||
# changes:
|
||||
# 60731-1423 - changed to use DBI-DBD::mysql
|
||||
@@ -21,6 +21,7 @@
|
||||
# 90909-0922 - Fixed calleridname issue
|
||||
# 101004-1012 - Changed park to Music On Hold, added option for park on AGI
|
||||
# 130108-1817 - Changes for Asterisk 1.8 compatibility
|
||||
# 180430-1842 - Added inbound_groups-park_ext option
|
||||
#
|
||||
|
||||
$script = 'park_CID.agi';
|
||||
@@ -264,6 +265,40 @@ if ($VACcount > 0)
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($calleridname =~ /^Y\d\d\d\d\d\d\d\d\d\d\d\d\d\d/i)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "-- In-Group MOH override check: |$VAC_campaign_id|$VAC_call_type|$VLA_user| |$callerid|"; &agi_output;}
|
||||
$stmtA = "SELECT park_file_name FROM vicidial_inbound_groups where group_id='$VAC_campaign_id' and park_file_name!='' and park_file_name IS NOT NULL;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$VICcount=$sthA->rows;
|
||||
if ($VICcount > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$VICpark_context = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ($VICcount > 0)
|
||||
{
|
||||
$stmtA = "SELECT count(*) FROM vicidial_music_on_hold_files where moh_id='$VICpark_context';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$MOHIcount=$sthA->rows;
|
||||
if ($MOHIcount > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$MOHIfiles = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
if ($MOHIfiles > 0)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "-- In-Group MOH override confirmed: |$park_context|$VICpark_context|$VAC_call_type|$VLA_user| |$callerid|"; &agi_output;}
|
||||
$park_context = $VICpark_context;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$stmtA = "SELECT count(*) FROM vicidial_music_on_hold_files where moh_id='$park_context';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
@@ -1258,7 +1258,8 @@ add_lead_timezone ENUM('SERVER','PHONE_CODE_AREACODE') default 'SERVER',
|
||||
icbq_call_time_id VARCHAR(20) default '24hours',
|
||||
icbq_dial_filter VARCHAR(50) default 'NONE',
|
||||
populate_lead_source VARCHAR(20) default 'DISABLED',
|
||||
populate_lead_vendor VARCHAR(20) default 'INBOUND_NUMBER'
|
||||
populate_lead_vendor VARCHAR(20) default 'INBOUND_NUMBER',
|
||||
park_file_name VARCHAR(100) default ''
|
||||
) ENGINE=MyISAM;
|
||||
|
||||
CREATE TABLE vicidial_stations (
|
||||
@@ -4215,4 +4216,4 @@ INSERT INTO vicidial_settings_containers(container_id,container_notes,container_
|
||||
|
||||
UPDATE system_settings set vdc_agent_api_active='1';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1542',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1543',db_schema_update_date=NOW(),reload_timestamp=NOW();
|
||||
|
||||
@@ -619,3 +619,7 @@ ALTER TABLE vicidial_inbound_groups ADD populate_lead_source VARCHAR(20) default
|
||||
ALTER TABLE vicidial_inbound_groups ADD populate_lead_vendor VARCHAR(20) default 'INBOUND_NUMBER';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1542',db_schema_update_date=NOW() where db_schema_version < 1542;
|
||||
|
||||
ALTER TABLE vicidial_inbound_groups ADD park_file_name VARCHAR(100) default '';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1543',db_schema_update_date=NOW() where db_schema_version < 1543;
|
||||
|
||||
+10
-7
File diff suppressed because one or more lines are too long
@@ -158,6 +158,7 @@
|
||||
# 180310-2246 - Added settings-source_id_display
|
||||
# 180410-1609 - Added users-pause_code_approval
|
||||
# 180424-1530 - Added in-group populate_lead_source, populate_lead_vendor entries
|
||||
# 180430-1837 - Added inbound_groups-park_ext entry
|
||||
#
|
||||
|
||||
require("dbconnect_mysqli.php");
|
||||
@@ -2548,6 +2549,11 @@ if ($SSqc_features_active > 0)
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Admin User Group"); ?> -</B><?php echo _QXZ("This is the administrative user group for this inbound group, this allows admin viewing of this in-group restricted by user group. Default is --ALL-- which allows any admin user to view this in-group."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="inbound_groups-park_ext">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Park Music-on-Hold"); ?> -</B><?php echo _QXZ("This optional setting will override the agent campaign setting for Park Music-on-Hold, if populated. Default is empty for disabled."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="inbound_groups-callback_queue_calls">
|
||||
<BR>
|
||||
|
||||
Reference in New Issue
Block a user