Add contact_in_ping to Gateways (#6439)

* Add contact_in_ping to Gateways

* Update gateway_edit.php

* Update gateways.php

* Update app_languages.php

* Update sofia.conf.lua
This commit is contained in:
FusionPBX
2022-07-19 16:34:01 -06:00
committed by GitHub
parent 4cf53c9719
commit e65d483ef7
5 changed files with 126 additions and 8 deletions

View File

@@ -5,7 +5,7 @@
$apps[$x]['uuid'] = "297ab33e-2c2f-8196-552c-f3567d2caaf8";
$apps[$x]['category'] = "Switch";;
$apps[$x]['subcategory'] = "";
$apps[$x]['version'] = "1.0";
$apps[$x]['version'] = "1.1";
$apps[$x]['license'] = "Mozilla Public License 1.1";
$apps[$x]['url'] = "http://www.fusionpbx.com";
$apps[$x]['description']['en-us'] = "Gateways provide access into other voice networks. These can be voice providers or other systems that require SIP registration.";
@@ -205,6 +205,10 @@
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "contact_in_ping";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "caller_id_in_from";
$apps[$x]['db'][$y]['fields'][$z]['type'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";

View File

@@ -1,5 +1,4 @@
<?php
#This file was last reorganized on 19th of September 2017 08:54:24 AM UTC
$text['title-gateways']['en-us'] = "Gateways";
$text['title-gateways']['en-gb'] = "Gateways";
@@ -485,7 +484,7 @@ $text['label-ping']['sv-se'] = "Ping";
$text['label-ping']['uk-ua'] = "Пінг";
$text['label-ping_min']['en-us'] = "Ping Min";
$text['label-ping_min']['en-gb'] = "";
$text['label-ping_min']['en-gb'] = "Ping Min";
$text['label-ping_min']['ar-eg'] = "";
$text['label-ping_min']['de-at'] = "";
$text['label-ping_min']['de-ch'] = "";
@@ -506,7 +505,7 @@ $text['label-ping_min']['sv-se'] = "";
$text['label-ping_min']['uk-ua'] = "";
$text['label-ping_max']['en-us'] = "Ping Max";
$text['label-ping_max']['en-gb'] = "";
$text['label-ping_max']['en-gb'] = "Ping Max";
$text['label-ping_max']['ar-eg'] = "";
$text['label-ping_max']['de-at'] = "";
$text['label-ping_max']['de-ch'] = "";
@@ -526,6 +525,27 @@ $text['label-ping_max']['ru-ru'] = "";
$text['label-ping_max']['sv-se'] = "";
$text['label-ping_max']['uk-ua'] = "";
$text['label-contact_in_ping']['en-us'] = "Contact in Ping";
$text['label-contact_in_ping']['en-gb'] = "";
$text['label-contact_in_ping']['ar-eg'] = "";
$text['label-contact_in_ping']['de-at'] = "";
$text['label-contact_in_ping']['de-ch'] = "";
$text['label-contact_in_ping']['de-de'] = "";
$text['label-contact_in_ping']['es-cl'] = "";
$text['label-contact_in_ping']['es-mx'] = "";
$text['label-contact_in_ping']['fr-ca'] = "";
$text['label-contact_in_ping']['fr-fr'] = "";
$text['label-contact_in_ping']['he-il'] = "";
$text['label-contact_in_ping']['it-it'] = "";
$text['label-contact_in_ping']['nl-nl'] = "";
$text['label-contact_in_ping']['pl-pl'] = "";
$text['label-contact_in_ping']['pt-br'] = "";
$text['label-contact_in_ping']['pt-pt'] = "";
$text['label-contact_in_ping']['ro-ro'] = "";
$text['label-contact_in_ping']['ru-ru'] = "";
$text['label-contact_in_ping']['sv-se'] = "";
$text['label-contact_in_ping']['uk-ua'] = "";
$text['label-password']['en-us'] = "Password";
$text['label-password']['en-gb'] = "Password";
$text['label-password']['ar-eg'] = "كلمة السر";
@@ -1177,6 +1197,48 @@ $text['description-ping']['ru-ru'] = "Введите интервал ping зд
$text['description-ping']['sv-se'] = "Ange interval för ping i sekunder.";
$text['description-ping']['uk-ua'] = "Введіть інтервал пінгування в секундах.";
$text['description-ping_min']['en-us'] = "Enter the ping minimum range in seconds.";
$text['description-ping_min']['en-gb'] = "Enter the ping minimum range in seconds.";
$text['description-ping_min']['ar-eg'] = "";
$text['description-ping_min']['de-at'] = ""; //copied from de-de
$text['description-ping_min']['de-ch'] = ""; //copied from de-de
$text['description-ping_min']['de-de'] = "";
$text['description-ping_min']['es-cl'] = "";
$text['description-ping_min']['es-mx'] = ""; //copied from es-cl
$text['description-ping_min']['fr-ca'] = ""; //copied from fr-fr
$text['description-ping_min']['fr-fr'] = "";
$text['description-ping_min']['he-il'] = "";
$text['description-ping_min']['it-it'] = "";
$text['description-ping_min']['nl-nl'] = "";
$text['description-ping_min']['pl-pl'] = "";
$text['description-ping_min']['pt-br'] = "";
$text['description-ping_min']['pt-pt'] = "";
$text['description-ping_min']['ro-ro'] = "";
$text['description-ping_min']['ru-ru'] = "";
$text['description-ping_min']['sv-se'] = "";
$text['description-ping_min']['uk-ua'] = "";
$text['description-ping_max']['en-us'] = "Enter the ping maximum range in seconds.";
$text['description-ping_max']['en-gb'] = "Enter the ping maximum range in seconds.";
$text['description-ping_max']['ar-eg'] = "";
$text['description-ping_max']['de-at'] = ""; //copied from de-de
$text['description-ping_max']['de-ch'] = ""; //copied from de-de
$text['description-ping_max']['de-de'] = "";
$text['description-ping_max']['es-cl'] = "";
$text['description-ping_max']['es-mx'] = ""; //copied from es-cl
$text['description-ping_max']['fr-ca'] = ""; //copied from fr-fr
$text['description-ping_max']['fr-fr'] = "";
$text['description-ping_max']['he-il'] = "";
$text['description-ping_max']['it-it'] = "";
$text['description-ping_max']['nl-nl'] = "";
$text['description-ping_max']['pl-pl'] = "";
$text['description-ping_max']['pt-br'] = "";
$text['description-ping_max']['pt-pt'] = "";
$text['description-ping_max']['ro-ro'] = "";
$text['description-ping_max']['ru-ru'] = "";
$text['description-ping_max']['sv-se'] = "";
$text['description-ping_max']['uk-ua'] = "";
$text['description-password']['en-us'] = "Enter the password here.";
$text['description-password']['en-gb'] = "Enter the password here.";
$text['description-password']['ar-eg'] = "";
@@ -1492,6 +1554,27 @@ $text['description-codec_prefs']['ru-ru'] = "Задайте список код
$text['description-codec_prefs']['sv-se'] = "Ange codec preferenser som en lista . Ex : PCMA , PCMU , G722";
$text['description-codec_prefs']['uk-ua'] = "";
$text['description-contact_in_ping']['en-us'] = "Select whether to add contact in the ping. ";
$text['description-contact_in_ping']['en-gb'] = "Select whether to add contact in the ping.";
$text['description-contact_in_ping']['ar-eg'] = "";
$text['description-contact_in_ping']['de-at'] = ""; //copied from de-de
$text['description-contact_in_ping']['de-ch'] = ""; //copied from de-de
$text['description-contact_in_ping']['de-de'] = "";
$text['description-contact_in_ping']['es-cl'] = "";
$text['description-contact_in_ping']['es-mx'] = ""; //copied from es-cl
$text['description-contact_in_ping']['fr-ca'] = ""; //copied from fr-fr
$text['description-contact_in_ping']['fr-fr'] = "";
$text['description-contact_in_ping']['he-il'] = "";
$text['description-contact_in_ping']['it-it'] = "";
$text['description-contact_in_ping']['nl-nl'] = "";
$text['description-contact_in_ping']['pl-pl'] = "";
$text['description-contact_in_ping']['pt-br'] = "";
$text['description-contact_in_ping']['pt-pt'] = "";
$text['description-contact_in_ping']['ro-ro'] = "";
$text['description-contact_in_ping']['ru-ru'] = "";
$text['description-contact_in_ping']['sv-se'] = "";
$text['description-contact_in_ping']['uk-ua'] = "";
$text['description-channels']['en-us'] = "Maximum number of simultaneous channels available in the gateway.";
$text['description-channels']['en-gb'] = "Maximum number of simultaneous channels available in the gateway.";
$text['description-channels']['ar-eg'] = "";

View File

@@ -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-2020
Portions created by the Initial Developer are Copyright (C) 2008-2022
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -96,6 +96,7 @@
$ping = $_POST["ping"];
$ping_min = $_POST["ping_min"];
$ping_max = $_POST["ping_max"];
$contact_in_ping = $_POST["contact_in_ping"];
$channels = $_POST["channels"];
$caller_id_in_from = $_POST["caller_id_in_from"];
$supress_cng = $_POST["supress_cng"];
@@ -182,6 +183,7 @@
$array['gateways'][$x]["ping"] = $ping;
$array['gateways'][$x]["ping_min"] = $ping_min;
$array['gateways'][$x]["ping_max"] = $ping_max;
$array['gateways'][$x]["contact_in_ping"] = $contact_in_ping;
$array['gateways'][$x]["channels"] = $channels;
$array['gateways'][$x]["caller_id_in_from"] = $caller_id_in_from;
$array['gateways'][$x]["supress_cng"] = $supress_cng;
@@ -285,6 +287,7 @@
$ping = $row["ping"];
$ping_min = $row["ping_min"];
$ping_max = $row["ping_max"];
$contact_in_ping = $row["contact_in_ping"];
$channels = $row["channels"];
$caller_id_in_from = $row["caller_id_in_from"];
$supress_cng = $row["supress_cng"];
@@ -734,6 +737,31 @@
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
echo " ".$text['label-contact_in_ping']."\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select class='formfld' name='contact_in_ping'>\n";
echo " <option value=''></option>\n";
if ($contact_in_ping == "true") {
echo " <option value='true' selected='selected'>".$text['label-true']."</option>\n";
}
else {
echo " <option value='true'>".$text['label-true']."</option>\n";
}
if ($contact_in_ping == "false") {
echo " <option value='false' selected='selected'>".$text['label-false']."</option>\n";
}
else {
echo " <option value='false'>".$text['label-false']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-contact_in_ping']."\n";
echo "</td>\n";
echo "</tr>\n";
if (permission_exists('gateway_channels')) {
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap>\n";
@@ -882,4 +910,4 @@
//include the footer
require_once "resources/footer.php";
?>
?>

View File

@@ -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-2020
Portions created by the Initial Developer are Copyright (C) 2008-2022
the Initial Developer. All Rights Reserved.
Contributor(s):

View File

@@ -1,6 +1,6 @@
-- xml_handler.lua
-- Part of FusionPBX
-- Copyright (C) 2013 - 2018 Mark J Crane <markjcrane@fusionpbx.com>
-- Copyright (C) 2013 - 2022 Mark J Crane <markjcrane@fusionpbx.com>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
@@ -193,6 +193,9 @@
if (string.len(field.ping_max) > 0) then
table.insert(xml, [[ <param name="ping-max" value="]] .. field.ping_max .. [["/>]]);
end
if (string.len(field.contact_in_ping) > 0) then
table.insert(xml, [[ <param name="contact-in-ping" value="]] .. field.contact_in_ping .. [["/>]]);
end
if (string.len(field.context) > 0) then
table.insert(xml, [[ <param name="context" value="]] .. field.context .. [["/>]]);
end