diff --git a/app/call_centers/app_config.php b/app/call_centers/app_config.php index fc25496112..e9922f1269 100644 --- a/app/call_centers/app_config.php +++ b/app/call_centers/app_config.php @@ -261,6 +261,10 @@ $apps[$x]['db'][$y]['fields'][$z]['name'] = "agent_no_answer_delay_time"; $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; + $z++; + $apps[$x]['db'][$y]['fields'][$z]['name'] = "agent_record"; + $apps[$x]['db'][$y]['fields'][$z]['type'] = "text"; + $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $y++; $apps[$x]['db'][$y]['table']['name'] = "v_call_center_queues"; diff --git a/app/call_centers/call_center_agent_edit.php b/app/call_centers/call_center_agent_edit.php index 8fff6c511f..7016ad9d4e 100644 --- a/app/call_centers/call_center_agent_edit.php +++ b/app/call_centers/call_center_agent_edit.php @@ -93,6 +93,7 @@ $agent_wrap_up_time = $_POST["agent_wrap_up_time"]; $agent_reject_delay_time = $_POST["agent_reject_delay_time"]; $agent_busy_delay_time = $_POST["agent_busy_delay_time"]; + $agent_record = $_POST["agent_record"]; //$agent_logout = $_POST["agent_logout"]; } @@ -174,6 +175,7 @@ $array['call_center_agents'][0]['agent_wrap_up_time'] = $agent_wrap_up_time; $array['call_center_agents'][0]['agent_reject_delay_time'] = $agent_reject_delay_time; $array['call_center_agents'][0]['agent_busy_delay_time'] = $agent_busy_delay_time; + $array['call_center_agents'][0]['agent_record'] = $agent_record; if (is_uuid($user_uuid)) { $array['users'][0]['domain_uuid'] = $_SESSION['domain_uuid']; $array['users'][0]['user_uuid'] = $user_uuid; @@ -301,6 +303,7 @@ $agent_wrap_up_time = $row["agent_wrap_up_time"]; $agent_reject_delay_time = $row["agent_reject_delay_time"]; $agent_busy_delay_time = $row["agent_busy_delay_time"]; + $agent_record = $row["agent_record"]; //$agent_logout = $row["agent_logout"]; } unset($sql, $parameters, $row); @@ -579,6 +582,20 @@ echo "\n"; echo "\n"; + echo "\n"; + echo "\n"; + echo " ".$text['label-record_template']."\n"; + echo "\n"; + echo "\n"; + echo " \n"; + echo "
\n"; + echo $text['description-record_template']."\n"; + echo "\n"; + echo "\n"; + /* echo "\n"; echo "\n"; diff --git a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua index 01a404abb5..8d747bd7c4 100644 --- a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua +++ b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua @@ -180,16 +180,21 @@ agent_wrap_up_time = row.agent_wrap_up_time; agent_reject_delay_time = row.agent_reject_delay_time; agent_busy_delay_time = row.agent_busy_delay_time; + agent_record = row.agent_record; --get and then set the complete agent_contact with the call_timeout and when necessary confirm --confirm = "group_confirm_file=custom/press_1_to_accept_this_call.wav,group_confirm_key=1"; --if you change this variable also change app/call_center/call_center_agent_edit.php confirm = "group_confirm_file=ivr/ivr-accept_reject_voicemail.wav,group_confirm_key=1,group_confirm_read_timeout=2000,leg_timeout="..agent_call_timeout; + local record = ""; + if (agent_record == "true") then + record = string.format(",execute_on_pre_bridge='record_session %s/%s/archive/${strftime(%%Y)}/${strftime(%%b)}/${strftime(%%d)}/${uuid}.${record_ext}'", recordings_dir, domain_name) + end if (string.find(agent_contact, '}') == nil) then --not found if (string.find(agent_contact, 'sofia/gateway') == nil) then --add the call_timeout - agent_contact = "{call_timeout="..agent_call_timeout..",domain_name="..domain_name..",domain_uuid="..domain_uuid..",extension_uuid="..extension_uuid..",sip_h_caller_destination=${caller_destination}}"..agent_contact; + agent_contact = "{call_timeout="..agent_call_timeout..",domain_name="..domain_name..",domain_uuid="..domain_uuid..",extension_uuid="..extension_uuid..",sip_h_caller_destination=${caller_destination}"..record.."}"..agent_contact; else --add the call_timeout and confirm agent_contact = "{"..confirm..",call_timeout="..agent_call_timeout..",domain_name="..domain_name..",domain_uuid="..domain_uuid..",sip_h_caller_destination=${caller_destination}}"..agent_contact;