bug fixes

git-svn-id: svn://192.168.202.10@1290 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
mattf
2009-12-30 21:28:53 +00:00
parent 325d5bcce8
commit b72bdbdb0c
5 changed files with 70 additions and 10 deletions
+53 -7
View File
@@ -117,6 +117,7 @@
# 91213-0942 - Added queue_position to queue_log COMPLETE... records
# 91214-2034 - Fixes for rare in-group rank route bug
# 91223-0959 - Added VID(vendor_lead_code) options
# 91230-0911 - Reset to original callerID when sending the call to VMAIL/CALLMENU/PHONE/etc...
#
$script = 'agi-VDAD_ALL_inbound.agi';
@@ -295,11 +296,11 @@ if ( ($callerid =~ /\".*\"/) && ( (!$calleridname) or ($calleridname =~ /unknown
$calleridname =~ s/\"|\" //gi;
}
$callerid =~ s/\D//gi;
$calleridname =~ s/unknown//gi;
$callerid =~ s/\D//gi;
$calleridname =~ s/unknown//gi;
if ( (!$callerid) or ($callerid =~ /unknown/) )
{$callerid = $calleridname;}
$originalCID = $callerid;
$user_unavailable_action='';
##### special processing for DID forwarded calls "99909*1*"
@@ -365,8 +366,9 @@ if ($call_handle_method =~ /^CLOSER/)
$PADlead_id = sprintf("%09s", $parked_by); while (length($PADlead_id) > 9) {chop($PADlead_id);}
# JmmddhhmmssLLLLLLLLL
$JqueryCID = "J$CIDdate$PADlead_id";
$callerid = $JqueryCID;
$JqueryCID = "J$CIDdate$PADlead_id";
$callerid = $JqueryCID;
$VCcallerid = $JqueryCID;
### set the new call callerid to track the call
print "SET CALLERID $JqueryCID\n";
checkresult($result);
@@ -420,6 +422,9 @@ if ($AGILOG) {$agi_string = "+++++ INBOUND CALL VDCL STARTED : |$channel_group|$
$VDADphone='';
$VDADphone_code='';
$VCcallerid = $channel_group;
if (length($VCcallerid)<2)
{$VCcallerid = 'ViciDial Inbound';}
if ($channel =~ /Local/i)
{
@@ -801,6 +806,11 @@ if ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) )
}
if ($after_hours_action =~ /VOICEMAIL/)
{
$newcallerid = "\"$VCcallerid <$originalCID>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
$DROPexten = "$voicemail_dump_exten$after_hours_voicemail";
}
if ($after_hours_action =~ /IN_GROUP/)
@@ -961,6 +971,11 @@ if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
}
if ($no_agent_action =~ /DID/)
{
$newcallerid = "\"$VCcallerid <$originalCID>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
if (length($no_agent_action_value) < 1)
{$no_agent_action_value = '6666';}
$DROPexten = $no_agent_action_value;
@@ -968,11 +983,21 @@ if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
}
if ($no_agent_action =~ /CALLMENU/)
{
$newcallerid = "\"$VCcallerid <$originalCID>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
$DROPexten = 's';
$ext_context = $no_agent_action_value;
}
if ($no_agent_action =~ /VOICEMAIL/)
{
$newcallerid = "\"$VCcallerid <$originalCID>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
$DROPexten = "$voicemail_dump_exten$no_agent_action_value";
}
if ($no_agent_action =~ /INGROUP/)
@@ -1095,8 +1120,9 @@ if ($AGILOG) {$agi_string = "|$stmtA|$insert_lead_id|"; &agi_output;}
$PADlead_id = sprintf("%09s", $insert_lead_id); while (length($PADlead_id) > 9) {chop($PADlead_id);}
# YmmddhhmmssLLLLLLLLL
$YqueryCID = "Y$CIDdate$PADlead_id";
$callerid = $YqueryCID;
$YqueryCID = "Y$CIDdate$PADlead_id";
$callerid = $YqueryCID;
$VCcallerid = $YqueryCID;
### set the callerid
print "SET CALLERID $YqueryCID\n";
checkresult($result);
@@ -2576,6 +2602,11 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
if ($pin =~ /1/)
{
$newcallerid = "\"$VCcallerid <$originalCID>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
$DROPexten = "$voicemail_dump_exten$hold_time_option_voicemail";
$HT_status='QVMAIL';
@@ -2612,6 +2643,11 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
}
if ($hold_time_option =~ /VOICEMAIL/)
{
$newcallerid = "\"$VCcallerid <$originalCID>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
if (length($hold_time_option_voicemail)>0)
{$DROPexten = "$voicemail_dump_exten$hold_time_option_voicemail";}
}
@@ -2894,6 +2930,11 @@ if ($drop_timer > $DROP_TIME)
}
if ($drop_action =~ /VOICEMAIL/)
{
$newcallerid = "\"$VCcallerid <$originalCID>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
if (length($VDADvoicemail_ext)>0)
{$DROPexten = "$voicemail_dump_exten$VDADvoicemail_ext";}
}
@@ -2903,6 +2944,11 @@ if ($drop_timer > $DROP_TIME)
}
if ($drop_action =~ /PHONE/)
{
$newcallerid = "\"$VCcallerid <$originalCID>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
### Grab phone dialplan number value from the database
$stmtA = "SELECT dialplan_number FROM phones where server_ip='$did_phone_server_ip' and extension='$did_phone';";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
@@ -70,6 +70,7 @@
# 90827-1535 - Added proper logging of list_id in vicidial_log table
# 90924-1605 - Added drop_inbound_group_override list_id option
# 91112-1101 - Changed ENTERQUEUE to CALLOUTBOUND in QM logging for outbound calls
# 91230-1159 - Change to callee callerID when sending the call to VMAIL
#
$script = 'agi-VDAD_ALL_outbound.agi';
@@ -1088,6 +1089,11 @@ if ($call_handle_method =~ /SURVEY/)
$DROPexten='';
if ($survey_method =~ /VOICEMAIL/)
{
$newcallerid = "\"$callerid <$VDADphone>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
$survey_status='SVYVM';
if (length($VDADvoicemail_ext)>0)
{$DROPexten = "$voicemail_dump_exten$VDADvoicemail_ext";}
@@ -1819,6 +1825,11 @@ if ($drop_timer > $DROP_TIME)
}
if ($drop_action =~ /VOICEMAIL/)
{
$newcallerid = "\"$callerid <$VDADphone>\"";
$AGI->set_callerid($newcallerid);
print STDERR "Setting CID \"$newcallerid\"\n";
checkresult($result);
if ($AGILOG) {$agi_string = "callerID changed: $newcallerid"; &agi_output;}
if (length($VDADvoicemail_ext)>0)
{$DROPexten = "$voicemail_dump_exten$VDADvoicemail_ext";}
}
+1 -1
View File
@@ -206,7 +206,7 @@ if ($non_latin < 1)
$state = ereg_replace("[^ -\_0-9a-zA-Z]","",$state);
$title = ereg_replace("[^ -\_0-9a-zA-Z]","",$title);
$vendor_lead_code = ereg_replace("[^ -\.\_0-9a-zA-Z]","",$vendor_lead_code);
$rank = ereg_replace("[^ -0-9]","",$rank);
$rank = ereg_replace("[^-0-9]","",$rank);
$owner = ereg_replace("[^-\.\:\/\@\_0-9a-zA-Z]","",$owner);
}
else
+1 -1
View File
@@ -4338,7 +4338,7 @@ if ($ACTION == 'updateDISPO')
else
{
### reset the API fields in vicidial_live_agents record
$stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='',external_update_fields='0',external_update_fields_data='',external_launch_action_timer='-1',last_state_change='$NOW_TIME' where user='$user' and server_ip='$server_ip';";
$stmt = "UPDATE vicidial_live_agents set lead_id=0,external_hangup=0,external_status='',external_update_fields='0',external_update_fields_data='',external_timer_action_seconds='-1',last_state_change='$NOW_TIME' where user='$user' and server_ip='$server_ip';";
if ($DB) {echo "$stmt\n";}
$rslt=mysql_query($stmt, $link);
if ($mel > 0) {$errno = mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00141',$user,$server_ip,$session_name,$one_mysql_log);}
+4 -1
View File
@@ -9569,7 +9569,10 @@ else
LIVE_default_xfer_group = default_xfer_group;
LIVE_campaign_recording = campaign_recording;
LIVE_campaign_rec_filename = campaign_rec_filename;
document.getElementById("DispoSelectPhonE").innerHTML = document.vicidial_form.phone_number.value;
if (disable_alter_custphone!='HIDE')
{document.getElementById("DispoSelectPhonE").innerHTML = document.vicidial_form.phone_number.value;}
else
{document.getElementById("DispoSelectPhonE").innerHTML = '';}
if (auto_dial_level == 0)
{
if (document.vicidial_form.DiaLAltPhonE.checked==true)