Recordings - Enable Default/Domain/User setting to control filename prefix and password.
This commit is contained in:
@@ -335,28 +335,33 @@
|
||||
$recordings = $database->select($sql, $parameters, 'all');
|
||||
unset($sql, $parameters);
|
||||
|
||||
//get current recordings pin number
|
||||
if (permission_exists('recording_pin')) {
|
||||
$sql = "
|
||||
select
|
||||
split_part(dd.dialplan_detail_data,'=',2)
|
||||
from
|
||||
v_dialplans as d,
|
||||
v_dialplan_details as dd
|
||||
where
|
||||
d.dialplan_uuid = dd.dialplan_uuid and
|
||||
d.domain_uuid = :domain_uuid and
|
||||
d.app_uuid = '430737df-5385-42d1-b933-22600d3fb79e' and
|
||||
d.dialplan_name = 'recordings' and
|
||||
d.dialplan_enabled = 'true' and
|
||||
dd.dialplan_detail_tag = 'action' and
|
||||
dd.dialplan_detail_type = 'set' and
|
||||
dd.dialplan_detail_data like 'pin_number=%' and
|
||||
dd.dialplan_detail_enabled = 'true' ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$pin_number = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
//get current recordings password
|
||||
if (permission_exists('recording_password')) {
|
||||
if (is_numeric($_SESSION['recordings']['recording_password']['numeric'])) {
|
||||
$recording_password = $_SESSION['recordings']['recording_password']['numeric'];
|
||||
}
|
||||
else {
|
||||
$sql = "
|
||||
select
|
||||
split_part(dd.dialplan_detail_data,'=',2)
|
||||
from
|
||||
v_dialplans as d,
|
||||
v_dialplan_details as dd
|
||||
where
|
||||
d.dialplan_uuid = dd.dialplan_uuid and
|
||||
d.domain_uuid = :domain_uuid and
|
||||
d.app_uuid = '430737df-5385-42d1-b933-22600d3fb79e' and
|
||||
d.dialplan_name = 'recordings' and
|
||||
d.dialplan_enabled = 'true' and
|
||||
dd.dialplan_detail_tag = 'action' and
|
||||
dd.dialplan_detail_type = 'set' and
|
||||
dd.dialplan_detail_data like 'pin_number=%' and
|
||||
dd.dialplan_detail_enabled = 'true' ";
|
||||
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
$database = new database;
|
||||
$recording_password = $database->select($sql, $parameters, 'column');
|
||||
unset($sql, $parameters);
|
||||
}
|
||||
}
|
||||
|
||||
//create token
|
||||
@@ -422,8 +427,8 @@
|
||||
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
|
||||
}
|
||||
|
||||
if (permission_exists('recording_pin') && is_numeric($pin_number)) {
|
||||
echo str_replace('||PIN_NUMBER||', "<nobr style='font-weight: 600;'>".$pin_number."</nobr>", $text['description-with_pin']."\n");
|
||||
if (permission_exists('recording_password') && is_numeric($recording_password)) {
|
||||
echo str_replace('||RECORDING_PASSWORD||', "<nobr style='font-weight: 600;'>".$recording_password."</nobr>", $text['description-with_password']."\n");
|
||||
}
|
||||
else {
|
||||
echo $text['description']."\n";
|
||||
|
||||
Reference in New Issue
Block a user