aboutsummaryrefslogtreecommitdiffstats
path: root/config/freeswitch
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-06-17 04:44:04 -0600
committermcrane <mctch@yahoo.com>2009-06-17 04:44:04 -0600
commitb1987950d03d44471de08f512ecfc20beeb4aaca (patch)
treee0b4a498773259feb4380a59c55649069b9f5384 /config/freeswitch
parent1ffa8ceddfe7f18ea86c1b4720dbea7bacaac6df (diff)
downloadpfsense-packages-b1987950d03d44471de08f512ecfc20beeb4aaca.tar.gz
pfsense-packages-b1987950d03d44471de08f512ecfc20beeb4aaca.tar.bz2
pfsense-packages-b1987950d03d44471de08f512ecfc20beeb4aaca.zip
FreeSWITCH repair mod_fax for latest build. IVR allow t option timeout to run on its own enables a recording to play and then direct the call at the end of the recording. IVR and Huntgroup now have a new feature ability to set a caller id name prefix. This prefix makes it possilbe to track where the call came from.
Diffstat (limited to 'config/freeswitch')
-rw-r--r--config/freeswitch/freeswitch.inc54
-rw-r--r--config/freeswitch/freeswitch.xml2
-rw-r--r--config/freeswitch/freeswitch_hunt_group_edit.tmp24
-rw-r--r--config/freeswitch/freeswitch_ivr_edit.tmp23
4 files changed, 77 insertions, 26 deletions
diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc
index f41a3c47..41ffb818 100644
--- a/config/freeswitch/freeswitch.inc
+++ b/config/freeswitch/freeswitch.inc
@@ -1030,6 +1030,7 @@ function sync_package_freeswitch_hunt_group()
//$rowhelper['huntgrouptype']
//$rowhelper['huntgrouptimeout']
//$rowhelper['huntgroupcontext']
+ //$rowhelper['huntgroupcidnameprefix']
//$rowhelper['huntgroupdescr']
//add each Hunt Group to the dialplan
@@ -1178,9 +1179,20 @@ function sync_package_freeswitch_hunt_group()
$tmp .= " domain_name = session.getVariable(\"domain_name\");\n";
$tmp .= " domain = session.getVariable(\"domain\");\n";
$tmp .= " us_ring = session.getVariable(\"us-ring\");\n";
- $tmp .= " caller_id_name = session.getVariable(\"caller_id_name\");\n";
+ $tmp .= " caller_id_name = session.getVariable(\"caller_id_name\");\n";
$tmp .= " caller_id_number = session.getVariable(\"caller_id_number\");\n";
+ $tmp .= " effective_caller_id_name = session.getVariable(\"effective_caller_id_name\");\n";
+ $tmp .= " effective_caller_id_number = session.getVariable(\"effective_caller_id_number\");\n";
+ $tmp .= " outbound_caller_id_name = session.getVariable(\"outbound_caller_id_name\");\n";
+ $tmp .= " outbound_caller_id_number = session.getVariable(\"outbound_caller_id_number\");\n";
$tmp .= "\n";
+
+ //set caller id prefix
+ if (strlen($rowhelper['huntgroupcidnameprefix'])> 0) {
+ $tmp .= "session.execute(\"set\", \"caller_id_name=".$rowhelper['huntgroupcidnameprefix']."\"+caller_id_name);\n";
+ $tmp .= "session.execute(\"set\", \"effective_caller_id_name=".$rowhelper['huntgroupcidnameprefix']."\"+effective_caller_id_name);\n";
+ $tmp .= "session.execute(\"set\", \"outbound_caller_id_name=".$rowhelper['huntgroupcidnameprefix']."\"+outbound_caller_id_name);\n";
+ }
$tmp .= " session.execute(\"set\", \"ringback=\"+us_ring); //set to ringtone\n";
$tmp .= " session.execute(\"set\", \"transfer_ringback=\"+us_ring); //set to ringtone\n";
if ($rowhelper['huntgrouptimeout'] > 0) {
@@ -1577,6 +1589,8 @@ function sync_package_freeswitch_ivr()
$rowhelper['ivrcontext']
$rowhelper['ivrdirectdial']
$rowhelper['ivrconditionjs']
+ $rowhelper['ivrringback']
+ $rowhelper['ivrcidnameprefix']
$rowhelper['ivrdescr']
*/
@@ -1733,8 +1747,21 @@ function sync_package_freeswitch_ivr()
$tmp .= " domain_name = session.getVariable(\"domain_name\");\n";
$tmp .= " domain = session.getVariable(\"domain\");\n";
$tmp .= " us_ring = session.getVariable(\"us-ring\");\n";
- $tmp .= " caller_id_name = session.getVariable(\"caller_id_name\");\n";
+ $tmp .= " caller_id_name = session.getVariable(\"caller_id_name\");\n";
$tmp .= " caller_id_number = session.getVariable(\"caller_id_number\");\n";
+ $tmp .= " effective_caller_id_name = session.getVariable(\"effective_caller_id_name\");\n";
+ $tmp .= " effective_caller_id_number = session.getVariable(\"effective_caller_id_number\");\n";
+ $tmp .= " outbound_caller_id_name = session.getVariable(\"outbound_caller_id_name\");\n";
+ $tmp .= " outbound_caller_id_number = session.getVariable(\"outbound_caller_id_number\");\n";
+ $tmp .= "\n";
+
+ //set caller id prefix
+ if (strlen($rowhelper['ivrcidnameprefix'])> 0) {
+ $tmp .= "session.execute(\"set\", \"caller_id_name=".$rowhelper['ivrcidnameprefix']."\"+caller_id_name);\n";
+ $tmp .= "session.execute(\"set\", \"effective_caller_id_name=".$rowhelper['ivrcidnameprefix']."\"+effective_caller_id_name);\n";
+ $tmp .= "session.execute(\"set\", \"outbound_caller_id_name=".$rowhelper['ivrcidnameprefix']."\"+outbound_caller_id_name);\n";
+ }
+
$tmp .= "\n";
$tmp .= " session.execute(\"set\", \"continue_on_fail=true\");\n";
@@ -1969,10 +1996,10 @@ function sync_package_freeswitch_ivr()
//$tmpaction .= "\n";
switch ($row['optionnumber']) {
- case "t":
- break;
- case "d":
- break;
+ //case "t":
+ // break;
+ //case "d":
+ // break;
default:
//$tmpaction .= " //console_log( \"info\", \"IVR Detected 1 digit \\n\" );\n";
if ($x == 0) {
@@ -2194,10 +2221,10 @@ function sync_package_freeswitch_ivr()
if ($row['optionaction'] == "anti-action") {
switch ($row['optionnumber']) {
- case "t":
- //break;
- case "d":
- //break;
+ //case "t":
+ // //break;
+ //case "d":
+ // //break;
default:
//$tmpantiaction .= " //console_log( \"info\", \"IVR Detected 1 digit \\n\" );\n";
@@ -2582,7 +2609,7 @@ function sync_package_freeswitch()
function freeswitch_php_install_command()
{
global $config;
- $freeswitch_package_version = "0.9.2.3";
+ $freeswitch_package_version = "0.9.2.4";
$freeswitch_build_version = "1.0.4 pre 8";
$freeswitch_build_revision = "13784";
@@ -2634,7 +2661,6 @@ function freeswitch_php_install_command()
exec("cp /tmp/dialplan.public.xml /usr/local/freeswitch/conf/dialplan/public.xml");
unlink_if_exists("/tmp/dialplan.public.xml");
-
//make a backup copy of the default config used with the 'Restore Default' buttons on the text areas.
exec("cp -R /usr/local/freeswitch/conf /usr/local/freeswitch/conf.orig");
@@ -2650,8 +2676,6 @@ function freeswitch_php_install_command()
exec("mkdir /usr/local/freeswitch/sounds/custom/8000/");
}
-
-
//copy audio files
exec("cd /usr/local/freeswitch/sounds/custom/8000/;fetch http://www.pfsense.com/packages/config/freeswitch/please_enter_your_pin_number.wav");
exec("cd /usr/local/freeswitch/sounds/custom/8000/;fetch http://www.pfsense.com/packages/config/freeswitch/please_enter_the_pin_number.wav");
@@ -2662,6 +2686,8 @@ function freeswitch_php_install_command()
exec("cd /usr/local/freeswitch/sounds/custom/8000/;fetch http://www.pfsense.com/packages/config/freeswitch/begin_recording.wav");
exec("cd /usr/local/freeswitch/sounds/custom/8000/;fetch http://www.pfsense.com/packages/config/freeswitch/your_pin_number_is_incorect_goodbye.wav");
+ //mod_fax
+ exec("cd /usr/local/freeswitch/mod/;fetch http://www.pfsense.com/packages/config/freeswitch/mod_fax.so");
//download lib files
exec("cd /usr/local/lib/;fetch http://www.pfsense.com/packages/config/freeswitch/libtinfo.so.5.6");
diff --git a/config/freeswitch/freeswitch.xml b/config/freeswitch/freeswitch.xml
index 876cb502..20f2b0f8 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.2.3</version>
+ <version>0.9.2.4</version>
<title>FreeSWITCH: Settings</title>
<include_file>/usr/local/pkg/freeswitch.inc</include_file>
<menu>
diff --git a/config/freeswitch/freeswitch_hunt_group_edit.tmp b/config/freeswitch/freeswitch_hunt_group_edit.tmp
index b1c6d57f..49720fcd 100644
--- a/config/freeswitch/freeswitch_hunt_group_edit.tmp
+++ b/config/freeswitch/freeswitch_hunt_group_edit.tmp
@@ -53,10 +53,11 @@ if (isset($id) && $a_hunt_group[$id]) {
$pconfig['huntgroupextension'] = $a_hunt_group[$id]['huntgroupextension'];
$pconfig['huntgroupname'] = $a_hunt_group[$id]['huntgroupname'];
$pconfig['huntgrouptype'] = $a_hunt_group[$id]['huntgrouptype'];
- $pconfig['huntgroupcontext'] = $a_hunt_group[$id]['huntgroupcontext'];
+ $pconfig['huntgroupcontext'] = $a_hunt_group[$id]['huntgroupcontext'];
$pconfig['huntgrouptimeout'] = $a_hunt_group[$id]['huntgrouptimeout'];
$pconfig['huntgrouptimeoutdestination'] = $a_hunt_group[$id]['huntgrouptimeoutdestination'];
$pconfig['huntgrouptimeouttype'] = $a_hunt_group[$id]['huntgrouptimeouttype'];
+ $pconfig['huntgroupcidnameprefix'] = $a_hunt_group[$id]['huntgroupcidnameprefix'];
$pconfig['huntgroupdescr'] = $a_hunt_group[$id]['huntgroupdescr'];
}
@@ -89,11 +90,12 @@ if ($_POST) {
}
$huntgroupent['huntgroupextension'] = $_POST['huntgroupextension'];
$huntgroupent['huntgroupname'] = $_POST['huntgroupname'];
- $huntgroupent['huntgrouptype'] = $_POST['huntgrouptype'];
+ $huntgroupent['huntgrouptype'] = $_POST['huntgrouptype'];
$huntgroupent['huntgroupcontext'] = $_POST['huntgroupcontext'];
$huntgroupent['huntgrouptimeout'] = $_POST['huntgrouptimeout'];
$huntgroupent['huntgrouptimeoutdestination'] = $_POST['huntgrouptimeoutdestination'];
$huntgroupent['huntgrouptimeouttype'] = $_POST['huntgrouptimeouttype'];
+ $huntgroupent['huntgroupcidnameprefix'] = $_POST['huntgroupcidnameprefix'];
$huntgroupent['huntgroupdescr'] = $_POST['huntgroupdescr'];
if (isset($id) && $a_hunt_group[$id]) {
@@ -242,12 +244,26 @@ display_top_tabs(build_menu());
?>
</td>
</tr>
+
+ <tr>
+ <td width="22%" valign="top" class="vncell">CID Prefix</td>
+ <td width="78%" class="vtable">
+ <input name="huntgroupcidnameprefix" type="text" class="formfld" id="huntgroupcidnameprefix" size="40" value="<?=htmlspecialchars($pconfig['huntgroupcidnameprefix']);?>">
+ <br>
+ <span class="vexpl">
+ Set a prefix on the caller ID name. (optional)
+ </span>
+ </td>
+ </tr>
<tr>
<td width="22%" valign="top" class="vncell">Description</td>
<td width="78%" class="vtable">
<input name="huntgroupdescr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['huntgroupdescr']);?>">
- <br> <span class="vexpl">You may enter a description here
- for your reference (not parsed).</span></td>
+ <br>
+ <span class="vexpl">
+ You may enter a description here for your reference (not parsed).
+ </span>
+ </td>
</tr>
<tr>
diff --git a/config/freeswitch/freeswitch_ivr_edit.tmp b/config/freeswitch/freeswitch_ivr_edit.tmp
index 87dd1394..77d7ceec 100644
--- a/config/freeswitch/freeswitch_ivr_edit.tmp
+++ b/config/freeswitch/freeswitch_ivr_edit.tmp
@@ -129,13 +129,14 @@ if (isset($id) && $a_ivr[$id]) {
$ivrid = $a_ivr[$id]['ivrid'];
$pconfig['ivrextension'] = $a_ivr[$id]['ivrextension'];
$pconfig['ivrname'] = $a_ivr[$id]['ivrname'];
- $pconfig['recordingidaction'] = $a_ivr[$id]['recordingidaction'];
+ $pconfig['recordingidaction'] = $a_ivr[$id]['recordingidaction'];
$pconfig['recordingidantiaction'] = $a_ivr[$id]['recordingidantiaction'];
$pconfig['ivrtimeout'] = $a_ivr[$id]['ivrtimeout'];
$pconfig['ivrcalltimeout'] = $a_ivr[$id]['ivrcalltimeout'];
$pconfig['ivrcontext'] = $a_ivr[$id]['ivrcontext'];
- $pconfig['ivrdirectdial'] = $a_ivr[$id]['ivrdirectdial'];
+ $pconfig['ivrdirectdial'] = $a_ivr[$id]['ivrdirectdial'];
$pconfig['ivrringback'] = $a_ivr[$id]['ivrringback'];
+ $pconfig['ivrcidnameprefix'] = $a_ivr[$id]['ivrcidnameprefix'];
$pconfig['ivrconditionjs'] = ($a_ivr[$id]['ivrconditionjs']);
$pconfig['ivrdescr'] = $a_ivr[$id]['ivrdescr'];
}
@@ -170,14 +171,15 @@ if ($_POST) {
}
$ivrent['ivrextension'] = $_POST['ivrextension'];
$ivrent['ivrname'] = $_POST['ivrname'];
- $ivrent['recordingidaction'] = $_POST['recordingidaction'];
+ $ivrent['recordingidaction'] = $_POST['recordingidaction'];
$ivrent['recordingidantiaction'] = $_POST['recordingidantiaction'];
$ivrent['ivrtimeout'] = $_POST['ivrtimeout'];
- $ivrent['ivrcalltimeout'] = $_POST['ivrcalltimeout'];
+ $ivrent['ivrcalltimeout'] = $_POST['ivrcalltimeout'];
$ivrent['ivrcontext'] = $_POST['ivrcontext'];
- $ivrent['ivrdirectdial'] = $_POST['ivrdirectdial'];
- $ivrent['ivrringback'] = $_POST['ivrringback'];
- $ivrent['ivrconditionjs'] = base64_encode($_POST['ivrconditionjs']);
+ $ivrent['ivrdirectdial'] = $_POST['ivrdirectdial'];
+ $ivrent['ivrringback'] = $_POST['ivrringback'];
+ $ivrent['ivrcidnameprefix'] = $_POST['ivrcidnameprefix'];
+ $ivrent['ivrconditionjs'] = base64_encode($_POST['ivrconditionjs']);
$ivrent['ivrdescr'] = $_POST['ivrdescr'];
if (isset($id) && $a_ivr[$id]) {
@@ -398,6 +400,13 @@ display_top_tabs(build_menu());
</tr>
<tr>
+ <td width="22%" valign="top" class="vncellreq">CID Prefix</td>
+ <td width="78%" class="vtable">
+ <input name="ivrcidnameprefix" type="text" class="formfld" id="ivrcidnameprefix" size="40" value="<?=htmlspecialchars($pconfig['ivrcidnameprefix']);?>">
+ <br> <span class="vexpl">Set a prefix on the caller ID name. (optional)</span></td>
+ </tr>
+
+ <tr>
<td width="22%" valign="top" class="vncellreq">Description</td>
<td width="78%" class="vtable">
<input name="ivrdescr" type="text" class="formfld" id="descr" size="40" value="<?=htmlspecialchars($pconfig['ivrdescr']);?>">