diff --git a/resources/install/scripts/app/conference_center/index.lua b/resources/install/scripts/app/conference_center/index.lua index e2080b32f1..3049fce9f4 100644 --- a/resources/install/scripts/app/conference_center/index.lua +++ b/resources/install/scripts/app/conference_center/index.lua @@ -63,6 +63,12 @@ --answer the call session:answer(); +--get record_ext + record_ext = session:getVariable("record_ext"); + if (not record_ext) then + record_ext = "wav"; + end + --define a function to send email function send_email(email, attachment, default_language, default_dialect) @@ -769,7 +775,7 @@ end --record the conference if (record == "true") then - cmd="sched_api (+5 none lua app/conference_center/resources/scripts/start_recording.lua "..meeting_uuid.." "..domain_name.." )"; + cmd="sched_api (+5 none lua app/conference_center/resources/scripts/start_recording.lua "..meeting_uuid.." "..domain_name.." "..record_ext.." )"; api:executeString(cmd); end --send the call to the conference diff --git a/resources/install/scripts/app/conference_center/resources/scripts/start_recording.lua b/resources/install/scripts/app/conference_center/resources/scripts/start_recording.lua index 49a04ddd4c..b2ffccd011 100644 --- a/resources/install/scripts/app/conference_center/resources/scripts/start_recording.lua +++ b/resources/install/scripts/app/conference_center/resources/scripts/start_recording.lua @@ -12,6 +12,7 @@ --options all, last, non_moderator, member_id meeting_uuid = argv[1]; domain_name = argv[2]; + record_ext = argv[3]; --prepare the api object api = freeswitch.API(); @@ -43,8 +44,8 @@ recording = recordings_dir.."/"..conference_session_uuid; --send a command to record the conference - if (not file_exists(recording..".wav")) then - cmd = "conference "..meeting_uuid.."@"..domain_name.." record "..recording..".wav"; + if (not file_exists(recording.."."..record_ext)) then + cmd = "conference "..meeting_uuid.."@"..domain_name.." record "..recording.."."..record_ext; freeswitch.consoleLog("notice", "[start-recording] cmd: " .. cmd .. "\n"); response = api:executeString(cmd); end