Change kick and kick all to uuid_kill so that the participant's call is logged to the database. Fix recordings and the announce that the call is being recorded for the first person to join the conference. Add a permission to control the conference session 'details' column in the conference sessions so CDR link can be hidden from the user. Don't allow a conference moderator and participant to use the same pin number.

This commit is contained in:
Mark Crane
2013-03-15 17:12:13 +00:00
parent 16223677ef
commit faeee96624
8 changed files with 128 additions and 67 deletions
+30 -2
View File
@@ -74,6 +74,30 @@ else {
exit;
}
//define an alternative kick all
function conference_end($fp, $name) {
$switch_cmd = "conference '".$name."' xml_list";
$xml_str = trim(event_socket_request($fp, 'api '.$switch_cmd));
try {
$xml = new SimpleXMLElement($xml_str);
}
catch(Exception $e) {
//echo $e->getMessage();
}
$session_uuid = $xml->conference['uuid'];
$x = 0;
foreach ($xml->conference->members->member as $row) {
$switch_result = event_socket_request($fp, 'api uuid_kill '.$row->uuid);
if ($x < 1) {
usleep(500000); //500000 = 0.5 seconds
}
else {
usleep(10000); //1000000 = 0.01 seconds
}
$x++;
}
}
//execute the command
if (count($_GET) > 0) {
if (strlen($cmd) > 0) {
@@ -129,8 +153,12 @@ else {
$switch_cmd .= $recording_dir."/".$uuid.".wav";
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
elseif ($data == "kick" || $data == "kick all") {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
elseif ($data == "kick") {
$switch_result = event_socket_request($fp, 'api uuid_kill '.$uuid);
}
elseif ($data == "kick all") {
//$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
conference_end($fp, $name);
}
elseif ($data == "mute" || $data == "unmute" || $data == "mute non_moderator" || $data == "unmute non_moderator") {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);