Ring Ready support disabling it in dialplan #6536
This commit is contained in:
parent
48661c3aa6
commit
5b77e3d62b
|
|
@ -236,6 +236,14 @@
|
||||||
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
$apps[$x]['default_settings'][$y]['default_setting_value'] = "";
|
||||||
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
|
||||||
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
$apps[$x]['default_settings'][$y]['default_setting_description'] = "";
|
||||||
|
$y++;
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "50cbb1bb-3d67-4320-9f7e-0b09aa09676d";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_category'] = "ring_group";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "ring_ready";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_name'] = "boolean";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_value'] = "true";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
|
||||||
|
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Add ring_ready in the dialplan to send 180 ringing to calling party";
|
||||||
|
|
||||||
//schema details
|
//schema details
|
||||||
$y=0;
|
$y=0;
|
||||||
|
|
|
||||||
|
|
@ -474,7 +474,9 @@
|
||||||
//build the xml dialplan
|
//build the xml dialplan
|
||||||
$dialplan_xml = "<extension name=\"".xml::sanitize($ring_group_name)."\" continue=\"\" uuid=\"".xml::sanitize($dialplan_uuid)."\">\n";
|
$dialplan_xml = "<extension name=\"".xml::sanitize($ring_group_name)."\" continue=\"\" uuid=\"".xml::sanitize($dialplan_uuid)."\">\n";
|
||||||
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($ring_group_extension)."$\">\n";
|
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".xml::sanitize($ring_group_extension)."$\">\n";
|
||||||
$dialplan_xml .= " <action application=\"ring_ready\" data=\"\"/>\n";
|
if ($settings->get('ring_group', 'ring_ready', true)) {
|
||||||
|
$dialplan_xml .= " <action application=\"ring_ready\" data=\"\"/>\n";
|
||||||
|
}
|
||||||
$dialplan_xml .= " <action application=\"set\" data=\"ring_group_uuid=".xml::sanitize($ring_group_uuid)."\"/>\n";
|
$dialplan_xml .= " <action application=\"set\" data=\"ring_group_uuid=".xml::sanitize($ring_group_uuid)."\"/>\n";
|
||||||
$dialplan_xml .= " <action application=\"lua\" data=\"app.lua ring_groups\"/>\n";
|
$dialplan_xml .= " <action application=\"lua\" data=\"app.lua ring_groups\"/>\n";
|
||||||
$dialplan_xml .= " </condition>\n";
|
$dialplan_xml .= " </condition>\n";
|
||||||
|
|
|
||||||
|
|
@ -182,11 +182,6 @@ log = require "resources.functions.log".ring_group
|
||||||
call_direction = "local";
|
call_direction = "local";
|
||||||
end
|
end
|
||||||
|
|
||||||
--set ring ready
|
|
||||||
if (session:ready()) then
|
|
||||||
session:execute("ring_ready", "");
|
|
||||||
end
|
|
||||||
|
|
||||||
--define additional variables
|
--define additional variables
|
||||||
external = "false";
|
external = "false";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue