Add distinctive ring to inbound destinations (#6357)
* Add distinctive ring to inbound destinations * Update destination_edit.php
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2021
|
||||
Portions created by the Initial Developer are Copyright (C) 2008-2022
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -111,6 +111,7 @@
|
||||
$destination_buy = check_float($_POST["destination_buy"]);
|
||||
$currency_buy = $_POST["currency_buy"];
|
||||
$destination_hold_music = $_POST["destination_hold_music"];
|
||||
$destination_distinctive_ring = $_POST["destination_distinctive_ring"];
|
||||
$destination_record = $_POST["destination_record"];
|
||||
$destination_accountcode = $_POST["destination_accountcode"];
|
||||
$destination_type_voice = $_POST["destination_type_voice"];
|
||||
@@ -401,6 +402,9 @@
|
||||
if (strlen($destination_hold_music) > 0) {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"export\" data=\"hold_music=".$destination_hold_music."\" inline=\"true\"/>\n";
|
||||
}
|
||||
if (strlen($destination_distinctive_ring) > 0) {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"export\" data=\"sip_h_Alert-Info=".$destination_distinctive_ring."\" inline=\"true\"/>\n";
|
||||
}
|
||||
if (strlen($destination_accountcode) > 0) {
|
||||
$dialplan["dialplan_xml"] .= " <action application=\"export\" data=\"accountcode=".$destination_accountcode."\" inline=\"true\"/>\n";
|
||||
}
|
||||
@@ -527,6 +531,17 @@
|
||||
$y++;
|
||||
}
|
||||
|
||||
//set the distinctive ring
|
||||
if (strlen($destination_distinctive_ring) > 0) {
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "export";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_data"] = "sip_h_Alert-Info=".$destination_distinctive_ring;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_inline"] = "true";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $dialplan_detail_order;
|
||||
$y++;
|
||||
}
|
||||
|
||||
//add fax detection
|
||||
if (is_uuid($fax_uuid)) {
|
||||
|
||||
@@ -735,7 +750,12 @@
|
||||
$array['destinations'][$x]["destination_caller_id_number"] = $destination_caller_id_number;
|
||||
$array['destinations'][$x]["destination_cid_name_prefix"] = $destination_cid_name_prefix;
|
||||
$array['destinations'][$x]["destination_context"] = $destination_context;
|
||||
$array['destinations'][$x]["destination_hold_music"] = $destination_hold_music;
|
||||
if (permission_exists("destination_hold_music")) {
|
||||
$array['destinations'][$x]["destination_hold_music"] = $destination_hold_music;
|
||||
}
|
||||
if (permission_exists("destination_distinctive_ring")) {
|
||||
$array['destinations'][$x]["destination_distinctive_ring"] = $destination_distinctive_ring;
|
||||
}
|
||||
$array['destinations'][$x]["destination_record"] = $destination_record;
|
||||
$array['destinations'][$x]["destination_accountcode"] = $destination_accountcode;
|
||||
$array['destinations'][$x]["destination_type_voice"] = $destination_type_voice ? 1 : null;
|
||||
@@ -886,6 +906,7 @@
|
||||
$destination_caller_id_number = $row["destination_caller_id_number"];
|
||||
$destination_cid_name_prefix = $row["destination_cid_name_prefix"];
|
||||
$destination_hold_music = $row["destination_hold_music"];
|
||||
$destination_distinctive_ring = $row["destination_distinctive_ring"];
|
||||
$destination_record = $row["destination_record"];
|
||||
$destination_accountcode = $row["destination_accountcode"];
|
||||
$destination_type_voice = $row["destination_type_voice"];
|
||||
@@ -1381,7 +1402,7 @@
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) {
|
||||
if (permission_exists("destination_hold_music") && is_dir($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/app/music_on_hold')) {
|
||||
echo "<tr id='tr_hold_music'>\n";
|
||||
echo "<td width=\"30%\" class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-destination_hold_music']."\n";
|
||||
@@ -1396,6 +1417,19 @@
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists("destination_distinctive_ring")) {
|
||||
echo "<tr>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
echo " ".$text['label-destination_distinctive_ring']."\n";
|
||||
echo "</td>\n";
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='destination_distinctive_ring' maxlength='255' value='".escape($destination_distinctive_ring)."'>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-destination_distinctive_ring']." \n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
if (permission_exists("destination_accountcode")) {
|
||||
echo "<tr id='tr_account_code'>\n";
|
||||
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
|
||||
|
||||
Reference in New Issue
Block a user