diff options
author | mcrane <mctch@yahoo.com> | 2009-06-19 06:16:38 -0600 |
---|---|---|
committer | mcrane <mctch@yahoo.com> | 2009-06-19 06:21:12 -0600 |
commit | 6919906b41eab4e7ff51455a8e8a9735a61145dd (patch) | |
tree | 61ad78fbfe60cc4d45863a41003a94e11307d63c /config/freeswitch | |
parent | 2ae85567c2f898664393eaef1489ce0f6f9e4af7 (diff) | |
download | pfsense-packages-6919906b41eab4e7ff51455a8e8a9735a61145dd.tar.gz pfsense-packages-6919906b41eab4e7ff51455a8e8a9735a61145dd.tar.bz2 pfsense-packages-6919906b41eab4e7ff51455a8e8a9735a61145dd.zip |
FreeSWITCH update fax, add ringback for music or ring tone to the huntgroup, option to keep voicemail file on local filesystem, and remove invalid characters from caller id number on the extension.
Diffstat (limited to 'config/freeswitch')
-rw-r--r-- | config/freeswitch/freeswitch.inc | 33 | ||||
-rw-r--r-- | config/freeswitch/freeswitch.xml | 2 | ||||
-rw-r--r-- | config/freeswitch/freeswitch_extensions_edit.tmp | 39 | ||||
-rw-r--r-- | config/freeswitch/freeswitch_hunt_group_edit.tmp | 30 |
4 files changed, 94 insertions, 10 deletions
diff --git a/config/freeswitch/freeswitch.inc b/config/freeswitch/freeswitch.inc index 41ffb818..5e26316a 100644 --- a/config/freeswitch/freeswitch.inc +++ b/config/freeswitch/freeswitch.inc @@ -588,7 +588,16 @@ function sync_package_freeswitch_extensions() default: $tmpxml .= " <param name=\"vm-attach-file\" value=\"true\"/>\n"; } - + switch ($rowhelper['vm-keep-local-after-email']) { + case "true": + $tmpxml .= " <param name=\"vm-keep-local-after-email\" value=\"true\"/>\n"; + break; + case "false": + $tmpxml .= " <param name=\"vm-keep-local-after-email\" value=\"false\"/>\n"; + break; + default: + $tmpxml .= " <param name=\"vm-keep-local-after-email\" value=\"true\"/>\n"; + } $tmpxml .= " <param name=\"vm-mailto\" value=\"" . $rowhelper['vm-mailto'] . "\"/>\n"; } if (strlen($rowhelper['auth-acl']) > 0) { @@ -1030,6 +1039,7 @@ function sync_package_freeswitch_hunt_group() //$rowhelper['huntgrouptype'] //$rowhelper['huntgrouptimeout'] //$rowhelper['huntgroupcontext'] + //$rowhelper['huntgroupringback'] //$rowhelper['huntgroupcidnameprefix'] //$rowhelper['huntgroupdescr'] @@ -1193,8 +1203,22 @@ function sync_package_freeswitch_hunt_group() $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 (isset($rowhelper['huntgroupringback'])){ + if ($rowhelper['huntgroupringback'] == "ring"){ + $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['huntgroupringback'] == "music"){ + $tmp .= " session.execute(\"set\", \"ringback=\${hold_music}\"); //set to ringtone\n"; + $tmp .= " session.execute(\"set\", \"transfer_ringback=\${hold_music}\"); //set to ringtone\n"; + } + } + else { + $tmp .= " session.execute(\"set\", \"ringback=\${hold_music}\"); //set to ringtone\n"; + $tmp .= " session.execute(\"set\", \"transfer_ringback=\${hold_music}\"); //set to ringtone\n"; + } + if ($rowhelper['huntgrouptimeout'] > 0) { $tmp .= " session.execute(\"set\", \"call_timeout=".$rowhelper['huntgrouptimeout']."\");\n"; $tmp .= " session.execute(\"set\", \"continue_on_fail=true\");\n"; @@ -2585,7 +2609,6 @@ function sync_package_freeswitch_public_includes() function sync_package_freeswitch() { - global $config; sync_package_freeswitch_settings(); sync_package_freeswitch_dialplan(); @@ -2609,7 +2632,7 @@ function sync_package_freeswitch() function freeswitch_php_install_command() { global $config; - $freeswitch_package_version = "0.9.2.4"; + $freeswitch_package_version = "0.9.2.5"; $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 20f2b0f8..c25b8286 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.4</version> + <version>0.9.2.5</version> <title>FreeSWITCH: Settings</title> <include_file>/usr/local/pkg/freeswitch.inc</include_file> <menu> diff --git a/config/freeswitch/freeswitch_extensions_edit.tmp b/config/freeswitch/freeswitch_extensions_edit.tmp index 636a548f..b6ca1b10 100644 --- a/config/freeswitch/freeswitch_extensions_edit.tmp +++ b/config/freeswitch/freeswitch_extensions_edit.tmp @@ -55,6 +55,7 @@ if (isset($id) && $a_extensions[$id]) { $pconfig['outbound_caller_id_number'] = $a_extensions[$id]['outbound_caller_id_number']; $pconfig['vm-mailto'] = $a_extensions[$id]['vm-mailto']; $pconfig['vm-attach-file'] = $a_extensions[$id]['vm-attach-file']; + $pconfig['vm-keep-local-after-email'] = $a_extensions[$id]['vm-keep-local-after-email']; $pconfig['user_context'] = $a_extensions[$id]['user_context']; $pconfig['callgroup'] = $a_extensions[$id]['callgroup']; $pconfig['auth-acl'] = $a_extensions[$id]['auth-acl']; @@ -71,6 +72,12 @@ if ($_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(); $ent['extension'] = $_POST['extension']; $ent['password'] = $_POST['password']; @@ -78,11 +85,12 @@ if ($_POST) { $ent['vm-password'] = $_POST['vm-password']; $ent['accountcode'] = $_POST['accountcode']; $ent['effective_caller_id_name'] = $_POST['effective_caller_id_name']; - $ent['effective_caller_id_number'] = $_POST['effective_caller_id_number']; + $ent['effective_caller_id_number'] = $effective_caller_id_number; $ent['outbound_caller_id_name'] = $_POST['outbound_caller_id_name']; - $ent['outbound_caller_id_number'] = $_POST['outbound_caller_id_number']; + $ent['outbound_caller_id_number'] = $outbound_caller_id_number; $ent['vm-mailto'] = $_POST['vm-mailto']; $ent['vm-attach-file'] = $_POST['vm-attach-file']; + $ent['vm-keep-local-after-email'] = $_POST['vm-keep-local-after-email]; $ent['user_context'] = $_POST['user_context']; $ent['callgroup'] = $_POST['callgroup']; $ent['auth-acl'] = $_POST['auth-acl']; @@ -235,7 +243,32 @@ display_top_tabs(build_menu()); ?> Choose whether to attach the file to the email. </td> - </tr> + </tr> + <tr> + <td width="25%" valign="top" class="vncellreq" nowrap>vm-keep-local-after-email</td> + <td width="75%" class="vtable"> + <?php + echo " <select name='vm-keep-local-after-email' class='formfld unknown'>\n"; + echo " <option></option>\n"; + switch (htmlspecialchars($pconfig['vm-keep-local-after-email'])) { + case "true": + echo " <option value='true' selected='yes'>true</option>\n"; + echo " <option value='false'>false</option>\n"; + break; + case "false": + echo " <option value='true'>true</option>\n"; + echo " <option value='false' selected='yes'>false</option>\n"; + + break; + default: + echo " <option value='true' selected='yes'>true</option>\n"; + echo " <option value='false'>false</option>\n"; + } + echo " </select>\n"; + ?> + Keep local file after sending the email. + </td> + </tr> <tr> <td width="25%" valign="top" class="vncellreq">User Context</td> <td width="75%" class="vtable"> diff --git a/config/freeswitch/freeswitch_hunt_group_edit.tmp b/config/freeswitch/freeswitch_hunt_group_edit.tmp index 49720fcd..7657a03d 100644 --- a/config/freeswitch/freeswitch_hunt_group_edit.tmp +++ b/config/freeswitch/freeswitch_hunt_group_edit.tmp @@ -57,6 +57,7 @@ if (isset($id) && $a_hunt_group[$id]) { $pconfig['huntgrouptimeout'] = $a_hunt_group[$id]['huntgrouptimeout']; $pconfig['huntgrouptimeoutdestination'] = $a_hunt_group[$id]['huntgrouptimeoutdestination']; $pconfig['huntgrouptimeouttype'] = $a_hunt_group[$id]['huntgrouptimeouttype']; + $pconfig['huntgroupringback'] = $a_hunt_group[$id]['huntgroupringback']; $pconfig['huntgroupcidnameprefix'] = $a_hunt_group[$id]['huntgroupcidnameprefix']; $pconfig['huntgroupdescr'] = $a_hunt_group[$id]['huntgroupdescr']; } @@ -95,6 +96,7 @@ if ($_POST) { $huntgroupent['huntgrouptimeout'] = $_POST['huntgrouptimeout']; $huntgroupent['huntgrouptimeoutdestination'] = $_POST['huntgrouptimeoutdestination']; $huntgroupent['huntgrouptimeouttype'] = $_POST['huntgrouptimeouttype']; + $huntgroupent['huntgroupringback'] = $_POST['huntgroupringback']; $huntgroupent['huntgroupcidnameprefix'] = $_POST['huntgroupcidnameprefix']; $huntgroupent['huntgroupdescr'] = $_POST['huntgroupdescr']; @@ -244,7 +246,33 @@ display_top_tabs(build_menu()); ?> </td> </tr> - + <tr> + <td width="22%" valign="top" class="vncellreq">Ring Back</td> + <td width="78%" class="vtable"> + <?php + echo " <select name='huntgroupringback' class='formfld'>\n"; + echo " <option></option>\n"; + if (htmlspecialchars($pconfig['huntgroupringback']) == "ring") { + echo " <option selected='yes'>ring</option>\n"; + } + else { + echo " <option>ring</option>\n"; + } + if (htmlspecialchars($pconfig['huntgroupringback']) == "music") { + echo " <option selected='yes'>music</option>\n"; + } + else { + echo " <option>music</option>\n"; + } + echo " </select>\n"; + ?> + <br> + <span class="vexpl"> + Defines what the caller will hear while destination is being called. The choices are music + (music on hold) ring (ring tone.) default: music + </span> + </td> + </tr> <tr> <td width="22%" valign="top" class="vncell">CID Prefix</td> <td width="78%" class="vtable"> |