aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rwxr-xr-xpkg_config.7.xml2
5 files changed, 78 insertions, 19 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
diff --git a/pkg_config.7.xml b/pkg_config.7.xml
index c02f53f8..bd396aa8 100755
--- a/pkg_config.7.xml
+++ b/pkg_config.7.xml
@@ -111,7 +111,7 @@
<pkginfolink>http://doc.pfsense.org/index.php/FreeSWITCH</pkginfolink>
<config_file>http://www.pfsense.com/packages/config/freeswitch/freeswitch.xml</config_file>
<depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url>
- <version>0.9.3.1</version>
+ <version>0.9.4</version>
<status>Beta</status>
<required_version>1.2.1</required_version>
<maintainer>markjcrane@gmail.com</maintainer>