Added new statuses for CPD Unknown transfers
git-svn-id: svn://192.168.202.10@2219 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
+32
-24
@@ -555,12 +555,16 @@ else
|
||||
|
||||
if ( ( ($DB_amd_send_to_vmx =~ /Y/) || ($force_playback =~ /YES/) ) && (length($DB_am_message_exten) > 0) )
|
||||
{
|
||||
$stmtA = "UPDATE vicidial_log set status='AM' where uniqueid='$uniqueid' and lead_id='$VD_lead_id' order by call_date desc limit 1;";
|
||||
$msg_status='AM';
|
||||
if ($AMDCAUSE =~ /^Unknown|\?\?\?/i)
|
||||
{$msg_status='UNKAM';}
|
||||
|
||||
$stmtA = "UPDATE vicidial_log set status='$msg_status' where uniqueid='$uniqueid' and lead_id='$VD_lead_id' order by call_date desc limit 1;";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log AM update: |$affected_rows|$uniqueid|"; &agi_output;}
|
||||
|
||||
$stmtA = "UPDATE vicidial_list set status='AM' where lead_id='$VD_lead_id';";
|
||||
$stmtA = "UPDATE vicidial_list set status='$msg_status' where lead_id='$VD_lead_id';";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list AM update: |$affected_rows|$uniqueid|"; &agi_output;}
|
||||
@@ -743,23 +747,25 @@ else
|
||||
|
||||
|
||||
### run waitforsilence if enabled
|
||||
if ( (length($waitforsilence_options) > 0) && ($waitforsilence_options !~ /NONE|X/i) )
|
||||
if ($AMDCAUSE !~ /^Unknown|\?\?\?/i)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "WaitForSilence launched: |$waitforsilence_options|"; &agi_output;}
|
||||
$AGI->exec("WaitForSilence","$waitforsilence_options");
|
||||
if ( (length($waitforsilence_options) > 0) && ($waitforsilence_options !~ /NONE|X/i) )
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "WaitForSilence launched: |$waitforsilence_options|"; &agi_output;}
|
||||
$AGI->exec("WaitForSilence","$waitforsilence_options");
|
||||
}
|
||||
if ($waitforsilence_options =~ /X/i)
|
||||
{
|
||||
$waitforsilence_seconds = $waitforsilence_options;
|
||||
$waitforsilence_seconds =~ s/\D//gi;
|
||||
if (length($waitforsilence_seconds) < 1)
|
||||
{$waitforsilence_seconds = '1';}
|
||||
if ($waitforsilence_seconds > 20)
|
||||
{$waitforsilence_seconds = '20';}
|
||||
if ($AGILOG) {$agi_string = "Wait time seconds in WaitForSilence field: |$waitforsilence_seconds|$waitforsilence_options|"; &agi_output;}
|
||||
sleep($waitforsilence_seconds);
|
||||
}
|
||||
}
|
||||
if ($waitforsilence_options =~ /X/i)
|
||||
{
|
||||
$waitforsilence_seconds = $waitforsilence_options;
|
||||
$waitforsilence_seconds =~ s/\D//gi;
|
||||
if (length($waitforsilence_seconds) < 1)
|
||||
{$waitforsilence_seconds = '1';}
|
||||
if ($waitforsilence_seconds > 20)
|
||||
{$waitforsilence_seconds = '20';}
|
||||
if ($AGILOG) {$agi_string = "Wait time seconds in WaitForSilence field: |$waitforsilence_seconds|$waitforsilence_options|"; &agi_output;}
|
||||
sleep($waitforsilence_seconds);
|
||||
}
|
||||
|
||||
|
||||
### if call menu or in-group method
|
||||
if ( ($AMDCAUSE =~ /^Unknown|\?\?\?/i) && ($cpd_unknown_action =~ /CALLMENU|INGROUP/) )
|
||||
@@ -778,15 +784,15 @@ else
|
||||
}
|
||||
if (length($DROPexten)>0)
|
||||
{
|
||||
$stmtA = "UPDATE vicidial_log set status='AMDXFR' where uniqueid='$uniqueid' and lead_id='$VD_lead_id' order by call_date desc limit 1;";
|
||||
$stmtA = "UPDATE vicidial_log set status='UNKXFR' where uniqueid='$uniqueid' and lead_id='$VD_lead_id' order by call_date desc limit 1;";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log AMDXFR update: |$affected_rows|$uniqueid|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log UNKXFR update: |$affected_rows|$uniqueid|"; &agi_output;}
|
||||
|
||||
$stmtA = "UPDATE vicidial_list set status='AMDXFR' where lead_id='$VD_lead_id';";
|
||||
$stmtA = "UPDATE vicidial_list set status='UNKXFR' where lead_id='$VD_lead_id';";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list AMDXFR update: |$affected_rows|$uniqueid|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list UNKXFR update: |$affected_rows|$uniqueid|"; &agi_output;}
|
||||
|
||||
$AGI->stream_file('sip-silence');
|
||||
$AGI->stream_file('sip-silence');
|
||||
@@ -872,13 +878,15 @@ else
|
||||
else
|
||||
{$AGI->stream_file("$DB_am_message_exten");}
|
||||
|
||||
|
||||
$stmtA = "UPDATE vicidial_log set status='AL' where uniqueid='$uniqueid' and lead_id='$VD_lead_id' order by call_date desc limit 1;";
|
||||
$last_status='AL';
|
||||
if ($AMDCAUSE =~ /^Unknown|\?\?\?/i)
|
||||
{$last_status='UNKAL';}
|
||||
$stmtA = "UPDATE vicidial_log set status='$last_status' where uniqueid='$uniqueid' and lead_id='$VD_lead_id' order by call_date desc limit 1;";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAD vicidial_log AL update: |$affected_rows|$uniqueid|"; &agi_output;}
|
||||
|
||||
$stmtA = "UPDATE vicidial_list set status='AL' where lead_id='$VD_lead_id';";
|
||||
$stmtA = "UPDATE vicidial_list set status='$last_status' where lead_id='$VD_lead_id';";
|
||||
if ($AGILOG) {$agi_string = "|$stmtA|"; &agi_output;}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
if ($AGILOG) {$agi_string = "-- VDAD vicidial_list AL update: |$affected_rows|$uniqueid|"; &agi_output;}
|
||||
|
||||
@@ -68,3 +68,6 @@ QCFAIL - QC_FAIL_CALLBK
|
||||
LSMERG - Agent lead search old lead merge
|
||||
DISMX - Dispo Call Max Status
|
||||
INBND - first status of a newly created lead going into the inbound queueing process
|
||||
UNKXFR - CPD Unknown result Transfer to Call Menu or In-Group
|
||||
UNKAM - CPD Unknown call sent to a message to be played
|
||||
UNKAL - CPD Unknown call sent to a message and message has been played
|
||||
|
||||
Reference in New Issue
Block a user