From 0b74db5c4965da547cd0bc89056a9097dcc9f690 Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 23 Sep 2011 15:37:49 +0000 Subject: [PATCH] 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 --- UPGRADE | 7 + agi/agi-VDAD_ALL_inbound.agi | 219 +++++++++--------- extras/MySQL_AST_CREATE_tables.sql | 11 +- extras/upgrade_2.4.sql | 8 + .../TO_BE_TRANSLATED_2.4.txt | 9 + www/vicidial/admin.php | 74 +++++- 6 files changed, 206 insertions(+), 122 deletions(-) diff --git a/UPGRADE b/UPGRADE index b2093bb1..82e665b1 100644 --- a/UPGRADE +++ b/UPGRADE @@ -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. + diff --git a/agi/agi-VDAD_ALL_inbound.agi b/agi/agi-VDAD_ALL_inbound.agi index 9fac8103..820e2ce0 100644 --- a/agi/agi-VDAD_ALL_inbound.agi +++ b/agi/agi-VDAD_ALL_inbound.agi @@ -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); diff --git a/extras/MySQL_AST_CREATE_tables.sql b/extras/MySQL_AST_CREATE_tables.sql index fe903f32..11244554 100644 --- a/extras/MySQL_AST_CREATE_tables.sql +++ b/extras/MySQL_AST_CREATE_tables.sql @@ -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; diff --git a/extras/upgrade_2.4.sql b/extras/upgrade_2.4.sql index cb11fb90..e9cdf121 100644 --- a/extras/upgrade_2.4.sql +++ b/extras/upgrade_2.4.sql @@ -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; diff --git a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt index 9a950a4a..99f01133 100644 --- a/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt +++ b/translations/raw_translation_files/TO_BE_TRANSLATED_2.4.txt @@ -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 diff --git a/www/vicidial/admin.php b/www/vicidial/admin.php index 4691bcc7..a84e5aa9 100644 --- a/www/vicidial/admin.php +++ b/www/vicidial/admin.php @@ -1647,6 +1647,12 @@ if (isset($_GET["modify_moh"])) {$modify_moh=$_GET["modify_moh"];} elseif (isset($_POST["modify_moh"])) {$modify_moh=$_POST["modify_moh"];} if (isset($_GET["modify_tts"])) {$modify_tts=$_GET["modify_tts"];} elseif (isset($_POST["modify_tts"])) {$modify_tts=$_POST["modify_tts"];} +if (isset($_GET["action_xfer_cid"])) {$action_xfer_cid=$_GET["action_xfer_cid"];} + elseif (isset($_POST["action_xfer_cid"])) {$action_xfer_cid=$_POST["action_xfer_cid"];} +if (isset($_GET["drop_callmenu"])) {$drop_callmenu=$_GET["drop_callmenu"];} + elseif (isset($_POST["drop_callmenu"])) {$drop_callmenu=$_POST["drop_callmenu"];} +if (isset($_GET["after_hours_callmenu"])) {$after_hours_callmenu=$_GET["after_hours_callmenu"];} + elseif (isset($_POST["after_hours_callmenu"])) {$after_hours_callmenu=$_POST["after_hours_callmenu"];} if (isset($script_id)) {$script_id= strtoupper($script_id);} @@ -2070,6 +2076,7 @@ if ($non_latin < 1) $auto_pause_precall_code = ereg_replace("[^0-9a-zA-Z]","",$auto_pause_precall_code); $disable_dispo_status = ereg_replace("[^0-9a-zA-Z]","",$disable_dispo_status); $use_custom_cid = ereg_replace("[^0-9a-zA-Z]","",$use_custom_cid); + $action_xfer_cid = ereg_replace("[^0-9a-zA-Z]","",$action_xfer_cid); ### DIGITS and Dots $server_ip = ereg_replace("[^\.0-9]","",$server_ip); @@ -2291,6 +2298,8 @@ if ($non_latin < 1) $on_hook_cid = ereg_replace("[^-_0-9a-zA-Z]","",$on_hook_cid); $pllb_grouping = ereg_replace("[^-_0-9a-zA-Z]","",$pllb_grouping); $user_start = ereg_replace("[^-_0-9a-zA-Z]","",$user_start); + $drop_callmenu = ereg_replace("[^-_0-9a-zA-Z]","",$drop_callmenu); + $after_hours_callmenu = ereg_replace("[^-_0-9a-zA-Z]","",$after_hours_callmenu); ### ALPHA-NUMERIC and underscore and dash and slash and dot $menu_prompt = ereg_replace("[^-\/\|\._0-9a-zA-Z]","",$menu_prompt); @@ -2894,12 +2903,13 @@ else # 110831-2038 - Added Campaign Areacode CID features # 110920-1344 - Added pllb_grouping_limit settings # 110922-1218 - Added new User admin permissions, Added DID Remote Agent extension override section +# 110923-0834 - Added option for in-group action transfer cid, and CALLMENU as drop and after-hours action options # # make sure you have added a user to the vicidial_users MySQL table with at least user_level 8 to access this page the first time -$admin_version = '2.4-336a'; -$build = '110922-1218'; +$admin_version = '2.4-337a'; +$build = '110923-0834'; $STARTtime = date("U"); $SQLdate = date("Y-m-d H:i:s"); @@ -5551,6 +5561,16 @@ if ($ADD==99999)
Drop Transfer Group - If Drop Action is set to IN_GROUP, the call will be sent to this inbound group if it reaches Drop Call Seconds. +
+ +
+ 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. + +
+
+
+ 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. +

@@ -5581,6 +5601,11 @@ if ($ADD==99999)
After Hours Transfer Group - If After Hours Action is set to IN_GROUP, the call will be sent to this inbound group if it enters the in-group outside of the call time scheme defined for the in-group. +
+
+
+ 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. +

@@ -11570,7 +11595,7 @@ if ($ADD==2011) } else { - $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid from vicidial_inbound_groups where group_id=\"$source_group_id\";"; + $stmt="INSERT INTO vicidial_inbound_groups (group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu) SELECT \"$group_id\",\"$group_name\",group_color,\"N\",web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename,eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,action_xfer_cid,drop_callmenu,after_hours_callmenu from vicidial_inbound_groups where group_id=\"$source_group_id\";"; $rslt=mysql_query($stmt, $link); $stmtA="INSERT INTO vicidial_campaign_stats (campaign_id) values('$group_id');"; @@ -15023,7 +15048,7 @@ if ($ADD==4111) echo "
GROUP MODIFIED: $group_id\n"; - $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',ignore_list_script_override='$ignore_list_script_override',extension_appended_cidname='$extension_appended_cidname',uniqueid_status_display='$uniqueid_status_display',uniqueid_status_prefix='$uniqueid_status_prefix',hold_time_option_minimum='$hold_time_option_minimum',hold_time_option_press_filename='$hold_time_option_press_filename',hold_time_option_callmenu='$hold_time_option_callmenu',onhold_prompt_no_block='$onhold_prompt_no_block',onhold_prompt_seconds='$onhold_prompt_seconds',hold_time_option_no_block='$hold_time_option_no_block',hold_time_option_prompt_seconds='$hold_time_option_prompt_seconds',hold_time_second_option='$hold_time_second_option',hold_time_third_option='$hold_time_third_option',wait_hold_option_priority='$wait_hold_option_priority',wait_time_option='$wait_time_option',wait_time_second_option='$wait_time_second_option',wait_time_third_option='$wait_time_third_option',wait_time_option_seconds='$wait_time_option_seconds',wait_time_option_exten='$wait_time_option_exten',wait_time_option_voicemail='$wait_time_option_voicemail',wait_time_option_xfer_group='$wait_time_option_xfer_group',wait_time_option_callmenu='$wait_time_option_callmenu',wait_time_option_callback_filename='$wait_time_option_callback_filename',wait_time_option_callback_list_id='$wait_time_option_callback_list_id',wait_time_option_press_filename='$wait_time_option_press_filename',wait_time_option_no_block='$wait_time_option_no_block',wait_time_option_prompt_seconds='$wait_time_option_prompt_seconds',timer_action_destination='$timer_action_destination',calculate_estimated_hold_seconds='$calculate_estimated_hold_seconds',add_lead_url='" . mysql_real_escape_string($add_lead_url) . "',eht_minimum_prompt_filename='$eht_minimum_prompt_filename',eht_minimum_prompt_no_block='$eht_minimum_prompt_no_block',eht_minimum_prompt_seconds='$eht_minimum_prompt_seconds',on_hook_ring_time='$on_hook_ring_time',na_call_url='" . mysql_real_escape_string($na_call_url) . "',on_hook_cid='$on_hook_cid' where group_id='$group_id';"; + $stmt="UPDATE vicidial_inbound_groups set group_name='$group_name', group_color='$group_color', active='$active', web_form_address='" . mysql_real_escape_string($web_form_address) . "', voicemail_ext='$voicemail_ext', next_agent_call='$next_agent_call', fronter_display='$fronter_display', ingroup_script='$script_id', get_call_launch='$get_call_launch', xferconf_a_dtmf='$xferconf_a_dtmf',xferconf_a_number='$xferconf_a_number', xferconf_b_dtmf='$xferconf_b_dtmf',xferconf_b_number='$xferconf_b_number',drop_action='$drop_action',drop_call_seconds='$drop_call_seconds',drop_exten='$drop_exten',call_time_id='$call_time_id',after_hours_action='$after_hours_action',after_hours_message_filename='$after_hours_message_filename',after_hours_exten='$after_hours_exten',after_hours_voicemail='$after_hours_voicemail',welcome_message_filename='$welcome_message_filename',moh_context='$moh_context',onhold_prompt_filename='$onhold_prompt_filename',prompt_interval='$prompt_interval',agent_alert_exten='$agent_alert_exten',agent_alert_delay='$agent_alert_delay',default_xfer_group='$default_xfer_group',queue_priority='$queue_priority',drop_inbound_group='$drop_inbound_group',ingroup_recording_override='$ingroup_recording_override',ingroup_rec_filename='$ingroup_rec_filename',afterhours_xfer_group='$afterhours_xfer_group',qc_enabled='$qc_enabled',qc_statuses='$QC_statuses',qc_shift_id='$qc_shift_id',qc_get_record_launch='$qc_get_record_launch',qc_show_recording='$qc_show_recording',qc_web_form_address='$qc_web_form_address',qc_script='$qc_script',play_place_in_line='$play_place_in_line',play_estimate_hold_time='$play_estimate_hold_time',hold_time_option='$hold_time_option',hold_time_option_seconds='$hold_time_option_seconds',hold_time_option_exten='$hold_time_option_exten',hold_time_option_voicemail='$hold_time_option_voicemail',hold_time_option_xfer_group='$hold_time_option_xfer_group',hold_time_option_callback_filename='$hold_time_option_callback_filename',hold_time_option_callback_list_id='$hold_time_option_callback_list_id',hold_recall_xfer_group='$hold_recall_xfer_group',no_delay_call_route='$no_delay_call_route',play_welcome_message='$play_welcome_message',answer_sec_pct_rt_stat_one='$answer_sec_pct_rt_stat_one',answer_sec_pct_rt_stat_two='$answer_sec_pct_rt_stat_two',default_group_alias='$default_group_alias',no_agent_no_queue='$no_agent_no_queue',no_agent_action='$no_agent_action',no_agent_action_value='$no_agent_action_value',web_form_address_two='" . mysql_real_escape_string($web_form_address_two) . "',timer_action='$timer_action',timer_action_message='$timer_action_message',timer_action_seconds='$timer_action_seconds',start_call_url='" . mysql_real_escape_string($start_call_url) . "',dispo_call_url='" . mysql_real_escape_string($dispo_call_url) . "',xferconf_c_number='$xferconf_c_number',xferconf_d_number='$xferconf_d_number',xferconf_e_number='$xferconf_e_number',ignore_list_script_override='$ignore_list_script_override',extension_appended_cidname='$extension_appended_cidname',uniqueid_status_display='$uniqueid_status_display',uniqueid_status_prefix='$uniqueid_status_prefix',hold_time_option_minimum='$hold_time_option_minimum',hold_time_option_press_filename='$hold_time_option_press_filename',hold_time_option_callmenu='$hold_time_option_callmenu',onhold_prompt_no_block='$onhold_prompt_no_block',onhold_prompt_seconds='$onhold_prompt_seconds',hold_time_option_no_block='$hold_time_option_no_block',hold_time_option_prompt_seconds='$hold_time_option_prompt_seconds',hold_time_second_option='$hold_time_second_option',hold_time_third_option='$hold_time_third_option',wait_hold_option_priority='$wait_hold_option_priority',wait_time_option='$wait_time_option',wait_time_second_option='$wait_time_second_option',wait_time_third_option='$wait_time_third_option',wait_time_option_seconds='$wait_time_option_seconds',wait_time_option_exten='$wait_time_option_exten',wait_time_option_voicemail='$wait_time_option_voicemail',wait_time_option_xfer_group='$wait_time_option_xfer_group',wait_time_option_callmenu='$wait_time_option_callmenu',wait_time_option_callback_filename='$wait_time_option_callback_filename',wait_time_option_callback_list_id='$wait_time_option_callback_list_id',wait_time_option_press_filename='$wait_time_option_press_filename',wait_time_option_no_block='$wait_time_option_no_block',wait_time_option_prompt_seconds='$wait_time_option_prompt_seconds',timer_action_destination='$timer_action_destination',calculate_estimated_hold_seconds='$calculate_estimated_hold_seconds',add_lead_url='" . mysql_real_escape_string($add_lead_url) . "',eht_minimum_prompt_filename='$eht_minimum_prompt_filename',eht_minimum_prompt_no_block='$eht_minimum_prompt_no_block',eht_minimum_prompt_seconds='$eht_minimum_prompt_seconds',on_hook_ring_time='$on_hook_ring_time',na_call_url='" . mysql_real_escape_string($na_call_url) . "',on_hook_cid='$on_hook_cid',action_xfer_cid='$action_xfer_cid',drop_callmenu='$drop_callmenu',after_hours_callmenu='$after_hours_callmenu' where group_id='$group_id';"; $rslt=mysql_query($stmt, $link); ### LOG INSERTION Admin Log Table ### @@ -23635,7 +23660,7 @@ if ($ADD==3111) echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; - echo "\n"; + echo "\n"; + + echo "\n"; echo "\n"; @@ -23969,10 +24001,12 @@ if ($ADD==3111) echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; echo "\n"; - echo "\n"; @@ -25553,7 +25589,21 @@ if ($ADD==31111) echo "
\n"; echo ""; - $stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename, eht_minimum_prompt_no_block, eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,group_calldate from vicidial_inbound_groups where group_id='$group_id';"; + $stmt="SELECT group_id,group_name,group_color,active,web_form_address,voicemail_ext,next_agent_call,fronter_display,ingroup_script,get_call_launch,xferconf_a_dtmf,xferconf_a_number,xferconf_b_dtmf,xferconf_b_number,drop_call_seconds,drop_action,drop_exten,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,default_xfer_group,queue_priority,drop_inbound_group,ingroup_recording_override,ingroup_rec_filename,afterhours_xfer_group,qc_enabled,qc_statuses,qc_shift_id,qc_get_record_launch,qc_show_recording,qc_web_form_address,qc_script,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,answer_sec_pct_rt_stat_one,answer_sec_pct_rt_stat_two,default_group_alias,no_agent_no_queue,no_agent_action,no_agent_action_value,web_form_address_two,timer_action,timer_action_message,timer_action_seconds,start_call_url,dispo_call_url,xferconf_c_number,xferconf_d_number,xferconf_e_number,ignore_list_script_override,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,timer_action_destination,calculate_estimated_hold_seconds,add_lead_url,eht_minimum_prompt_filename, eht_minimum_prompt_no_block,eht_minimum_prompt_seconds,on_hook_ring_time,na_call_url,on_hook_cid,group_calldate,action_xfer_cid,drop_callmenu,after_hours_callmenu from vicidial_inbound_groups where group_id='$group_id';"; $rslt=mysql_query($stmt, $link); $row=mysql_fetch_row($rslt); @@ -23743,6 +23768,9 @@ if ($ADD==3111) $na_call_url = $row[102]; $on_hook_cid = $row[103]; $group_calldate = $row[104]; + $action_xfer_cid = $row[105]; + $drop_callmenu = $row[106]; + $after_hours_callmenu = $row[107]; ##### get callmenu listings for dynamic pulldown $stmt="SELECT menu_id,menu_name from vicidial_call_menu order by menu_id"; @@ -23946,22 +23974,26 @@ if ($ADD==3111) echo "
Drop Call Seconds: $NWB#vicidial_inbound_groups-drop_call_seconds$NWE
Drop Action: $NWB#vicidial_inbound_groups-drop_action$NWE
Drop Action: $NWB#vicidial_inbound_groups-drop_action$NWE
Drop Exten: $NWB#vicidial_inbound_groups-drop_exten$NWE
Voicemail: voicemail chooser$NWB#vicidial_inbound_groups-voicemail_ext$NWE
Drop Transfer Group:
Drop Transfer Group: $NWB#vicidial_inbound_groups-drop_inbound_group$NWE
Drop Call Menu:$NWB#vicidial_inbound_groups-drop_callmenu$NWE
Call Time: $NWB#vicidial_inbound_groups-call_time_id$NWE
After Hours Action: $NWB#vicidial_inbound_groups-after_hours_action$NWE
Action Transfer CID: $NWB#vicidial_inbound_groups-action_xfer_cid$NWE
After Hours Action: $NWB#vicidial_inbound_groups-after_hours_action$NWE
After Hours Message Filename: audio chooser $NWB#vicidial_inbound_groups-after_hours_message_filename$NWE
After Hours Voicemail: voicemail chooser$NWB#vicidial_inbound_groups-after_hours_voicemail$NWE
After Hours Transfer Group:
After Hours Transfer Group: $NWB#vicidial_inbound_groups-afterhours_xfer_group$NWE
After Hours Call Menu:$NWB#vicidial_inbound_groups-after_hours_callmenu$NWE
No Agents No Queueing: $NWB#vicidial_inbound_groups-no_agent_no_queue$NWE
No Agent No Queue Action: $NWB#vicidial_inbound_groups-no_agent_no_queue$NWE\n"; @@ -24828,6 +24862,10 @@ if ($ADD==3311) echo "
Click here to see a traffic report for this DID
\n"; echo "
Click here to see a list of recordings and calls for this DID
\n"; + if ($SSdid_ra_extensions_enabled > 0) + { + echo "

SEE DID REMOTE AGENT EXTENSION OVERRIDES FOR THIS DID\n"; + } if ($LOGdelete_dids > 0) { echo "

DELETE THIS DID\n"; @@ -25128,8 +25166,6 @@ if ($ADD==3321) echo "
\n"; - -# ZZZZZZZZZZZZZZZZZZZZ echo "

MODIFY THIS DID\n"; if ($LOGuser_level >= 9) @@ -25540,7 +25576,7 @@ if ($ADD==31111) echo "\n"; echo "$NWB#vicidial_remote_agents-extension_group$NWE
Status: $NWB#vicidial_remote_agents-status$NWE
Campaign:
Campaign:
On-Hook Agent: $NWB#vicidial_remote_agents-on_hook_agent$NWE
\n"; echo "NOTE: It can take up to 30 seconds for changes submitted on this screen to go live\n"; + ##### get count of did ra extens + $stmt="SELECT count(*) from vicidial_did_ra_extensions where user_start='$user_start';"; + $rsltx=mysql_query($stmt, $link); + $didraext_to_print = mysql_num_rows($rsltx); + $didraext_count='0'; + if ($didraext_to_print > 0) + { + $rowx=mysql_fetch_row($rsltx); + $didraext_count = $rowx[0]; + } + if ($SSdid_ra_extensions_enabled > 0) + { + echo "

THERE ARE $didraext_count DID REMOTE AGENT EXTENSION OVERRIDES FOR THIS REMOTE AGENT\n"; + } if ($LOGdelete_remote_agents > 0) { echo "

DELETE THIS REMOTE AGENT\n";