From 6919906b41eab4e7ff51455a8e8a9735a61145dd Mon Sep 17 00:00:00 2001 From: mcrane Date: Fri, 19 Jun 2009 06:16:38 -0600 Subject: 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. --- config/freeswitch/freeswitch.inc | 33 +++++++++++++++++--- config/freeswitch/freeswitch.xml | 2 +- config/freeswitch/freeswitch_extensions_edit.tmp | 39 ++++++++++++++++++++++-- config/freeswitch/freeswitch_hunt_group_edit.tmp | 30 +++++++++++++++++- 4 files changed, 94 insertions(+), 10 deletions(-) (limited to 'config/freeswitch') 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 .= " \n"; } - + switch ($rowhelper['vm-keep-local-after-email']) { + case "true": + $tmpxml .= " \n"; + break; + case "false": + $tmpxml .= " \n"; + break; + default: + $tmpxml .= " \n"; + } $tmpxml .= " \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 @@ Describe your package requirements here Currently there are no FAQ items provided. FreeSWITCH Settings - 0.9.2.4 + 0.9.2.5 FreeSWITCH: Settings /usr/local/pkg/freeswitch.inc 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. - + + + vm-keep-local-after-email + + \n"; + echo " \n"; + switch (htmlspecialchars($pconfig['vm-keep-local-after-email'])) { + case "true": + echo " \n"; + echo " \n"; + break; + case "false": + echo " \n"; + echo " \n"; + + break; + default: + echo " \n"; + echo " \n"; + } + echo " \n"; + ?> + Keep local file after sending the email. + + User Context 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()); ?> - + + Ring Back + + \n"; + echo " \n"; + if (htmlspecialchars($pconfig['huntgroupringback']) == "ring") { + echo " \n"; + } + else { + echo " \n"; + } + if (htmlspecialchars($pconfig['huntgroupringback']) == "music") { + echo " \n"; + } + else { + echo " \n"; + } + echo " \n"; + ?> +
+ + Defines what the caller will hear while destination is being called. The choices are music + (music on hold) ring (ring tone.) default: music + + + CID Prefix -- cgit v1.2.3