aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-05-28 21:10:10 -0600
committermcrane <mctch@yahoo.com>2009-05-28 21:10:10 -0600
commitcf8abc2e725f42eb6176de1da77d5a03766fee6e (patch)
tree3f4b46236747546f92b479c637d66b27ba66bc44
parent23e1ab04471d14367023a7a11b08920b6a40b0b6 (diff)
downloadpfsense-packages-cf8abc2e725f42eb6176de1da77d5a03766fee6e.tar.gz
pfsense-packages-cf8abc2e725f42eb6176de1da77d5a03766fee6e.tar.bz2
pfsense-packages-cf8abc2e725f42eb6176de1da77d5a03766fee6e.zip
FreeSWITCH package add profile selection to hunt group dest, ivr watch for up to 5 digits instead of 4
-rw-r--r--config/freeswitch/freeswitch.inc21
-rw-r--r--config/freeswitch/freeswitch.xml2
-rw-r--r--config/freeswitch/freeswitch_hunt_group_destinations_edit.tmp29
-rw-r--r--config/freeswitch/freeswitch_hunt_group_edit.tmp18
-rw-r--r--config/freeswitch/freeswitch_ivr.tmp2
-rw-r--r--config/freeswitch/freeswitch_profiles.tmp12
-rw-r--r--config/freeswitch/freeswitch_recordings_edit.tmp2
-rwxr-xr-xpkg_config.7.xml2
8 files changed, 55 insertions, 33 deletions
diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc
index fc222125..6c0976da 100644
--- a/config/freeswitch/freeswitch.inc
+++ b/config/freeswitch/freeswitch.inc
@@ -1124,8 +1124,8 @@ function sync_package_freeswitch_hunt_group()
//Get the list of destinations then build the Hunt Group javascript
$tmp = "";
- $tmp .= " function get_sofia_contact(extension,domain_name){\n";
- $tmp .= " session.execute(\"set\", \"sofia_contact_\"+extension+\"=\${sofia_contact(internal/\"+extension+\"@\"+domain_name+\")}\");\n";
+ $tmp .= " function get_sofia_contact(extension,domain_name, profile){\n";
+ $tmp .= " session.execute(\"set\", \"sofia_contact_\"+extension+\"=\${sofia_contact(\"+profile+\"/\"+extension+\"@\"+domain_name+\")}\");\n";
$tmp .= " sofia_contact = session.getVariable(\"sofia_contact_\"+extension);\n";
$tmp .= " //console_log( \"info\", \"sofia_contact: \"+sofia_contact+\".\\n\" );\n";
$tmp .= " return sofia_contact;\n";
@@ -1185,15 +1185,18 @@ function sync_package_freeswitch_hunt_group()
$row['huntgroupid']
$row['destinationnumber']
$row['destinationtype']
+ $row['destinationprofile']
$row['destinationorder']
$row['destinationdescr']
*/
- if ($row['huntgroupid'] == $rowhelper['huntgroupid']) {
+ if ($row['huntgroupid'] == $rowhelper['huntgroupid']) {
+
+ //set the default profile
+ if (strlen($row['destinationnumber']) == 0) { $row['destinationnumber'] = "internal"; }
if ($row['destinationtype'] == "extension") {
- //$tmp .= " session.execute(\"transfer\", \"".$row['destinationnumber']." XML default\"); //".$row['destinationdescr']."\n";
- $tmp .= " sofia_contact_".$row['destinationnumber']." = get_sofia_contact(\"".$row['destinationnumber']."\",domain_name);\n";
+ $tmp .= " sofia_contact_".$row['destinationnumber']." = get_sofia_contact(\"".$row['destinationnumber']."\",domain_name, \"".$row['destinationprofile']."\");\n";
$tmp_sub_array["application"] = "bridge";
$tmp_sub_array["data"] = "sofia_contact_".$row['destinationnumber'];
$tmp_array[$x] = $tmp_sub_array;
@@ -1207,9 +1210,7 @@ function sync_package_freeswitch_hunt_group()
$tmp_array[$x] = $tmp_sub_array;
unset($tmp_sub_array);
}
- if ($row['destinationtype'] == "sip uri") {
- //$tmp .= " session.execute(\"transfer\", \"".$row['destinationnumber']." XML default\"); //".$row['destinationdescr']."\n";
- //tmp .= " sofia_contact_".$row['destinationnumber']." = get_sofia_contact(\"".$row['destinationnumber']."\",domain_name);\n";
+ if ($row['destinationtype'] == "sip uri") {
$tmp_sub_array["application"] = "bridge";
$tmp_sub_array["data"] = "\"".$row['destinationnumber']."\"";
$tmp_array[$x] = $tmp_sub_array;
@@ -1607,7 +1608,7 @@ function sync_package_freeswitch_ivr()
//$tmp .= " //http://wiki.freeswitch.org/wiki/Session_getDigits\n";
//$tmp .= " //getDigits(length, terminators, timeout, digit_timeout, abs_timeout)\n";
//$tmp .= " //dtmf.digits += session.getDigits(2, \"#\", 3000); //allow up to 3 digits\n";
- $tmp .= " dtmf.digits += session.getDigits(3, \"#\", 3000); //allow up to 4 digits\n";
+ $tmp .= " dtmf.digits += session.getDigits(4, \"#\", 3000); //allow up to 5 digits\n";
$tmp .= "\n";
$tmp .= "\n";
//$tmp .= " console_log( \"info\", \"IVR Digit Pressed: \" + dtmf.digits + \"\\n\" );\n";
@@ -2165,7 +2166,7 @@ function sync_package_freeswitch()
function freeswitch_php_install_command()
{
global $config;
- $freeswitch_package_version = "0.8.8";
+ $freeswitch_package_version = "0.8.8.1";
$freeswitch_build_version = "1.0.4 pre 6";
$freeswitch_build_revision = "13238";
diff --git a/config/freeswitch/freeswitch.xml b/config/freeswitch/freeswitch.xml
index fc191c21..83d0ccf4 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.8.8</version>
+ <version>0.8.8.1</version>
<title>FreeSWITCH: Settings</title>
<include_file>/usr/local/pkg/freeswitch.inc</include_file>
<menu>
diff --git a/config/freeswitch/freeswitch_hunt_group_destinations_edit.tmp b/config/freeswitch/freeswitch_hunt_group_destinations_edit.tmp
index bd7f446b..1188438c 100644
--- a/config/freeswitch/freeswitch_hunt_group_destinations_edit.tmp
+++ b/config/freeswitch/freeswitch_hunt_group_destinations_edit.tmp
@@ -57,6 +57,7 @@ if (isset($_POST['huntgroupid'])) {
if (isset($id) && $a_hunt_group_destinations[$id]) {
$pconfig['destinationnumber'] = $a_hunt_group_destinations[$id]['destinationnumber'];
$pconfig['destinationtype'] = $a_hunt_group_destinations[$id]['destinationtype'];
+ $pconfig['destinationprofile'] = $a_hunt_group_destinations[$id]['destinationprofile'];
$pconfig['destinationorder'] = $a_hunt_group_destinations[$id]['destinationorder'];
$pconfig['destinationdescr'] = $a_hunt_group_destinations[$id]['destinationdescr'];
}
@@ -80,6 +81,7 @@ if ($_POST) {
$huntgroupdestinationent['huntgroupid'] = $_POST['huntgroupid'];
$huntgroupdestinationent['destinationnumber'] = $_POST['destinationnumber'];
$huntgroupdestinationent['destinationtype'] = $_POST['destinationtype'];
+ $huntgroupdestinationent['destinationprofile'] = $_POST['destinationprofile'];
$huntgroupdestinationent['destinationorder'] = $_POST['destinationorder'];
$huntgroupdestinationent['destinationdescr'] = $_POST['destinationdescr'];
@@ -160,7 +162,32 @@ display_top_tabs(build_menu());
echo " </select>\n";
?>
</td>
- </tr>
+ </tr>
+
+ <tr>
+ <td width="22%" valign="top" class="vncellreq">Profile</td>
+ <td width="78%" class="vtable">
+ <?php
+ echo " <select name='destinationprofile' class='formfld'>\n";
+ echo " <option></option>\n";
+
+ foreach (ListFiles('/usr/local/freeswitch/conf/sip_profiles') as $key=>$sip_profile_file){
+ $sip_profile_name = str_replace(".xml", "", $sip_profile_file);
+
+ if (htmlspecialchars($pconfig['destinationprofile']) == $sip_profile_name) {
+ echo " <option selected='yes'>$sip_profile_name</option>\n";
+ }
+ else {
+ echo " <option>$sip_profile_name</option>\n";
+ }
+ }
+ echo " </select>\n";
+
+
+ ?>
+ </td>
+ </tr>
+
<tr>
<td width="22%" valign="top" class="vncell">Order</td>
<td width="78%" class="vtable">
diff --git a/config/freeswitch/freeswitch_hunt_group_edit.tmp b/config/freeswitch/freeswitch_hunt_group_edit.tmp
index 8e06429c..b1c6d57f 100644
--- a/config/freeswitch/freeswitch_hunt_group_edit.tmp
+++ b/config/freeswitch/freeswitch_hunt_group_edit.tmp
@@ -294,11 +294,12 @@ display_top_tabs(build_menu());
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td width="20%" class="listhdrr">Destination</td>
- <td width="25%" class="listhdrr">Type</td>
- <td width="25%" class="listhdrr">Order</td>
+ <td width="40%" class="listhdrr">Destination</td>
+ <td width="40" class="listhdrr">Type</td>
+ <td width="40" class="listhdrr">Profile</td>
+ <td width="40" class="listhdrr">Order</td>
<td width="45%" class="listhdr">Description</td>
- <td width="10%" class="list">
+ <td width="30" class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
<td width="17"></td>
@@ -342,6 +343,9 @@ display_top_tabs(build_menu());
<?=$ent['destinationtype'];?>&nbsp;
</td>
<td class="listr" ondblclick="document.location='freeswitch_hunt_group_destinations_edit.php?id=<?=$ent['id'];?>&parentid=<?=$parentid;?>&huntgroupid=<?=$huntgroupid;?>';">
+ <?=$ent['destinationprofile'];?>&nbsp;
+ </td>
+ <td class="listr" ondblclick="document.location='freeswitch_hunt_group_destinations_edit.php?id=<?=$ent['id'];?>&parentid=<?=$parentid;?>&huntgroupid=<?=$huntgroupid;?>';">
<?=$ent['destinationorder'];?>&nbsp;
</td>
<td class="listbg" ondblclick="document.location='freeswitch_hunt_group_destinations_edit.php?id=<?=$ent['id'];?>&parentid=<?=$parentid;?>&huntgroupid=<?=$huntgroupid;?>';">
@@ -363,7 +367,7 @@ display_top_tabs(build_menu());
}
?>
<tr>
- <td class="list" colspan="4"></td>
+ <td class="list" colspan="5"></td>
<td class="list">
<table border="0" cellspacing="0" cellpadding="1">
<tr>
@@ -376,7 +380,7 @@ display_top_tabs(build_menu());
<tr>
- <td class="list" colspan="4"></td>
+ <td class="list" colspan="5"></td>
<td class="list"></td>
</tr>
</table>
@@ -391,7 +395,7 @@ display_top_tabs(build_menu());
<tr>
- <td class="list" colspan="3"></td>
+ <td class="list" colspan="4"></td>
<td class="list"></td>
</tr>
</table>
diff --git a/config/freeswitch/freeswitch_ivr.tmp b/config/freeswitch/freeswitch_ivr.tmp
index 67084f07..c1e53dff 100644
--- a/config/freeswitch/freeswitch_ivr.tmp
+++ b/config/freeswitch/freeswitch_ivr.tmp
@@ -117,7 +117,7 @@ display_top_tabs(build_menu());
<?=$ent['ivrextension']?>
</td>
<td class="listr" ondblclick="document.location='freeswitch_ivr_edit.php?id=<?=$i;?>';">
- <?=$ent['ivrname'];?>&nbsp;<?=$ent['ivrid'];?>&nbsp;
+ <?=$ent['ivrname'];?>&nbsp;
</td>
<td class="listbg" ondblclick="document.location='freeswitch_ivr_edit.php?id=<?=$i;?>';">
<font color="#FFFFFF"><?=htmlspecialchars($ent['ivrdescr']);?>&nbsp;
diff --git a/config/freeswitch/freeswitch_profiles.tmp b/config/freeswitch/freeswitch_profiles.tmp
index 983b448c..188619f4 100644
--- a/config/freeswitch/freeswitch_profiles.tmp
+++ b/config/freeswitch/freeswitch_profiles.tmp
@@ -81,17 +81,7 @@ include("head.inc");
<tr><td class="tabnavtbl">
<?php
- $tab_array = array();
- $tab_array[] = array(gettext("Settings"), false, "/pkg_edit.php?xml=freeswitch.xml&amp;id=0");
- $tab_array[] = array(gettext("Dialplan"), false, "/packages/freeswitch/freeswitch_dialplan_includes.php");
- $tab_array[] = array(gettext("Extensions"), false, "/packages/freeswitch/freeswitch_extensions.php");
- $tab_array[] = array(gettext("Features"), false, "/packages/freeswitch/freeswitch_features.php");
- $tab_array[] = array(gettext("Gateways"), false, "/packages/freeswitch/freeswitch_gateways.php");
- $tab_array[] = array(gettext("Profiles"), true, "/packages/freeswitch/freeswitch_profiles.php");
- $tab_array[] = array(gettext("Public"), false, "/packages/freeswitch/freeswitch_public_includes.php");
- $tab_array[] = array(gettext("Status"), false, "/packages/freeswitch/freeswitch_status.php");
- $tab_array[] = array(gettext("Vars"), false, "/pkg_edit.php?xml=freeswitch_vars.xml&amp;id=0");
- display_top_tabs($tab_array);
+display_top_tabs(build_menu());
?>
</td></tr>
diff --git a/config/freeswitch/freeswitch_recordings_edit.tmp b/config/freeswitch/freeswitch_recordings_edit.tmp
index 1e38d616..e53c44fc 100644
--- a/config/freeswitch/freeswitch_recordings_edit.tmp
+++ b/config/freeswitch/freeswitch_recordings_edit.tmp
@@ -116,7 +116,7 @@ display_top_tabs(build_menu());
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="tabcont" >
-
+ <br />
<form action="freeswitch_recordings_edit.php" method="post" name="iform" id="iform">
<table width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
diff --git a/pkg_config.7.xml b/pkg_config.7.xml
index 7aa9fa42..bc1d28cf 100755
--- a/pkg_config.7.xml
+++ b/pkg_config.7.xml
@@ -92,7 +92,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.8.8</version>
+ <version>0.8.8.1</version>
<status>Beta</status>
<required_version>1.2.1</required_version>
<maintainer>markjcrane@gmail.com</maintainer>