Fixed logging bugs
git-svn-id: svn://192.168.202.10@1205 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -78,6 +78,7 @@
|
||||
# 90611-0554 - Bug fix for Manual dial calls and logging
|
||||
# 90619-1948 - Format fixing
|
||||
# 90630-2252 - Added Sangoma CDP pre-Answer call processing
|
||||
# 90816-0057 - Changed default vicidial_log time to 0 from 1 second
|
||||
#
|
||||
|
||||
|
||||
@@ -1123,7 +1124,7 @@ while($one_day_interval > 0)
|
||||
&event_logger;
|
||||
|
||||
$CLstage =~ s/LIVE|-//gi;
|
||||
if ($CLstage < 0.25) {$CLstage=1;}
|
||||
if ($CLstage < 0.25) {$CLstage=0;}
|
||||
|
||||
if ($CLstatus =~ /BUSY/) {$CLnew_status = 'B';}
|
||||
else
|
||||
@@ -1189,7 +1190,7 @@ while($one_day_interval > 0)
|
||||
### END - CPD Look for result for NA/B/DC calls
|
||||
##############################################################
|
||||
|
||||
$end_epoch = ($now_date_epoch + 1);
|
||||
$end_epoch = $now_date_epoch;
|
||||
if ($insertVLcount < 1)
|
||||
{
|
||||
$stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed,length_in_sec,end_epoch,alt_dial) values('$CLuniqueid','$CLlead_id','$CLcampaign_id','$SQLdate','$now_date_epoch','$CLnew_status','$CLphone_code','$CLphone_number','$insertVLuser','N','$CLstage','$end_epoch','$CLalt_dial')";
|
||||
@@ -1654,9 +1655,9 @@ while($one_day_interval > 0)
|
||||
&jam_event_logger;
|
||||
|
||||
$CLstage =~ s/LIVE|-//gi;
|
||||
if ($CLstage < 0.25) {$CLstage=1;}
|
||||
if ($CLstage < 0.25) {$CLstage=0;}
|
||||
|
||||
$end_epoch = ($now_date_epoch + 1);
|
||||
$end_epoch = $now_date_epoch;
|
||||
$stmtA = "INSERT INTO vicidial_log (uniqueid,lead_id,campaign_id,call_date,start_epoch,status,phone_code,phone_number,user,processed,length_in_sec,end_epoch,alt_dial) values('$CLuniqueid','$CLlead_id','$CLcampaign_id','$SQLdate','$now_date_epoch','DROP','$CLphone_code','$CLphone_number','VDAD','N','$CLstage','$end_epoch','$CLalt_dial')";
|
||||
if($M){print STDERR "\n|$stmtA|\n";}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
# 90608-0316 - Changed hangup code dispos B and DC to AB and ADC to separate Agent dispos from Auto
|
||||
# 90630-2253 - Added Sangoma CDP pre-Answer call processing
|
||||
# 90814-0810 - Added extra logging for vicidial_log in some cases
|
||||
# 90815-0750 - Fixed extra vicidial_log logging
|
||||
#
|
||||
|
||||
|
||||
@@ -615,6 +616,7 @@ sub process_request
|
||||
$VDADcampaign='';
|
||||
$VDADphone='';
|
||||
$VDADphone_code='';
|
||||
$VDL_status='';
|
||||
|
||||
if ($DEBUG =~ /^DEBUG$/)
|
||||
{
|
||||
@@ -872,20 +874,21 @@ sub process_request
|
||||
}
|
||||
if (!$epc_countCUSTDATA)
|
||||
{
|
||||
if ($AGILOG) {$agi_string = "no VDL or VDCL record found: $uniqueid $calleridname $VD_lead_id $uniqueid $VD_uniqueid"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "no VDL or VDCL record found: $uniqueid $calleridname $VD_lead_id $uniqueid $VD_uniqueid |$VACaffected_rows|$VD_callerid|"; &agi_output;}
|
||||
|
||||
$VD_status = 'NA';
|
||||
# uncomment for some special circumstances
|
||||
# $VD_status = 'NA';
|
||||
# if (length($VDL_status) > 0)
|
||||
# {$VD_status = $VDL_status;}
|
||||
|
||||
if ( ($VACaffected_rows > 0) && ($VD_callerid =~ /^V/) )
|
||||
{
|
||||
$stmtA = "INSERT INTO vicidial_log SET uniqueid='$VD_uniqueid',lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',call_date='$VD_call_time',start_epoch='$VD_start_epoch',status='$VD_status',phone_code='$VD_phone_code',phone_number='$VD_phone_number',user='VDAD',processed='N',length_in_sec='0',end_epoch,alt_dial='$VD_alt_dial';";
|
||||
if($M){print STDERR "\n|$stmtA|\n";}
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
$sthA->finish();
|
||||
# if ( ($VACaffected_rows > 0) && ($VD_callerid =~ /^V/) )
|
||||
# {
|
||||
# $stmtA = "INSERT INTO vicidial_log SET uniqueid='$uniqueid',lead_id='$VD_lead_id',campaign_id='$VD_campaign_id',call_date='$VD_call_time',start_epoch='$VD_start_epoch',status='$VD_status',phone_code='$VD_phone_code',phone_number='$VD_phone_number',user='VDAD',processed='N',length_in_sec='0',end_epoch='$VD_start_epoch',alt_dial='$VD_alt_dial';";
|
||||
# $affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
$event_string = "| NO VDL add to vicidial_log $VD_uniqueid|$VD_lead_id|$VD_phone_number|$VD_status|$affected_rows|$VACaffected_rows";
|
||||
&event_logger;
|
||||
}
|
||||
# $agi_string = "| NO VDL add to vicidial_log $VD_uniqueid|$VD_lead_id|$VD_phone_number|$VD_status|$affected_rows|$VACaffected_rows|$affected_rows|$stmtA|";
|
||||
# &agi_output;
|
||||
# }
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2973,6 +2973,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
prefix_choice='';
|
||||
agent_dialed_number='';
|
||||
agent_dialed_type='';
|
||||
CalL_ScripT_id='';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4652,6 +4653,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
"&source_id=" + source_id + '' +
|
||||
"&rank=" + document.vicidial_form.rank.value + '' +
|
||||
"&owner=" + document.vicidial_form.owner.value + '' +
|
||||
"&camp_script=" + campaign_script + '' +
|
||||
"&in_script=" + CalL_ScripT_id + '' +
|
||||
webform_session;
|
||||
|
||||
var regWFspace = new RegExp(" ","ig");
|
||||
@@ -4734,6 +4737,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
prefix_choice='';
|
||||
agent_dialed_number='';
|
||||
agent_dialed_type='';
|
||||
CalL_ScripT_id='';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4859,6 +4863,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
prefix_choice='';
|
||||
agent_dialed_number='';
|
||||
agent_dialed_type='';
|
||||
CalL_ScripT_id='';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5025,6 +5030,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
prefix_choice='';
|
||||
agent_dialed_number='';
|
||||
agent_dialed_type='';
|
||||
CalL_ScripT_id='';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5606,6 +5612,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
"&source_id=" + source_id + '' +
|
||||
"&rank=" + document.vicidial_form.rank.value + '' +
|
||||
"&owner=" + document.vicidial_form.owner.value + '' +
|
||||
"&camp_script=" + campaign_script + '' +
|
||||
"&in_script=" + CalL_ScripT_id + '' +
|
||||
webform_session;
|
||||
|
||||
var regWFspace = new RegExp(" ","ig");
|
||||
@@ -5754,6 +5762,8 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";}
|
||||
"&source_id=" + source_id + '' +
|
||||
"&rank=" + document.vicidial_form.rank.value + '' +
|
||||
"&owner=" + document.vicidial_form.owner.value + '' +
|
||||
"&camp_script=" + campaign_script + '' +
|
||||
"&in_script=" + CalL_ScripT_id + '' +
|
||||
webform_session;
|
||||
|
||||
var regWFspace = new RegExp(" ","ig");
|
||||
@@ -7182,6 +7192,8 @@ encoded=utf8_decode(xtest);
|
||||
var SCdialed_label = dialed_label;
|
||||
var SCrank = document.vicidial_form.rank.value;
|
||||
var SCowner = document.vicidial_form.owner.value;
|
||||
var SCcamp_script = campaign_script;
|
||||
var SCin_script = CalL_ScripT_id;
|
||||
var SCweb_vars = LIVE_web_vars;
|
||||
|
||||
if (encoded.match(RGiframe))
|
||||
@@ -7229,6 +7241,8 @@ encoded=utf8_decode(xtest);
|
||||
SCdialed_label = SCdialed_label.replace(RGplus,'+');
|
||||
SCrank = SCrank.replace(RGplus,'+');
|
||||
SCowner = SCowner.replace(RGplus,'+');
|
||||
SCcamp_script = SCcamp_script.replace(RGplus,'+');
|
||||
SCin_script = SCin_script.replace(RGplus,'+');
|
||||
SCweb_vars = SCweb_vars.replace(RGplus,'+');
|
||||
}
|
||||
|
||||
@@ -7277,6 +7291,8 @@ encoded=utf8_decode(xtest);
|
||||
var RGdialed_label = new RegExp("--A--dialed_label--B--","g");
|
||||
var RGrank = new RegExp("--A--rank--B--","g");
|
||||
var RGowner = new RegExp("--A--owner--B--","g");
|
||||
var RGcamp_script = new RegExp("--A--camp_script--B--","g");
|
||||
var RGin_script = new RegExp("--A--in_script--B--","g");
|
||||
var RGweb_vars = new RegExp("--A--web_vars--B--","g");
|
||||
|
||||
encoded = encoded.replace(RGvendor_lead_code, SCvendor_lead_code);
|
||||
@@ -7324,6 +7340,8 @@ encoded=utf8_decode(xtest);
|
||||
encoded = encoded.replace(RGdialed_label, SCdialed_label);
|
||||
encoded = encoded.replace(RGrank, SCrank);
|
||||
encoded = encoded.replace(RGowner, SCowner);
|
||||
encoded = encoded.replace(RGcamp_script, SCcamp_script);
|
||||
encoded = encoded.replace(RGin_script, SCin_script);
|
||||
encoded = encoded.replace(RGweb_vars, SCweb_vars);
|
||||
}
|
||||
decoded=encoded; // simple no ?
|
||||
|
||||
@@ -5825,6 +5825,8 @@ if ($ADD==7111111)
|
||||
$RGdialed_label = 'ALT';
|
||||
$RGrank = '99';
|
||||
$RGowner = '6666';
|
||||
$RGcamp_script = 'TESTSCRIPT';
|
||||
$RGin_script = '';
|
||||
|
||||
echo "</title>\n";
|
||||
echo "</head>\n";
|
||||
@@ -5880,6 +5882,8 @@ if ($ADD==7111111)
|
||||
$RGdialed_label = eregi_replace(' ','+',$RGdialed_label);
|
||||
$RGrank = eregi_replace(' ','+',$RGrank);
|
||||
$RGowner = eregi_replace(' ','+',$RGowner);
|
||||
$RGcamp_script = eregi_replace(' ','+',$RGcamp_script);
|
||||
$RGin_script = eregi_replace(' ','+',$RGin_script);
|
||||
}
|
||||
|
||||
$script_text = eregi_replace('--A--vendor_lead_code--B--',"$vendor_lead_code",$script_text);
|
||||
@@ -5924,6 +5928,8 @@ if ($ADD==7111111)
|
||||
$script_text = eregi_replace('--A--dialed_label--B--',"$RGdialed_label",$script_text);
|
||||
$script_text = eregi_replace('--A--rank--B--',"$RGrank",$script_text);
|
||||
$script_text = eregi_replace('--A--owner--B--',"$RGowner",$script_text);
|
||||
$script_text = eregi_replace('--A--camp_script--B--',"$RGcamp_script",$script_text);
|
||||
$script_text = eregi_replace('--A--in_script--B--',"$RGin_script",$script_text);
|
||||
$script_text = eregi_replace("\n","<BR>",$script_text);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user