Change simple conference switch name from uuid@domain to extension@domain

This commit is contained in:
markjcrane
2021-04-28 14:23:35 -06:00
parent 77064157d5
commit 88f730b251
3 changed files with 16 additions and 6 deletions

View File

@@ -193,7 +193,7 @@
$dialplan_xml = "<extension name=\"".$conference_name."\" continue=\"\" uuid=\"".$dialplan_uuid."\">\n";
$dialplan_xml .= " <condition field=\"destination_number\" expression=\"^".$conference_extension."$\">\n";
$dialplan_xml .= " <action application=\"answer\" data=\"\"/>\n";
$dialplan_xml .= " <action application=\"conference\" data=\"".$conference_uuid."@".$_SESSION['domain_name']."@".$conference_profile.$pin_number."+flags{'".$conference_flags."'}\"/>\n";
$dialplan_xml .= " <action application=\"conference\" data=\"".$conference_extension."@".$_SESSION['domain_name']."@".$conference_profile.$pin_number."+flags{'".$conference_flags."'}\"/>\n";
$dialplan_xml .= " </condition>\n";
$dialplan_xml .= "</extension>\n";

View File

@@ -44,12 +44,15 @@
$text = $language->get();
//get the http get or post and set it as php variables
if (is_uuid($_REQUEST["c"])) {
$conference_uuid = $_REQUEST["c"];
if (is_numeric($_REQUEST["c"])) {
$conference_id = $_REQUEST["c"];
}
elseif (is_uuid($_REQUEST["c"])) {
$conference_id = $_REQUEST["c"];
}
//replace the space with underscore
$conference_name = $conference_uuid.'@'.$_SESSION['domain_name'];
$conference_name = $conference_id.'@'.$_SESSION['domain_name'];
//create the conference list command
$switch_cmd = "conference '".$conference_name."' xml_list";

View File

@@ -85,7 +85,9 @@
$name_array = explode('@', $name);
if ($name_array[1] == $_SESSION['domain_name']) {
$conference_uuid = $name_array[0];
if (is_uuid($conference_uuid)) {
//if uuid then lookup the conference name
if (isset($name_array[0]) && is_uuid($name_array[0])) {
//check for the conference center room
$sql = "select ";
$sql .= "cr.conference_room_name, ";
@@ -124,9 +126,14 @@
}
}
//if numeric use the conference extension as the name
if (isset($name_array[0]) && is_numeric($name_array[0])) {
$conference_name = $name_array[0];
}
if (permission_exists('conference_interactive_view')) {
$list_row_url = 'conference_interactive.php?c='.urlencode($conference_uuid);
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
echo " <td>";
if (permission_exists('conference_interactive_view')) {
@@ -151,4 +158,4 @@
echo "<br /><br />";
}
?>
?>