aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-07-04 04:24:59 -0600
committermcrane <mctch@yahoo.com>2009-07-04 04:27:39 -0600
commitd9f07bd4d5b9c5d69176d7badb07c8310ed38ddf (patch)
tree7cf0bd0e93486357a7c574bd6c8fb25d3412acc8 /config
parent578fda76bb2566d8cf9deeaee3569a35da6ba63e (diff)
downloadpfsense-packages-d9f07bd4d5b9c5d69176d7badb07c8310ed38ddf.tar.gz
pfsense-packages-d9f07bd4d5b9c5d69176d7badb07c8310ed38ddf.tar.bz2
pfsense-packages-d9f07bd4d5b9c5d69176d7badb07c8310ed38ddf.zip
FreeSWITCH package add ping parameter to advanced gateway options helps keep connections alive behind NAT, fix warning message when a gateway is disabled and later deleted, add effective_caller_id_name, effective_caller_id_number, outbound_caller_id_name, outbound_caller_id_number to the gateway
Diffstat (limited to 'config')
-rw-r--r--config/freeswitch/freeswitch.inc9
-rw-r--r--config/freeswitch/freeswitch.xml2
-rw-r--r--config/freeswitch/freeswitch_gateways.tmp7
-rw-r--r--config/freeswitch/freeswitch_gateways_edit.tmp77
4 files changed, 77 insertions, 18 deletions
diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc
index fcba145e..9e4f0627 100644
--- a/config/freeswitch/freeswitch.inc
+++ b/config/freeswitch/freeswitch.inc
@@ -704,14 +704,17 @@ function sync_package_freeswitch_gateways()
if (strlen($rowhelper['extension']) > 0) {
$tmpxml .= " <param name=\"extension\" value=\"" . $rowhelper['extension'] . "\"/>\n";
}
+ if (strlen($rowhelper['ping']) > 0) {
+ $tmpxml .= " <param name=\"ping\" value=\"" . $rowhelper['ping'] . "\"/>\n";
+ }
if (strlen($rowhelper['context']) > 0) {
$tmpxml .= " <param name=\"context\" value=\"" . $rowhelper['context'] . "\"/>\n";
}
if (strlen($rowhelper['caller-id-in-from']) > 0) {
- $tmpxml .= " <param name=\"context\" value=\"" . $rowhelper['context'] . "\"/>\n";
+ $tmpxml .= " <param name=\"caller-id-in-from\" value=\"" . $rowhelper['caller-id-in-from'] . "\"/>\n";
}
if (strlen($rowhelper['supress-cng']) > 0) {
- $tmpxml .= " <param name=\"context\" value=\"" . $rowhelper['context'] . "\"/>\n";
+ $tmpxml .= " <param name=\"supress-cng\" value=\"" . $rowhelper['supress-cng'] . "\"/>\n";
}
$tmpxml .= " </gateway>\n";
@@ -2641,7 +2644,7 @@ function sync_package_freeswitch()
function freeswitch_php_install_command()
{
global $config;
- $freeswitch_package_version = "0.9.3.1";
+ $freeswitch_package_version = "0.9.4";
$freeswitch_build_version = "1.0.4 pre 8";
$freeswitch_build_revision = "13784";
diff --git a/config/freeswitch/freeswitch.xml b/config/freeswitch/freeswitch.xml
index 393f8620..2d58fd83 100644
--- a/config/freeswitch/freeswitch.xml
+++ b/config/freeswitch/freeswitch.xml
@@ -44,7 +44,7 @@
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>FreeSWITCH Settings</name>
- <version>0.9.3.1</version>
+ <version>0.9.4</version>
<title>FreeSWITCH: Settings</title>
<include_file>/usr/local/pkg/freeswitch.inc</include_file>
<menu>
diff --git a/config/freeswitch/freeswitch_gateways.tmp b/config/freeswitch/freeswitch_gateways.tmp
index 279be301..16d933fd 100644
--- a/config/freeswitch/freeswitch_gateways.tmp
+++ b/config/freeswitch/freeswitch_gateways.tmp
@@ -38,8 +38,11 @@ $a_gateways = &$config['installedpackages']['freeswitchgateways']['config'];
if ($_GET['act'] == "del") {
if ($_GET['type'] == 'gateways') {
- if ($a_gateways[$_GET['id']]) {
- unlink("/usr/local/freeswitch/conf/sip_profiles/external/".$_GET['gateway'].".xml");
+ if ($a_gateways[$_GET['id']]) {
+ $tmp_file_name = "/usr/local/freeswitch/conf/sip_profiles/external/".$_GET['gateway'].".xml";
+ if (file_exists($tmp_file_name)) {
+ unlink($tmp_file_name);
+ }
unset($a_gateways[$_GET['id']]);
write_config();
header("Location: freeswitch_gateways.php");
diff --git a/config/freeswitch/freeswitch_gateways_edit.tmp b/config/freeswitch/freeswitch_gateways_edit.tmp
index 1fef05f3..73792c1a 100644
--- a/config/freeswitch/freeswitch_gateways_edit.tmp
+++ b/config/freeswitch/freeswitch_gateways_edit.tmp
@@ -45,22 +45,29 @@ if (isset($_POST['id'])) {
if (isset($id) && $a_gateways[$id]) {
$pconfig['gatewayid'] = $a_gateways[$id]['gatewayid'];
- $gatewayid = $a_gateways[$id]['gatewayid'];
+ $gatewayid = $a_gateways[$id]['gatewayid'];
$pconfig['gateway'] = $a_gateways[$id]['gateway'];
$pconfig['username'] = $a_gateways[$id]['username'];
$pconfig['password'] = $a_gateways[$id]['password'];
- $pconfig['realm'] = $a_gateways[$id]['realm'];
+ $pconfig['realm'] = $a_gateways[$id]['realm'];
$pconfig['from-user'] = $a_gateways[$id]['from-user'];
- $pconfig['from-domain'] = $a_gateways[$id]['from-domain'];
+ $pconfig['from-domain'] = $a_gateways[$id]['from-domain'];
$pconfig['proxy'] = $a_gateways[$id]['proxy'];
$pconfig['expire-seconds'] = $a_gateways[$id]['expire-seconds'];
$pconfig['register'] = $a_gateways[$id]['register'];
$pconfig['register-transport'] = $a_gateways[$id]['register-transport'];
$pconfig['retry-seconds'] = $a_gateways[$id]['retry-seconds'];
$pconfig['extension'] = $a_gateways[$id]['extension'];
- $pconfig['context'] = $a_gateways[$id]['context'];
+ $pconfig['ping'] = $a_gateways[$id]['ping'];
$pconfig['caller-id-in-from'] = $a_gateways[$id]['caller-id-in-from'];
$pconfig['supress-cng'] = $a_gateways[$id]['supress-cng'];
+
+ $pconfig['effective_caller_id_name'] = $a_gateways[$id]['effective_caller_id_name'];
+ $pconfig['effective_caller_id_number'] = $a_gateways[$id]['effective_caller_id_number'];
+ $pconfig['outbound_caller_id_name'] = $a_gateways[$id]['outbound_caller_id_name'];
+ $pconfig['outbound_caller_id_number'] = $a_gateways[$id]['outbound_caller_id_number'];
+
+ $pconfig['context'] = $a_gateways[$id]['context'];
$pconfig['enabled'] = $a_gateways[$id]['enabled'];
$pconfig['description'] = $a_gateways[$id]['description'];
}
@@ -70,16 +77,21 @@ if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
-
if (!$input_errors) {
+ $effective_caller_id_number = $_POST['effective_caller_id_number'];
+ $outbound_caller_id_number = $_POST['outbound_caller_id_number'];
+ $replace_array = array("(", ")", " ", "-");
+ $effective_caller_id_number = str_replace($replace_array, "", $effective_caller_id_number);
+ $outbound_caller_id_number = str_replace($replace_array, "", $outbound_caller_id_number);
+
$ent = array();
if (strlen($_POST['ivrid']) > 0) {
$ent['gatewayid'] = $_POST['ivrid'];
}
else {
- $ent['gatewayid'] = guid();
- }
+ $ent['gatewayid'] = guid();
+ }
$ent['gateway'] = $_POST['gateway'];
$ent['username'] = $_POST['username'];
$ent['password'] = $_POST['password'];
@@ -92,13 +104,19 @@ if ($_POST) {
$ent['register-transport'] = $_POST['register-transport'];
$ent['retry-seconds'] = $_POST['retry-seconds'];
$ent['extension'] = $_POST['extension'];
- $ent['context'] = $_POST['context'];
+ $ent['ping'] = $_POST['ping'];
$ent['caller-id-in-from'] = $_POST['caller-id-in-from'];
$ent['supress-cng'] = $_POST['supress-cng'];
+
+ $ent['effective_caller_id_name'] = $_POST['effective_caller_id_name'];
+ $ent['effective_caller_id_number'] = $effective_caller_id_number;
+ $ent['outbound_caller_id_name'] = $_POST['outbound_caller_id_name'];
+ $ent['outbound_caller_id_number'] = $outbound_caller_id_number;
+
+ $ent['context'] = $_POST['context'];
$ent['enabled'] = $_POST['enabled'];
$ent['description'] = $_POST['description'];
-
if (isset($id) && $a_gateways[$id]) {
//update
$a_gateways[$id] = $ent;
@@ -107,9 +125,8 @@ if ($_POST) {
//add
$a_gateways[] = $ent;
}
-
-
+
if (strlen(trim($_POST['dialplan_expression']))> 0) {
$gatewayid = $_POST['gatewayid'];
@@ -390,6 +407,35 @@ display_top_tabs(build_menu());
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell">Effective Caller ID Name</td>
+ <td width="78%" class="vtable">
+ <input name="effective_caller_id_name" type="text" class="formfld" id="effective_caller_id_name" size="40" value="<?=htmlspecialchars($pconfig['effective_caller_id_name']);?>">
+ <br> <span class="vexpl">Enter the effective caller ID name here.<br></span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">Effective Caller ID Number</td>
+ <td width="78%" class="vtable">
+ <input name="effective_caller_id_number" type="text" class="formfld" id="effective_caller_id_number" size="40" value="<?=htmlspecialchars($pconfig['effective_caller_id_number']);?>">
+ <br> <span class="vexpl">Enter the effective caller ID number here.<br></span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">Outbound Caller ID Name</td>
+ <td width="78%" class="vtable">
+ <input name="outbound_caller_id_name" type="text" class="formfld" id="outbound_caller_id_name" size="40" value="<?=htmlspecialchars($pconfig['outbound_caller_id_name']);?>">
+ <br> <span class="vexpl">Enter the outbound caller ID name here.<br></span>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell">Outbound Caller ID Number</td>
+ <td width="78%" class="vtable">
+ <input name="outbound_caller_id_number" type="text" class="formfld" id="outbound_caller_id_number" size="40" value="<?=htmlspecialchars($pconfig['outbound_caller_id_number']);?>">
+ <br> <span class="vexpl">Enter the outbound caller ID number here.<br></span>
+ </td>
+ </tr>
+
+ <tr>
<td width="22%" valign="top" class="vncellreq">Context</td>
<td width="78%" class="vtable">
<input name="context" type="text" class="formfld" id="context" size="40" value="<?=htmlspecialchars($pconfig['context']);?>">
@@ -439,7 +485,7 @@ display_top_tabs(build_menu());
?>
Choose whether to register-transport.
</td>
- </tr>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncell">Extension</td>
<td width="78%" class="vtable">
@@ -448,6 +494,13 @@ display_top_tabs(build_menu());
</td>
</tr>
<tr>
+ <td width="22%" valign="top" class="vncell">Ping</td>
+ <td width="78%" class="vtable">
+ <input name="ping" type="text" class="formfld" id="ping" size="40" value="<?=htmlspecialchars($pconfig['ping']);?>">
+ <br> <span class="vexpl">Enter the ping interval here in seconds.<br></span>
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncell">Caller-id-in-from</td>
<td width="78%" class="vtable">
<?php