Added user recording override settings checking, for remote agent recording

git-svn-id: svn://192.168.202.10@1631 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2011-03-25 18:41:08 +00:00
parent 91ec2cfd4a
commit cf8bff3354
4 changed files with 94 additions and 10 deletions
+20
View File
@@ -17,6 +17,7 @@
# changes:
# 110303-2325 - First build
# 110324-2328 - Added recording of remote agent calls, per in-group and campaign recording settings
# 110325-1411 - Added user recording override settings checking for remote agent recording
#
$script = 'agi-VDAD_RINGALL.agi';
@@ -259,6 +260,7 @@ if ($NAGcount > 0)
$sthA->finish();
if ($AGILOG) {$agi_string = "-- AVC Session Reserved: |$callerid|$auto_call_id|$dial_user|3WAY_$dial_user|$now_date|$VLAconf_exten|"; &agi_output;}
### get the recording settings for the campaign that this remote agent is logged into
if (length($VLAcampaign_id) > 0)
{
$stmtA = "SELECT campaign_recording,campaign_rec_filename FROM vicidial_campaigns where campaign_id='$VLAcampaign_id';";
@@ -274,6 +276,24 @@ if ($NAGcount > 0)
$sthA->finish();
}
### look for the recording settings for the start user of this remote agent
if (length($VLAra_user) > 0)
{
$stmtA = "SELECT vicidial_recording_override,vicidial_recording FROM vicidial_users where user='$VLAra_user';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArowsVUrec=$sthA->rows;
if ($sthArowsVUrec > 0)
{
@aryA = $sthA->fetchrow_array;
if ($aryA[0] !~ /DISABLED/)
{$campaign_recording = $aryA[0];}
if ($aryA[1] < 1)
{$campaign_recording = 'NONE';}
}
$sthA->finish();
}
### if recording is enabled then start recording on this call before sending to a remote agent
if ($campaign_recording =~ /ALLCALLS|ALLFORCE/)
{