mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Make presence for conferences work out of the box (#2514)
Use '@' instead of '-' for separating conference name and domain, which is what FreeSWITCH mod_conference uses.
This commit is contained in:
@@ -287,7 +287,7 @@
|
||||
|
||||
--if the conference is empty
|
||||
if (conference_session_uuid) then
|
||||
cmd = "conference "..meeting_uuid.."-"..domain_name.." xml_list";
|
||||
cmd = "conference "..meeting_uuid.."@"..domain_name.." xml_list";
|
||||
result = trim(api:executeString(cmd));
|
||||
if (string.sub(result, -9) == "not found") then
|
||||
--get the conference start_epoch
|
||||
@@ -597,7 +597,7 @@
|
||||
else
|
||||
if (meeting_uuid) then
|
||||
--check if the conference exists
|
||||
cmd = "conference "..meeting_uuid.."-"..domain_name.." xml_list";
|
||||
cmd = "conference "..meeting_uuid.."@"..domain_name.." xml_list";
|
||||
result = trim(api:executeString(cmd));
|
||||
if (string.sub(result, -9) == "not found") then
|
||||
conference_exists = false;
|
||||
@@ -618,7 +618,7 @@
|
||||
--max members must be 2 or more
|
||||
session:execute("set","conference_max_members="..max_members);
|
||||
if (conference_exists) then
|
||||
cmd = "conference "..meeting_uuid.."-"..domain_name.." get count";
|
||||
cmd = "conference "..meeting_uuid.."@"..domain_name.." get count";
|
||||
count = trim(api:executeString(cmd));
|
||||
if (count ~= nil) then
|
||||
if (tonumber(count) >= tonumber(max_members)) then
|
||||
@@ -687,7 +687,7 @@
|
||||
end
|
||||
|
||||
--get the conference xml_list
|
||||
cmd = "conference "..meeting_uuid.."-"..domain_name.." xml_list";
|
||||
cmd = "conference "..meeting_uuid.."@"..domain_name.." xml_list";
|
||||
freeswitch.consoleLog("INFO","" .. cmd .. "\n");
|
||||
result = trim(api:executeString(cmd));
|
||||
|
||||
@@ -723,7 +723,7 @@
|
||||
--play a message that the conference is being a recorded
|
||||
session:execute("playback", sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/ivr/ivr-recording_started.wav");
|
||||
--play a message that the conference is being a recorded
|
||||
--cmd = "conference "..meeting_uuid.."-"..domain_name.." play "..sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/ivr/ivr-recording_started.wav";
|
||||
--cmd = "conference "..meeting_uuid.."@"..domain_name.." play "..sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/ivr/ivr-recording_started.wav";
|
||||
--freeswitch.consoleLog("notice", "[conference center] ".. cmd .."\n");
|
||||
--response = api:executeString(cmd);
|
||||
end
|
||||
@@ -731,24 +731,24 @@
|
||||
--announce the caller
|
||||
if (announce == "true") then
|
||||
--announce the caller - play the recording
|
||||
cmd = "conference "..meeting_uuid.."-"..domain_name.." play " .. temp_dir:gsub("\\", "/") .. "/conference-"..uuid..".wav";
|
||||
cmd = "conference "..meeting_uuid.."@"..domain_name.." play " .. temp_dir:gsub("\\", "/") .. "/conference-"..uuid..".wav";
|
||||
--freeswitch.consoleLog("notice", "[conference center] ".. cmd .."\n");
|
||||
response = api:executeString(cmd);
|
||||
--play has entered the conference
|
||||
cmd = "conference "..meeting_uuid.."-"..domain_name.." play "..sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/conference/conf-has_joined.wav";
|
||||
cmd = "conference "..meeting_uuid.."@"..domain_name.." play "..sounds_dir.."/"..default_language.."/"..default_dialect.."/"..default_voice.."/conference/conf-has_joined.wav";
|
||||
--freeswitch.consoleLog("notice", "[conference center] ".. cmd .."\n");
|
||||
response = api:executeString(cmd);
|
||||
else
|
||||
if (not conference_locked) then
|
||||
if (sounds == "true") then
|
||||
cmd = "conference "..meeting_uuid.."-"..domain_name.." play "..enter_sound;
|
||||
cmd = "conference "..meeting_uuid.."@"..domain_name.." play "..enter_sound;
|
||||
response = api:executeString(cmd);
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--get the conference member count
|
||||
cmd = "conference "..meeting_uuid.."-"..domain_name.." list count";
|
||||
cmd = "conference "..meeting_uuid.."@"..domain_name.." list count";
|
||||
--freeswitch.consoleLog("notice", "[conference center] cmd: ".. cmd .."\n");
|
||||
member_count = api:executeString(cmd);
|
||||
if (string.sub(trim(member_count), -9) == "not found") then
|
||||
@@ -773,7 +773,7 @@
|
||||
api:executeString(cmd);
|
||||
end
|
||||
--send the call to the conference
|
||||
cmd = meeting_uuid.."-"..domain_name.."@"..profile.."+flags{".. flags .."}";
|
||||
cmd = meeting_uuid.."@"..domain_name.."@"..profile.."+flags{".. flags .."}";
|
||||
freeswitch.consoleLog("INFO","[conference center] conference " .. cmd .. "\n");
|
||||
session:execute("conference", cmd);
|
||||
end
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
api = freeswitch.API();
|
||||
|
||||
--check if the conference exists
|
||||
cmd = "conference "..meeting_uuid.."-"..domain_name.." xml_list";
|
||||
cmd = "conference "..meeting_uuid.."@"..domain_name.." xml_list";
|
||||
freeswitch.consoleLog("INFO","" .. cmd .. "\n");
|
||||
result = trim(api:executeString(cmd));
|
||||
if (string.sub(result, -9) == "not found") then
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
--send a command to record the conference
|
||||
if (not file_exists(recording..".wav")) then
|
||||
cmd = "conference "..meeting_uuid.."-"..domain_name.." record "..recording..".wav";
|
||||
cmd = "conference "..meeting_uuid.."@"..domain_name.." record "..recording..".wav";
|
||||
freeswitch.consoleLog("notice", "[start-recording] cmd: " .. cmd .. "\n");
|
||||
response = api:executeString(cmd);
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user