Added ability to define a callerid to use for action transfers from in-groups(Drop, After-Hours, No-Agent-No-Queue) when transferring out to voicemail, extension, callmenu, etc... You can also select that the customer phone number is used.
Added ability to drop or after-hours to a call menu in in-groups. git-svn-id: svn://192.168.202.10@1726 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -712,6 +712,13 @@ OTHER CHANGES:
|
||||
163. Added 9 new User permissions to allow access to specific Admin sections
|
||||
like Vociemail Music-on-hold and 7 others individually.
|
||||
|
||||
164. Added ability to define a callerid to use for action transfers from
|
||||
in-groups(Drop, After-Hours, No-Agent-No-Queue) when transferring out
|
||||
to voicemail, extension, callmenu, etc... You can also select that the
|
||||
customer phone number is used.
|
||||
|
||||
165. Added ability to drop or after-hours to a call menu in in-groups.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+113
-106
@@ -158,6 +158,7 @@
|
||||
# 110822-1256 - Added optional did_agent_log logging
|
||||
# 110920-1426 - Small fix for rare remote agent recording issue
|
||||
# 110922-2149 - Added compatibility with DID remote agent extension overrides
|
||||
# 110923-1133 - Added drop and after-hours to callmenu, and added action transfer cid setting
|
||||
#
|
||||
|
||||
$script = 'agi-VDAD_ALL_inbound.agi';
|
||||
@@ -169,7 +170,7 @@ $wait_prompt_runs=0;
|
||||
$at='@';
|
||||
$S='*';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=179;
|
||||
$mysql_log_count=186;
|
||||
$one_mysql_log=0;
|
||||
|
||||
|
||||
@@ -474,6 +475,7 @@ if ($call_handle_method =~ /^CLOSER/)
|
||||
}
|
||||
$CIDlead_id = $parked_by;
|
||||
$fronter_call_seconds = $EXT_vars[8]; # not currently used
|
||||
$originalCID = $phone_number;
|
||||
|
||||
$PADlead_id = sprintf("%010s", $parked_by); while (length($PADlead_id) > 10) {chop($PADlead_id);}
|
||||
# JmmddhhmmssLLLLLLLLL
|
||||
@@ -492,7 +494,28 @@ if ($call_handle_method =~ /^CLOSER/)
|
||||
$CIDlead_id = ($CIDlead_id + 0);
|
||||
$VCcallerid = $callerid;
|
||||
$insert_lead_id = $CIDlead_id;
|
||||
if ($AGILOG) {$agi_string = "Lead ID found: $insert_lead_id"; &agi_output;}
|
||||
|
||||
$stmtA= "SELECT phone_number from vicidial_list where lead_id='$insert_lead_id';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02180'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$phone_number = $aryA[0];
|
||||
$originalCID = $phone_number;
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
### set the call callerid to track the call
|
||||
# YmmddhhmmssLLLLLLLLL
|
||||
# $PADlead_id = sprintf("%010s", $insert_lead_id); while (length($PADlead_id) > 10) {chop($PADlead_id);}
|
||||
# $YqueryCID = "Y$CIDdate$PADlead_id";
|
||||
$Jnewcallerid = "\"$callerid <$phone_number>\"";
|
||||
$AGI->set_callerid($Jnewcallerid);
|
||||
|
||||
if ($AGILOG) {$agi_string = "Lead ID found: $insert_lead_id|$phone_number| |$Jnewcallerid|"; &agi_output;}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -618,7 +641,7 @@ $affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
### Grab inbound groups values from the database
|
||||
$cbc=0;
|
||||
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,ingroup_recording_override,ingroup_rec_filename,on_hook_cid FROM vicidial_inbound_groups where group_id = '$channel_group';";
|
||||
$stmtA = "SELECT call_time_id,after_hours_action,after_hours_message_filename,after_hours_exten,after_hours_voicemail,welcome_message_filename,moh_context,onhold_prompt_filename,prompt_interval,agent_alert_exten,agent_alert_delay,drop_call_seconds,drop_action,drop_exten,next_agent_call,voicemail_ext,queue_priority,drop_inbound_group,afterhours_xfer_group,play_place_in_line,play_estimate_hold_time,hold_time_option,hold_time_option_seconds,hold_time_option_exten,hold_time_option_voicemail,hold_time_option_xfer_group,hold_time_option_callback_filename,hold_time_option_callback_list_id,hold_recall_xfer_group,no_delay_call_route,play_welcome_message,no_agent_no_queue,no_agent_action,no_agent_action_value,extension_appended_cidname,uniqueid_status_display,uniqueid_status_prefix,hold_time_option_minimum,hold_time_option_press_filename,hold_time_option_callmenu,onhold_prompt_no_block,onhold_prompt_seconds,hold_time_option_no_block,hold_time_option_prompt_seconds,hold_time_second_option,hold_time_third_option,wait_hold_option_priority,wait_time_option,wait_time_second_option,wait_time_third_option,wait_time_option_seconds,wait_time_option_exten,wait_time_option_voicemail,wait_time_option_xfer_group,wait_time_option_callmenu,wait_time_option_callback_filename,wait_time_option_callback_list_id,wait_time_option_press_filename,wait_time_option_no_block,wait_time_option_prompt_seconds,active,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,ingroup_recording_override,ingroup_rec_filename,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu FROM vicidial_inbound_groups where group_id = '$channel_group';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
@@ -703,6 +726,10 @@ if ($sthArows > 0)
|
||||
$ingroup_recording_override = $aryA[67];
|
||||
$campaign_rec_filename = $aryA[68];
|
||||
$on_hook_cid = $aryA[69];
|
||||
$action_xfer_cid = $aryA[70];
|
||||
$drop_callmenu = $aryA[71];
|
||||
$after_hours_callmenu = $aryA[72];
|
||||
|
||||
$custom_call_id='';
|
||||
if ($uniqueid_status_display =~ /ENABLED/)
|
||||
{$custom_call_id = "$uniqueid";}
|
||||
@@ -1002,6 +1029,41 @@ else
|
||||
}
|
||||
|
||||
|
||||
### BEGIN Check for Action transfer cid setting ###
|
||||
$transfer_cid = $originalCID;
|
||||
if (length($action_xfer_cid) > 4)
|
||||
{
|
||||
if ($action_xfer_cid =~ /CAMPAIGN/)
|
||||
{
|
||||
$CIDcampaign_cid='0000000000';
|
||||
### Grab ID values from the database
|
||||
$stmtA = "SELECT campaign_id,campaign_cid FROM vicidial_campaigns where closer_campaigns LIKE \"% $channel_group %\" and active='Y';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02113'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$CIDcampaign_id = $aryA[0];
|
||||
$CIDcampaign_cid = $aryA[1];
|
||||
$transfer_cid = $CIDcampaign_cid;
|
||||
if ($AGILOG) {$agi_string = "-- CAMPAIGN CID Chosen for Transfer CID: |$CIDcampaign_cid|$CIDcampaign_id|"; &agi_output;}
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
elsif ($action_xfer_cid =~ /CUSTOMER/)
|
||||
{
|
||||
$transfer_cid = $originalCID;
|
||||
}
|
||||
else
|
||||
{
|
||||
$transfer_cid = $action_xfer_cid;
|
||||
}
|
||||
}
|
||||
### END Check for Action transfer cid setting ###
|
||||
|
||||
|
||||
|
||||
##### BEGIN AFTER HOURS CHECK #####
|
||||
$ct_stop_overflow=0; # allow for overflow time, past midnight
|
||||
@@ -1048,25 +1110,20 @@ if ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $ct_st
|
||||
if ($AGILOG) {$agi_string = "-- AH VDCL vac record deleted: |$affected_rows| $VDADcampaign|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- AH action: |$after_hours_action|$after_hours_exten|$after_hours_message_filename|$after_hours_voicemail|"; &agi_output;}
|
||||
|
||||
if ($after_hours_action =~ /EXTENSION|VOICEMAIL|IN_GROUP/)
|
||||
if ($after_hours_action =~ /EXTENSION|VOICEMAIL|IN_GROUP|CALLMENU/)
|
||||
{
|
||||
if ($after_hours_action =~ /CALLMENU/)
|
||||
{
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$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 = $after_hours_callmenu;
|
||||
}
|
||||
if ($after_hours_action =~ /EXTENSION/)
|
||||
{
|
||||
$CIDcampaign_cid='0000000000';
|
||||
### Grab ID values from the database
|
||||
$stmtA = "SELECT campaign_id,campaign_cid FROM vicidial_campaigns where closer_campaigns LIKE \"% $channel_group %\" and active='Y';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02113'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$CIDcampaign_id = $aryA[0];
|
||||
$CIDcampaign_cid = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if ( ($channel_group =~ /AGENTDIRECT/) && (length($agent_only) > 1) && ($after_hours_exten =~ /AGENTEXT/) )
|
||||
{
|
||||
### Grab user's custom_five field from the database
|
||||
@@ -1084,11 +1141,11 @@ if ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $ct_st
|
||||
}
|
||||
$DROPexten = "$after_hours_exten";
|
||||
|
||||
$newcallerid = "\"$callerid <$CIDcampaign_cid>\"";
|
||||
$newcallerid = "\"$callerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$CIDcampaign_cid\> from $CIDcampaign_id"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$transfer_cid\>"; &agi_output;}
|
||||
}
|
||||
if ($after_hours_action =~ /VOICEMAIL/)
|
||||
{
|
||||
@@ -1107,7 +1164,7 @@ if ( ( ($hm < $ct_default_start) || ($hm > $ct_default_stop) ) && ($hm >= $ct_st
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
$newcallerid = "\"$VCcallerid <$originalCID>\"";
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
@@ -1280,30 +1337,15 @@ if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
$CIDcampaign_cid='0000000000';
|
||||
### Grab ID values from the database
|
||||
$stmtA = "SELECT campaign_id,campaign_cid FROM vicidial_campaigns where closer_campaigns LIKE \"% $channel_group %\" and active='Y';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02114'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$CIDcampaign_id = $aryA[0];
|
||||
$CIDcampaign_cid = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$newcallerid = "\"$callerid <$CIDcampaign_cid>\"";
|
||||
$newcallerid = "\"$callerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$CIDcampaign_cid\> from $CIDcampaign_id"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$transfer_cid\> from $CIDcampaign_id"; &agi_output;}
|
||||
}
|
||||
if ($no_agent_action =~ /DID/)
|
||||
{
|
||||
$newcallerid = "\"$VCcallerid <$originalCID>\"";
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
@@ -1315,7 +1357,7 @@ if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
|
||||
}
|
||||
if ($no_agent_action =~ /CALLMENU/)
|
||||
{
|
||||
$newcallerid = "\"$VCcallerid <$originalCID>\"";
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
@@ -1340,7 +1382,7 @@ if ($no_agent_no_queue =~ /Y|NO_PAUSED/)
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
$newcallerid = "\"$VCcallerid <$originalCID>\"";
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
@@ -2211,7 +2253,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
$dbhP=$dbhA; $mysql_count='02181'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
@@ -2223,7 +2265,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
$dbhP=$dbhA; $mysql_count='02182'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
@@ -2233,7 +2275,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
|
||||
$stmtA = "UPDATE vicidial_did_ra_extensions set call_count_today=(call_count_today + 1) where extension='$DRAE_extension' and did_id='$DRAE_did_id' and user_start IN('$ARra_user[$ragp]','---ALL---') limit 1;";
|
||||
$DRAEaffected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$DRAEaffected_rows; &mysql_error_logging;
|
||||
$dbhP=$dbhA; $mysql_count='02183'; $MEL_aff_rows=$DRAEaffected_rows; &mysql_error_logging;
|
||||
|
||||
$ARconf_exten[$ragp] = $DRAE_extension;
|
||||
$ARdialplan_number[$ragp] = $DRAE_extension;
|
||||
@@ -2604,7 +2646,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
$dbhP=$dbhA; $mysql_count='02184'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
@@ -2616,7 +2658,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
$dbhP=$dbhA; $mysql_count='02185'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
@@ -2626,7 +2668,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
|
||||
$stmtA = "UPDATE vicidial_did_ra_extensions set call_count_today=(call_count_today + 1) where extension='$DRAE_extension' and did_id='$DRAE_did_id' and user_start IN('$ra_user','---ALL---') limit 1;";
|
||||
$DRAEaffected_rows = $dbhA->do($stmtA);
|
||||
$dbhP=$dbhA; $mysql_count='02XXX'; $MEL_aff_rows=$DRAEaffected_rows; &mysql_error_logging;
|
||||
$dbhP=$dbhA; $mysql_count='02186'; $MEL_aff_rows=$DRAEaffected_rows; &mysql_error_logging;
|
||||
|
||||
$VDADconf_exten = $DRAE_extension;
|
||||
}
|
||||
@@ -3483,26 +3525,11 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
$CIDcampaign_cid='0000000000';
|
||||
### Grab ID values from the database
|
||||
$stmtA = "SELECT campaign_id,campaign_cid FROM vicidial_campaigns where closer_campaigns LIKE \"% $channel_group %\" and active='Y';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02119'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$CIDcampaign_id = $aryA[0];
|
||||
$CIDcampaign_cid = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$newcallerid = "\"$callerid <$CIDcampaign_cid>\"";
|
||||
$newcallerid = "\"$callerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$CIDcampaign_cid\> from $CIDcampaign_id"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$transfer_cid\>"; &agi_output;}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3523,7 +3550,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
$newcallerid = "\"$VCcallerid <$originalCID>\"";
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
@@ -3533,7 +3560,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
}
|
||||
if ($wait_time_option =~ /CALL_MENU/)
|
||||
{
|
||||
$newcallerid = "\"$VCcallerid <$originalCID>\"";
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
@@ -3906,26 +3933,11 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
$sthA->finish();
|
||||
}
|
||||
|
||||
$CIDcampaign_cid='0000000000';
|
||||
### Grab ID values from the database
|
||||
$stmtA = "SELECT campaign_id,campaign_cid FROM vicidial_campaigns where closer_campaigns LIKE \"% $channel_group %\" and active='Y';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02119'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$CIDcampaign_id = $aryA[0];
|
||||
$CIDcampaign_cid = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$newcallerid = "\"$callerid <$CIDcampaign_cid>\"";
|
||||
$newcallerid = "\"$callerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$CIDcampaign_cid\> from $CIDcampaign_id"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$transfer_cid\>"; &agi_output;}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3946,7 +3958,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
}
|
||||
$sthA->finish();
|
||||
}
|
||||
$newcallerid = "\"$VCcallerid <$originalCID>\"";
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
@@ -3956,7 +3968,7 @@ while ( ($drop_timer <= $DROP_TIME) && ($wait_in_queue > 0) )
|
||||
}
|
||||
if ($hold_time_option =~ /CALL_MENU/)
|
||||
{
|
||||
$newcallerid = "\"$VCcallerid <$originalCID>\"";
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
@@ -4318,33 +4330,18 @@ if ($drop_timer > $DROP_TIME)
|
||||
}
|
||||
else
|
||||
{
|
||||
$CIDcampaign_cid='0000000000';
|
||||
### Grab ID values from the database
|
||||
$stmtA = "SELECT campaign_id,campaign_cid FROM vicidial_campaigns where closer_campaigns LIKE \"% $channel_group %\" and active='Y';";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
$dbhP=$dbhA; $mysql_count='02118'; $MEL_aff_rows=$sthArows; &mysql_error_logging;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$CIDcampaign_id = $aryA[0];
|
||||
$CIDcampaign_cid = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$newcallerid = "\"$callerid <$CIDcampaign_cid>\"";
|
||||
$newcallerid = "\"$callerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$CIDcampaign_cid\> from $CIDcampaign_id"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "callerID changed: \"$callerid\" \<$transfer_cid\>"; &agi_output;}
|
||||
}
|
||||
if (length($drop_exten)>0)
|
||||
{$DROPexten = "$drop_exten";}
|
||||
}
|
||||
if ($drop_action =~ /VOICEMAIL/)
|
||||
{
|
||||
$newcallerid = "\"$VCcallerid <$originalCID>\"";
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
@@ -4352,13 +4349,23 @@ if ($drop_timer > $DROP_TIME)
|
||||
if (length($VDADvoicemail_ext)>0)
|
||||
{$DROPexten = "$voicemail_dump_exten$VDADvoicemail_ext";}
|
||||
}
|
||||
if ($drop_action =~ /CALLMENU/)
|
||||
{
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$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 = $drop_callmenu;
|
||||
}
|
||||
if ($drop_action =~ /IN_GROUP/)
|
||||
{ # 90009*CL_uk3survy_*8301*10000123*universal*7275551212*1234*"
|
||||
$DROPexten = "90009*$drop_inbound_group$S$S$insert_lead_id$S$S$phone_number$S$fronter$S";
|
||||
}
|
||||
if ($drop_action =~ /PHONE/)
|
||||
{
|
||||
$newcallerid = "\"$VCcallerid <$originalCID>\"";
|
||||
$newcallerid = "\"$VCcallerid <$transfer_cid>\"";
|
||||
$AGI->set_callerid($newcallerid);
|
||||
print STDERR "Setting CID \"$newcallerid\"\n";
|
||||
checkresult($result);
|
||||
@@ -4388,7 +4395,7 @@ if ($drop_timer > $DROP_TIME)
|
||||
$DROPexten = "$DIDphoneDIALstr$did_phone_dialplan_number";
|
||||
}
|
||||
|
||||
if ($AGILOG) {$agi_string = "-- VDCL DROP: |$drop_action|$DROPexten|"; &agi_output;}
|
||||
if ($AGILOG) {$agi_string = "-- VDCL DROP: |$drop_action|$DROPexten|$ext_context|"; &agi_output;}
|
||||
|
||||
$stmtA = "DELETE FROM vicidial_auto_calls where callerid='$callerid' and server_ip='$VARserver_ip' order by call_time desc limit 1;";
|
||||
$affected_rows = $dbhA->do($stmtA);
|
||||
|
||||
@@ -935,10 +935,10 @@ xferconf_a_number VARCHAR(50),
|
||||
xferconf_b_dtmf VARCHAR(50),
|
||||
xferconf_b_number VARCHAR(50),
|
||||
drop_call_seconds SMALLINT(4) unsigned default '360',
|
||||
drop_action ENUM('HANGUP','MESSAGE','VOICEMAIL','IN_GROUP') default 'MESSAGE',
|
||||
drop_action ENUM('HANGUP','MESSAGE','VOICEMAIL','IN_GROUP','CALLMENU') default 'MESSAGE',
|
||||
drop_exten VARCHAR(20) default '8307',
|
||||
call_time_id VARCHAR(20) default '24hours',
|
||||
after_hours_action ENUM('HANGUP','MESSAGE','EXTENSION','VOICEMAIL','IN_GROUP') default 'MESSAGE',
|
||||
after_hours_action ENUM('HANGUP','MESSAGE','EXTENSION','VOICEMAIL','IN_GROUP','CALLMENU') default 'MESSAGE',
|
||||
after_hours_message_filename VARCHAR(255) default 'vm-goodbye',
|
||||
after_hours_exten VARCHAR(20) default '8300',
|
||||
after_hours_voicemail VARCHAR(20),
|
||||
@@ -1024,7 +1024,10 @@ eht_minimum_prompt_seconds SMALLINT(5) default '10',
|
||||
on_hook_ring_time SMALLINT(5) default '15',
|
||||
na_call_url TEXT,
|
||||
on_hook_cid VARCHAR(30) default 'GENERIC',
|
||||
group_calldate DATETIME
|
||||
group_calldate DATETIME,
|
||||
action_xfer_cid VARCHAR(18) default 'CUSTOMER',
|
||||
drop_callmenu VARCHAR(50) default '',
|
||||
after_hours_callmenu VARCHAR(50) default ''
|
||||
);
|
||||
|
||||
CREATE TABLE vicidial_stations (
|
||||
@@ -2664,7 +2667,7 @@ CREATE TABLE vicidial_log_noanswer_archive LIKE vicidial_log_noanswer;
|
||||
CREATE TABLE vicidial_did_agent_log_archive LIKE vicidial_did_agent_log;
|
||||
CREATE UNIQUE INDEX vdala on vicidial_did_agent_log_archive (uniqueid,call_date,did_route);
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1297',db_schema_update_date=NOW();
|
||||
UPDATE system_settings SET db_schema_version='1298',db_schema_update_date=NOW();
|
||||
|
||||
GRANT RELOAD ON *.* TO cron@'%';
|
||||
GRANT RELOAD ON *.* TO cron@localhost;
|
||||
|
||||
@@ -1059,3 +1059,11 @@ ALTER TABLE vicidial_users ADD modify_moh ENUM('1','0') default '0';
|
||||
ALTER TABLE vicidial_users ADD modify_tts ENUM('1','0') default '0';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1297',db_schema_update_date=NOW() where db_schema_version < 1297;
|
||||
|
||||
ALTER TABLE vicidial_inbound_groups MODIFY drop_action ENUM('HANGUP','MESSAGE','VOICEMAIL','IN_GROUP','CALLMENU') default 'MESSAGE';
|
||||
ALTER TABLE vicidial_inbound_groups MODIFY after_hours_action ENUM('HANGUP','MESSAGE','EXTENSION','VOICEMAIL','IN_GROUP','CALLMENU') default 'MESSAGE';
|
||||
ALTER TABLE vicidial_inbound_groups ADD action_xfer_cid VARCHAR(18) default 'CUSTOMER';
|
||||
ALTER TABLE vicidial_inbound_groups ADD drop_callmenu VARCHAR(50) default '';
|
||||
ALTER TABLE vicidial_inbound_groups ADD after_hours_callmenu VARCHAR(50) default '';
|
||||
|
||||
UPDATE system_settings SET db_schema_version='1298',db_schema_update_date=NOW() where db_schema_version < 1298;
|
||||
|
||||
@@ -738,6 +738,15 @@ REMOTE AGENT EXTENSION OVERRIDES FOR THIS DID||
|
||||
REMOTE AGENT EXTENSION OVERRIDE LISTINGS||
|
||||
DID Remote Agent Extension Overrides||
|
||||
This section allows you to enable DIDs to have extension overrides for remote agent routed calls through in-groups. The User Start must be a valid Remote Agent User Start or if you want the Extension Override entry to work for all calls then you can use ---ALL--- in the User Start field. If there are multiple entries for the same DID and User Start then the active entries will be used in a round robin method||
|
||||
SEE DID REMOTE AGENT EXTENSION OVERRIDES FOR THIS DID||
|
||||
THERE ARE||
|
||||
DID REMOTE AGENT EXTENSION OVERRIDES FOR THIS REMOTE AGENT||
|
||||
Action Transfer CID||
|
||||
Used for Drop, After-hours and No-agent-no-queue actions. This is the caller ID number that the call uses before it is transferred to extensions, messages, voicemail or call menus. You can use CUSTOMER in this field to use the customer phone number, or CAMPAIGN to use the first allowed campaign caller id number. Default is CUSTOMER||
|
||||
After Hours Call Menu||
|
||||
If After Hours Action is set to CALLMENU, the call will be sent to this Call Menu if it enters the in-group outside of the call time scheme defined for the in-group||
|
||||
Drop Call Menu||
|
||||
If Drop Action is set to CALLMENU, the call will be sent to this call menu if it reaches Drop Call Seconds||
|
||||
|
||||
|
||||
lead_report_export.php
|
||||
|
||||
+62
-12
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user