diff --git a/app/conferences_active/conference_exec.php b/app/conferences_active/conference_exec.php
index 41764fcd3d..fcf227a2e0 100644
--- a/app/conferences_active/conference_exec.php
+++ b/app/conferences_active/conference_exec.php
@@ -41,6 +41,7 @@ else {
if (count($_GET)>0) {
$cmd = trim(check_str($_GET["cmd"]));
$name = trim(check_str($_GET["name"]));
+ $uuid = trim(check_str($_GET["uuid"]));
$data = trim(check_str($_GET["data"]));
$id = trim(check_str($_GET["id"]));
$direction = trim(check_str($_GET["direction"]));
@@ -103,22 +104,21 @@ if (count($_GET)>0) {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd.' '.$tmp_value);
}
elseif ($data == "record") {
- $switch_cmd .= $_SESSION['switch']['recordings']['dir']."/".$name."-tmp.wav";
- if (!file_exists($_SESSION['switch']['recordings']['dir']."/".$name."-tmp.wav")) {
+ $recording_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.date("Y").'/'.date("M").'/'.date("d");
+ $switch_cmd .= $recording_dir."/".$uuid.".wav";
+ if (!file_exists($recording_dir."/".$uuid.".wav")) {
$switch_result = event_socket_request($fp, "api ".$switch_cmd);
}
}
elseif ($data == "norecord") {
//stop recording and rename the file
- if (file_exists($_SESSION['switch']['recordings']['dir']."/".$name."-tmp.wav")) {
- rename($_SESSION['switch']['recordings']['dir']."/".$name."-tmp.wav", $_SESSION['switch']['recordings']['dir']."/".$name."-".date("Y").".".date("M").".".date("d")."-".uuid().".wav");
- }
- $switch_cmd .= $_SESSION['switch']['recordings']['dir']."/".$name."-tmp.wav";
- $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
- }
- else {
+ $recording_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.date("Y").'/'.date("M").'/'.date("d");
+ $switch_cmd .= $recording_dir."/".$uuid.".wav";
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
+ //else {
+ // $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
+ //}
}
}
}
diff --git a/app/conferences_active/conference_interactive_inc.php b/app/conferences_active/conference_interactive_inc.php
index 3ef0da0075..203fb831bb 100644
--- a/app/conferences_active/conference_interactive_inc.php
+++ b/app/conferences_active/conference_interactive_inc.php
@@ -43,32 +43,32 @@ else {
}
else {
//get the conference_uuid from the coference_name
- $sql = "select conference_uuid from v_conferences ";
- $sql .= "where conference_name = '".$conference_name."' ";
- $sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' ";
- $prep_statement = $db->prepare($sql);
- if ($prep_statement) {
- $prep_statement->execute();
- $row = $prep_statement->fetch(PDO::FETCH_ASSOC);
- $conference_uuid = $row['conference_uuid'];
- }
+ $sql = "select conference_uuid from v_conferences ";
+ $sql .= "where conference_name = '".$conference_name."' ";
+ $sql .= "and domain_uuid = '".$_SESSION['domain_uuid']."' ";
+ $prep_statement = $db->prepare($sql);
+ if ($prep_statement) {
+ $prep_statement->execute();
+ $row = $prep_statement->fetch(PDO::FETCH_ASSOC);
+ $conference_uuid = $row['conference_uuid'];
+ }
//show only assigned extensions
- $sql = "select count(*) as num_rows from v_conferences as c, v_conference_users as u ";
- $sql .= "where c.conference_uuid = u.conference_uuid ";
- $sql .= "and c.conference_uuid = '".$conference_uuid."' ";
- $sql .= "and c.domain_uuid = '".$_SESSION['domain_uuid']."' ";
- $sql .= "and u.user_uuid = '".$_SESSION['user_uuid']."' ";
- if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
- $prep_statement = $db->prepare($sql);
- if ($prep_statement) {
- $prep_statement->execute();
- $row = $prep_statement->fetch(PDO::FETCH_ASSOC);
- if ($row['num_rows'] == 0) {
- echo "access denied";
- exit;
+ $sql = "select count(*) as num_rows from v_conferences as c, v_conference_users as u ";
+ $sql .= "where c.conference_uuid = u.conference_uuid ";
+ $sql .= "and c.conference_uuid = '".$conference_uuid."' ";
+ $sql .= "and c.domain_uuid = '".$_SESSION['domain_uuid']."' ";
+ $sql .= "and u.user_uuid = '".$_SESSION['user_uuid']."' ";
+ if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
+ $prep_statement = $db->prepare($sql);
+ if ($prep_statement) {
+ $prep_statement->execute();
+ $row = $prep_statement->fetch(PDO::FETCH_ASSOC);
+ if ($row['num_rows'] == 0) {
+ echo "access denied";
+ exit;
+ }
}
- }
}
//replace the space with underscore
@@ -102,8 +102,10 @@ else {
//echo $e->getMessage();
}
//$name = $xml->conference['name'];
+ $session_uuid = $xml->conference['uuid'];
$member_count = $xml->conference['member-count'];
$locked = $xml->conference['locked'];
+ $recording = $xml->conference['recording'];
$c = 0;
$row_style["0"] = "row_style0";
@@ -124,12 +126,30 @@ else {
if (permission_exists('conferences_active_record') || permission_exists('conferences_active_lock')) {
echo " Conference Tools: \n";
}
+
+ $recording_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.date("Y").'/'.date("M").'/'.date("d");
+ $recording_name = '';
+ if (file_exists($recording_dir.'/'.$row['uuid'].'.wav')) {
+ $recording_name = $session_uuid.".wav";
+ }
+ elseif (file_exists($recording_dir.'/'.$row['uuid'].'.mp3')) {
+ $recording_name = $session_uuid.".mp3";
+ }
+
if (permission_exists('conferences_active_record')) {
- if (file_exists($_SESSION['switch']['recordings']['dir']."/".$conference_name."-tmp.wav")) {
- echo " Stop Record \n";
+ if ($recording == "true") {
+ echo " Stop Record \n";
}
else {
- echo " Start Record \n";
+ echo " Start Record \n";
+ }
+ }
+ else {
+ if ($recording == "true") {
+ echo " Recording ";
+ }
+ else {
+ echo " Not Recording ";
}
}
if (permission_exists('conferences_active_lock')) {