1234 Commits

Author SHA1 Message Date
a15ce6fe8a merge upstream 2026-04-28 00:10:50 +00:00
FusionPBX
ba8f626058 Update call_recordings.php 2026-04-11 18:22:53 +00:00
Antonio Fernandez
f0154a9db8 Bug Fix: on $action_name = 'both' there was no comma (#466)
No command when action_name was set to 'both' causing the SQL statement to be invalid
2026-04-11 18:19:18 +00:00
Antonio Fernandez
c97579ab69 Implement move result code check for recordings (#467)
Add error handling for file move operation.
2026-04-10 22:11:43 +00:00
FusionPBX
2e68b248cb Specify full paths for wget and tar commands
Make sure wget is installed
2026-04-10 02:55:00 +00:00
FusionPBX
733a33f231 Direct install of the sounds and music 2026-04-08 10:13:38 -06:00
FusionPBX
cf10439e57 Fix the switch_branch condition 2026-04-07 17:50:53 -06:00
FusionPBX
b8666cb2bb Checkout the correct branch 2026-04-07 17:10:23 -06:00
FusionPBX
9da8998fee Add unzip package to the install 2026-04-07 12:24:27 -06:00
FusionPBX
d2e2579bdf Add unzip package to the install 2026-04-07 12:21:47 -06:00
FusionPBX
066ffe546a Use one condition to overwrite the branch
Simplifies the code by removing multiple conditions for the trixie codename
2026-04-07 18:04:34 +00:00
7c4d0d1e11 fix typo 2026-04-06 12:39:57 -04:00
adf53bb33f fix fusionpbx git repo location 2026-04-06 11:45:13 -04:00
d12a870efb revert 802f168bde
revert add prompt for install domain and admin user name.
2026-04-06 15:39:36 +00:00
28e960adef revert 787216ebff
revert add git auth block to install file.
2026-04-06 15:37:20 +00:00
78e081320d Merge pull request 'update default install options for internal development for nsi' (#1) from nsi-defaults into installer
Reviewed-on: #1
2026-04-06 12:45:06 +00:00
5db4a3f259 update fusionpbx git repo location. 2026-04-06 08:40:27 -04:00
802f168bde add prompt for install domain and admin user name. 2026-04-04 07:31:07 -04:00
787216ebff add git auth block to install file. 2026-04-04 07:22:52 -04:00
af3a9b2d16 update repository url for internal development 2026-04-04 07:03:13 -04:00
FusionPBX
74c0616ab3 Install ffmpeg 2026-02-22 00:53:43 -07:00
FusionPBX
f32430b587 Add the -$switch_version postfix and use it consistently 2026-02-22 00:02:01 -07:00
FusionPBX
7e0127c44d Update nftables.sh 2026-02-02 16:24:46 -07:00
FusionPBX
1c12644b34 Update the version release version to 5.5 2026-01-30 16:50:39 -07:00
FusionPBX
e17be44af2 Add application language_model to the install 2026-01-30 08:10:05 -07:00
FusionPBX
e7ee4a3128 Update nftables configuration and installation script
This script now installs nftables, removes iptables, and configures nftables rules in /etc/nftables.conf.
2025-12-30 17:32:28 -07:00
FusionPBX
25c25e64db Set the version of PostgreSQL to 18 2025-12-02 17:24:25 -07:00
FusionPBX
ce71d89797 Set the version of PostgreSQL to 18 2025-12-02 17:23:37 -07:00
FusionPBX
1ac04192c8 Add PHP 8.4 support for Ubuntu 2025-12-01 10:16:29 -07:00
frytimo
7d41f37a18 Fix condition for checking OS codename and branch (#452) 2025-11-25 07:45:40 -07:00
frytimo
bc30e8c6c9 Add support for Debian version 13 codename Trixie (#451) 2025-11-21 18:27:09 -07:00
FusionPBX
eefc35b778 Add support for PHP 8.3 in ioncube.sh 2025-11-10 11:57:32 -07:00
Alex
2658bccf03 Add session settings (#450)
* Add session settings

* Update config.conf

* Update config.conf

* Update config.conf

* Update config.conf
2025-10-03 16:07:09 -06:00
FusionPBX
7934ab0b7f Update fusionpbx 2025-08-25 15:21:06 -06:00
frytimo
a4ce30cbb7 Fix applications.sh not having executable flag set (#449) 2025-08-15 07:24:50 -06:00
FusionPBX
652308414c Update finish.sh 2025-08-13 11:05:04 -06:00
FusionPBX
a53839ce35 Update finish.sh 2025-08-13 11:03:01 -06:00
FusionPBX
feb239f112 Update finish.sh 2025-08-13 11:02:12 -06:00
FusionPBX
fa8d5de14f Update finish.sh 2025-08-13 11:01:29 -06:00
AdSecIT
9d7fb24069 Update pre-install.sh (#448)
* Update pre-install.sh

Sets apt-get to be non interactive on the pre-install.

* Update pre-install.sh

Sets apt-get to be non interactive on the pre-install.
2025-08-12 23:02:39 -06:00
FusionPBX
1edb57cca5 Update source-release.sh 2025-08-06 17:29:47 -06:00
FusionPBX
b224795585 Update nginx fusionpbx to 8.2 2025-08-03 11:04:00 -06:00
FusionPBX
2b1bb28990 Update fusionpbx 2025-08-03 11:02:56 -06:00
FusionPBX
fa5646ba4f Add websockets to nginx 2025-08-03 11:00:10 -06:00
FusionPBX
0b2c7b2add Add websockets to nginx config 2025-08-03 10:59:03 -06:00
FusionPBX
54e84f95df Update schema, app defaults and services 2025-08-03 10:10:37 -06:00
FusionPBX
cb5b64677d Update schema and app defaults 2025-08-03 10:07:30 -06:00
FusionPBX
3d0d868e55 Update schema and app defaults. 2025-08-03 10:03:04 -06:00
FusionPBX
7b6205b55f Update source-master.sh 2025-08-03 09:14:27 -06:00
FusionPBX
6f076d09e2 Update source-master.sh 2025-08-03 09:14:09 -06:00
FusionPBX
6e4271fb8c Update source-master.sh 2025-08-03 09:13:04 -06:00
FusionPBX
bd17bf3668 Update PHP to 8.2 2025-08-03 08:48:14 -06:00
FusionPBX
789eaeb91c Install the services
Simplify installing the services
2025-08-03 08:41:32 -06:00
FusionPBX
4fd8615400 Install all the services
Simplify how the services are installed
2025-08-03 08:40:15 -06:00
FusionPBX
98079206fc Update the version to PHP 8.3 2025-08-03 08:32:39 -06:00
FusionPBX
b9f6101f44 Change the version of PHP to 8.3 2025-08-03 08:27:18 -06:00
FusionPBX
356e2b34d8 Update finish.sh 2025-07-15 02:49:31 -06:00
FusionPBX
195c9788b2 Update config.sh 2025-07-15 02:01:01 -06:00
FusionPBX
9120ade29b Update config.sh 2025-07-15 02:00:45 -06:00
FusionPBX
ddfe9ccf78 Update config.sh 2025-07-15 02:00:05 -06:00
chansizzle
0c6aeb216b pgpassword security and conflict avoidance (#442) 2025-07-05 16:13:33 -06:00
FusionPBX
08fdebd1bb Remove bdr
Remove old deprecated old replication
2025-07-05 16:09:17 -06:00
FusionPBX
a8f14d95e7 Add websockets and active_calls services 2025-06-24 13:47:56 -06:00
FusionPBX
e25129c99a Proxy calls to the websocket server 2025-06-24 12:37:28 -06:00
FusionPBX
b361af8c11 Update grandstream phonebook rewrite rule 2025-06-20 19:53:28 -06:00
FusionPBX
475c7c5203 Remove PHP 5.6 and 7.0 from the Debian install 2025-06-12 12:03:06 -06:00
FusionPBX
bc4842a5b5 Update call_recordings.php 2025-05-15 13:45:06 -06:00
FusionPBX
7a9200b3fd Update call_recordings.php 2025-04-04 15:45:54 -06:00
FusionPBX
b2a73beb59 Update call_recordings.php 2025-04-04 15:44:17 -06:00
FusionPBX
e5495ccb11 Update call_recordings.php 2025-04-04 15:33:01 -06:00
FusionPBX
c702809b77 Add option to convert with sox 2025-04-04 15:26:18 -06:00
FusionPBX
5d990aa0e7 Update ioncube.sh 2025-03-10 21:52:35 -06:00
FusionPBX
bdf9a998f2 Update php.sh 2025-03-10 21:44:31 -06:00
FusionPBX
ed7873a333 Update php.sh 2025-03-10 21:38:19 -06:00
FusionPBX
88f70caa38 Update ioncube.sh 2025-03-10 21:35:15 -06:00
FusionPBX
028dd53504 Update php.sh 2025-03-10 20:09:01 -06:00
FusionPBX
d27e184ee0 Update ioncube.sh 2025-03-10 20:03:10 -06:00
FusionPBX
68407a9e96 Update ioncube.sh 2025-03-10 20:01:48 -06:00
FusionPBX
80df536abe Add php8.2 support 2025-03-10 19:58:56 -06:00
chansizzle
10dc132466 Create fail2ban.local (#440)
adding this file removes the warning: 

WARNING 'allowipv6' not defined in 'Definition'. Using default one: 'auto'
2025-03-04 08:21:03 -07:00
frytimo
06a38b38a8 Fix the application edit path (#441) 2025-03-04 08:19:10 -07:00
FusionPBX
32132d055c Update package-release.sh 2025-02-14 16:23:03 -07:00
chansizzle
dee7ae0943 v_xml_cdr_json changed from start_stamp to insert_date (#438)
v_xml_cdr_json.start_stamp is always null so the old records in this table were not being purged. Changed to v_xml_cdr_json.insert_date since this field is populated
2025-02-04 08:46:35 -07:00
frytimo
2ede664657 add inotify to php installer and php8.2 (#439) 2025-02-04 08:44:21 -07:00
FusionPBX
a745027df0 Change the version to Postgresql 17 2024-12-30 20:11:06 -07:00
FusionPBX
71db64e7e7 Add UTF8 encoding and additional comments 2024-12-30 09:05:38 -07:00
FusionPBX
327d6d136c Install gpg with apt 2024-12-30 08:59:22 -07:00
FusionPBX
b837c958e7 Update Ubuntu source-permissions.sh 2024-12-21 22:00:08 -07:00
FusionPBX
e1e3ab5ce0 Update source-release.sh 2024-12-17 20:31:22 -07:00
FusionPBX
9cf2f3bc91 Update source-release.sh 2024-12-17 20:09:58 -07:00
FusionPBX
f663f3fc9c Update source-release.sh 2024-12-17 20:06:26 -07:00
FusionPBX
e8b7ae134f Change the Switch version to 1.10.12 2024-12-17 19:57:25 -07:00
FusionPBX
a3cb4c03bd Checkout the custom version branch 2024-12-17 19:25:40 -07:00
FusionPBX
2a2305f4fc Use the new git branch 2024-12-11 16:46:23 -07:00
FusionPBX
114f36fd7a Add bootstrap.sh 2024-11-23 16:46:31 -07:00
FusionPBX
32780058c2 Update the install to use a git repo 2024-11-23 16:34:47 -07:00
FusionPBX
abdd3a517a Update php version to 8.1 in the nginx config 2024-11-15 11:34:16 -07:00
FusionPBX
764122e86e Update source-release.sh 2024-10-08 19:21:46 -06:00
FusionPBX
38937d567e Use the mod_pgsql.patch 2024-10-08 18:46:49 -06:00
FusionPBX
ccda753859 Create mod_pgsql.patch 2024-10-08 18:39:31 -06:00
FusionPBX
00b3c3b5d9 Use branch 5.3 for the new release. 2024-09-17 12:05:34 -06:00
FusionPBX
be0657803a Update config.conf
I removed this as its breaking the install.
2024-09-03 10:16:00 -06:00
Chad Sheridan
4fc59b5e5e Updated Ubuntu installer to support up to 24.04 LTS (#436)
- Added optional applications.sh scripts.
- Added call_recordings.php script for wav - mp3 conversion.
- Updated ubuntu\resources\fusionpbx\config.conf to add entry for setting the event socket password and a comment at the top to direct admins to where they can find more configuration options for this file.
- Updated config.sh to add switch_token entry and some version changes to make the installer Ubuntu 24.04 compatible.  
- Added on the Optional applications.
- Updated environment.sh to include setting the PATH just in case.
- Updated finish.sh to include output of database username and password to save a few steps when setting up.
- Added freeswitch-acl.conf from the Debian side as more security is important.
- Updated jail.local to include freeswitch-acl as well as turning several items on by default (security should always be the default).
- Updated install.sh to include some missing dependencies (nginx and build-essential)
- Updated php.sh, and nginx.sh to include 8.1, 8.2 and 8.3
- Swapped plocate for mlocate in dependency install in ubuntu\resources\switch\source-release.sh
- uncommented ./bootstrap.sh -j line for git compatibility
- removed duplicate $switch_version from sed commands, added sed command to disable mod_av.
- Added environment.sh include to switch.sh
- Added monit files for freeswitch perms etc.
2024-08-30 18:06:50 -06:00
denisent
d0322070ff fix tables not deleting and added echoing (#432)
- updated tables that were not deleting
- updated user log table IF statement variable name
- changed section comments to echo so it is easier to know what is being deleted if running manually. includes number of days
2024-08-30 16:51:14 -06:00
Antonio Fernandez
6f866ad94f indentation (#435) 2024-08-30 16:48:05 -06:00
FusionPBX
020d191e23 Create rc.d.xml_cdr
Add xml_cdr service
2024-08-27 07:23:19 -06:00
FusionPBX
e74388f560 Add fax_queue service
Move email_queue and event_guard services into the fusionpbx directory.
2024-08-27 07:18:38 -06:00
FusionPBX
7496c5e844 Create rc.d.email_queue 2024-08-27 07:14:36 -06:00
FusionPBX
a8b37ba452 Update rc.d.event_guard
Improved start, stop, and status
2024-08-27 07:12:54 -06:00
FusionPBX
cef887def6 update pf.conf
Remove this line.
  anti-spoof quick for all 
It created an error.
2024-08-27 06:27:02 -06:00
FusionPBX
54b605d3d2 Create rc.d.event_guard 2024-08-26 11:48:04 -06:00
FusionPBX
587c184ea8 Update rc.d.freeswitch
Update the path, user and group
2024-08-26 11:40:07 -06:00
FusionPBX
886d3c17e9 Update pf.conf and settings 2024-08-25 20:01:59 -06:00
FusionPBX
719a960a79 Update pf.sh 2024-08-25 17:38:37 -06:00
FusionPBX
161cb556f0 Move IGNORE_DEPENDS
Needed for PHP and FreeSWITCH as both use postgresql15-client by default
2024-08-24 12:17:11 -06:00
FusionPBX
7bb8399729 Update php.sh 2024-08-24 11:56:10 -06:00
FusionPBX
545bf2e3d9 Add IGNORE_DEPENDS
IGNORE_DEPENDS=postgresql15-client to the /usr/local/etc/pkg.conf file. 

Adding this to allow PotgreSQL 16 client
2024-08-24 11:30:21 -06:00
FusionPBX
f1631f9d7e Update portsnap 2024-08-24 10:32:41 -06:00
FusionPBX
84db5c1335 Update install.sh 2024-08-24 10:25:41 -06:00
FusionPBX
87a729b547 Update install.sh 2024-08-24 10:24:15 -06:00
FusionPBX
e906b0caf2 FreeBSD Update multiple changes
- remove memcache
- update switch url
- switch package require postgresql 15
- portsnap enabled
2024-08-24 10:11:54 -06:00
FusionPBX
4e0fba4cb9 use system_branch variable 2024-08-24 09:43:21 -06:00
FusionPBX
35a9d4df82 PostgreSQL update 2024-08-24 09:30:47 -06:00
FusionPBX
b203064132 Update PostgreSQL version to 16 2024-08-24 09:24:16 -06:00
Antonio Fernandez
13e6cf2f2f Update fusionpbx.sh (#434)
* Update fusionpbx.sh

4.4 branch is no longer available so this causes the script to fail

* changed to be just like Linux
2024-07-14 09:50:21 -06:00
Harry Foster
6d76c2fe0b Update iptables.sh (#429)
Bookworm (12) is not accounted for in the iptables script. End up with an almost blank chain on install.
2024-07-06 20:40:43 -06:00
Antonio Fernandez
49930c411a avaya rewrite rules added for all distros (#433) 2024-07-04 20:19:01 -06:00
FusionPBX
02f30200c6 Send the output to /dev/null 2024-07-03 13:35:53 -06:00
FusionPBX
1dd775d251 Create call_recordings.php 2024-07-03 12:36:24 -06:00
Antonio Fernandez
8820f2be22 Added nginx rewrites to fix snom provision url (#431) 2024-06-27 15:56:43 -06:00
FusionPBX
acd052f6e9 Updated patches for FreeSWITCH 2024-06-22 13:28:23 -06:00
FusionPBX
65f3d2dd22 RTP audio patch
Fix RTP audio issues use the following for additional information. 

https://github.com/briteback/freeswitch/
2024-06-22 11:07:15 -06:00
FusionPBX
fcda62a065 Create rtp_timestamp.patch 2024-06-22 11:00:40 -06:00
Antonio Fernandez
3a19df73ec Added needed Snom rewrite rules to all distros (#428) 2024-06-12 09:43:32 -06:00
Antonio Fernandez
7b695723c0 updated the repo for dehydrated (#430) 2024-06-12 09:42:17 -06:00
FusionPBX
2d1c2bc15d Update fail2ban.sh 2024-05-09 09:00:17 -06:00
FusionPBX
8bd141b9c1 Add rsyslog package for fail2ban 2024-05-09 08:59:47 -06:00
chansizzle
55beab1c70 Fix calling variables and consistent database connections (#426)
A couple of variables were not being called correctly (missing '$')
A couple of database connection strings were not consistent with the other connection strings
2024-05-09 08:29:41 -06:00
fusionate
1574a51e66 Maintenance Script (Debian) - Clean up empty year and/or month folders after Call Recordings are removed. 2024-05-03 12:45:28 -06:00
fusionate
06f85cf964 Maintenance Script - Clean up empty year and/or month folders after Call Recordings are removed. 2024-05-03 12:38:26 -06:00
FusionPBX
906441b4bb Add Avaya rewrite rules 2024-04-25 14:16:02 -06:00
frytimo
664dc95771 Add ioncube 81 ubuntu (#424)
* Add ioncube loader for php8.1
2024-04-20 10:31:30 -06:00
chansizzle
582d1ffb69 add missing log tables and new cdr tables (#423) 2024-04-20 10:27:24 -06:00
chansizzle
3bb58326ec remove duplicate --config /etc/dehydrated/config (#425) 2024-04-20 10:25:53 -06:00
FusionPBX
3a2d0d98b8 Update config.sh 2024-04-20 08:05:23 -06:00
FusionPBX
24df03ddb0 Add option for additional applications 2024-04-16 15:36:06 -06:00
demonspork
b4c9408e73 Install Cron (#422)
Debian 12 doesn't always have crontab command available
2024-03-04 08:05:52 -07:00
FusionPBX
86b84e122d Update Raspbian 12 ARM to use PHP 8.2
Makes the install work for the Raspberry Pi
2024-02-19 22:07:48 -07:00
FusionPBX
1e19d61b18 Update source-release.sh 2024-02-12 17:12:39 -07:00
FusionPBX
b7538125e2 Create source-release.sh 2024-02-12 12:15:41 -07:00
FusionPBX
0260b66242 Add libsox-fmt-all for mp3 support 2024-02-09 13:32:45 -07:00
FusionPBX
e0784e8c6c Ubuntu use FreeSWITCH 1.10.11 2024-02-08 12:21:35 -07:00
frytimo
d47e023a38 fix spacing for variable assignment (#420)
fix spacing for variable assignment
2024-02-08 11:15:42 -07:00
FusionPBX
63a0a1303a Add gpg as a debian install dependency 2024-02-08 09:39:24 -07:00
FusionPBX
16360ed97a Update sngrep.sh 2024-02-05 12:50:12 -07:00
FusionPBX
a0ee735bdc Sngrep included recent Debian versions 2024-02-05 12:49:29 -07:00
tao_ssh
7e0d874857 Fix some errors for Centos platform (#410)
* Fix bugs

* Update conf-copy.sh

Update fusionpbx template path

* Update package-release.sh

Fix the issue of the files.freeswitch.org site not available

* Fix bug
2024-02-03 10:23:23 -07:00
FusionPBX
5ffcaf4b20 Update FreeSWITCH version to 1.10.11 2024-02-03 10:15:06 -07:00
FusionPBX
904e044320 Use the new FusionPBX 5.2 release 2024-01-25 12:40:16 -07:00
FusionPBX
ca3650baf9 Add debug symbols 2024-01-15 10:11:30 -07:00
FusionPBX
1da287d9a3 Fix install for Debian 11 and older 2024-01-10 10:10:22 -07:00
Larry Gadallah
39beae7c13 Fixes to allow deployment on FreeBSD 14 (#415)
* Changing default domain name to hostname, setting default PostgreSQL version to 15

* Adding support for PostgreSQL 14 and 15

* Correcting user and group options for freeswitch runtime

* Copying missing resources/fail2ban/freeswitch-dos.conf from debian dir, adding missing copy of sip-auth-challenge-ip.conf and sip-auth-challenge.conf, setting default setting for allowipv6 directive

* Remove freeswitch database and user

Reason for this change is if FreeSWITCH uses the PostgreSQL then its a good idea for it to use its own instance. This is to prevent blocking FreeSWITCH from accessing the database if there is a long running Query on the FusionPBX database

* Changing default domain name to hostname, setting default PostgreSQL version to 15

* Adding support for PostgreSQL 14 and 15

* Correcting user and group options for freeswitch runtime

* Copying missing resources/fail2ban/freeswitch-dos.conf from debian dir, adding missing copy of sip-auth-challenge-ip.conf and sip-auth-challenge.conf, setting default setting for allowipv6 directive

---------
Co-authored-by: Charlie Root <root@sjcacs-test.gadallah.net>
2024-01-03 14:06:57 -07:00
demonspork
9601ff7db8 Improve apt key security and always install sngrep from official (#416)
* Improve apt key security and always install sngrep from official

* Correct PHP GPG key file path
2024-01-03 09:53:16 -07:00
chansizzle
d1b75cc405 removed unneeded word (#417) 2024-01-03 09:48:08 -07:00
FusionPBX
bb317b0d28 Update source-sounds.sh 2024-01-02 12:54:56 -07:00
FusionPBX
4cd6bd1f1f Update source-sounds.sh 2024-01-02 11:58:30 -07:00
FusionPBX
cba28677b6 Install cron 2023-12-26 10:20:11 -07:00
FusionPBX
91061aa93b Install cron 2023-12-26 10:19:19 -07:00
FusionPBX
309dd5fdbd Remove freeswitch database and user
Reason for this change is if FreeSWITCH uses the PostgreSQL then its a good idea for it to use its own instance. This is to prevent blocking FreeSWITCH from accessing the database if there is a long running Query on the FusionPBX database
2023-12-21 10:16:47 -07:00
FusionPBX
7e0c0ef76f Keep the version when compiling the Switch 2023-12-06 11:09:26 -07:00
FusionPBX
7ce1d5eea1 Compile sofia in the versioned directory 2023-12-06 10:53:47 -07:00
FusionPBX
b8e9252375 Update versions 2023-12-06 10:48:09 -07:00
FusionPBX
a1861e9360 Update sofia version to 1.13.17 2023-12-06 10:47:21 -07:00
FusionPBX
872343dbf7 Prompt for replication method
Options: logical, or bdr

BDR considered deprecated but for now leaving it as an option.
2023-12-04 19:37:17 -07:00
FusionPBX
69c565f1bf Updated permission sury-php-8.x.gpg 2023-11-20 16:26:32 -07:00
FusionPBX
7ceb1293e8 Update permissions on pgdg.gpg file 2023-11-20 16:22:51 -07:00
FusionPBX
c28aad31a1 Disable viewing any directories that start with a period
.git was added a while ago but all hidden directories should also be blocked
2023-10-14 08:41:09 -06:00
FusionPBX
b57d970b06 Update php.sh 2023-10-11 18:43:25 -06:00
FusionPBX
fb931b299a Add ppa:ondrej/php for 20.04 LTS focal 2023-10-11 18:32:28 -06:00
FusionPBX
b6ae3716b6 Use 5.1 branch 2023-10-11 17:36:00 -06:00
chansizzle
031e852f64 add device logs table cleanup (#412) 2023-10-03 16:15:41 -06:00
jailbird777
ec61ad1feb Remove unsupported error for aarch64 Linux (#414)
While SignalWire doesn't have aarch64 debs of FreeSWITCH, PostgreSQL.org
and sury.org have debs of PgSQL & PHP for aarch64, respectively.
Compiling FreeSWITCH from source works cleanly on aarch64, tested on
both Armbian and stock Debian. So might as well remove the unsupported.

While we're add it, let's parallelize the makes, as it's dreadfully slow
on most SBCs without it
2023-10-03 16:15:13 -06:00
FusionPBX
c71ec93538 Use a specific commit for spandsp
0d2e6ac65e
2023-09-30 22:12:21 -06:00
FusionPBX
a46fb85c8b Update iptables.sh 2023-09-22 13:37:01 -06:00
FusionPBX
211de16e69 Update iptables.sh 2023-09-22 13:32:35 -06:00
FusionPBX
dc034e9317 Remove ufw chains 2023-09-21 21:32:59 -06:00
FusionPBX
014fca9062 Flush iptables before adding rules and use iptables-save 2023-09-21 21:25:07 -06:00
FusionPBX
c2bba26431 Initialize the database
Install on Debian 12 failed to initialize the database on its own so adding pg_createcluster to do this.
2023-09-21 15:43:43 -06:00
FusionPBX
49e2fb434d Use PostgreSQL 16 by default 2023-09-21 14:58:47 -06:00
FusionPBX
ef5170b557 Update PostgreSQL install 2023-09-21 14:56:22 -06:00
FusionPBX
b0dfc9fb47 Simplify PostgreSQL repo 2023-09-21 14:55:41 -06:00
FusionPBX
deda4e554d Update postgresql.sh 2023-09-21 14:51:30 -06:00
FusionPBX
bf2598b23a Use /etc/apt/trusted.gpg.d 2023-09-21 13:38:29 -06:00
FusionPBX
f6ea7bb164 Remove arch amd64 2023-09-21 13:34:13 -06:00
FusionPBX
44318812c1 Use keyring for PostgreSQL on Debian 11 and 12 2023-09-21 13:23:11 -06:00
FusionPBX
41892a3ce0 Update to use latest commit 2023-09-21 09:53:54 -06:00
FusionPBX
8621dbf5a9 Update the crontab command 2023-09-21 09:46:08 -06:00
chansizzle
32e3a03bbb fix appending crontab (#411) 2023-09-21 00:15:40 -06:00
FusionPBX
182cde2031 Add a cron job for call detail records. 2023-09-20 11:23:49 -06:00
FusionPBX
eb17e2b443 Set the branch to 5.1 2023-09-11 11:16:24 -06:00
FusionPBX
bd764df868 Able to set the git branch 2023-09-11 11:15:44 -06:00
FusionPBX
156ddccf44 Update Switch, Sofia and Postgresql version
Debian 12, Switch 1.10.10, Sofia 1.13.16, and PostgreSQL 15
2023-09-06 17:29:53 -06:00
FusionPBX
85380ba815 Add bookworm to php.sh 2023-09-06 17:22:00 -06:00
FusionPBX
0df0c8d02d Reload the Postgres config 2023-09-06 17:17:52 -06:00
FusionPBX
359eb22185 Update postgresql.sh 2023-09-06 17:06:57 -06:00
FusionPBX
69bda4704d replace scram-sha-256 with md5 2023-09-06 17:06:28 -06:00
FusionPBX
4e35bbc472 Update postgresql.sh 2023-09-06 16:48:53 -06:00
FusionPBX
cc5bf0f1a4 Add Debian 12 codename bookworm 2023-09-06 16:45:42 -06:00
FusionPBX
4885fe58aa Use php 7.4 for Raspberry Pi 4 - based on Debian 11 2023-07-25 13:51:46 -06:00
FusionPBX
671a151dde Fix compile errors use spandsp with a specific commit 2023-07-19 17:20:40 -06:00
FusionPBX
f6a5513b05 Use a specific commit 2023-06-30 13:46:16 -06:00
FusionPBX
287da37b91 Update source-release.sh 2023-06-30 13:31:24 -06:00
FusionPBX
9e5676eb6c Update source-release.sh 2023-06-30 13:29:54 -06:00
FusionPBX
830368ed94 Change required version from 2.71 to 2.69
This is needed for Debian 11
2023-06-30 13:24:27 -06:00
FusionPBX
6c22bd37b8 Update conf-copy.sh 2023-06-23 13:39:21 -06:00
FusionPBX
fe4d8b5d30 Update conf-copy.sh 2023-06-23 13:38:14 -06:00
FusionPBX
853fe7d016 Update source-copy.sh 2023-06-23 13:37:31 -06:00
FusionPBX
49d75adec5 Update package-copy.sh 2023-06-23 13:36:47 -06:00
FusionPBX
075113ad8a Update conf-copy.sh 2023-06-23 13:35:25 -06:00
FusionPBX
1931f3870e Debian 11 if config.sh PHP version is set to 7.4
Then use the system repo instead of using sury. Use sury repo only when its needed.
2023-06-20 15:40:07 -06:00
emak-Corey
a7e1cfe3eb Enable mod_translate when building FreeSWITCH (#409)
Required for Advanced > Number Translations app.
2023-06-19 13:08:54 -06:00
FusionPBX
73e35e27c2 Update php.sh 2023-06-16 17:38:39 -06:00
FusionPBX
7ecb60295a Update php.sh 2023-06-16 16:27:11 -06:00
FusionPBX
10c18bb0f5 Update php.sh 2023-06-16 16:24:15 -06:00
FusionPBX
ac87158a4b Add /usr/bin/ to sed path 2023-06-16 16:15:57 -06:00
FusionPBX
c58007e0f4 Use sury repo for PHP 8.1 and Debian system for 7.4 2023-06-16 16:10:25 -06:00
FusionPBX
6d09f6e90b Update php.sh 2023-06-16 16:03:15 -06:00
FusionPBX
85645e3e09 Update fusionpbx-maintenance 2023-06-14 11:23:56 -06:00
FusionPBX
e457af3737 Add db_name variable 2023-06-14 11:23:43 -06:00
FusionPBX
d4e7851f96 Use db_port,db_host, and db_username variables
This allows connecting to remote servers
2023-06-14 11:07:45 -06:00
FusionPBX
d341ef3d93 Update nginx.sh 2023-06-13 20:54:25 -06:00
FusionPBX
e9d6c5c1bd Update config.sh 2023-06-13 20:52:14 -06:00
FusionPBX
6c417058a1 Update nginx.sh and PHP 8.1 2023-06-13 20:48:39 -06:00
FusionPBX
b21b3cce36 Stick with PHP 8.1 for now.
Waiting on ioncube to support PHP 8.2
2023-06-13 11:02:58 -06:00
FusionPBX
27f4e1a892 Update php.sh 2023-06-12 12:39:18 -06:00
FusionPBX
290c083048 Update config.conf 2023-05-14 14:08:52 -06:00
FusionPBX
db8724ff58 Update config.conf 2023-05-14 14:08:22 -06:00
FusionPBX
a16c7c7fba Default to PHP 8.1 2023-05-14 13:49:18 -06:00
FusionPBX
e2f5055dd9 Update php.sh add PHP 8.1 support 2023-05-14 13:45:48 -06:00
FusionPBX
076fb99c18 Use 20210902 for PHP 8.1 2023-05-11 22:57:40 -06:00
FusionPBX
57819714e8 Hide results of upgrade schema
Upgrade schema is very long and makes it harder to see results that happened before it.
2023-05-11 08:35:53 -06:00
FusionPBX
b967656cb6 Update finish.sh 2023-05-10 19:28:20 -06:00
FusionPBX
fd9553d9dc Debian PHP add --no-install-recommends 2023-05-10 19:19:16 -06:00
FusionPBX
c0586576d8 Add php-common 2023-05-10 18:56:51 -06:00
FusionPBX
6d9bdb58af Update finish.sh 2023-05-10 18:47:31 -06:00
FusionPBX
8a99470e0c Update php.sh 2023-05-10 18:35:38 -06:00
FusionPBX
e7383e65b7 Update php.sh 2023-05-10 18:17:35 -06:00
FusionPBX
f902aacb49 Update php.sh 2023-05-10 18:16:21 -06:00
FusionPBX
87f55a8831 Continue to use 7.4 for now on Debian 2023-05-10 18:08:47 -06:00
FusionPBX
cb0a9ead75 Update php.sh 2023-05-10 17:39:43 -06:00
FusionPBX
42e8d06504 Update php.sh 2023-05-10 17:36:32 -06:00
FusionPBX
2b0d85654d Update php.sh 2023-05-09 14:44:45 -06:00
FusionPBX
7d441b1496 Use PHP 8.1 for Debian 11 2023-05-09 14:38:01 -06:00
FusionPBX
d7507bb6af Update config.sh 2023-05-09 14:28:38 -06:00
FusionPBX
3c7ec87f2f Update ioncube.sh 2023-05-09 13:35:23 -06:00
FusionPBX
d62e6082f4 Update ioncube.sh 2023-04-27 08:39:28 -06:00
FusionPBX
605a522a33 Update ioncube.sh 2023-04-27 08:36:45 -06:00
FusionPBX
c6c6072c39 Add support for PHP 8 2023-04-27 08:30:01 -06:00
fusionate
80321dcf2d Update fusionpbx-maintenance (#407)
Comment out command that purges the v_call_recordings table, as was turned into a view in FusionPBX 5.0.7+.  So, call recording data should now be managed only in the v_xml_cdr table instead.
2023-04-18 15:48:47 -06:00
FusionPBX
64f3eabf17 Update postgresql.sh 2023-04-04 23:36:52 -06:00
FusionPBX
080778d048 Use PostgreSQL 13 by default 2023-03-28 10:56:00 -06:00
FusionPBX
5d62a5e94c Update the version of FreeSWITCH and Sofia 2023-03-28 10:55:36 -06:00
fusionate
b20228e19d Source Switch Scripts - Updated source permissions script. (#406)
Make source-permissions.sh the same as package-permissions.sh, since the paths are the same.
2023-02-28 11:22:33 -10:00
FusionPBX
20746dc3ce Update package-release.sh 2023-02-23 20:20:18 -07:00
FusionPBX
c078a8df0f Update package-release.sh 2023-02-23 20:19:46 -07:00
FusionPBX
ce4308ec77 Update package-release.sh 2023-02-23 20:18:48 -07:00
FusionPBX
2a5e867571 Install sox 2023-02-23 20:18:08 -07:00
FusionPBX
f28d2803a8 Update source-release.sh 2023-02-23 20:16:50 -07:00
FusionPBX
814cd820d4 Install sox 2023-02-23 20:16:12 -07:00
FusionPBX
bd3e11e5a9 Update version to FreeSWITCH 1.10.9 and Sofia 1.13.13 2023-02-07 11:10:24 -07:00
FusionPBX
c4ee52d8e9 Update fusionpbx-maintenance 2023-01-27 10:35:04 -07:00
markjcrane
787c7686a9 Update shell script execute permissions 2023-01-26 17:21:07 -07:00
FusionPBX
7c2474b778 Update README.md 2023-01-18 22:15:25 -07:00
Leandro Heck
141a869019 Add command line for installing on Ubuntu/Raspbian OS (#404)
* Add command line for installing on Ubuntu/Raspbian OS

* Raspbian was the old name, now it is Raspberry OS

* Update README.md
2023-01-18 22:14:53 -07:00
FusionPBX
e2d63bd539 Update switch.sh 2023-01-18 22:11:33 -07:00
FusionPBX
1f08a634d1 Update source-release.sh 2023-01-18 22:10:30 -07:00
FusionPBX
f6b14519ad Create source-sounds.sh 2023-01-18 22:09:47 -07:00
FusionPBX
9197586ecc Update switch.sh 2023-01-18 13:12:19 -07:00
FusionPBX
2e74c5e380 Update source-release.sh 2023-01-18 13:10:53 -07:00
FusionPBX
66d52df5b1 Update source-sounds.sh 2023-01-18 13:10:11 -07:00
FusionPBX
0319e435fe Create source-sounds.sh 2023-01-18 13:08:07 -07:00
Arsenie Ciprian
f4677be0fe Update fusionpbx (#403)
* Update fusionpbx

added ipv6 support to port 80 and 443 [::]:

* Update fusionpbx
2023-01-09 11:11:29 -07:00
chansizzle
145575a8d1 set old cipher's priority to last (#405)
If old ciphers are used, make sure they are set to last in priority, which improves preferred order score.
2023-01-09 11:03:58 -07:00
FusionPBX
6a02dda4e5 Update dsn.sh 2022-12-23 16:42:22 -07:00
FusionPBX
0a25b44ec0 Use the fusionpbx database. 2022-12-23 16:38:08 -07:00
FusionPBX
663ae4d1ca Update dsn.sh 2022-12-23 16:35:33 -07:00
FusionPBX
a1bb6b86c3 update the switch database directory 2022-12-23 15:51:19 -07:00
FusionPBX
8987317c9f update the switch db directory 2022-12-23 15:31:03 -07:00
FusionPBX
0d0229c0f4 Use the file cache 2022-12-23 15:20:37 -07:00
FusionPBX
42a5e0abd2 Ubunut compile 1.10.8 2022-12-19 12:37:44 -07:00
FusionPBX
31ae7fc978 Debian 10 use PHP 7.4 2022-12-18 12:27:23 -07:00
FusionPBX
d2bd98d96e disable vi visual mode 2022-12-13 11:59:10 -07:00
FusionPBX
f36ae28a9d Older phone firmware still need ssl_protocols TLSv1 TLSv1.1 2022-12-09 13:07:41 -07:00
FusionPBX
e26840d8f2 Update config.sh 2022-11-30 15:32:16 -07:00
FusionPBX
a9dfe6ad39 Add uuid-dev 2022-11-23 18:14:54 -07:00
FusionPBX
5cfff5ac91 Update reboot_phones.sh 2022-11-09 19:54:19 -07:00
FusionPBX
4820a39b79 Update reboot_phones.sh 2022-11-09 19:53:04 -07:00
FusionPBX
8aa1d2147b Update reboot_phones.sh 2022-11-09 19:52:26 -07:00
FusionPBX
10592c0453 Update reboot_phones.sh 2022-11-09 19:47:20 -07:00
FusionPBX
50032b722d config.php has been replaced by config.conf 2022-10-26 13:48:28 -06:00
FusionPBX
d140f482f4 config.php has been replaced by config.conf 2022-10-26 13:48:13 -06:00
FusionPBX
5a11657ad2 config.php has been replaced by config.conf 2022-10-26 13:47:58 -06:00
FusionPBX
09579c9328 config.php has been replaced by config.conf 2022-10-26 13:47:25 -06:00
FusionPBX
4a552bd30f config.php has been replaced by config.conf 2022-10-26 13:46:52 -06:00
FusionPBX
ec316d100f Disable the patch for 1.10.8 2022-10-19 20:38:09 -06:00
FusionPBX
5ff0e1493c Chang version to 1.10.8 2022-10-19 20:37:16 -06:00
FusionPBX
fddb06683e Use SQLite by default 2022-10-19 11:03:19 -06:00
FusionPBX
5d1d402079 Use SQLite by default 2022-10-19 11:02:06 -06:00
FusionPBX
df1368ac76 Use SQLite by default 2022-10-19 11:01:06 -06:00
FusionPBX
e0409214af Use SQLite by default 2022-10-19 10:59:46 -06:00
FusionPBX
17c0051d3e Use SQLite by default 2022-10-19 10:58:47 -06:00
FusionPBX
320e3f0eb2 Fix sounds and scripts directory 2022-10-18 08:17:22 -06:00
FusionPBX
ecfba00d18 Update config.sh 2022-10-17 23:04:40 -06:00
FusionPBX
8e1a43fbf7 Update finish.sh 2022-10-17 22:33:49 -06:00
FusionPBX
60af1e3adf Update config.sh 2022-10-17 22:21:29 -06:00
FusionPBX
bb024ec47f Update config.conf 2022-10-17 22:16:02 -06:00
FusionPBX
a713b4eec1 Update finish.sh 2022-10-17 22:13:41 -06:00
FusionPBX
f116ade736 Update the config.conf 2022-10-13 15:15:47 -06:00
FusionPBX
1887bef722 Add additional database settings. 2022-10-13 15:11:13 -06:00
FusionPBX
bdd6adc95c Update config.conf 2022-10-13 15:08:04 -06:00
FusionPBX
5c18456b23 Use PHP 7.4 2022-10-12 18:58:34 -06:00
FusionPBX
9f61f8d8cd Update config.conf 2022-10-12 10:32:04 -06:00
FusionPBX
5536cf2f1f Update config.conf 2022-10-12 10:31:39 -06:00
FusionPBX
65be3d44a1 Add database_name and database_username 2022-10-12 10:21:37 -06:00
FusionPBX
2809f6aaff Update database_username and add database_name 2022-10-12 10:20:30 -06:00
FusionPBX
45ccf815d4 Add database_name 2022-10-12 10:17:40 -06:00
FusionPBX
2b77fa79b1 Update config.sh 2022-10-12 10:16:58 -06:00
FusionPBX
be6b39cb09 Add database_username to config.sh 2022-10-12 10:13:01 -06:00
FusionPBX
c6fa300858 Use database_username variable from config.sh 2022-10-12 10:11:32 -06:00
FusionPBX
bc7bdb95a6 Remove config.php and chown 2022-10-12 09:40:13 -06:00
FusionPBX
2c86a8db1c Remove config.php and chown 2022-10-12 09:39:21 -06:00
FusionPBX
0087938f6f Update finish.sh 2022-10-10 09:04:03 -06:00
FusionPBX
1d17deeefb Create config.conf 2022-10-10 09:03:18 -06:00
FusionPBX
6c8c8a8e35 Create config.conf 2022-10-10 08:44:25 -06:00
FusionPBX
0d5191331e Use /usr/local/etc on FreeBSD 2022-10-10 08:39:38 -06:00
FusionPBX
9143158480 Update finish.sh 2022-10-10 08:36:02 -06:00
FusionPBX
175e88285f Create config.conf 2022-10-10 08:35:15 -06:00
FusionPBX
ed6b4d06b3 Create config.conf 2022-10-10 08:34:06 -06:00
FusionPBX
7402ecbe16 Update finish.sh 2022-10-10 08:33:23 -06:00
FusionPBX
3767d0f3fd Update finish.sh 2022-10-10 08:32:31 -06:00
FusionPBX
15de248b35 Create config.conf 2022-10-10 08:31:33 -06:00
FusionPBX
0dc55fac31 Update php.sh 2022-09-27 12:10:01 -06:00
FusionPBX
c5d7bebcb8 Update README.md 2022-09-17 11:09:55 -06:00
FusionPBX
fe963fb296 Remove duplicate fastcgi_read_timeout and re-arrange to be more consistent. 2022-09-11 10:09:31 -06:00
jailbird777
3c12d3dd50 Update FreeBSD install script (for release, anyways) (#392)
Tested on HardenedBSD 14-CURRENT

I'm honestly not sure how the script ever worked without the missing cd commands?
2022-09-10 10:00:37 -06:00
emak
f60848e6e9 Add ability to build master branch (#400)
Adds the ability to build mater branch by setting the existing variable `$switch_branch` to `master` in config.sh
2022-09-10 09:56:37 -06:00
agree
8afacd9262 fail2ban add INVITE to auth challange filter (#401) 2022-09-08 09:30:29 -06:00
FusionPBX
7e62f45ff6 Add fastcgi_read_timeout 300 2022-09-06 16:34:50 -06:00
FusionPBX
205ea4060a Update fusionpbx 2022-08-09 15:50:30 -06:00
FusionPBX
5ee45aff75 Add phonebook.xml for SPA based firmware. 2022-08-09 15:17:34 -06:00
emak
cab0786d3c Update mod_pgsql.c patch (#399)
We use pgsql14 and build from source on 1.10.7 was failing again for some reason. Updated the source code to match the current freeswitch master branch and it worked fine. Updated code these differences were made from can be found here:

92d2e0b136
2022-08-08 20:21:47 -06:00
FusionPBX
fe3db43912 Update package-permissions.sh 2022-08-08 20:20:03 -06:00
FusionPBX
ace12fe203 Update package-permissions.sh 2022-08-08 19:42:37 -06:00
FusionPBX
bfa8ec3a45 Update fusionpbx-backup.sh 2022-08-08 18:19:23 -06:00
FusionPBX
60b5acc6ab Update fusionpbx-backup 2022-08-08 18:18:52 -06:00
FusionPBX
41137f6659 Add -f to the rm. 2022-08-08 18:17:55 -06:00
FusionPBX
3f3593ba4f Update vsofia version 1.13.7 to 1.13.8 2022-08-07 16:27:32 -06:00
FusionPBX
232e30cd25 Update jail.local 2022-08-02 17:38:37 -06:00
FusionPBX
49a375b691 Update jail.local 2022-08-02 17:37:49 -06:00
FusionPBX
206d3add87 Update finish.sh 2022-08-02 17:35:55 -06:00
FusionPBX
d8b7f0e75c Update finish.sh 2022-08-02 17:34:30 -06:00
FusionPBX
e17b057881 Only need user_groups table. Old if statement is no longer needed. (#394) 2022-06-25 11:37:21 -06:00
Pro-pra
954247951a Set missing php end brace (#393)
* Update config.php

* Update config.php

* Update config.php

* Update config.php
2022-06-14 09:26:30 -06:00
Valentin
9f550a3c42 Devuan: update all install scripts from debian (#390)
* devuan: pull fail2ban updates from debian installer

* devuan: merge updates to postgresql.sh from debian

* devuan: pull updated resources/backup scripts from debian

* devuan: merge and update php installer scripts

* devuan: merged changes to reset_admin_password.sh from debian

* devuan: fix release name typo for chimaera

* devuan: merge iptables changes from debian

* devuan: merge nginx changes from debian

* devuan: merge letsencrypt.sh from debian

* devuan: merge main install scripts and config from debian

* devuan: simplify sngrep install, its in all maintained releases

* devuan: merge main install script updates from debian

* devuan: finish.sh: use /usr/sbin/service for restart

* devuan: postgresql.sh: fix syntax error

* devuan: update and unify sysvinit setup

there is no sysvinit package available from freeswitch,
usethe same init and defaults file for package and source install

* devuan: add equvalent debian releasesto environment.sh

* devuan: merge changes to switch* from debian

* devuan: switch: use os_codenam_debian to add repos

* devuan: olny stop ufw if it was installed

* devuan: update config.sh defaults

* devuan: remove systemd-specifics from switch package installation

* devuan: install postgres before freeswitch

* devuan: removed libyuv-dev installation, embedded in freeswitch

* devuan: fix failing move of freeswitch music

* devuan: removed another libyuv-dev installation, embedded in freeswitch

* devuan: revert freeswitch script dir setting in /etc/default

* devuan: Enable mod_av for the install. (#389)

* devuan: merge improved nginx ssl settings (#388)
2022-04-18 19:37:02 -06:00
FusionPBX
d3974e1584 Change ssl_protocols and additional ssl_ciphers 2022-04-18 19:34:10 -06:00
FusionPBX
f84c40f7e6 sed command now works with any number of spaces or tabs
sed command was broken because tabs had been replaced with spaces in the nginx fusionpbx file.
2022-04-18 19:20:48 -06:00
FusionPBX
383c480679 Use spaces so it will work again with current sed command. 2022-04-18 18:16:11 -06:00
FusionPBX
590eb2415a Add email and fax queues to the maintenance script. 2022-04-15 22:19:02 -06:00
FusionPBX
c1b758be0d Add mod say for French and Spanish. 2022-04-15 11:11:44 -06:00
FusionPBX
fdbc3cfb30 Add Spanish and French FreeSWITCH modules 2022-04-15 11:06:06 -06:00
ggflow
002d57675d Update nginx ciphers to work with Yealink t4xg series and earlier phones (#391) 2022-04-14 22:39:47 -06:00
FusionPBX
2a3f61b528 Move python3-distutils so it works for Debian 10. 2022-04-14 15:56:30 -06:00
FusionPBX
e7ce554f2f Create repo.sh 2022-04-12 15:09:15 -06:00
FusionPBX
6c3049f081 Curl is required so make sure its installed. 2022-04-12 12:11:20 -06:00
FusionPBX
67e434871c Add some comments to show additional options. 2022-04-06 09:49:54 -06:00
emak
2b1771c457 Update fusionpbx (#388)
The following changes have been made:

* Enable http2 for enhanced HTTP performance
* Disable TLSv1 and TLSv1.1 which are now insecure and deprecated
* Enable TLSv1.3
* Set more specific list of enabled ciphers to reasonable balance of compliant but still secure ciphers
* Add SSL session cache to improve SSL performance in nginx

Configurations here were very heavily influenced by the following resources and tools:

https://libre-software.net/tls-nginx/
https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1k&guideline=5.6
https://success.qualys.com/discussions/s/question/0D52L00004TnxRMSAZ/help-to-configure-sslciphers-in-nginx-with-tls-13-support
2022-04-06 09:46:16 -06:00
FusionPBX
48c06fc743 Enable mod_av for the install. (#389)
* Update source-release.sh

* Add package mod_av
2022-04-05 21:26:41 -06:00
FusionPBX
59597eb215 Update source-master.sh 2022-04-02 17:46:11 -06:00
FusionPBX
13223865d1 Update source-release.sh 2022-04-02 17:45:47 -06:00
FusionPBX
095c674cba Add libvlc-dev 2022-04-02 17:44:20 -06:00
FusionPBX
67109fa2ed Add new dependency libvlc-dev 2022-04-02 17:43:02 -06:00
FusionPBX
6c9e99de58 Use FreeSWITCH 1.10.7 and sofia-sip 1.13.7 by default.
FreeSWITCH 1.10.3 and sofia-sip 1.13.6 will currently compile fine as well.
2022-03-24 10:50:34 -06:00
FusionPBX
dbbadc1eed Update mod_pgsql.patch 2022-03-24 00:34:34 -06:00
FusionPBX
e2589576c7 Remove comments for older versions of freeswitch version before 1.10.0. 2022-03-23 23:09:58 -06:00
FusionPBX
100220418c Work on the dependency version if statements. 2022-03-23 22:38:03 -06:00
FusionPBX
4831b73000 Update mod_pgsql.patch 2022-03-19 12:41:36 -06:00
FusionPBX
f8b898f006 Update mod_pgsql.patch 2022-03-19 12:36:00 -06:00
FusionPBX
1fb48aac87 Update mod_pgsql.patch 2022-03-19 12:16:03 -06:00
FusionPBX
195b7cb607 Add Raspberry Pi new apt repo using freeswitch.signalwire.com. 2022-03-19 10:05:53 -06:00
FusionPBX
13937e5a8a Improve the descriptions for the config.sh file. 2022-03-19 09:43:00 -06:00
FusionPBX
913897b48b Relative path didn't use full path for the moment. 2022-03-18 12:33:47 -06:00
FusionPBX
cd48fe22a8 Change the default compile version to 1.10.3. 2022-03-18 11:26:00 -06:00
markjcrane
9fabc661e6 Apply the mod_pgsql.patch 2022-03-18 11:20:55 -06:00
markjcrane
d177080f5d Add pgsql patch to fix newer PostgreSQL version 2022-03-18 11:12:44 -06:00
Len
9dd7f7de68 FreeSWITCH Repo change (#386)
Added a new variable to config.sh "switch_token". A Personal Access Token is now needed to pull from the Community version of FreeSWITCH.  To generate one, please create an account at https://signalwire.com More info can be found here. https://freeswitch.org/confluence/display/FREESWITCH/HOWTO+Create+a+SignalWire+Personal+Access+Token
2022-03-17 18:26:03 -06:00
Len
aa9580af0c FreeSWITCH Repo change (#385)
Added a new variable to config.sh "switch_token". A Personal Access Token is now needed to pull from the Community version of FreeSWITCH.  To generate one, please create an account at https://signalwire.com More info can be found here. https://freeswitch.org/confluence/display/FREESWITCH/HOWTO+Create+a+SignalWire+Personal+Access+Token
2022-03-17 18:25:14 -06:00
FusionPBX
f531cdaea2 Update source-release.sh 2022-03-17 15:50:56 -06:00
FusionPBX
7b5bcaa1d3 Update ioncube.sh to use PHP 7.4 2022-03-10 19:45:44 -07:00
FusionPBX
6ce0351928 Add a better rewrite rule for the Grandstream phonebook. 2022-03-09 23:17:08 -07:00
agree
d6edf06a26 comment out lines that breaks nginx config file (#383)
It doesn't seem to have any purpose. If someone knows the purpose feel free to update in a way that doesn't break the config
2022-03-03 14:52:29 -07:00
FusionPBX
413ee56196 Change version to 1.10.7 2022-03-03 13:31:05 -07:00
FusionPBX
ced688d1d7 Change to PHP 7.4 2022-02-21 13:32:30 -07:00
Richard Allen
e3d22325bf changed default postgresql version to 13 to match the defalt version used by the freeswitch package. (#381)
changed py37-fail2ban to py38-fail2ban because the py37-fail2ban package is no longer available.
2022-02-21 13:07:22 -07:00
FusionPBX
86caf34713 Path to iptables is not always /usr/sbin 2022-02-10 11:56:29 -07:00
Darren Williams
d406eaaf9f Update nginx.sh (#382)
This change will allow FusionPBX to build successfully on arm/arm64 when using Ubuntu focal.  Yhis piece of code is currently redundant anyway as its set for Debian stretch but in the Ubuntu installer
2022-02-10 11:48:29 -07:00
FusionPBX
1fb06497dd Disable some modules skinny and verto 2022-01-25 23:56:12 -07:00
FusionPBX
8bf593a624 Change the default compile version to 1.10.6 2022-01-25 22:10:10 -07:00
FusionPBX
9f41488e59 Restart postgresql service 2022-01-15 19:27:25 -07:00
FusionPBX
27ba502198 Add the path /usr/sbin/ to iptables 2022-01-15 19:19:57 -07:00
FusionPBX
ad72a5caf6 Add the path /usr/sbin/ to iptables 2022-01-15 19:17:21 -07:00
FusionPBX
95190a0b95 Add the path /usr/sbin/ to iptables 2022-01-15 19:15:18 -07:00
FusionPBX
09621fd37c Use the pg_reload_conf command. 2022-01-15 18:58:32 -07:00
FusionPBX
c6e1b8f60b Add pg_reload_config 2022-01-15 18:56:22 -07:00
FusionPBX
115578fcf8 Need to reverse the sed statement to comment out verto. 2022-01-14 21:36:58 -07:00
FusionPBX
2c426f047e Correct the path for mod_verto 2022-01-14 21:12:37 -07:00
FusionPBX
c5b4a29975 Recent install required installing pip and disable mod_verto. 2022-01-14 21:09:22 -07:00
FusionPBX
dca3e2f0a9 Change the version of FreeSWITCH from 1.10.3 to 1.10.7 2022-01-10 17:21:55 -07:00
FusionPBX
977dde886a Change version of FreeSWITCH from 1.10.3 to 1.10.7 2022-01-10 17:21:17 -07:00
Andy Binder
4339a65ee7 [WIP] Ubuntu - Freeswitch 1.10.7 (#378)
* Freeswitch 1.10.7

* Use release for sofia-sip.

* Introduce sofia_version variable for release
2022-01-10 15:52:25 -07:00
Andy Binder
73e1606d6c Add 1.10.7 to source-script. (#379)
Squashed commit of the following:
-install iptables as it is not part of minimal install.
-change swig for bullseye to swig4.0
-php7.4-dev for build required (php-config)
-add python3-distutils
-libks seems to be required for mod_verto
-disable mod_avmd to keep in sync with ubuntu-config (eaaef03163 (diff-62a8f25a3200194e88b1073f2b11ebdf1622761f025a30158c012e83e5f593aa))
2022-01-10 15:51:59 -07:00
FusionPBX
3d24b132c7 Update letsencrypt.sh add --algo rsa to the dehydrated command. (#380)
* Update letsencrypt.sh
2022-01-06 13:43:13 -07:00
FusionPBX
aefc849f9c Add --preferred-chain ISRG Root X1 2021-12-30 08:54:57 -07:00
FusionPBX
56b138366a Update package-permissions.sh 2021-12-20 10:49:30 -07:00
FusionPBX
3cd7abfd6e Split up recordings and storage. 2021-12-20 10:31:25 -07:00
FusionPBX
6cba006776 Add preferred-chain ISRG Root X1 2021-12-09 09:11:23 -07:00
FusionPBX
291b236290 Add --preferred-chain ISRG Root X1 to fix Letsencypt working with Yealink, Polycom and other phones. 2021-12-06 15:32:02 -07:00
FusionPBX
5fe8186e7f Enable upgrade for dehydrated script when running the script. 2021-12-06 15:17:04 -07:00
FusionPBX
69f01e08de Update finish.sh 2021-12-03 16:09:01 -07:00
FusionPBX
1e3c3e914a Update finish.sh 2021-11-13 14:09:06 -07:00
FusionPBX
393eb2b8e2 Update finish.sh 2021-11-13 13:34:15 -07:00
FusionPBX
c8da852f04 Update config.sh 2021-11-13 13:11:44 -07:00
FusionPBX
dff9992b83 Update iptables.sh 2021-11-13 13:07:33 -07:00
FusionPBX
c64169c145 Have the iptables script remove the ufw. 2021-11-13 12:50:15 -07:00
FusionPBX
56a1280caa Update php.sh 2021-11-13 12:12:52 -07:00
FusionPBX
1fe4f14304 Add missing $ on os_codename to fix Debian 11, Bullseye install. 2021-11-13 12:01:00 -07:00
emak
0fbbfe997b Add Preliminary Debian 11 "Bullseye" Support (#376)
* Add Debian 11 support
2021-11-01 11:27:28 -06:00
FusionPBX
dc9cce9e11 Comment out deprecated ssl on 2021-10-18 01:09:11 -06:00
FusionPBX
54cc4f73ae Update fusionpbx 2021-10-18 01:08:18 -06:00
FusionPBX
c4fbdc107c Remove deprecated ssl on 2021-10-18 01:07:37 -06:00
FusionPBX
d5fa0c7062 Removed the deprecated ssl on 2021-10-18 01:05:20 -06:00
FusionPBX
d227f00498 Restart php fpm in finish.sh. 2021-10-14 11:47:02 -06:00
FusionPBX
2deae6ec45 Use the operating system package for PostgreSQL
This should around the problem with compiling mod_pgsql with PostgreSQL 14
2021-10-08 09:04:54 -06:00
FusionPBX
c19f8e0c10 Install PostgreSQL 13 as 14 causes a compile issue with mod_pgsql currently. 2021-10-07 11:03:54 -06:00
FusionPBX
32c4e6e16e Option to install PostgreSQL 13 2021-10-07 11:03:00 -06:00
FusionPBX
d29102e221 Restart php-fpm and nginx 2021-10-06 19:40:08 -06:00
FusionPBX
8c9feda6e8 Update finish.sh 2021-10-06 19:33:12 -06:00
FusionPBX
e2bb44d193 Update finish.sh 2021-10-06 19:32:41 -06:00
FusionPBX
415d616016 Update finish.sh 2021-10-06 19:32:14 -06:00
FusionPBX
8fa711ac2a Update finish.sh 2021-10-06 19:31:42 -06:00
FusionPBX
e3b52d9e9b Update finish.sh 2021-10-06 19:30:53 -06:00
FusionPBX
63e766458c remove pgsql-9.6 from the path to psql and change 9.6 to 14 2021-10-06 18:49:04 -06:00
FusionPBX
1717be44d2 Change the service restart to postgresql-14 2021-10-06 18:05:10 -06:00
FusionPBX
2fff460632 A few more updates change 9.6 to 14 2021-10-06 18:03:48 -06:00
FusionPBX
f4b4f09943 Update the path to psql. 2021-10-06 17:59:39 -06:00
FusionPBX
8e87ca646f Update PostgreSQL to version 14. 2021-10-06 15:50:51 -06:00
FusionPBX
12110c641e Add a message rewrite rule, add a few more deny rules and replaces spaces with tabs. 2021-09-30 10:40:22 -06:00
FusionPBX
d8fb2a7b88 Add a message rewrite rule and replaces spaces with tabs. 2021-09-30 10:31:41 -06:00
FusionPBX
69601c7b01 Add a message rewrite rule and replaces spaces with tabs. 2021-09-30 10:23:06 -06:00
FusionPBX
8fdb549193 Add media rewrite rule and replace spaces with tabs. 2021-09-30 10:17:33 -06:00
FusionPBX
816f18c977 Update fusionpbx-maintenance 2021-09-18 13:31:26 -06:00
FusionPBX
c6da1e217b Update fusionpbx-maintenance 2021-09-18 13:29:36 -06:00
FusionPBX
982c129998 Update fusionpbx-maintenance 2021-09-18 13:29:01 -06:00
FusionPBX
6ec67a15da Update fusionpbx-maintenance 2021-09-18 13:27:05 -06:00
FusionPBX
1271ae5597 Update fusionpbx-maintenance 2021-09-18 13:26:01 -06:00
FusionPBX
3f3d44f51b Add php_sessions and database_transactions 2021-09-18 13:18:54 -06:00
FusionPBX
51bba8e4ad Add php_sessions and database_transactions 2021-09-18 13:17:31 -06:00
FusionPBX
e97e587362 Update fusionpbx-maintenance 2021-09-18 12:39:13 -06:00
FusionPBX
88dd266438 Change fslogs to switch_logs and recordings to call_recordings
Switch is referring to FreeSWITCH. Changed recordings to indicate call_recordings.
2021-09-16 18:12:31 -06:00
FusionPBX
8121210471 Remove the find and psql lines. 2021-09-16 18:05:52 -06:00
jamesorose
62d304ee3a Add options (#374)
make the backup script more easily changed. Disable deletions by default.
2021-09-16 18:02:45 -06:00
FusionPBX
2c1d519d16 Change \w+ to .* to account for domains with hyphens. 2021-08-21 12:54:06 -06:00
FusionPBX
1819d33e3d Change \w+ to .* to account for domains with hyphens. 2021-08-21 12:53:34 -06:00
FusionPBX
663c0dd914 Change \w+ to .* to account for domains with hyphens. 2021-08-21 12:52:40 -06:00
FusionPBX
bf7930955d Change \w+ to .* to account for domains with hyphens. 2021-08-21 12:49:14 -06:00
FusionPBX
d6f6b71078 Change \w+ to .* to account for domains with hyphens. 2021-08-21 12:48:53 -06:00
FusionPBX
9772341a34 Change w+ to .* to account for domains with hyphens. 2021-08-21 12:48:05 -06:00
FusionPBX
59b1d611e8 Change w+ to .* to account for domains with hyphens. 2021-08-21 12:47:27 -06:00
FusionPBX
43db03ba1a Update sip-auth-failure.conf 2021-08-21 12:46:32 -06:00
FusionPBX
6c6ce47758 Update sip-auth-challenge.conf 2021-08-21 12:46:18 -06:00
FusionPBX
9a3a74ccd1 Update auth-challenge-ip.conf 2021-08-21 12:45:20 -06:00
FusionPBX
95fbc19ea8 Update freeswitch.conf 2021-08-21 12:45:06 -06:00
FusionPBX
b8729f2357 Change w+ to .* to account for domains with hyphens. 2021-08-21 12:43:56 -06:00
FusionPBX
43fce2d231 Change w+ to .* to account for domains with hyphens. 2021-08-21 12:43:06 -06:00
FusionPBX
0618074b69 Change w+ to .* to account for domains with hyphens. 2021-08-21 12:42:26 -06:00
FusionPBX
41046e30a6 Change w+ to .* to account for domains with hyphens. 2021-08-21 12:41:43 -06:00
FusionPBX
dd2ac64251 Update database_version add postgresql 14 and remove versions older than 9.6.
PostgreSQL 12 works the best currently for the install script the other versions are there because they can be installed on FreeBSD 13. However other versions may have issues with PHP package that is built to use PostgreSQL 12.
2021-07-31 10:48:53 -06:00
FusionPBX
89432238f9 Change the description for php_version removing old versions of PHP. 2021-07-31 10:45:38 -06:00
FusionPBX
be8d23190d Remove old versions of PHP and add PHP 8.0. 2021-07-31 10:44:04 -06:00
FusionPBX
a187afad8d Add mbstring used by fax and smarty. 2021-07-07 11:44:50 -06:00
FusionPBX
86e27b370c Add mbstring used by fax and smarty. 2021-07-07 11:41:33 -06:00
FusionPBX
97989452cb Add mbstring used by fax and smarty. 2021-07-07 11:38:36 -06:00
FusionPBX
2eece9d01e Fix Raspberry Pi ioncube install. 2021-06-25 11:24:07 -06:00
FusionPBX
ceb0f06f63 Remove the comments. 2021-06-07 22:29:15 -06:00
FusionPBX
4ad6ce0b14 Update Ubuntu install PostgreSQL if the database_host is 127.0.0.1 or ::1 2021-06-07 19:00:20 -06:00
FusionPBX
e81f22f4c7 Update fusionpbx-maintenance 2021-04-26 11:57:23 -06:00
FusionPBX
59c4b7df5b Add PHP curl to the FreeBSD install script. 2021-04-16 16:42:45 -06:00
FusionPBX
b74b33e1c0 Change FreeSWITCH compile to 1.10.3
Compile FreeSWITCH 1.10.3 compile works with Ubuntu 20.04 LTS
2021-03-20 01:39:58 -06:00
FusionPBX
4359da381f Update php.sh 2021-03-19 23:03:56 -06:00
FusionPBX
d3a7125ff2 Update ioncube.sh 2021-03-19 22:18:35 -06:00
FusionPBX
0795fa076a Update the path /usr/lib/php/20170718 to /usr/lib/php/20190902 2021-03-19 22:02:50 -06:00
FusionPBX
8a9620a581 Start adding php version 7.4 2021-03-19 21:57:21 -06:00
FusionPBX
eaaef03163 Remove mod_avmd from default compile. 2021-03-19 20:01:24 -06:00
FusionPBX
331a7e77ca Change libspandsp3-dev to libspandsp-dev
libspandsp3-dev not available on Ubuntu 20.04 LTS changed to libspandsp-dev
2021-03-19 19:43:34 -06:00
FusionPBX
c8ad3bbf5e Remove pushd and pop
These are fancy tools but not as intuitive.
2021-03-19 19:38:42 -06:00
FusionPBX
e651d3f41c Add PHP 7.3 and 7.4 2021-03-09 15:45:25 -07:00
FusionPBX
94914a2052 Install FreeSWITCH then Fail2ban. 2021-03-08 08:36:42 -07:00
FusionPBX
66f6f70177 Install FreeSWITCH then Fail2ban. 2021-03-08 08:34:42 -07:00
FusionPBX
741e9b634b Install FreeSWITCH then Fail2ban. 2021-03-08 08:33:20 -07:00
FusionPBX
1ce68372c0 Add ExecStartPre=/bin/sleep 10 to systemd freeswitch.service file. 2021-02-20 17:25:49 -07:00
alex-eri
35ba464189 Ubuntu 20.04 (#367)
* Ubuntu 20.04 LTS

For #363

* Update php.sh

* Ubuntu 20.04

* Update nginx.sh

* Update php.sh

* Update source-release.sh

* Update source-release.sh

* Update etc.default.freeswitch.source

Co-authored-by: FusionPBX <markjcrane@gmail.com>
2021-02-14 11:21:46 -07:00
FusionPBX
113700a741 Copy the freeswitch-acl.conf filter into the fail2ban filter.d directory. 2021-02-03 17:55:24 -07:00
FusionPBX
bb6cfd01b7 Add the new freeswitch-acl filter to jail.local. 2021-02-03 17:45:23 -07:00
FusionPBX
7346df61a3 New fail2ban filter for Rejected by register acl 2021-02-03 17:38:10 -07:00
FusionPBX
94fd2d4d39 Create nftables.sh
Add the start of an nftables script. Will need additional work.
2021-01-22 14:26:32 -07:00
FusionPBX
5699784e94 Use doublequotes so that the email address variable is added to the configuration. 2021-01-09 12:32:54 -07:00
FusionPBX
84057d999a Update letsencrypt.sh 2021-01-09 00:31:18 -07:00
FusionPBX
bc91517e0d Fix indentation and remove 'ssl on' as it was deprecated. 2021-01-08 12:50:55 -07:00
Guangming Zhou
1805dd7c8d Fix PostgreSQL version (#364) 2021-01-08 12:44:32 -07:00
frytimo
3a63d467fd If condition always evaluated to true (#362)
If condition always evaluated to true.
2020-12-16 16:49:17 -07:00
cargreg
881c60fb9f Update postgresql version from 9.4 to 9.6 to prevent installation issue on Centos
* modfied finish.sh to prevent failure during postgresql user creation
* update postgresql.sh to install postgresql-9.6
2020-12-16 16:45:00 -07:00
Len
78aa6f9cd2 Update finish.sh (#361) 2020-12-16 12:34:52 -07:00
Len
a5d4c05118 Update finish.sh (#360) 2020-12-16 12:34:24 -07:00
Len
d29fb42f3c Update finish.sh (#359) 2020-12-16 12:33:32 -07:00
Len
b7640f6952 Update finish.sh (#358) 2020-12-16 12:33:21 -07:00
Len
f5b375a3d0 Update finish.sh (#357) 2020-12-16 12:33:08 -07:00
FusionPBX
389d355630 Update php.ini variables with better defaults. 2020-12-16 12:30:30 -07:00
FusionPBX
ff1ad43d0f Uncomment service freeswitch restart 2020-11-16 19:39:10 -07:00
FusionPBX
ea70a6313c Add pg_ctl start after initdb has completed. 2020-11-16 17:07:34 -07:00
FusionPBX
101c67aba8 Change database version from 11 to 12 2020-11-15 22:19:49 -07:00
FusionPBX
46f7cbac90 Add PostgreSQL server 12 and 13 2020-11-15 21:59:47 -07:00
FusionPBX
b61fbf40cc Remove pkg install postgresql-client
The postgresql client should be added as a dependency automatically.
2020-11-15 21:34:20 -07:00
FusionPBX
e40e204211 Update php.sh
Fix a spelling mistake to improve the install.
2020-11-15 20:38:55 -07:00
FusionPBX
fd6d398c5e Update php.sh
Add php74 and pdo_pgsql out of the database_version if statement.
2020-11-15 19:32:19 -07:00
FusionPBX
f1e071b0b5 Update package-release.sh
Use switch_source package or port instead of portsnap_enabled.
2020-11-15 19:16:51 -07:00
Len
4510c58a25 Update finish.sh (#355) 2020-11-10 18:48:00 -07:00
Len
12b790fe77 Update finish.sh (#353) 2020-11-10 18:47:40 -07:00
Len
aa323cf12f Update finish.sh (#352) 2020-11-10 18:47:27 -07:00
Len
bebcaa39e0 Update finish.sh (#351) 2020-11-10 18:47:13 -07:00
Len
4f606f7399 Update finish.sh (#354) 2020-11-10 18:46:54 -07:00
FusionPBX
2b4c3f6873 Add the path to the service command. 2020-10-15 14:59:47 -06:00
Len
ef78ba5a96 Update finish.sh (#346) 2020-10-02 15:53:13 -06:00
Len
da04b9eb33 Update finish.sh (#347) 2020-10-02 15:52:45 -06:00
Len
6c180e5e3e Update finish.sh (#348) 2020-10-02 15:52:20 -06:00
Len
b0e272841d Update finish.sh (#349) 2020-10-02 15:51:54 -06:00
Len
a394dd7477 Update finish.sh (#350) 2020-10-02 15:51:20 -06:00
FusionPBX
2c723fdd8f Update fusionpbx 2020-09-16 10:29:48 -06:00
yois615
0237a5b1c5 Install FreeSWITCH 1.10.3 (#331)
Previous version of this script pulled FreeSWITCH 1.6, but there is an official RPM package available for 1.10.3.  I have tested this with my own system and haven't encountered problems.
2020-08-28 10:30:22 -06:00
Len
02f3bd3ecc Update finish.sh (#340) 2020-08-28 10:29:02 -06:00
Len
e8b06a7f1d Update finish.sh (#341) 2020-08-28 10:28:48 -06:00
Len
158d306092 Update finish.sh (#342) 2020-08-28 10:28:18 -06:00
Len
b7d83e7a4e Update finish.sh (#343) 2020-08-28 10:28:03 -06:00
Len
6a3d9086c7 Update finish.sh (#344) 2020-08-28 10:27:51 -06:00
Len
ec2edccb84 Update finish.sh (#345) 2020-08-28 10:27:34 -06:00
FusionPBX
f40e96c479 Adjst the syntax of the if database_host statement. 2020-08-20 08:36:30 -06:00
FusionPBX
9b40c12126 Update postgresql.sh 2020-08-19 13:23:09 -06:00
FusionPBX
72d486560d Update finish.sh 2020-08-19 12:47:00 -06:00
FusionPBX
ec20eefcff Update finish.sh 2020-08-17 20:03:10 -06:00
FusionPBX
24539c4d3c Use psql options qtAX so that trim is no longer needed. 2020-08-17 19:44:11 -06:00
FusionPBX
b5da3f063d Use symbolic links instead of copying the file. 2020-08-11 10:07:11 -06:00
FusionPBX
6abe7cd360 Set findtime to 60 (one minute) to make it simple to understand. 2020-08-07 10:50:52 -06:00
Len
dd0a2a30d5 Update finish.sh (#339) 2020-08-02 22:57:09 -06:00
Len
522ddb8fc5 Update finish.sh (#338) 2020-08-02 22:56:04 -06:00
Len
567efd0eba Update finish.sh (#337) 2020-08-02 22:54:47 -06:00
Len
7aa6eabf31 Update finish.sh (#336) 2020-08-02 22:53:38 -06:00
Len
7514ceb3da Update finish.sh (#335) 2020-08-02 22:52:51 -06:00
Gill Abada
278e65c2e1 make database host dynamic. (#334)
Co-authored-by: Gill Abada <gill@callifi.com>
2020-07-31 09:17:08 -06:00
FusionPBX
5d3a0d2624 Add php filter 2020-07-25 09:29:40 -06:00
FusionPBX
6d537d3f27 Add an to the firmware on the rewrite rule. 2020-07-21 15:59:10 -06:00
FusionPBX
a6c3d51cbf Removing environment.sh includ as it isn't needed. 2020-07-13 09:57:51 -06:00
Len
547feffebf Update finish.sh (#326) 2020-06-29 18:54:54 -06:00
Len
5f25107e89 Update finish.sh (#327) 2020-06-29 18:53:49 -06:00
Len
a0fae634e7 Update finish.sh (#328) 2020-06-29 18:53:16 -06:00
Len
7b52a2f82d Update finish.sh (#329) 2020-06-29 18:52:44 -06:00
Len
4d8dd4725f Update finish.sh (#330) 2020-06-29 18:52:31 -06:00
FusionPBX
c24c6c2068 Add php zlib. 2020-06-20 23:09:15 -06:00
FusionPBX
826e9e9532 Add php iconv 2020-06-20 11:06:27 -06:00
FusionPBX
9185b58289 Update ioncube.sh 2020-06-17 15:38:19 -06:00
Maksym Sobolyev
a9d4a2df82 Use proper location for scripts (#325)
Locate scripts in a proper place. This should fix app.lua and
friends being missing.
2020-06-17 10:13:04 -06:00
Len
8d054ada34 Update finish.sh (#324) 2020-06-13 23:37:42 -06:00
Len
335de6fdb7 Update finish.sh (#323) 2020-06-13 23:37:19 -06:00
Len
a492fe33e3 Update finish.sh (#322) 2020-06-13 23:36:42 -06:00
Len
2c5e207df2 Update finish.sh (#321) 2020-06-13 23:36:20 -06:00
Len
4a11c74bec Update finish.sh (#320) 2020-06-13 23:35:50 -06:00
FusionPBX
12e7aed47d Add another Debian libswscale-dev dependency for mod_av. 2020-06-13 23:32:34 -06:00
FusionPBX
29168ba26e Debian update FreeSWITCH version from 1.10.1 to 1.10.3 2020-06-13 22:56:13 -06:00
FusionPBX
89ffcf5dbc Add debian dependency libavformat-dev needed for compiling mod_av-all 2020-06-13 22:55:23 -06:00
Maksym Sobolyev
f6ce7e9ae5 Few small freebsd fixes (#319)
* Use python 3.7 which is the default.

* Fix typo (missing space before closing ]):

00:04:22.942  + [ -f /usr/ports/UPDATING]
00:04:22.942  [: missing ]

* GC unneded "cd resource". php.sh is included into resources/ngnix.sh, which does
cd resources as the first step by itself.
2020-06-11 10:41:50 -06:00
FusionPBX
e053b3ada0 Add package net-tools 2020-06-04 09:52:49 -06:00
FusionPBX
be0076595d Add --no-check-certificate to ioncube.sh 2020-06-02 11:52:55 -06:00
FusionPBX
2666f0b9f0 Add --no-check-certificate 2020-06-02 11:52:01 -06:00
FusionPBX
aad2199bc3 Update ioncube.sh 2020-06-02 11:35:10 -06:00
FusionPBX
8887a29770 Add missing, then. 2020-06-02 11:25:31 -06:00
FusionPBX
dba9624750 ioncube.sh if wget https fails try again without validating the certificate 2020-06-02 11:20:03 -06:00
FusionPBX
d24a68080c Add the /bin/ in front of mkdir 2020-05-21 18:10:37 -06:00
FusionPBX
41c189380d note, dbatch uses the defaults alternative is make config-recursive 2020-05-20 13:18:25 -06:00
FusionPBX
fb58a00fd9 Update package-release.sh 2020-05-20 13:12:47 -06:00
FusionPBX
4476b9153b Add ability to install from freeswitch from ports 2020-05-20 12:21:39 -06:00
FusionPBX
87acc19e50 Improve portsnap 2020-05-20 12:18:06 -06:00
FusionPBX
d7dfa262ae Set portsnap_enabled to default of true 2020-05-20 11:59:11 -06:00
FusionPBX
4098b306c7 Add ossp-uuid which can generate uuid version 4. 2020-05-20 11:45:42 -06:00
FusionPBX
5addd2ebe2 Update fusionpbx.sh 2020-05-20 11:35:52 -06:00
FusionPBX
0c5472e7cf Add ghostscript9 dependency. 2020-05-20 11:34:39 -06:00
FusionPBX
a9ac8cddb5 Move these dependencies to the freeswitch script. 2020-05-20 11:33:01 -06:00
FusionPBX
8bb93195db Use the FreeBSD FreeSWITCH package 2020-05-20 10:35:25 -06:00
FusionPBX
63499fce50 Add missing wget 2020-05-20 09:24:35 -06:00
FusionPBX
c1c24ed847 Add missing wget 2020-05-20 08:57:03 -06:00
FusionPBX
b3f4d7ddb0 Move update-alternatives above iptables commands. 2020-05-19 01:17:29 -06:00
FusionPBX
d2f11b8e07 add -p so that there is not an error if existing 2020-05-19 00:43:12 -06:00
FusionPBX
4680de3ad7 Update etc.default.freeswitch.package 2020-05-18 23:52:51 -06:00
FusionPBX
66bc195f44 Update freeswitch.service.package 2020-05-18 23:52:23 -06:00
FusionPBX
4cc678face install dependencies that depend on the operating system version 2020-05-18 22:32:18 -06:00
FusionPBX
dc6513f459 Debian 10 - defaults to nftables by default this enables iptables
https://wiki.debian.org/nftables
2020-05-18 22:26:29 -06:00
FusionPBX
4d2c89cb1a Remove redundant settings. 2020-05-18 22:05:42 -06:00
FusionPBX
a9182feeb0 Synchronize with FreeSWITCH official systemd file.
https://github.com/signalwire/freeswitch/blob/master/debian/freeswitch-systemd.freeswitch.service
2020-05-18 22:01:59 -06:00
chansizzle
0265d1acdd Update letsencrypt.sh (#317) 2020-05-12 13:34:00 -06:00
Len
a898bef7d7 Update finish.sh (#316) 2020-05-01 23:34:39 -06:00
Len
42b8e8e0b0 Update finish.sh (#315) 2020-05-01 23:34:10 -06:00
Len
3d87379055 Update finish.sh (#314) 2020-05-01 23:33:29 -06:00
Len
69cc254401 Update finish.sh (#313) 2020-05-01 23:33:06 -06:00
Len
111cbdfddc Update finish.sh (#312) 2020-05-01 23:32:46 -06:00
FusionPBX
808d21af58 Update ioncube.sh 2020-04-29 20:18:54 -06:00
saraxxin
1b4f732e23 Add rewrite for Snom phones (#296)
* Add rewrite for Snom phones

Added a rewrite rule for Snom phones
2020-04-22 07:25:55 -06:00
FusionPBX
5fd038f288 Update ioncube.sh 2020-04-04 11:47:55 -06:00
FusionPBX
7da8336a81 Update ioncube.sh 2020-04-04 11:42:05 -06:00
FusionPBX
a3bef19aed Update ioncube.sh 2020-04-04 11:37:46 -06:00
FusionPBX
943b57b275 Update ioncube.sh 2020-04-04 11:34:26 -06:00
FusionPBX
60c182cf09 Update fail2ban.sh 2020-03-28 19:16:57 -06:00
FusionPBX
66ae26f28f Update switch.sh 2020-03-28 19:16:21 -06:00
FusionPBX
c81492a8aa Update package-permissions.sh 2020-03-28 19:14:14 -06:00
FusionPBX
b7e1ccb81e Update fail2ban.sh 2020-03-28 19:12:26 -06:00
FusionPBX
e57b20b3e8 Update switch.sh 2020-03-28 19:11:49 -06:00
FusionPBX
8be15c1484 Update php.sh 2020-03-28 18:22:18 -06:00
FusionPBX
29a8a40040 Update php.sh 2020-03-28 17:55:50 -06:00
FusionPBX
089957ea66 Update environment.sh 2020-03-28 16:59:50 -06:00
FusionPBX
b975895e76 Update iptables.sh 2020-03-28 16:45:40 -06:00
FusionPBX
472836905a Update environment.sh 2020-03-28 16:44:24 -06:00
Len
728dad6873 spelling error (#311) 2020-03-27 17:16:23 -06:00
racitup
7f593391e5 Update ubuntu install config for 18.04 (#309)
* Update ubuntu install config for 18.04

* Sync with debian letsencrypt.sh changes

* Update git repo for dehydrated
2020-03-25 23:28:28 -06:00
FusionPBX
a7a6184871 Update config.sh 2020-03-18 22:26:01 -06:00
FusionPBX
703caf91b4 Update php.sh 2020-03-18 22:25:31 -06:00
FusionPBX
ba0ce9543d Update fusionpbx-backup 2020-03-11 13:53:03 -06:00
Len
f131d11532 Comment out weak security ciphers (#295)
https://stackoverflow.com/questions/28286086/default-securityprotocol-in-net-4-5#36454717
https://www.imperialviolet.org/2014/12/08/poodleagain.html
2020-03-07 12:12:54 -07:00
Len
4638ca82fa Update finish.sh (#298) 2020-03-07 12:03:50 -07:00
Len
0b1c5fa7da Update finish.sh (#299) 2020-03-07 12:03:41 -07:00
Len
d050ccb5e6 Update finish.sh (#300) 2020-03-07 12:03:34 -07:00
Len
676e6d938d Update finish.sh (#301) 2020-03-07 12:03:26 -07:00
Len
1f73cbd56b Update finish.sh (#302) 2020-03-07 12:03:16 -07:00
chansizzle
a3e1910c02 Update package-release.sh (#303) 2020-03-06 13:39:32 -07:00
chansizzle
0dcb82b95c Update package-release.sh (#304) 2020-03-06 13:39:01 -07:00
chansizzle
b2554b0a3c Update package-master.sh (#305) 2020-03-06 13:38:33 -07:00
chansizzle
6db0b2fc30 Update package-master.sh (#306) 2020-03-06 13:38:08 -07:00
chansizzle
ea5a857e1a Update package-release.sh (#307) 2020-03-06 13:37:39 -07:00
chansizzle
a9e489b6cc Update package-master.sh (#308) 2020-03-06 13:36:53 -07:00
FusionPBX
93666aee6b Update package-master.sh 2020-02-27 14:53:06 -07:00
FusionPBX
12fb68b46c Update package-release.sh 2020-02-27 14:52:00 -07:00
FusionPBX
5319dc55bd Update jail.local 2020-02-19 16:45:32 -07:00
FusionPBX
2477d81882 Update jail.local 2020-02-19 16:44:58 -07:00
FusionPBX
0a5fe52a12 Update jail.local 2020-02-19 16:44:27 -07:00
FusionPBX
4f59eed4cb Update jail.local 2020-02-19 16:43:45 -07:00
FusionPBX
3c37dc1d51 Update jail.local 2020-02-19 16:41:55 -07:00
Emmanuel Mahuni
176481d8e4 Fix Invoke-WebRequest Fails with SSL/TLS Secure Channel fails (#294)
It seems like on Windows Server 2016 or maybe other Windows OSs powershell uses TLS 1.0 by default and the sources have different tls versions. So this will make the script work without throwing those errors.
2020-01-22 00:17:33 -07:00
FusionPBX
36ed2be462 Update fusionpbx 2020-01-07 21:49:05 -07:00
FusionPBX
1f4f9b061b Update fusionpbx.conf 2020-01-07 21:48:08 -07:00
FusionPBX
252e8fb391 Update fusionpbx.conf 2020-01-07 21:38:52 -07:00
FusionPBX
5604a3b8a2 Update node.sh 2019-12-30 12:40:38 -07:00
TNSSF
62a79dbb4c Update node.sh (#292) 2019-12-30 12:37:27 -07:00
FusionPBX
81db58e495 Update config.sh 2019-12-19 18:44:34 -07:00
FusionPBX
807d2351d8 Update fusionpbx.sh 2019-12-14 10:55:59 -07:00
FusionPBX
70bdc1421a Update fusionpbx.sh 2019-12-14 10:54:42 -07:00
FusionPBX
e4af64e4ce Update fusionpbx.sh 2019-12-14 10:53:56 -07:00
FusionPBX
5552381442 Update fusionpbx.sh 2019-12-14 10:53:01 -07:00
FusionPBX
4ecb62560e Update fusionpbx.sh 2019-12-14 10:52:32 -07:00
chansizzle
8da9d50c69 Update source-release.sh (#291) 2019-12-13 15:06:45 -07:00
chansizzle
4e2c092a34 Update pre-install.sh (#289) 2019-12-13 11:52:57 -07:00
Len
bfee3dbad6 Update finish.sh (#284) 2019-12-11 19:08:31 -07:00
Len
ce45795024 Update finish.sh (#285) 2019-12-11 19:08:18 -07:00
Len
f58366f1f4 Update finish.sh (#286) 2019-12-11 19:08:04 -07:00
Len
06fd13e054 Update finish.sh (#287) 2019-12-11 19:07:49 -07:00
Len
3a8e3cd578 Update finish.sh (#288) 2019-12-11 19:07:38 -07:00
FusionPBX
bca839396d Update fusionpbx.sh 2019-12-06 23:52:18 -07:00
FusionPBX
2829b32b31 Update fusionpbx.sh 2019-12-06 23:51:04 -07:00
FusionPBX
3ae2627c31 Update fusionpbx.sh 2019-12-06 23:50:04 -07:00
FusionPBX
48e669a724 Update fusionpbx.sh 2019-12-06 23:49:15 -07:00
FusionPBX
96fb2dad2c Update fusionpbx.sh 2019-12-06 23:48:14 -07:00
FusionPBX
e57b6bda0c Update package-permissions.sh 2019-12-06 23:46:18 -07:00
FusionPBX
80a65639ce Update source-permissions.sh 2019-12-06 23:45:53 -07:00
FusionPBX
3c58424611 Update source-permissions.sh 2019-12-06 23:45:17 -07:00
FusionPBX
97f1b3c383 Update package-permissions.sh 2019-12-06 23:44:48 -07:00
FusionPBX
865caa3919 Update source-permissions.sh 2019-12-06 23:44:20 -07:00
FusionPBX
c1320d9365 Update package-permissions.sh 2019-12-06 23:43:54 -07:00
FusionPBX
287df6bc6d Update package-permissions.sh 2019-12-06 23:41:10 -07:00
FusionPBX
7c75272e98 Update package-permissions.sh 2019-12-06 23:40:30 -07:00
FusionPBX
373e4be54d Update fusionpbx.sh 2019-12-05 09:49:24 -07:00
FusionPBX
e0078c3d1e Update postgresql.sh 2019-12-04 18:59:57 -07:00
FusionPBX
0f09e9b1aa Update package-permissions.sh 2019-11-28 05:00:59 -07:00
FusionPBX
c536160e76 Update source-permissions.sh 2019-11-28 05:00:27 -07:00
FusionPBX
068b655025 Update source-permissions.sh 2019-11-28 04:59:56 -07:00
FusionPBX
32d9fd6db3 Update source-permissions.sh 2019-11-28 04:59:35 -07:00
FusionPBX
f1bccb8c83 Update package-permissions.sh 2019-11-28 04:58:53 -07:00
FusionPBX
302f677e0b Update source-permissions.sh 2019-11-28 04:58:05 -07:00
FusionPBX
911b6b8b8a Update package-permissions.sh 2019-11-28 04:57:28 -07:00
FusionPBX
a28cd75d1c Update package-permissions.sh 2019-11-28 04:57:01 -07:00
FusionPBX
f8a9889615 Update package-permissions.sh 2019-11-28 04:55:50 -07:00
FusionPBX
1ae62aeea4 Update fusionpbx.sh 2019-11-28 03:45:34 -07:00
FusionPBX
83344bed92 Update fusionpbx.sh 2019-11-28 03:43:08 -07:00
FusionPBX
a0280f5bf0 Update fusionpbx.sh 2019-11-28 03:42:39 -07:00
FusionPBX
c23cfbe8d7 Update fusionpbx.sh 2019-11-28 03:41:42 -07:00
FusionPBX
0842f745e0 Update fusionpbx.sh 2019-11-28 03:41:20 -07:00
FusionPBX
a9e0b23271 Update fusionpbx.sh 2019-11-28 03:40:53 -07:00
FusionPBX
92239e7679 Update fusionpbx.sh 2019-11-28 03:40:10 -07:00
FusionPBX
90b5344637 Update finish.sh 2019-11-27 17:58:14 -07:00
DigiDaz
c87b8d15ac Fix path (#283) 2019-11-27 17:18:18 -07:00
Len
dd0f76ce59 Update finish.sh (#281) 2019-11-27 17:06:37 -07:00
Len
4f1449d287 Update finish.sh (#280) 2019-11-27 17:06:02 -07:00
Len
6dfdee7a5b Update finish.sh (#278) 2019-11-27 17:05:48 -07:00
Len
2f0719bb6f Update finish.sh (#279) 2019-11-27 17:05:35 -07:00
Len
bac6e1d70f Update finish.sh (#282) 2019-11-27 17:05:22 -07:00
FusionPBX
51328bb5c8 Update jail.local 2019-11-27 17:04:40 -07:00
FusionPBX
6fb47856fb Update jail.local 2019-11-27 17:00:07 -07:00
FusionPBX
5dd6c4b349 Update finish.sh 2019-11-27 14:47:43 -07:00
FusionPBX
8e05076ceb Update finish.sh 2019-11-27 14:43:53 -07:00
FusionPBX
a9e153b951 Update fusionpbx 2019-11-21 20:10:26 -07:00
FusionPBX
7de5d2a627 Update config.sh 2019-11-04 22:26:17 -07:00
FusionPBX
b4315bb1cb Update source-release.sh 2019-11-04 22:25:46 -07:00
FusionPBX
60555c37d7 Update config.sh 2019-11-03 14:36:39 -07:00
FusionPBX
566d9fbec9 Update source-release.sh 2019-11-03 14:36:05 -07:00
FusionPBX
61e189c74b Update config.sh 2019-11-03 10:32:36 -07:00
FusionPBX
a5faeb8bce Update config.sh 2019-11-03 10:32:12 -07:00
FusionPBX
0eb5e092c7 Update config.sh 2019-11-03 10:31:13 -07:00
Ahmed Kajee
b5d59f85e9 Update sed entries in debian/letsencrypt.sh file (#272)
The sed entries to update the config file was creating the following issues: 1) It was creating duplicate config files, the second has a trailing space. 2) The email variable was not passed to the config file. 3) removing the leading # from WELLKNOWN does not require the file path as it does not change. This shortened command may eliminate the creating of two config files.
2019-10-19 08:37:29 -06:00
FusionPBX
7be5406963 Update php.sh 2019-10-11 18:45:59 -06:00
FusionPBX
9a2ab1e6d9 Update php.sh 2019-10-11 18:45:33 -06:00
FusionPBX
f3a236fe73 Update freeswitch 2019-10-05 11:18:32 -06:00
FusionPBX
2790404a98 Update monit.sh 2019-10-05 11:16:25 -06:00
FusionPBX
d109de5eb8 Update freeswitch 2019-10-05 11:14:48 -06:00
FusionPBX
d0481776b1 Update monit.sh 2019-10-05 11:10:28 -06:00
FusionPBX
bc72cee160 Create monit.sh 2019-10-05 11:09:12 -06:00
FusionPBX
cf38d8e87c Create freeswitch 2019-10-05 11:05:06 -06:00
FusionPBX
0e943eafa9 Create shell.sh 2019-10-05 11:03:57 -06:00
Len
ff5a757434 Update finish.sh (#271)
* Update finish.sh

* Update finish.sh
2019-09-27 14:56:22 -06:00
Len
1b995a7f92 Update finish.sh (#270)
* Update finish.sh

* Update finish.sh
2019-09-27 14:56:07 -06:00
Len
c98f6c87cc Update finish.sh (#269)
* Update finish.sh

* Update finish.sh
2019-09-27 14:55:48 -06:00
Len
56ba4d1bd0 Update finish.sh (#268)
* Update finish.sh

* Update finish.sh
2019-09-27 14:55:28 -06:00
Len
c9e0902989 Update finish.sh (#267)
* Update finish.sh

* Update finish.sh
2019-09-27 14:54:59 -06:00
FusionPBX
1df51f5a7e Update php.sh 2019-09-27 14:54:29 -06:00
FusionPBX
ff2f21a37b Update php.sh 2019-09-27 14:53:43 -06:00
FusionPBX
1eafc19cbd Update nginx.sh 2019-09-27 14:52:12 -06:00
FusionPBX
ebfe9a0005 Update php.sh 2019-09-27 14:50:55 -06:00
FusionPBX
5899f52f31 Update php.sh 2019-09-27 14:48:17 -06:00
chansizzle
09aab232e7 Update ioncube.sh (#273) 2019-09-14 11:59:06 -06:00
chansizzle
fc611781d5 Update environment.sh (#266) 2019-09-02 19:10:59 -06:00
Zachary Kitchen
0119304591 Fax Logs Clean up (#265)
* Update fusionpbx-maintenance

* Update fusionpbx-maintenance

* Update fusionpbx-maintenance.sh
2019-09-02 18:02:14 -06:00
FusionPBX
49a60d4f00 Update package-all.sh 2019-09-02 18:00:03 -06:00
FusionPBX
99a5cc6004 Update package-all.sh 2019-09-02 17:59:27 -06:00
FusionPBX
174241a3d5 Update package-all.sh 2019-09-02 17:58:37 -06:00
FusionPBX
086bf10219 Update package-all.sh 2019-09-02 17:54:10 -06:00
FusionPBX
66d6f7d26a Update package-all.sh 2019-09-02 17:53:43 -06:00
FusionPBX
3823de27fe Update package-all.sh 2019-09-02 17:52:53 -06:00
Len
25f6cda5a4 Update finish.sh (#264) 2019-08-23 22:13:47 -06:00
Len
7ebdaafe02 Update finish.sh (#262) 2019-08-23 22:12:36 -06:00
Len
7257e99a49 Update finish.sh (#263) 2019-08-23 22:12:11 -06:00
Len
6b51b74975 Update finish.sh (#260) 2019-08-23 16:05:35 -06:00
Len
e7d295d7d3 Update finish.sh (#261) 2019-08-23 16:04:57 -06:00
FusionPBX
0d1ab3b2e5 Update ioncube.sh 2019-08-22 11:31:35 -06:00
FusionPBX
4ada8ce29a Update php.sh 2019-08-22 09:16:54 -06:00
FusionPBX
8216b4ecaa Update php.sh 2019-08-22 09:12:28 -06:00
FusionPBX
01ece28690 Update package-release.sh 2019-08-22 08:17:58 -06:00
FusionPBX
4b59851058 Update ioncube.sh 2019-08-20 17:42:14 -06:00
FusionPBX
7686b4877c Update nginx.sh 2019-08-20 17:40:58 -06:00
FusionPBX
fde336671d Update nginx.sh 2019-08-20 17:38:47 -06:00
FusionPBX
25ec4ae435 Update ioncube.sh 2019-08-20 17:09:52 -06:00
FusionPBX
0726ba981b Update php.sh 2019-08-20 17:01:34 -06:00
FusionPBX
98fd1d9057 Update php.sh 2019-08-20 17:00:59 -06:00
FusionPBX
fb0a2d25de Update php.sh 2019-08-20 16:58:56 -06:00
FusionPBX
ae3a7cba79 Update postgresql.sh 2019-08-20 16:12:00 -06:00
FusionPBX
66f1550c4d Update sngrep.sh 2019-08-20 15:58:06 -06:00
FusionPBX
0ab59dcd3c Update php.sh 2019-08-20 15:22:38 -06:00
FusionPBX
ed42c540b1 Update package-release.sh 2019-08-20 15:18:53 -06:00
FusionPBX
0dd0d5b341 Update php.sh 2019-08-08 14:22:55 -06:00
FusionPBX
7f3a443831 Update source-release.sh 2019-08-07 09:45:50 -06:00
FusionPBX
4b113cf629 Update source-master.sh 2019-08-07 09:45:36 -06:00
FusionPBX
e27c4fb418 Update package-master.sh 2019-08-07 09:43:37 -06:00
FusionPBX
49c356aad7 Update package-release.sh 2019-08-07 09:43:24 -06:00
FusionPBX
0897a83701 Update source-release.sh 2019-08-07 09:42:42 -06:00
FusionPBX
6dc14134c4 Update source-master.sh 2019-08-07 09:42:12 -06:00
FusionPBX
85f7f0fa3c Update source-release.sh 2019-08-07 09:30:47 -06:00
FusionPBX
14c5a51c23 Update source-master.sh 2019-08-07 09:29:55 -06:00
FusionPBX
be52a5856c Update package-master.sh 2019-08-07 09:28:36 -06:00
FusionPBX
64bb8d1add Update package-release.sh 2019-08-07 09:27:53 -06:00
FusionPBX
c42fcf3a90 Update php.sh 2019-08-01 13:05:58 -06:00
FusionPBX
a1e94a036a Update php.sh 2019-08-01 13:04:20 -06:00
FusionPBX
d3e06e02ce Update php.sh 2019-08-01 13:02:08 -06:00
FusionPBX
ff147ea667 Update php.sh 2019-08-01 12:59:58 -06:00
FusionPBX
316495436e Update php.sh 2019-08-01 12:54:58 -06:00
FusionPBX
af093f19be Update php.sh 2019-07-28 12:45:26 -06:00
FusionPBX
9eecfac992 Update php.sh 2019-07-25 16:56:07 -06:00
FusionPBX
1eee6a065b Update php.sh 2019-07-25 16:54:57 -06:00
Len
5a6e2c4e99 Update config.sh (#259) 2019-07-02 21:56:02 -06:00
Len
70647eab8c Update finish.sh (#254) 2019-07-02 21:55:35 -06:00
Len
5405d385bc Update finish.sh (#255) 2019-07-02 21:55:09 -06:00
Len
cd65a10ce6 Update finish.sh (#256) 2019-07-02 21:54:37 -06:00
Len
cd7bf0510e Update finish.sh (#257) 2019-07-02 21:54:05 -06:00
Len
cd3ccb439c Update finish.sh (#258) 2019-07-02 21:53:39 -06:00
FusionPBX
8645db15fa Update source-release.sh 2019-06-24 16:13:34 -06:00
FusionPBX
49c0a951c9 Update config.sh 2019-06-19 08:32:47 -06:00
FusionPBX
2237f0e97e Update iptables.sh 2019-06-08 00:26:51 -06:00
FusionPBX
78c0993d9c Update iptables.sh 2019-06-08 00:26:08 -06:00
FusionPBX
99ee59e7e0 Update iptables.sh 2019-06-08 00:25:28 -06:00
Len
e0425e29fb Update finish.sh (#249) 2019-06-06 10:33:55 -06:00
Len
71a4675534 Update finish.sh (#250) 2019-06-06 10:33:26 -06:00
Len
159dc6546b Update finish.sh (#251) 2019-06-06 10:33:12 -06:00
Len
13fa2f64d9 Update finish.sh (#252) 2019-06-06 10:32:56 -06:00
Len
a57a78115b Update finish.sh (#253) 2019-06-06 10:32:42 -06:00
FusionPBX
307432bd27 Update php.sh 2019-06-04 08:53:54 -06:00
FusionPBX
b220bab2c3 Update php.sh 2019-06-04 08:47:08 -06:00
FusionPBX
ca11a3f1c2 Update source-release.sh 2019-06-03 20:33:05 -06:00
FusionPBX
2a29ce8d67 Update source-release.sh 2019-06-03 20:32:41 -06:00
FusionPBX
48b9ee4f95 Update source-release.sh 2019-06-03 19:24:06 -06:00
FusionPBX
d2cbc7f423 Update source-release.sh 2019-06-03 19:09:03 -06:00
Rodrigo Ramírez Norambuena
eacfb9089b Bugfix: Fix the user/group for /etc/php-fpm.d/www.conf (#237)
For a clean install of Centos 7 and using the installer php-fpm get the
permission error

"unix:/var/run/php-fpm/php-fpm.sock failed (13: Permission denied) while
connecting to upstream"

This patch the correct group and user to run php-fpm process.
2019-06-03 18:51:05 -06:00
FusionPBX
6ab767c012 Update source-release.sh 2019-06-03 18:50:05 -06:00
FusionPBX
6a97e374ca Update install.sh 2019-06-03 18:43:48 -06:00
FusionPBX
12665ba192 Update source-release.sh 2019-06-03 16:42:27 -06:00
FusionPBX
ce00742fdb Update source-release.sh 2019-06-03 09:59:26 -06:00
FusionPBX
b8fd0361cc Update php.sh 2019-06-03 09:56:31 -06:00
FusionPBX
87adb7c9b7 Update config.sh 2019-06-03 09:55:53 -06:00
FusionPBX
6d96e75ea1 Update ioncube.sh 2019-06-03 09:55:35 -06:00
FusionPBX
38b83c9ec7 Update php.sh 2019-06-03 09:52:20 -06:00
FusionPBX
a7a964c4af Update php.sh 2019-06-03 09:51:25 -06:00
FusionPBX
b6c3af9ff4 Update php.sh 2019-06-03 09:49:58 -06:00
Bryan Redeagle
f045753429 Added rewrite rules for Digium provisioning. (#246) 2019-06-03 09:42:02 -06:00
FusionPBX
d15330ac33 Update source-release.sh 2019-06-03 09:40:10 -06:00
FusionPBX
516debb6fc Update source-release.sh 2019-06-03 09:19:16 -06:00
FusionPBX
ce17ea8599 Update source-release.sh 2019-06-03 09:07:31 -06:00
FusionPBX
3a17c81c76 Update source-release.sh 2019-06-03 08:57:55 -06:00
FusionPBX
507fa386c0 Update source-release.sh 2019-06-03 08:49:13 -06:00
FusionPBX
3c3f95a2e8 Update source-release.sh 2019-06-03 08:46:18 -06:00
FusionPBX
bec740b602 Update source-release.sh 2019-06-03 08:13:24 -06:00
FusionPBX
fd4054ea68 Update source-release.sh 2019-06-03 08:08:00 -06:00
FusionPBX
256b26f01c Update source-release.sh 2019-06-03 07:49:49 -06:00
FusionPBX
2eaed1ebbf Update source-release.sh 2019-06-03 07:35:08 -06:00
FusionPBX
3638c93dd1 Update sngrep.sh 2019-06-03 07:28:04 -06:00
FusionPBX
0685880101 Update sngrep.sh 2019-06-03 07:24:41 -06:00
FusionPBX
0e1ef59c5f Update source-release.sh 2019-06-03 07:22:42 -06:00
FusionPBX
83c882f77c Update postgresql.sh 2019-06-03 07:21:17 -06:00
FusionPBX
b7e283f87b Update config.sh 2019-06-03 07:06:56 -06:00
FusionPBX
761e5f3a0b Update source-release.sh 2019-06-03 07:06:19 -06:00
FusionPBX
edc902cc42 Update package-release.sh 2019-06-03 06:52:06 -06:00
root
cf63fc5f4b Start working on Ubuntu 2019-06-03 12:48:27 +00:00
FusionPBX
8b50ca4b96 Update iptables.sh 2019-05-31 13:41:11 -06:00
J005
867d887596 Iptables update (#238)
* Update iptables.sh

Removed the rules with --string "system" as is can cause issues with legitimate SIP traffic from clients with user agents such as "3CXPhoneSystem"

* Update iptables.sh

Removed the rule --string "system" as is can cause issues with legitimate SIP traffic from clients with user agents such as "3CXPhoneSystem"
2019-05-31 13:37:49 -06:00
Len
e0b2d6ae2e Update finish.sh (#242)
* Update finish.sh

* Update finish.sh
2019-05-30 09:34:26 -06:00
Len
09ad84a7a1 Update finish.sh (#243)
* Update finish.sh

* Update finish.sh
2019-05-30 09:34:05 -06:00
Len
d8eae924bb Update finish.sh (#244) 2019-05-30 08:52:32 -06:00
Len
25bbd1c939 Update finish.sh (#245) 2019-05-30 08:51:51 -06:00
Len
bb3f9a796f Update finish.sh (#241) 2019-05-30 08:44:45 -06:00
Len
34c3d262f9 Update finish.sh (#240) 2019-05-30 08:40:31 -06:00
powerpbx
6f40d5f57a Update letsencrypt.sh (#239) 2019-05-30 00:43:48 -06:00
FusionPBX
cf487f5233 Update postgresql.sh 2019-05-22 15:18:18 -06:00
FusionPBX
9badac0e9d Update auth-challenge-ip.conf 2019-05-07 23:03:15 -06:00
FusionPBX
8074f2ece7 Update postgresql.sh 2019-04-22 17:54:23 -06:00
FusionPBX
319e5797c7 Update auth-challenge-ip.conf 2019-04-19 09:47:35 -06:00
FusionPBX
236fba080f Update README.md 2019-04-16 20:16:18 -06:00
FusionPBX
1b095979c6 Update README.md 2019-04-16 20:08:59 -06:00
FusionPBX
93db738137 Update postgresql.sh 2019-04-16 19:58:22 -06:00
FusionPBX
e142f5b087 Update package-permissions.sh 2019-04-15 20:13:02 -06:00
FusionPBX
fbc4be10ff Update pf.conf 2019-03-25 22:57:16 -06:00
FusionPBX
6e6b36f52d Update config.sh 2019-03-19 20:28:32 -06:00
FusionPBX
bfb8781617 Update config.sh 2019-03-19 16:22:45 -06:00
FusionPBX
17a22ff1b1 Update fail2ban.sh 2019-03-14 09:00:50 -06:00
FusionPBX
2f39ffdf9a Update config.sh 2019-03-11 16:39:06 -06:00
FusionPBX
4b40805692 Update source-release.sh 2019-02-28 11:46:30 -07:00
FusionPBX
806a4e6456 Update source-release.sh 2019-02-28 11:45:13 -07:00
FusionPBX
5909422067 Update source-release.sh 2019-02-28 05:00:33 -07:00
FusionPBX
f99bb84e79 Update config.sh 2019-02-28 04:59:04 -07:00
FusionPBX
5e4d9fbbc9 Update ioncube.sh 2019-02-28 01:51:12 -07:00
FusionPBX
27106c3435 Update php.sh 2019-02-22 10:54:31 -07:00
FusionPBX
feb3dfa914 Update php.sh 2019-02-22 10:51:59 -07:00
FusionPBX
1eed29b872 Update php.sh 2019-02-22 10:45:22 -07:00
FusionPBX
c15ff96704 Update source-release.sh 2019-02-21 11:02:35 -07:00
FusionPBX
9b0b6fa4e5 Update source-release.sh 2019-02-21 10:17:03 -07:00
FusionPBX
31af0983df Update switch.sh 2019-02-21 10:09:11 -07:00
FusionPBX
c6cc229120 Update source-release.sh 2019-02-21 10:04:23 -07:00
FusionPBX
c75f08ee10 Update config.php 2019-02-19 22:35:44 -07:00
FusionPBX
0b2ee93dd6 Update ioncube.sh 2019-02-17 11:29:52 -07:00
FusionPBX
f5e1f3ed23 Update php.sh 2019-02-17 11:10:54 -07:00
FusionPBX
3d91ac2207 Update php.sh 2019-02-17 11:07:15 -07:00
FusionPBX
61a9e0a874 Update ioncube.sh 2019-02-17 11:06:45 -07:00
FusionPBX
a80b9ce9f1 Update ioncube.sh 2019-02-17 11:04:43 -07:00
FusionPBX
6abd0efadf Update ioncube.sh 2019-02-17 10:51:10 -07:00
FusionPBX
04c0ab1b04 Update ioncube.sh 2019-02-17 10:49:50 -07:00
FusionPBX
5e6c17d54f Update php.sh 2019-02-17 10:46:07 -07:00
FusionPBX
f78a612909 Update ioncube.sh 2019-02-17 09:52:29 -07:00
FusionPBX
348c82e700 Update pre-install.sh 2019-02-17 09:44:51 -07:00
FusionPBX
507c454541 Update node.sh 2019-02-17 09:40:57 -07:00
FusionPBX
e481f32d9f Update iptables.sh 2019-02-17 09:40:05 -07:00
FusionPBX
82d088b43b Update package-master.sh 2019-02-17 09:39:04 -07:00
FusionPBX
0c7035634a Update package-all.sh 2019-02-17 09:37:55 -07:00
FusionPBX
f5aef70de7 Update package-master-all.sh 2019-02-17 09:37:16 -07:00
FusionPBX
7ba48962d9 Update package-release.sh 2019-02-17 09:36:31 -07:00
FusionPBX
e1dc70f279 Update package-release.sh 2019-02-17 09:36:07 -07:00
FusionPBX
3fdb18ce03 Update package-systemd.sh 2019-02-17 09:35:13 -07:00
FusionPBX
b0d2cf6880 Update source-master.sh 2019-02-17 09:34:57 -07:00
FusionPBX
f84227c196 Update source-master.sh 2019-02-17 09:34:45 -07:00
FusionPBX
41b73584a2 Update source-release.sh 2019-02-17 09:34:00 -07:00
FusionPBX
479ae664f8 Update source-release.sh 2019-02-17 09:33:43 -07:00
FusionPBX
eca449fcd8 Update php.sh 2019-02-17 09:33:07 -07:00
FusionPBX
03a4cb91a7 Update fusionpbx.sh 2019-02-17 09:31:57 -07:00
FusionPBX
86344e4590 Update iptables.sh 2019-02-17 09:31:21 -07:00
FusionPBX
718142e2a9 Update sngrep.sh 2019-02-17 09:30:31 -07:00
FusionPBX
5ef79a77ad Update postgresql.sh 2019-02-17 09:29:57 -07:00
FusionPBX
65b45e7a14 Update fail2ban.sh 2019-02-17 09:29:16 -07:00
FusionPBX
9c7f0ace3c Update install.sh 2019-02-17 09:06:33 -07:00
FusionPBX
5523ded540 Update nginx.sh 2019-02-17 09:04:49 -07:00
FusionPBX
439d962512 Update php.sh 2019-02-17 09:04:04 -07:00
FusionPBX
492058fb45 Update install.sh 2019-02-17 08:58:35 -07:00
FusionPBX
23bfe25395 Update php.sh 2019-02-17 08:57:25 -07:00
FusionPBX
42e7262e33 Update php.sh 2019-02-17 08:54:10 -07:00
FusionPBX
91661b4350 Update nginx.sh 2019-02-17 08:51:19 -07:00
FusionPBX
74a603d2df Update install.sh 2019-02-17 08:43:57 -07:00
FusionPBX
3169934769 Update php.sh 2019-02-17 08:32:54 -07:00
FusionPBX
676de33b29 Update nginx.sh 2019-02-17 08:31:50 -07:00
FusionPBX
f02120873a Update php.sh 2019-02-13 23:00:25 -07:00
FusionPBX
169c1bd6af Update nginx.sh 2019-02-13 22:56:37 -07:00
FusionPBX
ba38fa78c6 Create iptables.sh 2019-02-13 22:45:53 -07:00
FusionPBX
18e7ac042b Update install.sh 2019-02-13 15:50:14 -07:00
FusionPBX
2f53dc3dd8 Update install.sh 2019-02-13 15:49:04 -07:00
FusionPBX
a6c92bc64c Update install.sh 2019-02-13 15:46:34 -07:00
FusionPBX
38ccdf1766 Update finish.ps1 2019-02-10 08:52:29 -07:00
FusionPBX
377d94a031 Update finish.sh 2019-02-10 08:50:43 -07:00
FusionPBX
f991cd6f4b Update finish.sh 2019-02-10 08:48:58 -07:00
FusionPBX
cbd76f24ec Update finish.sh 2019-02-10 08:47:14 -07:00
FusionPBX
cf7172343c Update finish.sh 2019-02-10 08:44:45 -07:00
FusionPBX
ac62efcccc Update reset_admin_password.sh 2019-02-09 11:07:33 -07:00
FusionPBX
83b9327327 Update reset_admin_password.sh 2019-02-09 11:06:53 -07:00
FusionPBX
69baf03a07 Update reset_admin_password.sh 2019-02-09 11:06:18 -07:00
FusionPBX
a636d1a410 Update reset_admin_password.sh 2019-02-09 11:05:47 -07:00
FusionPBX
641dbcf85b Update finish.sh 2019-02-09 11:02:30 -07:00
FusionPBX
2290151e68 Update finish.sh 2019-02-09 10:59:24 -07:00
FusionPBX
cf5d1ef0ba Update finish.sh 2019-02-09 10:52:12 -07:00
FusionPBX
eb6d59f381 Update finish.sh 2019-02-09 10:51:32 -07:00
FusionPBX
da25572a38 Update finish.sh 2019-02-09 10:50:00 -07:00
FusionPBX
045f839369 Update finish.ps1 2019-02-09 10:48:54 -07:00
Len
1151c2fa6c Update finish.sh (#224) 2019-02-08 20:46:34 -07:00
Len
d58f43b3aa Update finish.sh (#225) 2019-02-08 20:46:24 -07:00
Len
0f3fc7a23b Update finish.sh (#226) 2019-02-08 20:46:12 -07:00
Len
0c18ca0c41 Update finish.sh (#227) 2019-02-08 20:46:00 -07:00
FusionPBX
821cf45f8d Update fusionpbx.sh 2019-01-29 09:59:17 -07:00
FusionPBX
4bf8d12b8e Update fusionpbx.sh 2019-01-29 09:58:02 -07:00
FusionPBX
df63f7875f Update fusionpbx.sh 2019-01-29 09:57:18 -07:00
FusionPBX
075ee51c78 Update empty.sh 2019-01-24 20:15:04 -07:00
FusionPBX
c1eb9a9f8e Update ioncube.sh 2019-01-20 09:55:56 -07:00
FusionPBX
54932e4107 Update postgresql.sh 2019-01-19 16:22:41 -07:00
Len
180cc2fbd1 Update finish.sh (#221) 2019-01-18 18:44:19 -05:00
Len
c27ee7715a Update finish.sh (#219) 2019-01-18 18:43:50 -05:00
Len
b1187de4a3 Update finish.sh (#220) 2019-01-18 18:43:17 -05:00
Len
c1edbec032 Update package-release.sh (#222)
update armhf to 1.8.4
2019-01-18 18:43:07 -05:00
Len
6d2027e606 Update finish.sh (#218) 2019-01-18 18:42:35 -05:00
Ben Knowles
17271a2f61 Disable viewing of .git directory (#214) 2019-01-04 16:27:59 -07:00
FusionPBX
96c487a327 Update iptables.sh 2018-12-21 20:43:27 -07:00
FusionPBX
afdab2ef1a Update fusionpbx-backup 2018-12-17 18:01:07 -07:00
FusionPBX
0d2ca23731 Update iptables.sh 2018-12-15 14:49:44 -07:00
FusionPBX
cade7ed139 Update iptables.sh 2018-12-12 09:43:29 -07:00
FusionPBX
12150e1775 Update iptables.sh 2018-12-11 18:39:43 -07:00
FusionPBX
d800e18b6c Update iptables.sh 2018-12-11 18:38:02 -07:00
FusionPBX
65240601c7 Update iptables.sh 2018-12-11 18:28:08 -07:00
FusionPBX
df4430fa53 Update iptables.sh 2018-12-11 18:26:11 -07:00
FusionPBX
5777753c3d Update iptables.sh 2018-12-11 18:20:54 -07:00
getsolveit
9a7d4aa993 Update postgresql.sh (#212)
environment.sh not environment.s
2018-12-11 18:06:19 -07:00
FusionPBX
8ee410f2cf Update finish.sh 2018-12-11 01:27:32 -07:00
FusionPBX
e7cfb2c08b Update postgresql.sh 2018-12-11 01:26:25 -07:00
FusionPBX
95b84963b8 Update postgresql.sh 2018-12-11 01:22:42 -07:00
FusionPBX
590236b18b Update and rename fusionpbx-maintenance.sh to fusionpbx-maintenance 2018-12-11 01:20:09 -07:00
FusionPBX
9c9900651f Update and rename fusionpbx-backup.sh to fusionpbx-backup 2018-12-11 01:19:41 -07:00
Len
cf00a89db0 Update finish.sh (#208) 2018-12-05 21:43:29 -07:00
Len
1d62f1e325 Update finish.sh (#207) 2018-12-05 21:42:48 -07:00
Len
a306bde96b Update finish.sh (#206) 2018-12-05 21:41:34 -07:00
Len
b2b7c0d148 Update finish.sh (#205) 2018-12-05 21:40:09 -07:00
FusionPBX
3dbea76a1d Update source-systemd.sh 2018-11-29 18:13:41 -07:00
Nate
704325d1e0 Correct misspelling. 2018-11-27 17:15:29 -07:00
Nate
33ea18cf8f Correct misspelling. 2018-11-27 17:13:13 -07:00
Len
cea98f6b98 Update finish.sh (#200) 2018-11-16 02:23:25 -06:00
Len
8d24bb5491 Update finish.sh (#201) 2018-11-16 02:23:02 -06:00
Len
c6d9328599 Update finish.sh (#202) 2018-11-16 02:22:45 -06:00
Len
979e7794c2 Update finish.sh (#203) 2018-11-16 02:22:26 -06:00
FusionPBX
62b75e5604 Update fusionpbx-backup.sh 2018-11-15 12:08:31 -06:00
danry25
f22fbfd04b Update Devuan codename, minor revising for readability (#199) 2018-11-14 23:31:11 -06:00
afanucchi
4af786b69e Updated README.md with Debian 9 details (#198)
Updated references to Debian 8 to show Debian 9 as it was confusing some people.
2018-11-14 21:46:19 -06:00
FusionPBX
bff4352b81 Update nginx.sh 2018-11-05 23:40:47 -07:00
FusionPBX
722fbc9846 Update nginx.sh 2018-11-05 23:35:42 -07:00
FusionPBX
cfb9dc5ab9 Update nginx.sh 2018-11-05 23:29:49 -07:00
FusionPBX
4217afadc1 Update php.sh 2018-11-05 23:27:36 -07:00
FusionPBX
e052971f52 Update php.sh 2018-11-05 23:13:08 -07:00
FusionPBX
ed7beb4156 Update package-release.sh 2018-11-05 22:58:49 -07:00
FusionPBX
9e52fb86c3 Update create.sh 2018-10-25 10:47:59 -06:00
FusionPBX
ea04d00a4b Update package-release.sh 2018-10-24 01:15:58 -06:00
DigiDaz
bb8d04b470 Quick fix to install missing packages (#197) 2018-10-24 01:14:43 -06:00
FusionPBX
94cb11e8b9 Update postgresql.sh 2018-10-13 11:11:31 -06:00
FusionPBX
71343e354a Update sngrep.sh 2018-10-13 11:09:08 -06:00
Len
41f09b58c0 Update finish.sh (#195) 2018-10-12 21:22:13 -06:00
Len
2aca97672d Update finish.sh (#193) 2018-10-12 21:22:01 -06:00
Len
bd30183a46 Update finish.sh (#194) 2018-10-12 20:37:09 -06:00
Len
72cd021519 Update finish.sh (#192) 2018-10-12 17:44:07 -06:00
FusionPBX
1a923a93ab Update jail.local 2018-10-11 12:29:54 -06:00
FusionPBX
f714f3bc43 Update jail.local 2018-10-11 12:28:41 -06:00
FusionPBX
c6dd16af8c Update jail.local 2018-10-11 12:28:30 -06:00
FusionPBX
78dcb6c6ea Update jail.local 2018-10-11 12:26:20 -06:00
FusionPBX
0a9359728a Update jail.local 2018-10-11 12:25:37 -06:00
danry25
009702bd12 Changed Fail2ban settings, updated Readme (#191)
* Made fail2ban settings more consistent across OSes, disabled HTTP ratelimit permaban on Debian as auto-refresh behaviour in FusionPBX can trigger it.

* Increase nginx-404 ban back to 1 hour
2018-10-11 12:22:35 -06:00
FusionPBX
0ac1c952ae Update install.sh 2018-10-10 18:49:01 -06:00
FusionPBX
666fc87838 Update install.sh 2018-10-10 18:27:44 -06:00
FusionPBX
dcce50b87c Update install.sh 2018-10-10 18:24:24 -06:00
FusionPBX
528229a681 Update nginx.sh 2018-10-09 20:50:37 -06:00
FusionPBX
b4d587b319 Update nginx.sh 2018-10-09 20:47:09 -06:00
FusionPBX
94ea7a3914 Update nginx.sh 2018-10-09 20:38:20 -06:00
FusionPBX
9d448ecabc Update ioncube.sh 2018-10-09 20:38:04 -06:00
FusionPBX
38df1e5b5b Update config.sh 2018-10-09 20:36:26 -06:00
FusionPBX
e348f0663f Update php.sh 2018-10-09 20:35:39 -06:00
Len
1b318bed0c Update finish.sh (#187) 2018-10-02 12:54:13 -06:00
Len
6a343ae817 Update finish.sh (#188) 2018-10-02 12:54:00 -06:00
Len
eace5b5366 Update finish.sh (#189) 2018-10-02 12:53:46 -06:00
Len
567b360741 Update finish.sh (#190) 2018-10-02 12:53:35 -06:00
FusionPBX
18486bef91 Update install.sh 2018-09-27 09:16:45 -06:00
FusionPBX
5edf267666 Debian 9 - FreeSWITCH 1.8 2018-09-27 09:14:26 -06:00
Len
ba4eedf1b2 Update finish.sh (#184) 2018-09-21 10:43:22 -04:00
Len
8590216c8e Update finish.sh (#183) 2018-09-21 10:43:04 -04:00
Len
e03589db8e Update finish.sh (#185) 2018-09-21 10:42:49 -04:00
Len
c03ad6fc3a Update finish.sh (#186) 2018-09-21 10:42:30 -04:00
FusionPBX
97d1d776c2 Update install.sh 2018-09-06 09:54:26 -06:00
FusionPBX
97859bee9f Make sure nano is installed for an easy text editor. 2018-09-03 12:49:05 -06:00
FusionPBX
2b2a4b9d23 Update install.sh 2018-09-03 12:48:20 -06:00
FusionPBX
baa88d9468 Update fusionpbx-maintenance.sh 2018-08-30 13:19:38 -06:00
FusionPBX
f207784145 Update php.sh 2018-08-30 01:41:56 -06:00
FusionPBX
856d5d10fd Update nginx.sh 2018-08-30 01:39:35 -06:00
FusionPBX
379262fa0c Update nginx.sh 2018-08-30 01:38:55 -06:00
FusionPBX
54dbabaa52 Update ioncube.sh 2018-08-28 13:33:28 -06:00
FusionPBX
c8bb065108 Create ioncube.sh 2018-08-28 11:48:54 -06:00
Len
367af32205 Update finish.sh (#174) 2018-08-23 21:30:37 -06:00
Len
41c655d578 Update finish.sh (#175) 2018-08-23 21:30:06 -06:00
Len
ba251df676 Update finish.sh (#176) 2018-08-23 21:29:05 -06:00
Len
ce6acb0a10 Update finish.sh (#177) 2018-08-23 21:28:29 -06:00
FusionPBX
b71b241aac Update jail.local 2018-08-11 15:22:30 -06:00
FusionPBX
4af4ad9fa2 Update jail.local 2018-08-11 15:21:14 -06:00
FusionPBX
2d5bbd0437 Update fusionpbx-maintenance.sh 2018-08-09 19:33:35 -06:00
FusionPBX
2d3fe58bc8 Update fusionpbx.sh 2018-08-09 19:32:26 -06:00
FusionPBX
8bca6b7de3 Update letsencrypt.sh 2018-08-02 12:50:35 -06:00
FusionPBX
ae618f952a Update letsencrypt.sh 2018-08-02 12:46:32 -06:00
FusionPBX
42302131a4 Update pf.conf 2018-07-26 13:26:42 -05:00
FusionPBX
5b7490a559 Update iptables.sh 2018-07-26 13:25:19 -05:00
FusionPBX
566126a18b Update fusionpbx 2018-07-25 01:28:29 -05:00
FusionPBX
df72c3b07a Update letsencrypt.sh 2018-07-25 01:12:25 -05:00
FusionPBX
b5403fa888 Update config.sh 2018-07-25 01:01:28 -05:00
FusionPBX
98b9b0cf3b Update letsencrypt.sh 2018-07-25 00:59:53 -05:00
FusionPBX
c0072b0131 Update letsencrypt.sh 2018-07-25 00:55:18 -05:00
FusionPBX
2f1bc5f9c4 Update letsencrypt.sh 2018-07-25 00:41:15 -05:00
FusionPBX
e05f1de9cd Update fusionpbx 2018-07-25 00:01:41 -05:00
FusionPBX
fbe8e97b4e Update letsencrypt.sh 2018-07-21 23:38:41 -06:00
FusionPBX
0b823ce608 Update letsencrypt.sh 2018-07-21 14:50:24 -06:00
FusionPBX
8678516671 Update letsencrypt.sh 2018-07-21 14:21:58 -06:00
FusionPBX
7eafdcded6 Update letsencrypt.sh 2018-07-21 14:09:01 -06:00
FusionPBX
18376c5b41 Update letsencrypt.sh 2018-07-21 14:00:40 -06:00
FusionPBX
2551bc4768 Update letsencrypt.sh 2018-07-21 13:26:52 -06:00
FusionPBX
daa7c6b69f Update letsencrypt.sh 2018-07-21 00:18:39 -06:00
FusionPBX
5e84c0ac1e Update config.sh 2018-07-21 00:06:17 -06:00
FusionPBX
23ee84236f Update config.sh 2018-07-20 20:25:59 -06:00
FusionPBX
9640948236 Update dsn.sh 2018-07-20 00:55:03 -06:00
FusionPBX
41b629f58b Update dsn.sh 2018-07-19 12:06:20 -06:00
FusionPBX
95d84dd9b0 Update dsn.sh 2018-07-19 00:48:48 -06:00
FusionPBX
c4ee83cffd Create dsn.sh 2018-07-19 00:36:14 -06:00
FusionPBX
05932c1c8c Create dsn.sh 2018-07-19 00:23:52 -06:00
FusionPBX
662077e1a2 Update sip-auth-challenge-ip.conf 2018-07-11 22:29:33 -06:00
FusionPBX
0242ce3cc2 Update auth-challenge-ip.conf 2018-07-11 22:28:14 -06:00
FusionPBX
2723d9f0ab Create sip-auth-challenge-ip.conf 2018-07-11 19:52:00 -06:00
FusionPBX
f0a72884f8 Update jail.local 2018-07-11 19:51:08 -06:00
FusionPBX
048692db50 Rename freeswitch-dos.conf to sip-auth-challenge.conf 2018-07-11 19:44:41 -06:00
FusionPBX
62a470dcc3 Update jail.local 2018-07-11 19:25:55 -06:00
FusionPBX
9eb868418c Update fail2ban.sh 2018-07-11 18:17:33 -06:00
FusionPBX
ea93d7dc5d Rename sip-auth-challenge-ip.conf to auth-challenge-ip.conf 2018-07-11 18:15:20 -06:00
FusionPBX
eb393b2ae1 Update jail.local 2018-07-11 18:14:57 -06:00
FusionPBX
7a5ff0f39c Update jail.local 2018-07-11 17:59:55 -06:00
FusionPBX
7cd0c465f2 Update jail.local 2018-07-11 17:48:14 -06:00
FusionPBX
a7a2cb0318 Update jail.local 2018-07-11 17:47:06 -06:00
FusionPBX
88a08226e2 Update jail.local 2018-07-11 17:43:07 -06:00
FusionPBX
fa1fa58127 Update jail.local 2018-07-11 17:35:22 -06:00
FusionPBX
868053c018 Update jail.local 2018-07-11 17:34:57 -06:00
FusionPBX
e71abab6aa Update fail2ban.sh 2018-07-11 17:18:44 -06:00
FusionPBX
411af39f90 Create sip-auth-challenge-ip.conf 2018-07-11 17:17:19 -06:00
FusionPBX
5c4dbb00ac Update fusionpbx.conf 2018-07-11 16:22:55 -06:00
FusionPBX
b38653b99c Update letsencrypt.sh 2018-07-04 16:01:47 -06:00
FusionPBX
864698db9f Update letsencrypt.sh 2018-07-04 15:59:45 -06:00
Mark J Crane
c64d34a675 Add execute permissions 2018-07-04 19:24:36 +00:00
Charlie Root
7fad316089 Add execute permissions 2018-07-04 19:21:50 +00:00
FusionPBX
3ebfbb4db0 Update finish.sh 2018-07-04 13:06:47 -06:00
FusionPBX
163eff0204 Update finish.sh 2018-07-04 13:05:58 -06:00
FusionPBX
5090c68c0e Update finish.sh 2018-07-04 13:03:09 -06:00
FusionPBX
e8f3e57b03 Update finish.sh 2018-07-04 13:02:20 -06:00
FusionPBX
0316adfa04 Update finish.sh 2018-07-04 12:59:19 -06:00
Len
db55da9bd1 Update finish.sh (#171) 2018-07-04 10:36:45 -06:00
Len
1362e53aef Update finish.sh (#170) 2018-07-04 10:36:32 -06:00
Len
dede79a700 Update finish.sh (#169)
* Update finish.sh

* Update finish.sh
2018-07-04 10:36:17 -06:00
Len
8c6d7ca966 Update finish.sh (#168) 2018-07-04 10:04:04 -06:00
FusionPBX
c5e04d948d Update letsencrypt.sh 2018-07-01 09:34:40 -06:00
FusionPBX
8ab0c73671 Update letsencrypt.sh 2018-07-01 09:19:22 -06:00
FusionPBX
111545a7b4 Create dsn.sh 2018-07-01 08:42:49 -06:00
FusionPBX
89715a96a0 Create empty.sh 2018-07-01 08:37:03 -06:00
FusionPBX
52ac0c85ed Create letsencrypt.sh 2018-07-01 08:35:36 -06:00
FusionPBX
17a797e4dc Create domain_name.conf 2018-07-01 08:34:22 -06:00
FusionPBX
e739321e45 Create create.sh 2018-06-16 09:52:51 -06:00
FusionPBX
7621c33262 Update finish.sh 2018-05-23 23:30:39 -07:00
FusionPBX
00346e99b4 Update package-release.sh 2018-05-23 23:26:20 -07:00
FusionPBX
ced98febde Update finish.sh 2018-05-23 23:17:33 -07:00
FusionPBX
7e41f38852 Update dsn.sh 2018-05-23 23:15:52 -07:00
FusionPBX
906cf1ae40 Update config.sh 2018-05-23 22:53:54 -07:00
FusionPBX
4b1a45e824 Update package-release.sh 2018-05-23 22:48:26 -07:00
FusionPBX
d22fbaeb44 Update source-release.sh 2018-05-23 19:44:34 -07:00
FusionPBX
363a6b1f55 Update source-release.sh 2018-05-23 18:30:25 -07:00
FusionPBX
7e80638a57 Update source-release.sh 2018-05-23 17:37:48 -07:00
FusionPBX
fb214b8d56 Update source-release.sh 2018-05-22 23:48:30 -07:00
FusionPBX
3d5561663d Update php.sh 2018-05-22 22:54:33 -07:00
FusionPBX
9a8ddbe4fa Update php.sh 2018-05-22 22:20:52 -07:00
FusionPBX
b89efb0a1a Update config.sh 2018-05-22 22:02:51 -07:00
FusionPBX
41ad07183c Update php.sh 2018-05-22 21:59:56 -07:00
FusionPBX
f93f97d2a6 Update postgresql.sh 2018-05-17 19:15:37 -06:00
FusionPBX
ce0146e084 Update config.sh 2018-05-16 12:33:13 -06:00
FusionPBX
d55ab39c94 Update postgresql.sh 2018-05-16 12:31:57 -06:00
FusionPBX
b8064c7cb0 Update source-release.sh 2018-05-05 22:48:31 -06:00
FusionPBX
5f602876f7 Update fail2ban.sh 2018-05-02 15:15:13 -06:00
FusionPBX
c52cbe10e8 Update fail2ban.sh 2018-05-02 15:08:55 -06:00
FusionPBX
6d5211ccfe Rename sip-auth_failure.conf to sip-auth-failure.conf 2018-05-02 15:04:00 -06:00
FusionPBX
1cf12bab2c Rename sip-auth_challenge.conf to sip-auth-challenge.conf 2018-05-02 15:03:42 -06:00
FusionPBX
86151d2661 Update jail.local 2018-05-02 15:02:40 -06:00
FusionPBX
a496aff23a Rename freeswitch-auth_challenge.conf to sip-auth_challenge.conf 2018-05-02 15:00:06 -06:00
FusionPBX
f9697e3df7 Rename freeswitch-auth_failure.conf to sip-auth_failure.conf 2018-05-02 14:59:48 -06:00
FusionPBX
371ca9f63f Update jail.local 2018-05-02 14:07:52 -06:00
FusionPBX
9768efa715 Update fail2ban.sh 2018-05-02 14:03:17 -06:00
FusionPBX
7ad7516c35 Update jail.local 2018-05-02 14:02:28 -06:00
FusionPBX
1389ff9066 Rename freeswitch-sip_auth_challenge.conf to freeswitch-auth_challenge.conf 2018-05-02 14:01:15 -06:00
FusionPBX
a231899789 Rename freeswitch-sip_auth_failure.conf to freeswitch-auth_failure.conf 2018-05-02 14:00:55 -06:00
FusionPBX
46c0c53631 Update fail2ban.sh 2018-05-02 13:35:06 -06:00
FusionPBX
dc0ea82a05 Update jail.local 2018-05-02 13:26:22 -06:00
FusionPBX
03ff98bf8f Rename freeswitch-dos.conf to freeswitch-sip_auth_failure.conf 2018-05-02 13:19:27 -06:00
FusionPBX
c4c8e811d1 Create freeswitch-sip_auth_challenge.conf 2018-05-02 13:18:22 -06:00
FusionPBX
b6e0d9e541 Update nginx.sh 2018-05-02 12:47:47 -06:00
Len
4428fb462b Update finish.sh (#163)
* Update finish.sh

* Update finish.sh

* Update finish.sh

* Update finish.sh
2018-04-24 19:22:23 -06:00
Len
1433396aec Update finish.sh (#164)
* Update finish.sh

* Update finish.sh
2018-04-24 19:21:47 -06:00
Len
12debdc7b0 Update finish.sh (#165)
* Update finish.sh

* Update finish.sh
2018-04-24 19:21:24 -06:00
Len
bc423fd6b0 Update finish.sh (#166)
* Update finish.sh

* Update finish.sh
2018-04-24 19:21:03 -06:00
FusionPBX
6c4ae813eb Update iptables.sh 2018-04-17 13:56:38 -06:00
FusionPBX
2d93a708e5 Update jail.local 2018-04-17 13:56:01 -06:00
FusionPBX
198a9a91b2 Update nginx.sh 2018-04-07 22:42:15 -06:00
Len
95fc640c11 Update nginx.sh (#162) 2018-04-07 22:40:59 -06:00
Len
241d5319ae Update nginx.sh (#161)
update package source for arm
2018-04-07 22:20:28 -06:00
FusionPBX
6be2ccf02d Update fusionpbx.sh 2018-04-05 23:08:56 -06:00
FusionPBX
0bc37d5d46 Update letsencrypt.sh 2018-03-27 15:43:59 -06:00
FusionPBX
7843136081 Update letsencrypt.sh 2018-03-27 15:36:42 -06:00
FusionPBX
b8779fc724 Update letsencrypt.sh 2018-03-27 15:28:35 -06:00
FusionPBX
7af9b79ca4 Update letsencrypt.sh 2018-03-22 10:10:12 -06:00
FusionPBX
66178c093f Update letsencrypt.sh 2018-03-22 01:27:00 -06:00
FusionPBX
e08e8db1b5 Update letsencrypt.sh 2018-03-21 19:37:55 -06:00
FusionPBX
b0b2ddfe6c Update letsencrypt.sh 2018-03-21 19:30:40 -06:00
FusionPBX
09b783c520 Update letsencrypt.sh 2018-03-21 19:26:05 -06:00
FusionPBX
41e32c9da1 Update letsencrypt.sh 2018-03-21 11:53:23 -06:00
FusionPBX
527fdfaaaa Update letsencrypt.sh 2018-03-21 11:50:04 -06:00
FusionPBX
6b223fd360 Update letsencrypt.sh 2018-03-21 11:40:18 -06:00
FusionPBX
6033b19124 Update letsencrypt.sh 2018-03-21 11:30:31 -06:00
FusionPBX
fcd9a9b467 Update letsencrypt.sh 2018-03-21 11:25:51 -06:00
FusionPBX
377abaa623 Update letsencrypt.sh 2018-03-21 11:20:07 -06:00
FusionPBX
62c2dc1a38 Update letsencrypt.sh 2018-03-21 11:00:29 -06:00
Len
409fddcb5d Update package-release.sh (#159)
* Update package-release.sh

add $switch_version

* Update package-release.sh
2018-03-08 21:36:10 -07:00
Len
d082bd06f1 Update install.sh (#157) 2018-03-08 20:10:03 -07:00
Len
cb3dcc82e1 Update php.sh (#155) 2018-03-08 20:09:29 -07:00
Len
b02db342e7 Update nginx.sh (#156)
updated for stretch
2018-03-08 20:08:54 -07:00
markjcrane
6a82d2d673 Update permissions 2018-03-07 17:32:54 +00:00
markjcrane
9cc88b7d6a update permissions 2018-03-07 17:29:53 +00:00
FusionPBX
403cae332e Update php.sh 2018-03-07 09:49:33 -07:00
FusionPBX
8021065b0b Create php.sh 2018-03-07 09:30:50 -07:00
FusionPBX
0fbb3d8ad7 Update config.sh 2018-03-06 23:02:24 -07:00
FusionPBX
f331ac03f9 Update nginx.sh 2018-03-06 21:17:37 -07:00
FusionPBX
722731406a Update nginx.sh - Add PHP 7.1 2018-03-06 21:15:39 -07:00
FusionPBX
1f32e18744 Update ioncube.sh 2018-03-06 20:25:01 -07:00
FusionPBX
534762a2af Create ioncube.sh 2018-03-06 00:38:42 -07:00
FusionPBX
0abe1ee285 Update finish.sh 2018-03-01 01:21:26 -07:00
FusionPBX
b699920330 Update finish.sh 2018-03-01 01:20:54 -07:00
FusionPBX
a9f8132697 Update finish.sh 2018-03-01 01:20:06 -07:00
FusionPBX
dd7d56244b Update finish.sh 2018-03-01 01:19:21 -07:00
root
5792cd9fc2 Add execute permissions to files that need it 2018-02-28 09:36:51 +00:00
FusionPBX
e085f99004 Update ioncube.sh 2018-02-28 02:33:01 -07:00
FusionPBX
3a6d647e33 Update ioncube.sh 2018-02-28 01:37:14 -07:00
FusionPBX
58892a8f7c Create ioncube.sh 2018-02-28 01:20:33 -07:00
krstork
9e72bd2949 Fix rewrite for Grandstream phonebook (#154)
* Fix rewrite for Grandstream phonebook

* Update fusionpbx
2018-02-22 21:30:31 -07:00
FusionPBX
6b265aaf1d Update source-release.sh 2018-02-14 14:15:08 -07:00
FusionPBX
41f8269dbb Update iptables.sh 2018-01-30 15:07:38 -07:00
FusionPBX
11bcb33bbf Create pg_hba.sh 2018-01-30 15:07:00 -07:00
FusionPBX
e2fa7afa0b Create iptables.sh 2018-01-30 15:03:43 -07:00
Len
110ea265dd Update install-webplatform.ps1 (#152) 2018-01-26 22:44:50 -07:00
Len
68162fb1a2 Update install-postgresql.ps1 (#151) 2018-01-26 22:44:33 -07:00
Len
494b6755b4 Update README.md (#150) 2018-01-26 22:44:06 -07:00
Len
0dbf6e3eec Update finish.ps1 (#147)
* Update finish.ps1

* Update finish.ps1
2018-01-26 22:43:49 -07:00
FusionPBX
7ecf0eb1a5 Update fail2ban.sh 2018-01-26 09:54:41 -07:00
FusionPBX
e8f7cf98c9 Update iptables.sh 2018-01-26 09:46:55 -07:00
Len
c329a3bcb0 Update install-postgresql.ps1 (#149) 2018-01-25 22:09:38 -07:00
Len
8cbb55b20b Create pg_hba.conf (#148) 2018-01-25 22:08:08 -07:00
Len
127f0cbaad Update finish.ps1 (#144) 2018-01-24 20:29:10 -07:00
Len
67a7c97efa Update install-fusionpbx.ps1 (#145) 2018-01-24 20:27:10 -07:00
Len
3b235e6739 Update install-iis.ps1 (#146) 2018-01-24 20:17:03 -07:00
Len
feca5a7259 Update install-iis.ps1 (#141) 2018-01-23 22:33:15 -07:00
Len
217242d7cf Update finish.ps1 (#142) 2018-01-23 22:32:40 -07:00
Len
0e43ac0359 Update install-fusionpbx.ps1 (#143) 2018-01-23 22:32:13 -07:00
Len
4a680365b8 Update README.md (#140)
update url for windows section
2018-01-23 22:31:41 -07:00
FusionPBX
5b5dbd7088 Update postgresql.sh 2018-01-23 19:13:59 -07:00
FusionPBX
dbdd6384ed Update fusionpbx 2018-01-23 10:36:20 -07:00
FusionPBX
6e49545f15 Update jail.local 2018-01-20 20:11:13 -07:00
FusionPBX
ddd121c997 Rename freeswitch-404.conf to fusionpbx-404.conf 2018-01-20 20:06:44 -07:00
Len
5e3540fb2c Update install-iis.ps1 (#139) 2018-01-20 17:15:57 -07:00
Len
db78c75117 Update finish.ps1 (#138)
Added pause
2018-01-20 17:08:42 -07:00
Len
ebfeb8a00c Update README.md (#135)
* Update README.md

* Update install-iis.ps1
2018-01-20 17:06:26 -07:00
Len
8fe353a41a Update install-freeswitch.ps1 (#136)
update hard linked repo
2018-01-20 17:06:02 -07:00
FusionPBX
29e4ea7c6a Update node.sh 2018-01-20 02:41:56 -07:00
FusionPBX
e6d2dd1b70 Update README.md 2018-01-10 14:59:28 -07:00
FusionPBX
5fd29165b2 Update fusionpbx 2018-01-07 14:53:32 -07:00
FusionPBX
5ab6fc1f0b Update fusionpbx.conf 2018-01-07 14:52:41 -07:00
FusionPBX
63d7517286 Update fusionpbx 2018-01-07 14:51:47 -07:00
FusionPBX
e50a3bb1e9 Update finish.sh 2018-01-05 04:44:07 -07:00
FusionPBX
555f806064 Update finish.sh 2018-01-05 04:43:07 -07:00
FusionPBX
fe1a873116 Update finish.sh 2018-01-05 04:42:39 -07:00
FusionPBX
79725b3dca Update finish.sh 2018-01-05 04:42:10 -07:00
FusionPBX
5e839ea479 Update install-nginx.ps1 2018-01-03 23:59:39 -07:00
FusionPBX
86bddc25cf Update package-release.sh 2018-01-03 19:23:43 -07:00
FusionPBX
6484c6d2c9 Update nginx.sh 2018-01-03 19:09:20 -07:00
FusionPBX
d959b89ed2 Update php.sh 2018-01-03 19:02:35 -07:00
FusionPBX
5fbf58554c Update postgresql.sh 2018-01-03 18:56:37 -07:00
FusionPBX
0f7020e21d Update package-release.sh 2018-01-03 18:51:24 -07:00
FusionPBX
48165a244b Update install-webplatform.ps1 2018-01-03 03:29:44 -07:00
FusionPBX
3571e7b450 Delete pre-install.ps1 2018-01-03 03:28:50 -07:00
245 changed files with 10007 additions and 2100 deletions

46
README.md Executable file → Normal file
View File

@@ -1,23 +1,31 @@
FusionPBX Install FusionPBX Install
-------------------------------------- --------------------------------------
A quick install guide for a FusionPBX install. It is recommended to start the install on a minimal install of the operating system. A quick install guide & scripts for installing FusionPBX. It is recommended to start with a minimal install of the operating system. Notes on further tweaking your configuration are at end of the file.
## Operating Systems
### Debian ### Debian and Raspberry OS
Debian 8 is the preferred operating system by the FreeSWITCH developers. It supports the latest video dependencies. If you want to do video mixing use Debian. Download Debian 8 Jessie from here https://cdimage.debian.org/cdimage/archive/ Debian is the preferred operating system by the FreeSWITCH developers. It supports the latest video dependencies and should be used if you want to do video mixing. Download Debian at https://cdimage.debian.org/cdimage/release/current/
```sh ```sh
wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/debian/pre-install.sh | sh wget -O - https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh/raw/branch/installer/debian/pre-install.sh | sh;
cd /usr/src/fusionpbx-install.sh/debian && ./install.sh cd /usr/src/fusionpbx-install.sh/debian && ./install.sh
``` ```
### Ubuntu and Raspberry OS
```sh
wget -O - https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh/raw/branch/installer/ubuntu/pre-install.sh | sh;
cd /usr/src/fusionpbx-install.sh/ubuntu && ./install.sh
```
### Devuan ### Devuan
If you like Debian but rather not bother with systemd, Devuan is a "drop in" replacement. If you like Debian but rather not bother with systemd, Devuan is a "drop in" replacement.
Version 1 is bassed on Jessie. So you will find the same packages available. Devuan ASCII is based on Stretch, so you will find most of the same packages available.
Please note that the source installation and installation on ARM is not fully tested. Please note that the source installation and installation on ARM is not fully tested.
```sh ```sh
wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/devuan/pre-install.sh | sh wget -O - https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh/raw/branch/installer/devuan/pre-install.sh | sh;
cd /usr/src/fusionpbx-install.sh/devuan && ./install.sh cd /usr/src/fusionpbx-install.sh/devuan && ./install.sh
``` ```
@@ -26,7 +34,7 @@ FreeBSD is an operating system that has many great features like ZFS, HAST, CARP
```sh ```sh
pkg install --yes git pkg install --yes git
cd /usr/src && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git cd /usr/src && git clone https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh.git
cd /usr/src/fusionpbx-install.sh/freebsd/ cd /usr/src/fusionpbx-install.sh/freebsd/
./install.sh ./install.sh
``` ```
@@ -35,18 +43,26 @@ cd /usr/src/fusionpbx-install.sh/freebsd/
CentOS operating system is a requirement for some companies. Don't expect video mixing to work. It will likely be a year or more for video mixing dependencies to be updated enough to work in CentOS. CentOS operating system is a requirement for some companies. Don't expect video mixing to work. It will likely be a year or more for video mixing dependencies to be updated enough to work in CentOS.
```sh ```sh
wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/centos/pre-install.sh | sh wget -O - https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh/raw/branch/installer/centos/pre-install.sh | sh
cd /usr/src/fusionpbx-install.sh/centos && ./install.sh cd /usr/src/fusionpbx-install.sh/centos && ./install.sh
``` ```
### Windows ### Windows
Don't expect everything to work. Testing is required. * This powershell install for windows is currently in a "beta stage".
mod_lua is missing from builds after 1.6.14. Script will download it from github. * mod_lua is missing from builds after 1.6.14. Script will download it from github.
Open PowerShell as Administrator and run commands * Click to download the zip file and extract it.
* Extract the zip file
* Navigate to install.ps1
* Click on install.ps1 then right click on install.ps1 then choose Run with Powershell
* If you are not already Administrator you will have to choose run as Administrator
```sh ```sh
Set-Location "$env:PUBLIC\Downloads"
Invoke-WebRequest https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/windows/install.ps1 -OutFile install.ps1 Master https://github.com/fusionpbx/fusionpbx-install.sh/archive/master.zip
#run the script
.\install.ps1
``` ```
## Security Considerations
Fail2ban is installed and pre-configured for all operating systems this repository works on besides Windows, but the default settings may not be ideal depending on your needs. Please take a look at the jail file (/etc/fail2ban/jail.local on Debian/Devuan) to configure it to suit your application and security model!
## ISSUES
If you find a bug sign up for an account on www.fusionpbx.com to report the issue.

View File

@@ -13,8 +13,11 @@ cd "$(dirname "$0")"
verbose "Updating CentOS" verbose "Updating CentOS"
yum -y update && yum -y upgrade yum -y update && yum -y upgrade
# Add additional repository
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
# Installing basics packages # Installing basics packages
yum -y install ntp htop epel-release vim openssl yum -y install ntp yum-utils net-tools epel-release htop vim openssl
# Disable SELinux # Disable SELinux
resources/selinux.sh resources/selinux.sh

View File

@@ -4,7 +4,7 @@
yum -y install git yum -y install git
#get the install script #get the install script
cd /usr/src && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git cd /usr/src && git clone https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh.git
#change the working directory #change the working directory
cd /usr/src/fusionpbx-install.sh/centos cd /usr/src/fusionpbx-install.sh/centos

View File

@@ -10,10 +10,10 @@ mkdir -p /var/backups/fusionpbx/postgresql
echo "Backup Started" echo "Backup Started"
#delete postgres backups #delete postgres backups
find /var/backups/fusionpbx/postgresql/fusionpbx_pgsql* -mtime +4 -exec rm {} \; find /var/backups/fusionpbx/postgresql/fusionpbx_pgsql* -mtime +4 -exec rm -f {} \;
#delete the main backup #delete the main backup
find /var/backups/fusionpbx/*.tgz -mtime +2 -exec rm {} \; find /var/backups/fusionpbx/*.tgz -mtime +2 -exec rm -f {} \;
#backup the database #backup the database
pg_dump --verbose -Fc --host=$db_host --port=$db_port -U fusionpbx fusionpbx --schema=public -f /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql pg_dump --verbose -Fc --host=$db_host --port=$db_port -U fusionpbx fusionpbx --schema=public -f /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql

View File

@@ -2,7 +2,7 @@
# FusionPBX Settings # FusionPBX Settings
system_username=admin # default username admin system_username=admin # default username admin
system_password=random # random or as a pre-set value system_password=random # random or as a pre-set value
system_branch=stable # master, stable system_branch=master # master, stable
# FreeSWITCH Settings # FreeSWITCH Settings
switch_branch=stable # master, stable switch_branch=stable # master, stable
@@ -10,4 +10,10 @@ switch_source=false # true or false
switch_package=true # true or false switch_package=true # true or false
# Database Settings # Database Settings
database_password=random # random or as a pre-set value database_name=fusionpbx # Database name (safe characters A-Z, a-z, 0-9)
database_username=fusionpbx # Database username (safe characters A-Z, a-z, 0-9)
database_password=random # random or a custom value (safe characters A-Z, a-z, 0-9)
database_repo=official # PostgreSQL official, system, 2ndquadrant
database_host=127.0.0.1 # hostname or IP address
database_port=5432 # port number
database_backup=false # true or false

View File

@@ -7,8 +7,8 @@
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+) # (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT # Values: TEXT
# #
failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(REGISTER\) on sofia profile \'\w+\' for \[.*\] from ip <HOST> failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(REGISTER\) on sofia profile \'.*\' for \[.*\] from ip <HOST>
\[WARNING\] sofia_reg.c:\d+ SIP auth failure \(INVITE\) on sofia profile \'\w+\' for \[.*\] from ip <HOST> \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(INVITE\) on sofia profile \'.*\' for \[.*\] from ip <HOST>
# Option: ignoreregex # Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored. # Notes.: regex to ignore. If this regex matches, the line is ignored.

View File

@@ -67,7 +67,7 @@ findtime = 30
bantime = 6000 bantime = 6000
[freeswitch-404] [freeswitch-404]
enabled = true enabled = false
port = 5060,5061,5080,5081 port = 5060,5061,5080,5081
protocol = all protocol = all
filter = freeswitch-404 filter = freeswitch-404
@@ -95,13 +95,13 @@ port = 80,443
protocol = tcp protocol = tcp
filter = nginx-404 filter = nginx-404
logpath = /var/log/nginx/access*.log logpath = /var/log/nginx/access*.log
bantime = 600 bantime = 3600
findtime = 60 findtime = 60
maxretry = 120 maxretry = 120
[nginx-dos] [nginx-dos]
# Based on apache-badbots but a simple IP check (any IP requesting more than # Based on apache-badbots but a simple IP check (any IP requesting more than
# 240 pages in 60 seconds, or 4p/s average, is suspicious) # 300 pages in 60 seconds, or 5p/s average, is suspicious)
# Block for two full days. # Block for two full days.
enabled = true enabled = true
port = 80,443 port = 80,443
@@ -109,5 +109,5 @@ protocol = tcp
filter = nginx-dos filter = nginx-dos
logpath = /var/log/nginx/access*.log logpath = /var/log/nginx/access*.log
findtime = 60 findtime = 60
bantime = 172800 bantime = 86400
maxretry = 240 maxretry = 300

View File

@@ -19,15 +19,16 @@ fi
export PGPASSWORD=$database_password export PGPASSWORD=$database_password
#update the database password #update the database password
sudo -u postgres /usr/pgsql-9.4/bin/psql -c "ALTER USER fusionpbx WITH PASSWORD '$database_password';" sudo -u postgres /usr/bin/psql -c "ALTER USER fusionpbx WITH PASSWORD '$database_password';"
sudo -u postgres /usr/pgsql-9.4/bin/psql -c "ALTER USER freeswitch WITH PASSWORD '$database_password';" sudo -u postgres /usr/bin/psql -c "ALTER USER freeswitch WITH PASSWORD '$database_password';"
#add the config.php #add the config.conf
mkdir -p /etc/fusionpbx mkdir -p /etc/fusionpbx/
chown -R freeswitch:daemon /etc/fusionpbx cp fusionpbx/config.conf /etc/fusionpbx/
cp fusionpbx/config.php /etc/fusionpbx sed -i /etc/fusionpbx/config.conf -e s:"{database_host}:$database_host:"
sed -i /etc/fusionpbx/config.php -e s:'{database_username}:fusionpbx:' sed -i /etc/fusionpbx/config.conf -e s:"{database_name}:$database_name:"
sed -i /etc/fusionpbx/config.php -e s:"{database_password}:$database_password:" sed -i /etc/fusionpbx/config.conf -e s:"{database_username}:$database_username:"
sed -i /etc/fusionpbx/config.conf -e s:"{database_password}:$database_password:"
#add the database schema #add the database schema
cd /var/www/fusionpbx && php /var/www/fusionpbx/core/upgrade/upgrade_schema.php > /dev/null 2>&1 cd /var/www/fusionpbx && php /var/www/fusionpbx/core/upgrade/upgrade_schema.php > /dev/null 2>&1
@@ -64,9 +65,9 @@ group_uuid=$(psql --host=$database_host --port=$database_port --username=$databa
group_uuid=$(echo $group_uuid | sed 's/^[[:blank:]]*//;s/[[:blank:]]*$//') group_uuid=$(echo $group_uuid | sed 's/^[[:blank:]]*//;s/[[:blank:]]*$//')
#add the user to the group #add the user to the group
group_user_uuid=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php); user_group_uuid=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php);
group_name=superadmin group_name=superadmin
psql --host=$database_host --port=$database_port --username=$database_username -c "insert into v_group_users (group_user_uuid, domain_uuid, group_name, group_uuid, user_uuid) values('$group_user_uuid', '$domain_uuid', '$group_name', '$group_uuid', '$user_uuid');" psql --host=$database_host --port=$database_port --username=$database_username -c "insert into v_user_groups (user_group_uuid, domain_uuid, group_name, group_uuid, user_uuid) values('$user_group_uuid', '$domain_uuid', '$group_name', '$group_uuid', '$user_uuid');"
#update the php configuration #update the php configuration
sed -i 's/user nginx/user freeswitch daemon/g' /etc/nginx/nginx.conf sed -i 's/user nginx/user freeswitch daemon/g' /etc/nginx/nginx.conf
@@ -109,8 +110,10 @@ systemctl enable php-fpm
systemctl enable nginx systemctl enable nginx
systemctl enable freeswitch systemctl enable freeswitch
systemctl enable memcached systemctl enable memcached
systemctl enable postgresql-9.4 systemctl enable postgresql-14
systemctl daemon-reload systemctl daemon-reload
systemctl restart php-fpm
systemctl restart nginx
systemctl restart freeswitch systemctl restart freeswitch
#welcome message #welcome message
@@ -130,12 +133,14 @@ echo " Official FusionPBX Training"
echo " Fastest way to learn FusionPBX. For more information https://www.fusionpbx.com." echo " Fastest way to learn FusionPBX. For more information https://www.fusionpbx.com."
echo " Available online and in person. Includes documentation and recording." echo " Available online and in person. Includes documentation and recording."
echo "" echo ""
echo " Location Online and Boise,Idaho" echo " Location: Online"
echo " Admin Training 13 - 14 December 2017 (2 Days)" echo " Admin Training: TBA"
echo " Advanced Training 18 - 19 December 2017 (2 Days)" echo " Advanced Training: TBA"
echo " Timezone: https://www.timeanddate.com/worldclock/usa/boise" echo " Continuing Education: https://www.fusionpbx.com/training"
echo " Timezone: https://www.timeanddate.com/weather/usa/idaho"
echo "" echo ""
echo " Additional information." echo " Additional information."
echo " https://fusionpbx.com/members.php"
echo " https://fusionpbx.com/training.php" echo " https://fusionpbx.com/training.php"
echo " https://fusionpbx.com/support.php" echo " https://fusionpbx.com/support.php"
echo " https://www.fusionpbx.com" echo " https://www.fusionpbx.com"

0
centos/resources/firewall/iptables.sh Normal file → Executable file
View File

View File

@@ -24,15 +24,19 @@ if [ .$system_branch = .'master' ]; then
verbose "Using master" verbose "Using master"
BRANCH="" BRANCH=""
else else
FUSION_MAJOR=$(git ls-remote --heads https://github.com/fusionpbx/fusionpbx.git | cut -d/ -f 3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f1) FUSION_MAJOR=$(git ls-remote --heads https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git| cut -d/ -f 3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f1)
FUSION_MINOR=$(git ls-remote --tags https://github.com/fusionpbx/fusionpbx.git $FUSION_MAJOR.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2) FUSION_MINOR=$(git ls-remote --tags https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git$FUSION_MAJOR.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2)
FUSION_VERSION=$FUSION_MAJOR.$FUSION_MINOR FUSION_VERSION=$FUSION_MAJOR.$FUSION_MINOR
verbose "Using version $FUSION_VERSION" verbose "Using version $FUSION_VERSION"
BRANCH="-b $FUSION_VERSION" BRANCH="-b $FUSION_VERSION"
fi fi
#add the cache directory
mkdir -p /var/cache/fusionpbx
chown -R freeswitch:daemon /var/cache/fusionpbx
#get the source code #get the source code
git clone $BRANCH https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx git clone $BRANCH https://git.nsinnovations.net/nsinnovations/fusionpbx.gitvar/www/fusionpbx
#send a message #send a message
verbose "FusionPBX Installed" verbose "FusionPBX Installed"

View File

@@ -0,0 +1,48 @@
#database system settings
database.0.type = pgsql
database.0.host = {database_host}
database.0.port = 5432
database.0.sslmode = prefer
database.0.name = {database_name}
database.0.username = {database_username}
database.0.password = {database_password}
#database switch settings
database.1.type = sqlite
database.1.path = /var/lib/freeswitch/db
database.1.name = core.db
#general settings
document.root = /var/www/fusionpbx
project.path =
temp.dir = /tmp
php.dir = /usr/bin
php.bin = php
#session settings
session.cookie_httponly = true
session.cookie_secure = true
session.cookie_samesite = Lax
#cache settings
cache.method = file
cache.location = /var/cache/fusionpbx
cache.settings = true
#switch settings
switch.conf.dir = /etc/freeswitch
switch.sounds.dir = /usr/share/freeswitch/sounds
switch.database.dir = /var/lib/freeswitch/db
switch.recordings.dir = /var/lib/freeswitch/recordings
switch.storage.dir = /var/lib/freeswitch/storage
switch.voicemail.dir = /var/lib/freeswitch/storage/voicemail
switch.scripts.dir = /usr/share/freeswitch/scripts
#switch xml handler
xml_handler.fs_path = false
xml_handler.reg_as_number_alias = false
xml_handler.number_as_presence_id = true
#error reporting hide show all errors except notices and warnings
error.reporting = 'E_ALL ^ E_NOTICE ^ E_WARNING'

View File

@@ -1,45 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2016
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//set the database type
$db_type = 'pgsql'; //sqlite, mysql, pgsql, others with a manually created PDO connection
//sqlite: the db_name and db_path are automatically assigned however the values can be overidden by setting the values here.
//$db_name = 'fusionpbx.db'; //host name/ip address + '.db' is the default database filename
//$db_path = '/var/www/fusionpbx/secure'; //the path is determined by a php variable
//pgsql: database connection information
$db_host = 'localhost'; //set the host only if the database is not local
$db_port = '5432';
$db_name = 'fusionpbx';
$db_username = '{database_username}';
$db_password = '{database_password}';
//show errors
ini_set('display_errors', '1');
//error_reporting (E_ALL); // Report everything
error_reporting (E_ALL ^ E_NOTICE); // hide notices
//error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ); //hide notices and warnings

31
centos/resources/ioncube.sh Executable file
View File

@@ -0,0 +1,31 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ./config.sh
. ./colors.sh
. ./environment.sh
#make sure unzip is install
yum install unzip
#get the ioncube 64 bit loader
wget --no-check-certificate https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.zip
#uncompress the file
unzip ioncube_loaders_lin_x86-64.zip
#remove the zip file
rm ioncube_loaders_lin_x86-64.zip
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_7.1.so /usr/lib64/php/modules
#add the 00-ioncube.ini file
echo "zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_7.1.so" > /etc/php.d/00-ioncube.ini
#restart the service
#service httpd restart
service php-fpm restart

45
centos/resources/iptables.sh Executable file
View File

@@ -0,0 +1,45 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
. ./config.sh
. ./colors.sh
#send a message
verbose "Configuring IPTables"
#run iptables commands
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "friendly-scanner" --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "friendly-scanner" --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "sipcli/" --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "sipcli/" --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "VaxSIPUserAgent/" --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "VaxSIPUserAgent/" --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "pplsip" --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "pplsip" --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "script " --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "script " --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "system " --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "system " --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "exec." --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "exec." --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "multipart/mixed;boundary" --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "multipart/mixed;boundary" --algo bm --icase
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 7443 -j ACCEPT
iptables -A INPUT -p tcp --dport 5060:5091 -j ACCEPT
iptables -A INPUT -p udp --dport 5060:5091 -j ACCEPT
iptables -A INPUT -p udp --dport 16384:32768 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A INPUT -p udp --dport 1194 -j ACCEPT
iptables -t mangle -A OUTPUT -p udp -m udp --sport 16384:32768 -j DSCP --set-dscp 46
iptables -t mangle -A OUTPUT -p udp -m udp --sport 5060:5091 -j DSCP --set-dscp 26
iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 5060:5091 -j DSCP --set-dscp 26
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

View File

@@ -11,7 +11,7 @@ cd "$(dirname "$0")"
verbose "Installing the web server" verbose "Installing the web server"
#install dependencies #install dependencies
yum -y install nginx php-fpm php-gd php-pgsql php-odbc php-curl php-imap php-mcrypt php-opcache php-common php-pdo php-soap php-xml php-xmlrpc php-cli yum -y install nginx
#setup nginx #setup nginx
mkdir -p /etc/nginx/sites-available mkdir -p /etc/nginx/sites-available
@@ -23,5 +23,8 @@ ln -s /etc/nginx/sites-available/fusionpbx.conf /etc/nginx/sites-enabled/fusionp
awk '/server *{/ {c=1 ; next} c && /{/{c++} c && /}/{c--;next} !c' /etc/nginx/nginx.conf > /etc/nginx/nginx.tmp && mv -f /etc/nginx/nginx.tmp /etc/nginx/nginx.conf && rm -f /etc/nginx/nginx.tmp awk '/server *{/ {c=1 ; next} c && /{/{c++} c && /}/{c--;next} !c' /etc/nginx/nginx.conf > /etc/nginx/nginx.tmp && mv -f /etc/nginx/nginx.tmp /etc/nginx/nginx.conf && rm -f /etc/nginx/nginx.tmp
sed -i '/include \/etc\/nginx\/conf\.d\/\*\.conf\;/a \ include \/etc\/nginx\/sites-enabled\/\*\.conf\;' /etc/nginx/nginx.conf sed -i '/include \/etc\/nginx\/conf\.d\/\*\.conf\;/a \ include \/etc\/nginx\/sites-enabled\/\*\.conf\;' /etc/nginx/nginx.conf
#set the log permissions
chmod -R 664 /var/log/nginx/
#send a message #send a message
verbose "nginx installed" verbose "nginx installed"

View File

@@ -2,6 +2,7 @@
server { server {
listen 127.0.0.1:80; listen 127.0.0.1:80;
server_name 127.0.0.1; server_name 127.0.0.1;
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log; error_log /var/log/nginx/error.log;
@@ -31,11 +32,21 @@ server {
location ~^.+.(db)$ { location ~^.+.(db)$ {
deny all; deny all;
} }
location ~ /\.git {
deny all;
}
location ~ /\.lua {
deny all;
}
location ~ /\. {
deny all;
}
} }
server { server {
listen 80; listen 80;
server_name fusionpbx; server_name fusionpbx;
if ($uri !~* ^.*(provision|xml_cdr).*$) { if ($uri !~* ^.*(provision|xml_cdr).*$) {
rewrite ^(.*) https://$host$1 permanent; rewrite ^(.*) https://$host$1 permanent;
break; break;
@@ -47,8 +58,12 @@ server {
break; break;
} }
#algo #algo
rewrite "^.*/provision/algom([A-Fa-f0-9]{12})(\.(conf))?$" /app/provision/?mac=$1; rewrite "^.*/provision/algom([A-Fa-f0-9]{12})(\.(conf))?$" /app/provision/?mac=$1;
#avaya
rewrite "^.*/provision/J100Supgrade.txt" /resources/templates/provision/avaya/J100Supgrade.txt last;
rewrite "^.*/provision/([A-Fa-f0-9]{12}).txt?$" /app/provision/index.php?mac=$1 last;
#mitel #mitel
rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last; rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last;
@@ -90,6 +105,15 @@ server {
rewrite "^.*/provision/VCS754_([A-Fa-f0-9]{12})\.cfg$" /app/provision/?mac=$1; rewrite "^.*/provision/VCS754_([A-Fa-f0-9]{12})\.cfg$" /app/provision/?mac=$1;
rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml; rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
#Digium
rewrite "^.*/provision/([A-Fa-f0-9]{12})-contacts\.cfg$" "/app/provision/?mac=$1&file={%24mac}-contacts.cfg";
rewrite "^.*/provision/([A-Fa-f0-9]{12})-smartblf\.cfg$" "/app/provision/?mac=$1&file={%24mac}-smartblf.cfg";
#Snom
rewrite "^.*/provision/.*-([A-Fa-f0-9]{12})\.?(cfg|htm)?$" /app/provision/index.php?mac=$1;
rewrite "^.*/provision/C520-WiMi_([A-Fa-f0-9]{12})\.cfg$" /app/provision/index.php?mac=$1;
rewrite "^.*/provision/([A-Fa-f0-9]{12})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log; error_log /var/log/nginx/error.log;
@@ -119,12 +143,22 @@ server {
location ~^.+.(db)$ { location ~^.+.(db)$ {
deny all; deny all;
} }
location ~ /\.git {
deny all;
}
location ~ /\.lua {
deny all;
}
location ~ /\. {
deny all;
}
} }
server { server {
listen 443; listen 443 ssl;
server_name fusionpbx; server_name fusionpbx;
ssl on;
#ssl on;
ssl_certificate /etc/ssl/certs/nginx.crt; ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key; ssl_certificate_key /etc/ssl/private/nginx.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@@ -136,8 +170,15 @@ server {
break; break;
} }
#algo #message media
rewrite "^.*/provision/algom([A-Fa-f0-9]{12})(\.(conf))?$" /app/provision/?mac=$1; rewrite "^/app/messages/media/(.*)/(.*)" /app/messages/message_media.php?id=$1&action=download last;
#algo
rewrite "^.*/provision/algom([A-Fa-f0-9]{12})(\.(conf))?$" /app/provision/?mac=$1;
#avaya
rewrite "^.*/provision/J100Supgrade.txt" /resources/templates/provision/avaya/J100Supgrade.txt last;
rewrite "^.*/provision/([A-Fa-f0-9]{12}).txt?$" /app/provision/index.php?mac=$1 last;
#mitel #mitel
rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last; rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last;
@@ -179,6 +220,15 @@ server {
rewrite "^.*/provision/VCS754_([A-Fa-f0-9]{12})\.cfg$" /app/provision/?mac=$1; rewrite "^.*/provision/VCS754_([A-Fa-f0-9]{12})\.cfg$" /app/provision/?mac=$1;
rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml; rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
#Digium
rewrite "^.*/provision/([A-Fa-f0-9]{12})-contacts\.cfg$" "/app/provision/?mac=$1&file={%24mac}-contacts.cfg";
rewrite "^.*/provision/([A-Fa-f0-9]{12})-smartblf\.cfg$" "/app/provision/?mac=$1&file={%24mac}-smartblf.cfg";
#Snom
rewrite "^.*/provision/.*-([A-Fa-f0-9]{12})\.?(cfg|htm)?$" /app/provision/index.php?mac=$1;
rewrite "^.*/provision/C520-WiMi_([A-Fa-f0-9]{12})\.cfg$" /app/provision/index.php?mac=$1;
rewrite "^.*/provision/([A-Fa-f0-9]{12})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log; error_log /var/log/nginx/error.log;
@@ -218,4 +268,13 @@ server {
location ~^.+.(db)$ { location ~^.+.(db)$ {
deny all; deny all;
} }
location ~ /\.git {
deny all;
}
location ~ /\.lua {
deny all;
}
location ~ /\. {
deny all;
}
} }

View File

@@ -7,6 +7,17 @@ cd "$(dirname "$0")"
. ./config.sh . ./config.sh
. ./colors.sh . ./colors.sh
#send a message
verbose "Install PHP and PHP-FPM"
#set the version of php
#yum-config-manager --enable remi-php70
#yum-config-manager --enable remi-php71
yum-config-manager --enable remi-php72
#install dependencies
yum -y install php-fpm php-gd php-pgsql php-odbc php-curl php-imap php-opcache php-common php-pdo php-soap php-xml php-xmlrpc php-cli php-gd
#send a message #send a message
verbose "Configuring php/nginx/php-fpm and permissions" verbose "Configuring php/nginx/php-fpm and permissions"
@@ -17,13 +28,14 @@ TIMEZ=$(timedatectl | grep 'Time zone' | awk '{ print $3 }')
sed -ie "s#;date.timezone =#date.timezone = $TIMEZ#g" /etc/php.ini sed -ie "s#;date.timezone =#date.timezone = $TIMEZ#g" /etc/php.ini
sed -ie 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php.ini sed -ie 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' /etc/php.ini
sed -ie "s|listen = 127.0.0.1:9000|listen = /var/run/php-fpm/php-fpm.sock|g" /etc/php-fpm.d/www.conf sed -ie "s|listen = 127.0.0.1:9000|listen = /var/run/php-fpm/php-fpm.sock|g" /etc/php-fpm.d/www.conf
sed -ie 's/;listen.owner = nobody/listen.owner = nobody/g' /etc/php-fpm.d/www.conf sed -ie 's/;listen.owner = nobody/listen.owner = freeswitch/g' /etc/php-fpm.d/www.conf
sed -ie 's/;listen.group = nobody/listen.group = nobody/g' /etc/php-fpm.d/www.conf sed -ie 's/;listen.group = nobody/listen.group = daemon/g' /etc/php-fpm.d/www.conf
sed -ie 's/group = apache/group = daemon/g' /etc/php-fpm.d/www.conf sed -ie 's/group = apache/group = daemon/g' /etc/php-fpm.d/www.conf
#update the php.ini #update the php.ini
#sed -ie 's/post_max_size = .*/post_max_size = 80M/g' /etc/php.ini #sed -ie 's/post_max_size = .*/post_max_size = 80M/g' /etc/php.ini
#sed -ie 's/upload_max_filesize = .*/upload_max_filesize = 80M/g' /etc/php.ini #sed -ie 's/upload_max_filesize = .*/upload_max_filesize = 80M/g' /etc/php.ini
#sed -ie 's/; max_input_vars = .*/max_input_vars = 8000/g' /etc/php.ini
#make the session directory #make the session directory
mkdir -p /var/lib/php/session mkdir -p /var/lib/php/session

View File

@@ -8,46 +8,49 @@ cd "$(dirname "$0")"
. ./colors.sh . ./colors.sh
#send a message #send a message
verbose "Installing PostgreSQL 9.4" verbose "Installing PostgreSQL"
#generate a random password #generate a random password
password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64) password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64)
#included in the distribution # Install the repository
rpm -ivh --quiet http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum -y update
yum -y install postgresql94-server postgresql94-contrib postgresql94 # Install PostgreSQL:
sudo yum install -y postgresql14-server postgresql14-contrib postgresql14 postgresql14-libs
#send a message #send a message
verbose "Initalize PostgreSQL database" verbose "Initalize PostgreSQL database"
#initialize the database #initialize the database
/usr/pgsql-9.4/bin/postgresql94-setup initdb sudo /usr/pgsql-14/bin/postgresql-14-setup initdb
sudo systemctl enable postgresql-14
sudo systemctl start postgresql-14
#allow loopback #allow loopback
sed -i 's/\(host *all *all *127.0.0.1\/32 *\)ident/\1md5/' /var/lib/pgsql/9.4/data/pg_hba.conf sed -i 's/\(host *all *all *127.0.0.1\/32 *\)ident/\1md5/' /var/lib/pgsql/14/data/pg_hba.conf
sed -i 's/\(host *all *all *::1\/128 *\)ident/\1md5/' /var/lib/pgsql/9.4/data/pg_hba.conf sed -i 's/\(host *all *all *::1\/128 *\)ident/\1md5/' /var/lib/pgsql/14/data/pg_hba.conf
#systemd #systemd
systemctl daemon-reload systemctl daemon-reload
systemctl restart postgresql-9.4 systemctl restart postgresql-14
#move to /tmp to prevent a red herring error when running sudo with psql #move to /tmp to prevent a red herring error when running sudo with psql
cwd=$(pwd) cwd=$(pwd)
cd /tmp cd /tmp
#add the databases, users and grant permissions to them #add the databases, users and grant permissions to them
sudo -u postgres /usr/pgsql-9.4/bin/psql -d fusionpbx -c "DROP SCHEMA public cascade;"; sudo -u postgres /usr/bin/psql -d fusionpbx -c "DROP SCHEMA public cascade;";
sudo -u postgres /usr/pgsql-9.4/bin/psql -d fusionpbx -c "CREATE SCHEMA public;"; sudo -u postgres /usr/bin/psql -d fusionpbx -c "CREATE SCHEMA public;";
sudo -u postgres /usr/pgsql-9.4/bin/psql -c "CREATE DATABASE fusionpbx"; sudo -u postgres /usr/bin/psql -c "CREATE DATABASE fusionpbx";
sudo -u postgres /usr/pgsql-9.4/bin/psql -c "CREATE DATABASE freeswitch"; sudo -u postgres /usr/bin/psql -c "CREATE DATABASE freeswitch";
sudo -u postgres /usr/pgsql-9.4/bin/psql -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$password';" sudo -u postgres /usr/bin/psql -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$password';"
sudo -u postgres /usr/pgsql-9.4/bin/psql -c "CREATE ROLE freeswitch WITH SUPERUSER LOGIN PASSWORD '$password';" sudo -u postgres /usr/bin/psql -c "CREATE ROLE freeswitch WITH SUPERUSER LOGIN PASSWORD '$password';"
sudo -u postgres /usr/pgsql-9.4/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;" sudo -u postgres /usr/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;"
sudo -u postgres /usr/pgsql-9.4/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to fusionpbx;" sudo -u postgres /usr/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to fusionpbx;"
sudo -u postgres /usr/pgsql-9.4/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to freeswitch;" sudo -u postgres /usr/bin/psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to freeswitch;"
#ALTER USER fusionpbx WITH PASSWORD 'newpassword'; #ALTER USER fusionpbx WITH PASSWORD 'newpassword';
cd $cwd cd $cwd
#send a message #send a message
verbose "PostgreSQL 9.4 installed" verbose "PostgreSQL installed"

View File

@@ -9,14 +9,14 @@ cd "$(dirname "$0")"
. ./environment.sh . ./environment.sh
#count the users #count the users
admin_users=$(sudo -u postgres psql fusionpbx -Atc "select count(*) from v_users JOIN v_group_users USING (domain_uuid) where username='$system_username' and group_name = 'superadmin'") admin_users=$(sudo -u postgres psql fusionpbx -Atc "select count(*) from v_users JOIN v_user_groups USING (domain_uuid) where username='$system_username' and group_name = 'superadmin'")
if [ .$admin_users = .'0' ]; then if [ .$admin_users = .'0' ]; then
error "i could not find the user '$system_username' in the database, check your resources/config.sh is correct" error "i could not find the user '$system_username' in the database, check your resources/config.sh is correct"
elif [ .$admin_users = .'' ]; then elif [ .$admin_users = .'' ]; then
error "something went wrong, see errors above"; error "something went wrong, see errors above";
else else
admin_uuids=$(sudo -u postgres psql fusionpbx -Atc "select v_users.user_uuid from v_users JOIN v_group_users USING (domain_uuid) where username='$system_username' and group_name = 'superadmin'") admin_uuids=$(sudo -u postgres psql fusionpbx -Atc "select v_users.user_uuid from v_users JOIN v_user_groups USING (domain_uuid) where username='$system_username' and group_name = 'superadmin'")
for admin_uuid in $admin_uuids; do for admin_uuid in $admin_uuids; do
user_salt=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php); user_salt=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php);
if [ .$system_password = .'random' ]; then if [ .$system_password = .'random' ]; then

View File

@@ -3,4 +3,4 @@
#copy the conf directory #copy the conf directory
mv /etc/freeswitch /etc/freeswitch.orig mv /etc/freeswitch /etc/freeswitch.orig
mkdir /etc/freeswitch mkdir /etc/freeswitch
cp -R /var/www/fusionpbx/resources/templates/conf/* /etc/freeswitch cp -R /var/www/fusionpbx/app/switch/resources/conf/* /etc/freeswitch

View File

@@ -14,7 +14,13 @@ verbose "Installing FreeSWITCH"
yum -y install memcached curl gdb yum -y install memcached curl gdb
#install freeswitch packages #install freeswitch packages
yum install -y http://files.freeswitch.org/freeswitch-release-1-6.noarch.rpm #yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
echo "signalwire" > /etc/yum/vars/signalwireusername
echo 'please get your token from this site: https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Installation/HOWTO-Create-a-SignalWire-Personal-Access-Token_67240087/#attachments'
echo "please enter your token:"
read token
echo $token > /etc/yum/vars/signalwiretoken
yum install -y https://$(< /etc/yum/vars/signalwireusername):$(< /etc/yum/vars/signalwiretoken)@freeswitch.signalwire.com/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
yum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-* freeswitch-lua freeswitch-xml-cdr yum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-* freeswitch-lua freeswitch-xml-cdr
#remove the music package to protect music on hold from package updates #remove the music package to protect music on hold from package updates

View File

@@ -0,0 +1,129 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ../config.sh
. ../colors.sh
#upgrade packages
yum update && yum upgrade -y
yum -y install memcached curl gdb
#install build dependencies
yum install -y autoconf automake libtool gcc-c++ ncurses-devel zlib-devel libjpeg-devel openssl-devel libcurl-devel pcre-devel lua-devel libedit-devel libuuid-devel speex-devel libogg-devel libvorbis-devel curl-devel ldns-devel libsndfile-devel libtheora-devel
#install additional depdendencies
yum install -y libjpeg-devel sqlite-devel libpng-devel libtiff-devel libX11-devel e2fsprogs-devel openldap-devel libyuv-devel
yum install -y sox sqlite3 unzip
#we are about to move out of the executing directory so we need to preserve it to return after we are done
CWD=$(pwd)
#install the following dependencies if the switch version is greater than 1.10.0
if [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
# libks build-requirements
apt install -y cmake uuid-dev
# libks
cd /usr/src
git clone https://github.com/signalwire/libks.git libks
cd libks
cmake .
make -j $(getconf _NPROCESSORS_ONLN)
make install
# libks C includes
export C_INCLUDE_PATH=/usr/include/libks
# sofia-sip
cd /usr/src
#git clone https://github.com/freeswitch/sofia-sip.git sofia-sip
wget https://github.com/freeswitch/sofia-sip/archive/refs/tags/v$sofia_version.zip
unzip v$sofia_version.zip
cd sofia-sip-$sofia_version
sh autogen.sh
./configure --enable-debug
make -j $(getconf _NPROCESSORS_ONLN)
make install
# spandsp
cd /usr/src
git clone https://github.com/freeswitch/spandsp.git spandsp
cd spandsp
git reset --hard 0d2e6ac65e0e8f53d652665a743015a88bf048d4
#/usr/bin/sed -i 's/AC_PREREQ(\[2\.71\])/AC_PREREQ([2.69])/g' /usr/src/spandsp/configure.ac
sh autogen.sh
./configure --enable-debug
make -j $(getconf _NPROCESSORS_ONLN)
make install
ldconfig
fi
cd /usr/src
#check for master
if [ $switch_branch = "master" ]; then
#master branch
echo "Using version master"
rm -r /usr/src/freeswitch
git clone https://github.com/signalwire/freeswitch.git
cd /usr/src/freeswitch
./bootstrap.sh -j
fi
#check for stable release
if [ $switch_branch = "stable" ]; then
echo "Using version $switch_version"
#1.8 and older
if [ $(echo "$switch_version" | tr -d '.') -lt 1100 ]; then
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.zip
unzip freeswitch-$switch_version.zip
cd /usr/src/freeswitch-$switch_version
fi
#1.10.0 and newer
if [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.-release.zip
unzip freeswitch-$switch_version.-release.zip
mv freeswitch-$switch_version.-release freeswitch-$switch_version
cd /usr/src/freeswitch-$switch_version
#apply patch
#patch -u /usr/src/freeswitch/src/mod/databases/mod_pgsql/mod_pgsql.c -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/mod_pgsql.patch
fi
fi
# enable required modules
#sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_avmd:applications/mod_avmd:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'#applications/mod_av:formats/mod_av:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'#applications/mod_callcenter:applications/mod_callcenter:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'#applications/mod_cidlookup:applications/mod_cidlookup:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'#applications/mod_memcache:applications/mod_memcache:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'#applications/mod_nibblebill:applications/mod_nibblebill:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'#applications/mod_curl:applications/mod_curl:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'#applications/mod_translate:applications/mod_translate:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'#formats/mod_shout:formats/mod_shout:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'#formats/mod_pgsql:formats/mod_pgsql:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'#say/mod_say_es:say/mod_say_es:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'#say/mod_say_fr:say/mod_say_fr:'
#disable module or install dependency libks to compile signalwire
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'applications/mod_signalwire:#applications/mod_signalwire:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'endpoints/mod_skinny:#endpoints/mod_skinny:'
sed -i /usr/src/freeswitch-$switch_version/modules.conf -e s:'endpoints/mod_verto:#endpoints/mod_verto:'
# prepare the build
#./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --disable-fhs
./configure -C --enable-portable-binary --disable-dependency-tracking --enable-debug \
--prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--with-openssl --enable-core-pgsql-support
# compile and install
make -j $(getconf _NPROCESSORS_ONLN)
make install
#return to the executing directory
cd $CWD

51
debian/install.sh vendored
View File

@@ -11,12 +11,29 @@ cd "$(dirname "$0")"
# removes the cd img from the /etc/apt/sources.list file (not needed after base install) # removes the cd img from the /etc/apt/sources.list file (not needed after base install)
sed -i '/cdrom:/d' /etc/apt/sources.list sed -i '/cdrom:/d' /etc/apt/sources.list
#Update to latest packages #Update to the latest packages
verbose "Update installed packages" verbose "Update installed packages."
apt-get update && apt-get upgrade -y --force-yes apt-get update && apt-get upgrade -y
#Add dependencies #Add dependencies
apt-get install -y wget
apt-get install -y lsb-release apt-get install -y lsb-release
apt-get install -y systemd
apt-get install -y systemd-sysv
apt-get install -y ca-certificates
apt-get install -y dialog
apt-get install -y nano
apt-get install -y net-tools
apt-get install -y gpg
apt-get install -y unzip
#SNMP
apt-get install -y snmpd
echo "rocommunity public" > /etc/snmp/snmpd.conf
service snmpd restart
#disable vi visual mode
echo "set mouse-=a" >> ~/.vimrc
#IPTables #IPTables
resources/iptables.sh resources/iptables.sh
@@ -24,37 +41,29 @@ resources/iptables.sh
#sngrep #sngrep
resources/sngrep.sh resources/sngrep.sh
#FusionPBX #PHP
resources/fusionpbx.sh resources/php.sh
#NGINX web server #NGINX web server
resources/nginx.sh resources/nginx.sh
#PHP #FusionPBX
resources/php.sh resources/fusionpbx.sh
#Optional Applications
resources/applications.sh
#Fail2ban #Fail2ban
resources/fail2ban.sh resources/fail2ban.sh
#FreeSWITCH
resources/switch.sh
#Postgres #Postgres
resources/postgresql.sh resources/postgresql.sh
#FreeSWITCH
resources/switch.sh
#set the ip address #set the ip address
server_address=$(hostname -I) server_address=$(hostname -I)
#restart services
systemctl daemon-reload
if [ ."$php_version" = ."5" ]; then
systemctl restart php5-fpm
fi
if [ ."$php_version" = ."7" ]; then
systemctl restart php7.0-fpm
fi
systemctl restart nginx
systemctl restart fail2ban
#add the database schema, user and groups #add the database schema, user and groups
resources/finish.sh resources/finish.sh

View File

@@ -1,13 +1,16 @@
#!/bin/sh #!/bin/sh
# Set non-interactive mode for apt-get
export DEBIAN_FRONTEND=noninteractive
#upgrade the packages #upgrade the packages
apt-get update && apt-get upgrade -y --force-yes apt-get update && apt-get upgrade -y
#install packages #install packages
apt-get install -y --force-yes git lsb-release apt-get install -y git lsb-release
#get the install script #get the install script
cd /usr/src && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git cd /usr/src && git clone https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh.git
#change the working directory #change the working directory
cd /usr/src/fusionpbx-install.sh/debian cd /usr/src/fusionpbx-install.sh/debian

32
debian/resources/applications.sh vendored Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ./config.sh
#optional applications
cd /var/www/fusionpbx/app
if [ .$application_transcribe = .'true' ]; then
git clone https://github.com/fusionpbx/fusionpbx-app-transcribe.git transcribe
fi
if [ .$application_speech = .'true' ]; then
git clone https://github.com/fusionpbx/fusionpbx-app-speech.git speech
fi
if [ .$application_language_model = .'true' ]; then
git clone https://github.com/fusionpbx/fusionpbx-app-language_model.git language_model
fi
if [ .$application_device_logs = .'true' ]; then
git clone https://github.com/fusionpbx/fusionpbx-app-device_logs.git device_logs
fi
if [ .$application_dialplan_tools = .'true' ]; then
git clone https://github.com/fusionpbx/fusionpbx-app-dialplan_tools.git dialplan_tools
fi
if [ .$application_edit = .'true' ]; then
git clone https://github.com/fusionpbx/fusionpbx-app-edit.git edit
fi
if [ .$application_sip_trunks = .'true' ]; then
git clone https://github.com/fusionpbx/fusionpbx-app-sip_trunks.git sip_trunks
fi
chown -R www-data:www-data /var/www/fusionpbx

30
debian/resources/backup/fusionpbx-backup vendored Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/sh
export PGPASSWORD="zzz"
db_host=127.0.0.1
db_port=5432
now=$(date +%Y-%m-%d)
mkdir -p /var/backups/fusionpbx/postgresql
echo "Backup Started"
#delete postgres backups
find /var/backups/fusionpbx/postgresql/fusionpbx_pgsql* -mtime +4 -exec rm -f {} \;
#delete the main backup
find /var/backups/fusionpbx/*.tgz -mtime +2 -exec rm -f {} \;
#backup the database
pg_dump --verbose -Fc --host=$db_host --port=$db_port -U fusionpbx fusionpbx --schema=public -f /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql
#package
#tar --exclude='/var/lib/freeswitch/recordings/*/archive' -zvcf /var/backups/fusionpbx/backup_$now.tgz /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql /var/www/fusionpbx /usr/share/freeswitch/scripts /var/lib/freeswitch/storage /var/lib/freeswitch/recordings /etc/fusionpbx /etc/freeswitch /usr/share/freeswitch/sounds/music/
#source
#tar -zvcf /var/backups/fusionpbx/backup_$now.tgz /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql /var/www/fusionpbx /usr/local/freeswitch/scripts /usr/local/freeswitch/storage /usr/local/freeswitch/recordings /etc/fusionpbx /usr/local/freeswitch/conf /usr/local/freeswitch/sounds/music/
echo "Backup Completed"
# pgpassword security and conflict avoidance
unset PGPASSWORD

180
debian/resources/backup/fusionpbx-maintenance vendored Executable file
View File

@@ -0,0 +1,180 @@
#!/bin/sh
#settings
export PGPASSWORD="zzz"
db_host=127.0.0.1
db_port=5432
db_name=fusionpbx
db_username=fusionpbx
switch_package=true # true or false
purge_voicemail=false
purge_call_recordings=false
purge_cdrs=false
purge_fax=false
purge_switch_logs=true
purge_php_sessions=true
purge_database_transactions=true
purge_device_logs=false
purge_event_guard_logs=false
purge_user_logs=false
purge_email_queue=false
purge_fax_queue=true
days_keep_voicemail=90
days_keep_call_recordings=90
days_keep_cdrs=730
days_keep_fax=90
days_keep_switch_logs=7
days_keep_php_sessions=8
days_keep_database_transactions=30
days_keep_device_logs=180
days_keep_event_guard_logs=180
days_keep_user_logs=180
days_keep_email_queue=30
days_keep_fax_queue=30
#set the date
now=$(date +%Y-%m-%d)
#make sure the directory exists
if [ -e /var/backups/fusionpbx/postgresql ]; then
echo "postgres backup directory exists"
else
mkdir -p /var/backups/fusionpbx/postgresql
fi
#show message to the console
echo "Maintenance Started"
if [ .$purge_switch_logs = .true ]; then
echo "delete freeswitch logs older $days_keep_switch_logs days"
if [ .$switch_package = .true ]; then
find /var/log/freeswitch/freeswitch.log.* -mtime +$days_keep_switch_logs -exec rm {} \;
else
find /usr/local/freeswitch/log/freeswitch.log.* -mtime +$days_keep_switch_logs -exec rm {} \;
fi
else
echo "not purging Freeswitch logs"
fi
if [ .$purge_fax = .true ]; then
echo "delete fax file storage older than $days_keep_fax days"
if [ .$switch_package = .true ]; then
echo ".";
find /var/lib/freeswitch/storage/fax/* -name '*.tif' -mtime +$days_keep_fax -exec rm {} \;
find /var/lib/freeswitch/storage/fax/* -name '*.pdf' -mtime +$days_keep_fax -exec rm {} \;
else
echo ".";
find /usr/local/freeswitch/storage/fax/* -name '*.tif' -mtime +$days_keep_fax -exec rm {} \;
find /usr/local/freeswitch/storage/fax/* -name '*.pdf' -mtime +$days_keep_fax -exec rm {} \;
fi
#delete from the database
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_fax_files WHERE fax_date < NOW() - INTERVAL '$days_keep_fax days'"
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_fax_logs WHERE fax_date < NOW() - INTERVAL '$days_keep_fax days'"
else
echo "not purging Faxes"
fi
if [ .$purge_call_recordings = .true ]; then
echo "delete call recordings older than $days_keep_call_recordings days"
if [ .$switch_package = .true ]; then
find /var/lib/freeswitch/recordings/*/archive/* -name '*.wav' -mtime +$days_keep_call_recordings -exec rm {} \;
find /var/lib/freeswitch/recordings/*/archive/* -name '*.mp3' -mtime +$days_keep_call_recordings -exec rm {} \;
#remove empty folders
find /var/lib/freeswitch/recordings/*/archive/* -empty -type d -delete
else
find /usr/local/freeswitch/recordings/*/archive/* -name '*.wav' -mtime +$days_keep_call_recordings -exec rm {} \;
find /usr/local/freeswitch/recordings/*/archive/* -name '*.mp3' -mtime +$days_keep_call_recordings -exec rm {} \;
#remove empty folders
find /usr/local/freeswitch/recordings/*/archive/* -empty -type d -delete
fi
#Call recordings table uses a view. The data is from v_xml_cdr table. Changed in FusionPBX 5.0.7 and higher. The following line is useful to older versions.
#psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_call_recordings WHERE call_recording_date < NOW() - INTERVAL '90 days'"
else
echo "not purging Recordings."
fi
if [ .$purge_voicemail = .true ]; then
echo "delete voicemail older than $days_keep_voicemail days"
if [ .$switch_package = .true ]; then
echo ".";
find /var/lib/freeswitch/storage/voicemail/default/* -name 'msg_*.wav' -mtime +$days_keep_voicemail -exec rm {} \;
find /var/lib/freeswitch/storage/voicemail/default/* -name 'msg_*.mp3' -mtime +$days_keep_voicemail -exec rm {} \;
else
echo ".";
find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.wav' -mtime +$days_keep_voicemail -exec rm {} \;
find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.mp3' -mtime +$days_keep_voicemail -exec rm {} \;
fi
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_voicemail_messages WHERE to_timestamp(created_epoch) < NOW() - INTERVAL '$days_keep_voicemail days'"
else
echo "not purging voicemails."
fi
if [ .$purge_cdrs = .true ]; then
echo "delete call detail records older $days_keep_cdrs days"
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_xml_cdr WHERE start_stamp < NOW() - INTERVAL '$days_keep_cdrs days'"
#call detail record - call flow
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_xml_cdr_flow WHERE insert_date < NOW() - INTERVAL '$days_keep_cdrs days'"
#call detail record - json
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_xml_cdr_json WHERE insert_date < NOW() - INTERVAL '$days_keep_cdrs days'"
#call detail record - call logs
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_xml_cdr_logs WHERE insert_date < NOW() - INTERVAL '$days_keep_cdrs days'"
else
echo "not purging CDRs."
fi
echo "delete php sessions older than $days_keep_php_sessions days"
if [ .$purge_php_sessions = .true ]; then
find /var/lib/php/sessions/* -name 'sess_*' -mtime +$days_keep_php_sessions -exec rm {} \;
else
echo "not purging PHP Sessions."
fi
echo "delete database_transactions older $days_keep_database_transactions days"
if [ .$purge_database_transactions = .true ]; then
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_database_transactions where transaction_date < NOW() - INTERVAL '$days_keep_database_transactions days'"
else
echo "not purging database_transactions."
fi
echo "delete device_logs older $days_keep_device_logs days"
if [ .$purge_device_logs = .true ]; then
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_device_logs where timestamp < NOW() - INTERVAL '$days_keep_device_logs days'"
else
echo "not purging device_logs."
fi
echo "delete event_guard_logs older $days_keep_event_guard_logs days"
if [ .$purge_event_guard_logs = .true ]; then
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_event_guard_logs where log_date < NOW() - INTERVAL '$days_keep_event_guard_logs days'"
else
echo "not purging event_guard_logs."
fi
echo "delete user_logs older $days_keep_user_logs days"
if [ .$purge_user_logs = .true ]; then
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_user_logs where timestamp < NOW() - INTERVAL '$days_keep_user_logs days'"
else
echo "not purging user_logs."
fi
echo "delete email_queue older $days_keep_email_queue days"
if [ .$purge_email_queue = .true ]; then
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_email_queue where email_status = 'sent' and email_date < NOW() - INTERVAL '$days_keep_email_queue days'"
else
echo "not purging email_queue."
fi
echo "delete fax_queue older $days_keep_fax_queue days"
if [ .$purge_fax_queue = .true ]; then
psql $db_name --port $db_port --host=$db_host --username=$db_username -c "delete from v_fax_queue where fax_status = 'sent' and fax_date < NOW() - INTERVAL '$days_keep_fax_queue days'"
else
echo "not purging fax_queue."
fi
#completed message
echo "Maintenance Completed";
# pgpassword security and conflict avoidance
unset PGPASSWORD

View File

@@ -1,62 +0,0 @@
#!/bin/sh
#settings
#export PGPASSWORD="zzzzz"
db_host=127.0.0.1
db_port=5432
switch_package=true # true or false
#set the date
now=$(date +%Y-%m-%d)
#make sure the directory exists
mkdir -p /var/backups/fusionpbx/postgresql
#show message to the console
echo "Maintenance Started"
#delete freeswitch logs older 7 days
if [ .$switch_package = .true ]; then
find /var/log/freeswitch/freeswitch.log.* -mtime +7 -exec rm {} \;
else
find /usr/local/freeswitch/log/freeswitch.log.* -mtime +7 -exec rm {} \;
fi
#delete fax older than 90 days
if [ .$switch_package = .true ]; then
echo ".";
#find /var/lib/freeswitch/storage/fax/* -name '*.tif' -mtime +90 -exec rm {} \;
#find /var/lib/freeswitch/storage/fax/* -name '*.pdf' -mtime +90 -exec rm {} \;
else
echo ".";
#find /usr/local/freeswitch/storage/fax/* -name '*.tif' -mtime +90 -exec rm {} \;
#find /usr/local/freeswitch/storage/fax/* -name '*.pdf' -mtime +90 -exec rm {} \;
fi
#delete from the database
#psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_fax_files WHERE fax_date < NOW() - INTERVAL '90 days'"
#delete call recordings older than 90 days
if [ .$switch_package = .true ]; then
find /var/lib/freeswitch/recordings/*/archive/* -name '*.wav' -mtime +90 -exec rm {} \;
find /var/lib/freeswitch/recordings/*/archive/* -name '*.mp3' -mtime +90 -exec rm {} \;
else
find /usr/local/freeswitch/recordings/*/archive/* -name '*.wav' -mtime +90 -exec rm {} \;
find /usr/local/freeswitch/recordings/*/archive/* -name '*.mp3' -mtime +90 -exec rm {} \;
fi
#delete voicemail older than 90 days
if [ .$switch_package = .true ]; then
echo ".";
#find /var/lib/freeswitch/storage/voicemail/default/* -name 'msg_*.wav' -mtime +90 -exec rm {} \;
#find /var/lib/freeswitch/storage/voicemail/default/* -name 'msg_*.mp3' -mtime +90 -exec rm {} \;
else
echo ".";
#find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.wav' -mtime +90 -exec rm {} \;
#find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.mp3' -mtime +90 -exec rm {} \;
fi
#psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_voicemail_messages WHERE to_timestamp(created_epoch) < NOW() - INTERVAL '90 days'"
#delete call detail records older 90 days
#psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_xml_cdr WHERE start_stamp < NOW() - INTERVAL '90 days'"
#completed message
echo "Maintenance Completed";

View File

@@ -1,23 +1,40 @@
# FusionPBX Settings # FusionPBX Settings
domain_name=ip_address # hostname, ip_address or a custom value domain_name=ip_address # hostname, ip_address or a custom value
system_username=admin # default username admin system_username=admin # default username admin
system_password=random # random or a custom value system_password=random # random or a custom value
system_branch=stable # master, stable system_branch=5.5 # master, 5.5
# FreeSWITCH Settings # FreeSWITCH Settings
switch_branch=stable # master, stable switch_branch=stable # master, stable
switch_source=false # true or false switch_source=true # true (source compile) or false (binary package)
switch_package=true # true or false switch_package=false # true (binary package) or false (source compile)
switch_version=1.10.12 # which source code to download, only for source
switch_tls=true # true or false
switch_token= # Get the auth token from https://signalwire.com
# Signup or Login -> Profile -> Personal Auth Token
# Sofia-Sip Settings
sofia_version=1.13.17 # release-version for sofia-sip to use
# Database Settings # Database Settings
database_password=random # random or a custom value database_name=fusionpbx # Database name (safe characters A-Z, a-z, 0-9)
database_repo=official # PostgresSQL official, system, 2ndquadrant database_username=fusionpbx # Database username (safe characters A-Z, a-z, 0-9)
database_version=latest # requires repo official database_password=random # random or a custom value (safe characters A-Z, a-z, 0-9)
database_host=127.0.0.1 # hostname or IP address database_repo=official # PostgreSQL official, system
database_port=5432 # port number database_version=18 # requires repo official
database_backup=false # true or false database_host=127.0.0.1 # hostname or IP address
database_port=5432 # port number
database_backup=false # true or false
# General Settings # General Settings
php_version=5 # PHP version 5 or 7 php_version=8.2 # PHP version 8.3, 8.2, 8.1
letsencrypt_folder=true # true or false letsencrypt_folder=true # true or false
# Optional Applications
application_transcribe=true # Speech to Text
application_speech=true # Text to Speech
application_language_model=true # Language model
application_device_logs=true # Log device provision requests
application_dialplan_tools=false # Add additional dialplan applications
application_edit=false # Editor for XML, Provision, Scripts, and PHP
application_sip_trunks=false # Registration-based SIP trunks

View File

@@ -13,8 +13,16 @@ cpu_name=$(uname -m)
cpu_architecture='unknown' cpu_architecture='unknown'
cpu_mode='unknown' cpu_mode='unknown'
#set the environment path
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#check what the CPU and OS are #check what the CPU and OS are
if [ .$cpu_name = .'armv7l' ]; then if [ .$cpu_name = .'armv6l' ]; then
# RaspberryPi Zero
os_mode='32'
cpu_mode='32'
cpu_architecture='arm'
elif [ .$cpu_name = .'armv7l' ]; then
# RaspberryPi 3 is actually armv8l but current Raspbian reports the cpu as armv7l and no Raspbian 64Bit has been released at this time # RaspberryPi 3 is actually armv8l but current Raspbian reports the cpu as armv7l and no Raspbian 64Bit has been released at this time
os_mode='32' os_mode='32'
cpu_mode='32' cpu_mode='32'
@@ -61,7 +69,6 @@ if [ .$cpu_architecture = .'arm' ]; then
if [ .$os_mode = .'32' ]; then if [ .$os_mode = .'32' ]; then
verbose "Correct CPU and Operating System detected, using the ARM repo" verbose "Correct CPU and Operating System detected, using the ARM repo"
elif [ .$os_mode = .'64' ]; then elif [ .$os_mode = .'64' ]; then
error "You are using a 64bit arm OS this is unsupported"
switch_source=true switch_source=true
switch_package=false switch_package=false
else else

View File

@@ -6,28 +6,32 @@ cd "$(dirname "$0")"
#includes #includes
. ./config.sh . ./config.sh
. ./colors.sh . ./colors.sh
. ./environment.sh
#send a message #send a message
verbose "Installing Fail2ban" verbose "Installing Fail2ban"
#add the dependencies #add the dependencies
apt-get install -y --force-yes fail2ban apt-get install -y fail2ban rsyslog
#move the filters #move the filters
cp fail2ban/freeswitch-dos.conf /etc/fail2ban/filter.d/freeswitch-dos.conf
cp fail2ban/freeswitch-ip.conf /etc/fail2ban/filter.d/freeswitch-ip.conf
cp fail2ban/freeswitch-404.conf /etc/fail2ban/filter.d/freeswitch-404.conf
cp fail2ban/freeswitch.conf /etc/fail2ban/filter.d/freeswitch.conf cp fail2ban/freeswitch.conf /etc/fail2ban/filter.d/freeswitch.conf
cp fail2ban/freeswitch-acl.conf /etc/fail2ban/filter.d/freeswitch-acl.conf
cp fail2ban/sip-auth-failure.conf /etc/fail2ban/filter.d/sip-auth-failure.conf
cp fail2ban/sip-auth-challenge.conf /etc/fail2ban/filter.d/sip-auth-challenge.conf
cp fail2ban/auth-challenge-ip.conf /etc/fail2ban/filter.d/auth-challenge-ip.conf
cp fail2ban/freeswitch-ip.conf /etc/fail2ban/filter.d/freeswitch-ip.conf
cp fail2ban/fusionpbx.conf /etc/fail2ban/filter.d/fusionpbx.conf cp fail2ban/fusionpbx.conf /etc/fail2ban/filter.d/fusionpbx.conf
cp fail2ban/fusionpbx-mac.conf /etc/fail2ban/filter.d/fusionpbx-mac.conf cp fail2ban/fusionpbx-mac.conf /etc/fail2ban/filter.d/fusionpbx-mac.conf
cp fail2ban/fusionpbx-404.conf /etc/fail2ban/filter.d/fusionpbx-404.conf
cp fail2ban/nginx-404.conf /etc/fail2ban/filter.d/nginx-404.conf cp fail2ban/nginx-404.conf /etc/fail2ban/filter.d/nginx-404.conf
cp fail2ban/nginx-dos.conf /etc/fail2ban/filter.d/nginx-dos.conf cp fail2ban/nginx-dos.conf /etc/fail2ban/filter.d/nginx-dos.conf
cp fail2ban/jail.local /etc/fail2ban/jail.local cp fail2ban/jail.local /etc/fail2ban/jail.local
#update config if source is being used #update config if source is being used
if [ .$switch_source = .true ]; then #if [ .$switch_source = .true ]; then
sed 's#var/log/freeswitch#usr/local/freeswitch/log#g' -i /etc/fail2ban/jail.local # sed 's#var/log/freeswitch#usr/local/freeswitch/log#g' -i /etc/fail2ban/jail.local
fi #fi
#restart fail2ban #restart fail2ban
/usr/sbin/service fail2ban restart /usr/sbin/service fail2ban restart

View File

@@ -0,0 +1,21 @@
# Fail2Ban configuration file
#
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
#[WARNING] sofia_reg.c:1792 SIP auth challenge (INVITE) on sofia profile 'internal' for [+972592277524@xxx.xxx.xxx.xxx] from ip 209.160.120.12
failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth challenge \((INVITE|REGISTER)\) on sofia profile \'.*\' for \[.*@\d+.\d+.\d+.\d+\] from ip <HOST>
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =

View File

@@ -0,0 +1,6 @@
[DEFAULT]
# Option: allowipv6
# Notes.: Allows IPv6 interface:
# Default: auto
# Values: [ auto yes (on, true, 1) no (off, false, 0) ] Default: auto
allowipv6 = auto

View File

@@ -0,0 +1,20 @@
# Fail2Ban configuration file
#
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
#2021-02-03 16:27:57.292697 [WARNING] sofia_reg.c:2353 IP 62.210.78.91 Rejected by register acl "domains"
failregex = \[WARNING\] sofia_reg.c:\d+ IP <HOST> Rejected by register acl
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =

View File

@@ -7,8 +7,8 @@
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+) # (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT # Values: TEXT
# #
failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(REGISTER\) on sofia profile \'\w+\' for \[.*\] from ip <HOST> failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(REGISTER\) on sofia profile \'.*\' for \[.*\] from ip <HOST>
\[WARNING\] sofia_reg.c:\d+ SIP auth failure \(INVITE\) on sofia profile \'\w+\' for \[.*\] from ip <HOST> \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(INVITE\) on sofia profile \'.*\' for \[.*\] from ip <HOST>
# Option: ignoreregex # Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored. # Notes.: regex to ignore. If this regex matches, the line is ignored.

View File

@@ -5,87 +5,93 @@ protocol = ssh
filter = sshd filter = sshd
logpath = /var/log/auth.log logpath = /var/log/auth.log
action = iptables-allports[name=sshd, protocol=all] action = iptables-allports[name=sshd, protocol=all]
maxretry = 5 maxretry = 6
findtime = 7200 findtime = 60
bantime = 86400 bantime = 86400
[freeswitch-udp] [freeswitch]
enabled = true enabled = false
port = 5060:5090 port = 5060:5091
protocol = all protocol = all
filter = freeswitch filter = freeswitch
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-udp, port="5060:5090", protocol=udp] #logpath = /usr/local/freeswitch/log/freeswitch.log
maxretry = 5 action = iptables-allports[name=freeswitch, protocol=all]
findtime = 600 maxretry = 10
findtime = 60
bantime = 3600 bantime = 3600
# sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org] #no smtp server installed # sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org] #no smtp server installed
[freeswitch-tcp] [freeswitch-acl]
enabled = true
port = 5060:5090
protocol = all
filter = freeswitch
logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-tcp, port="5060:5090", protocol=tcp]
maxretry = 5
findtime = 600
bantime = 3600
# sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org] #no smtp server installed
[freeswitch-ip-tcp]
enabled = false enabled = false
port = 5060:5090 port = 5060:5091
protocol = all
filter = freeswitch-acl
logpath = /var/log/freeswitch/freeswitch.log
#logpath = /usr/local/freeswitch/log/freeswitch.log
action = iptables-allports[name=freeswitch-acl, protocol=all]
maxretry = 900
findtime = 60
bantime = 86400
[freeswitch-ip]
enabled = false
port = 5060:5091
protocol = all protocol = all
filter = freeswitch-ip filter = freeswitch-ip
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-ip-tcp, port="5060:5090", protocol=tcp] #logpath = /usr/local/freeswitch/log/freeswitch.log
action = iptables-allports[name=freeswitch-ip, protocol=all]
maxretry = 1 maxretry = 1
findtime = 30 findtime = 60
bantime = 86400 bantime = 86400
[freeswitch-ip-udp] [auth-challenge-ip]
enabled = false enabled = false
port = 5060:5090 port = 5060:5091
protocol = all protocol = all
filter = freeswitch-ip filter = auth-challenge-ip
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-ip-udp, port="5060:5090", protocol=udp] #logpath = /usr/local/freeswitch/log/freeswitch.log
action = iptables-allports[name=auth-challenge-ip, protocol=all]
maxretry = 1 maxretry = 1
findtime = 30 findtime = 60
bantime = 86400 bantime = 86400
[freeswitch-dos-udp] [sip-auth-challenge]
enabled = true enabled = false
port = 5060:5090 port = 5060:5091
protocol = all protocol = all
filter = freeswitch-dos filter = sip-auth-challenge
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-dos-udp, port="5060:5090", protocol=udp] #logpath = /usr/local/freeswitch/log/freeswitch.log
maxretry = 50 action = iptables-allports[name=sip-auth-challenge, protocol=all]
findtime = 30 maxretry = 100
bantime = 6000 findtime = 60
[freeswitch-dos-tcp]
enabled = true
port = 5060:5090
protocol = all
filter = freeswitch-dos
logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-dos-tcp, port="5060:5090", protocol=tcp]
maxretry = 50
findtime = 30
bantime = 7200 bantime = 7200
[freeswitch-404] [sip-auth-failure]
enabled = true enabled = false
port = 5060:5090 port = 5060:5091
protocol = all protocol = all
filter = freeswitch-404 filter = sip-auth-failure
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-allports[name=freeswitch-404, protocol=all] #logpath = /usr/local/freeswitch/log/freeswitch.log
maxretry = 3 action = iptables-allports[name=sip-auth-failure, protocol=all]
findtime = 300 maxretry = 6
findtime = 60
bantime = 7200
[fusionpbx-404]
enabled = false
port = 5060:5091
protocol = all
filter = fusionpbx-404
logpath = /var/log/freeswitch/freeswitch.log
#logpath = /usr/local/freeswitch/log/freeswitch.log
action = iptables-allports[name=fusionpbx-404, protocol=all]
maxretry = 6
findtime = 60
bantime = 86400 bantime = 86400
[fusionpbx] [fusionpbx]
@@ -94,10 +100,10 @@ port = 80,443
protocol = tcp protocol = tcp
filter = fusionpbx filter = fusionpbx
logpath = /var/log/auth.log logpath = /var/log/auth.log
action = iptables-multiport[name=fusionpbx, port="http,https", protocol=tcp] action = iptables-allports[name=fusionpbx, protocol=all]
# sendmail-whois[name=fusionpbx, dest=root, sender=fail2ban@example.org] #no smtp server installed # sendmail-whois[name=fusionpbx, dest=root, sender=fail2ban@example.org] #no smtp server installed
maxretry = 10 maxretry = 20
findtime = 600 findtime = 60
bantime = 3600 bantime = 3600
[fusionpbx-mac] [fusionpbx-mac]
@@ -106,11 +112,11 @@ port = 80,443
protocol = tcp protocol = tcp
filter = fusionpbx-mac filter = fusionpbx-mac
logpath = /var/log/syslog logpath = /var/log/syslog
action = iptables-multiport[name=fusionpbx-mac, port="http,https", protocol=tcp] action = iptables-allports[name=fusionpbx-mac, protocol=all]
# sendmail-whois[name=fusionpbx-mac, dest=root, sender=fail2ban@example.org] #no smtp server installed # sendmail-whois[name=fusionpbx-mac, dest=root, sender=fail2ban@example.org] #no smtp server installed
maxretry = 5 maxretry = 10
findtime = 300 findtime = 60
bantime = -1 bantime = 86400
[nginx-404] [nginx-404]
enabled = true enabled = true
@@ -118,18 +124,20 @@ port = 80,443
protocol = tcp protocol = tcp
filter = nginx-404 filter = nginx-404
logpath = /var/log/nginx/access*.log logpath = /var/log/nginx/access*.log
action = iptables-allports[name=nginx-404, protocol=all]
bantime = 3600 bantime = 3600
findtime = 60 findtime = 60
maxretry = 120 maxretry = 300
[nginx-dos] [nginx-dos]
# Based on apache-badbots but a simple IP check (any IP requesting more than # Based on apache-badbots but a simple IP check (any IP requesting more than
# 240 pages in 60 seconds, or 4p/s average, is suspicious) # 300 pages in 60 seconds, or 5p/s average, is suspicious)
enabled = true enabled = true
port = 80,443 port = 80,443
protocol = tcp protocol = tcp
filter = nginx-dos filter = nginx-dos
logpath = /var/log/nginx/access*.log logpath = /var/log/nginx/access*.log
action = iptables-allports[name=nginx-dos, protocol=all]
findtime = 60 findtime = 60
bantime = -1 bantime = 86400
maxretry = 240 maxretry = 800

View File

@@ -0,0 +1,21 @@
# Fail2Ban configuration file
#
# Author: soapee01
#
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth challenge \((?:REGISTER|INVITE)\) on sofia profile \'.*\' for \[.*\] from ip <HOST>
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =

View File

@@ -12,7 +12,7 @@
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+) # (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT # Values: TEXT
# #
failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(REGISTER\) on sofia profile \'\w+\' for \[.*\] from ip <HOST> failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(REGISTER\) on sofia profile \'.*\' for \[.*\] from ip <HOST>
# Option: ignoreregex # Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored. # Notes.: regex to ignore. If this regex matches, the line is ignored.

View File

@@ -8,8 +8,6 @@ cd "$(dirname "$0")"
. ./colors.sh . ./colors.sh
#database details #database details
database_host=127.0.0.1
database_port=5432
database_username=fusionpbx database_username=fusionpbx
if [ .$database_password = .'random' ]; then if [ .$database_password = .'random' ]; then
database_password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64 | sed 's/[=\+//]//g') database_password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64 | sed 's/[=\+//]//g')
@@ -19,18 +17,29 @@ fi
export PGPASSWORD=$database_password export PGPASSWORD=$database_password
#update the database password #update the database password
#sudo -u postgres psql --host=$database_host --port=$database_port --username=$database_username -c "ALTER USER fusionpbx WITH PASSWORD '$database_password';"
#sudo -u postgres psql --host=$database_host --port=$database_port --username=$database_username -c "ALTER USER freeswitch WITH PASSWORD '$database_password';"
sudo -u postgres psql -c "ALTER USER fusionpbx WITH PASSWORD '$database_password';" sudo -u postgres psql -c "ALTER USER fusionpbx WITH PASSWORD '$database_password';"
sudo -u postgres psql -c "ALTER USER freeswitch WITH PASSWORD '$database_password';" sudo -u postgres psql -c "ALTER USER freeswitch WITH PASSWORD '$database_password';"
#add the config.php #install the database backup
cp backup/fusionpbx-backup /etc/cron.daily
cp backup/fusionpbx-maintenance /etc/cron.daily
chmod 755 /etc/cron.daily/fusionpbx-backup
chmod 755 /etc/cron.daily/fusionpbx-maintenance
sed -i "s/zzz/$database_password/g" /etc/cron.daily/fusionpbx-backup
sed -i "s/zzz/$database_password/g" /etc/cron.daily/fusionpbx-maintenance
#add the config.conf
mkdir -p /etc/fusionpbx mkdir -p /etc/fusionpbx
chown -R www-data:www-data /etc/fusionpbx cp fusionpbx/config.conf /etc/fusionpbx
cp fusionpbx/config.php /etc/fusionpbx sed -i /etc/fusionpbx/config.conf -e s:"{database_host}:$database_host:"
sed -i /etc/fusionpbx/config.php -e s:'{database_username}:fusionpbx:' sed -i /etc/fusionpbx/config.conf -e s:"{database_name}:$database_name:"
sed -i /etc/fusionpbx/config.php -e s:"{database_password}:$database_password:" sed -i /etc/fusionpbx/config.conf -e s:"{database_username}:$database_username:"
sed -i /etc/fusionpbx/config.conf -e s:"{database_password}:$database_password:"
#add the database schema #add the database schema
cd /var/www/fusionpbx && php /var/www/fusionpbx/core/upgrade/upgrade_schema.php > /dev/null 2>&1 cd /var/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --schema
#get the server hostname #get the server hostname
if [ .$domain_name = .'hostname' ]; then if [ .$domain_name = .'hostname' ]; then
@@ -48,50 +57,72 @@ domain_uuid=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php);
#add the domain name #add the domain name
psql --host=$database_host --port=$database_port --username=$database_username -c "insert into v_domains (domain_uuid, domain_name, domain_enabled) values('$domain_uuid', '$domain_name', 'true');" psql --host=$database_host --port=$database_port --username=$database_username -c "insert into v_domains (domain_uuid, domain_name, domain_enabled) values('$domain_uuid', '$domain_name', 'true');"
#app defaults #run app defaults
cd /var/www/fusionpbx && php /var/www/fusionpbx/core/upgrade/upgrade_domains.php cd /var/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --defaults
#add the user #add the user
user_uuid=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php); user_uuid=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php);
user_salt=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php); user_salt=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php);
user_name=$system_username user_name=$system_username
if [ .$system_password = .'random' ]; then if [ .$system_password = .'random' ]; then
user_password=$(dd if=/dev/urandom bs=1 count=12 2>/dev/null | base64 | sed 's/[=\+//]//g') user_password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64 | sed 's/[=\+//]//g')
else else
user_password=$system_password user_password=$system_password
fi fi
password_hash=$(php -r "echo md5('$user_salt$user_password');"); password_hash=$(/usr/bin/php -r "echo md5('$user_salt$user_password');");
psql --host=$database_host --port=$database_port --username=$database_username -t -c "insert into v_users (user_uuid, domain_uuid, username, password, salt, user_enabled) values('$user_uuid', '$domain_uuid', '$user_name', '$password_hash', '$user_salt', 'true');" psql --host=$database_host --port=$database_port --username=$database_username -t -c "insert into v_users (user_uuid, domain_uuid, username, password, salt, user_enabled) values('$user_uuid', '$domain_uuid', '$user_name', '$password_hash', '$user_salt', 'true');"
#get the superadmin group_uuid #get the superadmin group_uuid
group_uuid=$(psql --host=$database_host --port=$database_port --username=$database_username -t -c "select group_uuid from v_groups where group_name = 'superadmin';"); #echo "psql --host=$database_host --port=$database_port --username=$database_username -qtAX -c \"select group_uuid from v_groups where group_name = 'superadmin';\""
group_uuid=$(echo $group_uuid | sed 's/^[[:blank:]]*//;s/[[:blank:]]*$//') group_uuid=$(psql --host=$database_host --port=$database_port --username=$database_username -qtAX -c "select group_uuid from v_groups where group_name = 'superadmin';");
#add the user to the group #add the user to the group
group_user_uuid=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php); user_group_uuid=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php);
group_name=superadmin group_name=superadmin
psql --host=$database_host --port=$database_port --username=$database_username -c "insert into v_group_users (group_user_uuid, domain_uuid, group_name, group_uuid, user_uuid) values('$group_user_uuid', '$domain_uuid', '$group_name', '$group_uuid', '$user_uuid');" #echo "insert into v_user_groups (user_group_uuid, domain_uuid, group_name, group_uuid, user_uuid) values('$user_group_uuid', '$domain_uuid', '$group_name', '$group_uuid', '$user_uuid');"
psql --host=$database_host --port=$database_port --username=$database_username -c "insert into v_user_groups (user_group_uuid, domain_uuid, group_name, group_uuid, user_uuid) values('$user_group_uuid', '$domain_uuid', '$group_name', '$group_uuid', '$user_uuid');"
#update xml_cdr url, user and password #update xml_cdr url, user and password
xml_cdr_username=$(dd if=/dev/urandom bs=1 count=12 2>/dev/null | base64 | sed 's/[=\+//]//g') xml_cdr_username=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64 | sed 's/[=\+//]//g')
xml_cdr_password=$(dd if=/dev/urandom bs=1 count=12 2>/dev/null | base64 | sed 's/[=\+//]//g') xml_cdr_password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64 | sed 's/[=\+//]//g')
sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_http_protocol}:http:" sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_http_protocol}:http:"
sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{domain_name}:127.0.0.1:" sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{domain_name}:$database_host:"
sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_project_path}::" sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_project_path}::"
sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_user}:$xml_cdr_username:" sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_user}:$xml_cdr_username:"
sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_pass}:$xml_cdr_password:" sed -i /etc/freeswitch/autoload_configs/xml_cdr.conf.xml -e s:"{v_pass}:$xml_cdr_password:"
#app defaults #update application defaults
cd /var/www/fusionpbx && php /var/www/fusionpbx/core/upgrade/upgrade_domains.php cd /var/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --defaults
#update permissions
cd /var/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --permissions
#restart freeswitch #restart freeswitch
/bin/systemctl daemon-reload /bin/systemctl daemon-reload
/bin/systemctl restart freeswitch /bin/systemctl restart freeswitch
#make the /var/run directory and set the ownership
mkdir -p /var/run/fusionpbx
chown -R www-data:www-data /var/run/fusionpbx
#install the services
cd /var/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --services
#install crontab
apt install cron
#update file permissions
chmod 664 /etc/fusionpbx/config.conf
#restart nginx
systemctl restart nginx freeswitch
#welcome message #welcome message
echo "" echo ""
echo "" echo ""
verbose "Installation has completed." verbose "Installation Notes. "
echo ""
echo " Please save this information and reboot this system to complete the install. "
echo "" echo ""
echo " Use a web browser to login." echo " Use a web browser to login."
echo " domain name: https://$domain_name" echo " domain name: https://$domain_name"
@@ -106,17 +137,19 @@ echo " Official FusionPBX Training"
echo " Fastest way to learn FusionPBX. For more information https://www.fusionpbx.com." echo " Fastest way to learn FusionPBX. For more information https://www.fusionpbx.com."
echo " Available online and in person. Includes documentation and recording." echo " Available online and in person. Includes documentation and recording."
echo "" echo ""
echo " Location Online and Boise,Idaho" echo " Location: Online"
echo " Admin Training 13 - 14 December 2017 (2 Days)" echo " Admin Training: TBA"
echo " Advanced Training 18 - 19 December 2017 (2 Days)" echo " Advanced Training: TBA"
echo " Timezone: https://www.timeanddate.com/worldclock/usa/boise" echo " Continuing Education: https://www.fusionpbx.com/training"
echo " Timezone: https://www.timeanddate.com/weather/usa/idaho"
echo "" echo ""
echo " Additional information." echo " Additional information."
echo " https://fusionpbx.com/members.php"
echo " https://fusionpbx.com/training.php" echo " https://fusionpbx.com/training.php"
echo " https://fusionpbx.com/support.php" echo " https://fusionpbx.com/support.php"
echo " https://www.fusionpbx.com" echo " https://www.fusionpbx.com"
echo " http://docs.fusionpbx.com" echo " http://docs.fusionpbx.com"
echo "" echo ""
# pgpassword security and conflict avoidance
unset PGPASSWORD

View File

@@ -11,22 +11,22 @@ cd "$(dirname "$0")"
verbose "Installing FusionPBX" verbose "Installing FusionPBX"
#install dependencies #install dependencies
apt-get install -y --force-yes vim git dbus haveged ssl-cert apt-get install -y vim git dbus haveged ssl-cert qrencode
apt-get install -y --force-yes ghostscript libtiff5-dev libtiff-tools at apt-get install -y ffmpeg ghostscript libtiff5-dev libtiff-tools at
#get the branch #get the branch
if [ .$system_branch = .'master' ]; then if [ .$system_branch = .'master' ]; then
verbose "Using master" verbose "Using master"
branch="" branch=""
else else
system_major=$(git ls-remote --heads https://github.com/fusionpbx/fusionpbx.git | cut -d/ -f 3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f1) verbose "Using version $system_branch"
system_minor=$(git ls-remote --tags https://github.com/fusionpbx/fusionpbx.git $system_major.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2) branch="-b $system_branch"
system_version=$system_major.$system_minor
verbose "Using version $system_version"
branch="-b $system_version"
fi fi
#add the cache directory
mkdir -p /var/cache/fusionpbx
chown -R www-data:www-data /var/cache/fusionpbx
#get the source code #get the source code
git clone $branch https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx git clone $branch https://git.nsinnovations.net/nsinnovations/fusionpbx.git /var/www/fusionpbx
chown -R www-data:www-data /var/www/fusionpbx chown -R www-data:www-data /var/www/fusionpbx
chmod -R 755 /var/www/fusionpbx/secure

49
debian/resources/fusionpbx/config.conf vendored Normal file
View File

@@ -0,0 +1,49 @@
#database system settings
database.0.type = pgsql
database.0.host = {database_host}
database.0.port = 5432
database.0.sslmode = prefer
database.0.name = {database_name}
database.0.username = {database_username}
database.0.password = {database_password}
#database switch settings
database.1.type = sqlite
database.1.path = /var/lib/freeswitch/db
database.1.name = core.db
#general settings
document.root = /var/www/fusionpbx
project.path =
temp.dir = /tmp
php.dir = /usr/bin
php.bin = php
#session settings
session.cookie_httponly = true
session.cookie_secure = true
session.cookie_samesite = Lax
#cache settings
cache.method = file
cache.location = /var/cache/fusionpbx
cache.settings = true
#switch settings
switch.conf.dir = /etc/freeswitch
switch.sounds.dir = /usr/share/freeswitch/sounds
switch.database.dir = /var/lib/freeswitch/db
switch.recordings.dir = /var/lib/freeswitch/recordings
switch.storage.dir = /var/lib/freeswitch/storage
switch.voicemail.dir = /var/lib/freeswitch/storage/voicemail
switch.scripts.dir = /usr/share/freeswitch/scripts
#switch xml handler
xml_handler.fs_path = false
xml_handler.reg_as_number_alias = false
xml_handler.number_as_presence_id = true
#error reporting options: user,dev,all
error.reporting = user

View File

@@ -1,45 +0,0 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2016
the Initial Developer. All Rights Reserved.
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
//set the database type
$db_type = 'pgsql'; //sqlite, mysql, pgsql, others with a manually created PDO connection
//sqlite: the db_name and db_path are automatically assigned however the values can be overidden by setting the values here.
//$db_name = 'fusionpbx.db'; //host name/ip address + '.db' is the default database filename
//$db_path = '/var/www/fusionpbx/secure'; //the path is determined by a php variable
//pgsql: database connection information
$db_host = 'localhost'; //set the host only if the database is not local
$db_port = '5432';
$db_name = 'fusionpbx';
$db_username = '{database_username}';
$db_password = '{database_password}';
//show errors
ini_set('display_errors', '1');
//error_reporting (E_ALL); // Report everything
//error_reporting (E_ALL ^ E_NOTICE); // hide notices
error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ); //hide notices and warnings

170
debian/resources/ioncube.sh vendored Executable file
View File

@@ -0,0 +1,170 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ./config.sh
. ./colors.sh
. ./environment.sh
#show cpu details
echo "cpu architecture: $cpu_architecture"
echo "cpu name: $cpu_name"
#make sure unzip is install
apt-get install -y unzip
#remove the ioncube directory if it exists
if [ -d "ioncube" ]; then
rm -Rf ioncube;
fi
#get the ioncube load and unzip it
if [ .$cpu_architecture = .'x86' ]; then
#get the ioncube 64 bit loader
wget --no-check-certificate https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.zip
#uncompress the file
unzip ioncube_loaders_lin_x86-64.zip
#remove the zip file
rm ioncube_loaders_lin_x86-64.zip
elif [ .$cpu_architecture = ."arm" ]; then
if [ .$cpu_name = .'armv7l' ]; then
#get the ioncube 64 bit loader
wget --no-check-certificate https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_armv7l.zip
#uncompress the file
unzip ioncube_loaders_lin_armv7l.zip
#remove the zip file
rm ioncube_loaders_lin_armv7l.zip
fi
fi
#set the version of php
#if [ ."$os_codename" = ."bullseye" ]; then
# php_version=8.0
#fi
#if [ ."$os_codename" = ."buster" ]; then
# php_version=7.4
#fi
#if [ ."$os_codename" = ."stretch" ]; then
# php_version=7.1
#fi
#if [ ."$os_codename" = ."jessie" ]; then
# php_version=7.1
#fi
#copy the loader to the correct directory
if [ ."$php_version" = ."5.6" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_5.6.so /usr/lib/php5/20131226
#add the 00-ioncube.ini file
echo "zend_extension = /usr/lib/php5/20131226/ioncube_loader_lin_5.6.so" > /etc/php5/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php5/20131226/ioncube_loader_lin_5.6.so" > /etc/php5/cli/conf.d/00-ioncube.ini
#restart the service
service php5-fpm restart
fi
if [ ."$php_version" = ."7.0" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_7.0.so /usr/lib/php/20151012
#add the 00-ioncube.ini file
echo "zend_extension = /usr/lib/php/20151012/ioncube_loader_lin_7.0.so" > /etc/php/7.0/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20151012/ioncube_loader_lin_7.0.so" > /etc/php/7.0/cli/conf.d/00-ioncube.ini
#restart the service
service php7.0-fpm restart
fi
if [ ."$php_version" = ."7.1" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_7.1.so /usr/lib/php/20160303
#add the 00-ioncube.ini file
echo "zend_extension = /usr/lib/php/20160303/ioncube_loader_lin_7.1.so" > /etc/php/7.1/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20160303/ioncube_loader_lin_7.1.so" > /etc/php/7.1/cli/conf.d/00-ioncube.ini
#restart the service
service php7.1-fpm restart
fi
if [ ."$php_version" = ."7.2" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_7.2.so /usr/lib/php/20170718
#add the 00-ioncube.ini file
echo "zend_extension = /usr/lib/php/20170718/ioncube_loader_lin_7.2.so" > /etc/php/7.2/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20170718/ioncube_loader_lin_7.2.so" > /etc/php/7.2/cli/conf.d/00-ioncube.ini
#restart the service
service php7.2-fpm restart
fi
if [ ."$php_version" = ."7.3" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_7.3.so /usr/lib/php/20180731
#add the 00-ioncube.ini file
echo "zend_extension = /usr/lib/php/20180731/ioncube_loader_lin_7.3.so" > /etc/php/7.3/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20180731/ioncube_loader_lin_7.3.so" > /etc/php/7.3/cli/conf.d/00-ioncube.ini
#restart the service
service php7.3-fpm restart
fi
if [ ."$php_version" = ."7.4" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_7.4.so /usr/lib/php/20190902
#add the 00-ioncube.ini file
echo "zend_extension = /usr/lib/php/20190902/ioncube_loader_lin_7.4.so" > /etc/php/7.4/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20190902/ioncube_loader_lin_7.4.so" > /etc/php/7.4/cli/conf.d/00-ioncube.ini
#restart the service
service php7.4-fpm restart
fi
if [ ."$php_version" = ."8.1" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_8.1.so /usr/lib/php/20210902
#add the 00-ioncube.ini file
echo "zend_extension = /usr/lib/php/20210902/ioncube_loader_lin_8.1.so" > /etc/php/8.1/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20210902/ioncube_loader_lin_8.1.so" > /etc/php/8.1/cli/conf.d/00-ioncube.ini
#restart the service
service php8.1-fpm restart
fi
if [ ."$php_version" = ."8.2" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_8.2.so /usr/lib/php/20220829
#add the 00-ioncube.ini file
echo "zend_extension = /usr/lib/php/20220829/ioncube_loader_lin_8.2.so" > /etc/php/8.2/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20220829/ioncube_loader_lin_8.2.so" > /etc/php/8.2/cli/conf.d/00-ioncube.ini
#restart the service
service php8.2-fpm restart
fi
if [ ."$php_version" = ."8.3" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_8.3.so /usr/lib/php/20230831
#add the 00-ioncube.ini file
echo "zend_extension = /usr/lib/php/20230831/ioncube_loader_lin_8.3.so" > /etc/php/8.3/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20230831/ioncube_loader_lin_8.3.so" > /etc/php/8.3/cli/conf.d/00-ioncube.ini
#restart the service
service php8.3-fpm restart
fi
if [ ."$php_version" = ."8.4" ]; then
#copy the php extension .so into the php lib directory
cp ioncube/ioncube_loader_lin_8.4.so /usr/lib/php/20240924
#add the 00-ioncube.ini file
echo "zend_extension = /usr/lib/php/20240924/ioncube_loader_lin_8.4.so" > /etc/php/8.4/fpm/conf.d/00-ioncube.ini
echo "zend_extension = /usr/lib/php/20240924/ioncube_loader_lin_8.4.so" > /etc/php/8.4/cli/conf.d/00-ioncube.ini
#restart the service
service php8.4-fpm restart
fi

View File

@@ -3,39 +3,99 @@
#move to script directory so all relative paths work #move to script directory so all relative paths work
cd "$(dirname "$0")" cd "$(dirname "$0")"
#add the includes
. ./config.sh . ./config.sh
. ./colors.sh . ./colors.sh
. ./environment.sh
#send a message #send a message
verbose "Configuring IPTables" verbose "Configuring IPTables"
#defaults to nftables by default this enables iptables
if [ ."$os_codename" = ."buster" ]; then
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
fi
if [ ."$os_codename" = ."bullseye" ]; then
apt-get install -y iptables
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
fi
if [ ."$os_codename" = ."bookworm" ]; then
apt-get install -y iptables
update-alternatives --set iptables /usr/sbin/iptables-legacy
update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
fi
#remove ufw
ufw reset
ufw disable
apt-get remove -y ufw
#apt-get purge ufw
iptables --delete-chain ufw-after-forward
iptables --delete-chain ufw-after-input
iptables --delete-chain ufw-after-logging-forward
iptables --delete-chain ufw-after-logging-input
iptables --delete-chain ufw-after-logging-output
iptables --delete-chain ufw-after-output
iptables --delete-chain ufw-before-forward
iptables --delete-chain ufw-before-input
iptables --delete-chain ufw-before-logging-forward
iptables --delete-chain ufw-before-logging-input
iptables --delete-chain ufw-before-logging-output
iptables --delete-chain ufw-before-output
iptables --delete-chain ufw-reject-forward
iptables --delete-chain ufw-reject-input
iptables --delete-chain ufw-reject-output
iptables --delete-chain ufw-track-forward
iptables --delete-chain ufw-track-input
iptables --delete-chain ufw-track-output
#flush iptables
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -F
#run iptables commands #run iptables commands
iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -j DROP -p udp --dport 5060:5090 -m string --string "friendly-scanner" --algo bm iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "friendly-scanner" --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5090 -m string --string "sipcli/" --algo bm iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "friendly-scanner" --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5090 -m string --string "VaxSIPUserAgent/" --algo bm iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "sipcli/" --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5090 -m string --string "friendly-scanner" --algo bm iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "sipcli/" --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5090 -m string --string "sipcli/" --algo bm iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "VaxSIPUserAgent/" --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5090 -m string --string "VaxSIPUserAgent/" --algo bm iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "VaxSIPUserAgent/" --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "pplsip" --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "pplsip" --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "system " --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "system " --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "exec." --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "exec." --algo bm --icase
iptables -A INPUT -j DROP -p udp --dport 5060:5091 -m string --string "multipart/mixed;boundary" --algo bm --icase
iptables -A INPUT -j DROP -p tcp --dport 5060:5091 -m string --string "multipart/mixed;boundary" --algo bm --icase
iptables -A INPUT -p tcp --dport 22 -j ACCEPT iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 5060:5090 -j ACCEPT iptables -A INPUT -p tcp --dport 7443 -j ACCEPT
iptables -A INPUT -p udp --dport 5060:5090 -j ACCEPT iptables -A INPUT -p tcp --dport 5060:5091 -j ACCEPT
iptables -A INPUT -p tcp --dport 5080:5090 -j ACCEPT iptables -A INPUT -p udp --dport 5060:5091 -j ACCEPT
iptables -A INPUT -p udp --dport 5080:5090 -j ACCEPT
iptables -A INPUT -p udp --dport 16384:32768 -j ACCEPT iptables -A INPUT -p udp --dport 16384:32768 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -A INPUT -p udp --dport 1194 -j ACCEPT iptables -A INPUT -p udp --dport 1194 -j ACCEPT
iptables -t mangle -A OUTPUT -p udp -m udp --sport 16384:32768 -j DSCP --set-dscp 46 iptables -t mangle -A OUTPUT -p udp -m udp --sport 16384:32768 -j DSCP --set-dscp 46
iptables -t mangle -A OUTPUT -p udp -m udp --sport 5060:5090 -j DSCP --set-dscp 26 iptables -t mangle -A OUTPUT -p udp -m udp --sport 5060:5091 -j DSCP --set-dscp 26
iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 5060:5090 -j DSCP --set-dscp 26 iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 5060:5091 -j DSCP --set-dscp 26
iptables -P INPUT DROP iptables -P INPUT DROP
iptables -P FORWARD DROP iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT iptables -P OUTPUT ACCEPT
#answer the questions for iptables persistent #save iptables to make it persistent
#mkdir /etc/iptables
#iptables-save > /etc/iptables/rules.v4
#answer the questions for iptables persistent and save the iptable rules
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections
apt-get install -y --force-yes iptables-persistent apt-get install -y iptables-persistent

View File

@@ -1,87 +1,130 @@
#!/bin/sh #!/bin/sh
# FusionPBX - Install
# Mark J Crane <markjcrane@fusionpbx.com>
# Copyright (C) 2018
# All Rights Reserved.
#move to script directory so all relative paths work #move to script directory so all relative paths work
cd "$(dirname "$0")" cd "$(dirname "$0")"
#includes #includes
. ./config.sh . ./config.sh
#. ./colors.sh
. ./environment.sh
#request the domain and email #Add dependencies
apt-get install -y curl
#remove dehyrdated letsencrypt script
rm /usr/local/sbin/dehydrated
rm -R /usr/src/dehydrated
#rm -R /etc/dehydrated/
#rm -R /usr/src/dns-01-manual
#rm -R /var/www/dehydrated
#request the domain name, email address and wild card domain
read -p 'Domain Name: ' domain_name read -p 'Domain Name: ' domain_name
read -p 'Email Address: ' email_address read -p 'Email Address: ' email_address
#domain_name=subdomain.domain.com
#email=username@domain.com
#remove previous install #get and install dehydrated
rm -R /opt/letsencrypt cd /usr/src && git clone https://github.com/dehydrated-io/dehydrated.git
rm -R /etc/letsencrypt cd /usr/src/dehydrated
cp dehydrated /usr/local/sbin
mkdir -p /var/www/dehydrated
mkdir -p /etc/dehydrated/certs
#use php version 5 for arm #wildcard detection
if [ .$cpu_architecture = .'arm' ]; then wildcard_domain=$(echo $domain_name | cut -c1-1)
php_version=5 if [ "$wildcard_domain" = "*" ]; then
wildcard_domain="true"
else
wildcard_domain="false"
fi fi
#enable fusionpbx nginx config #remove the wildcard and period
cp nginx/fusionpbx /etc/nginx/sites-available/fusionpbx if [ .$wildcard_domain = ."true" ]; then
domain_name=$(echo "$domain_name" | cut -c3-255)
#prepare socket name
if [ ."$php_version" = ."5" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php5-fpm.sock;#g'
fi fi
if [ ."$php_version" = ."7" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.0-fpm.sock;#g' #manual dns hook
if [ .$wildcard_domain = ."true" ]; then
cd /usr/src
git clone https://github.com/gheja/dns-01-manual.git
cd /usr/src/dns-01-manual/
cp hook.sh /etc/dehydrated/hook.sh
chmod 755 /etc/dehydrated/hook.sh
fi fi
ln -s /etc/nginx/sites-available/fusionpbx /etc/nginx/sites-enabled/fusionpbx
#read the config #copy config and hook.sh into /etc/dehydrated
/usr/sbin/nginx -t && /usr/sbin/nginx -s reload cd /usr/src/dehydrated
cp docs/examples/config /etc/dehydrated
#cp docs/examples/hook.sh /etc/dehydrated
#add jessie backports #update the dehydrated config
echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list #sed "s#CONTACT_EMAIL=#CONTACT_EMAIL=$email_address" -i /etc/dehydrated/config
apt-get update && apt-get upgrade sed -i 's/#CONTACT_EMAIL=/CONTACT_EMAIL="'"$email_address"'"/g' /etc/dehydrated/config
apt-get install certbot -t jessie-backports sed -i 's/#WELLKNOWN=/WELLKNOWN=/g' /etc/dehydrated/config
#install letsencrypt #accept the terms
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt ./dehydrated --register --accept-terms --config /etc/dehydrated/config
chmod 755 /opt/letsencrypt/certbot-auto
/opt/letsencrypt/./certbot-auto certonly
#make the directories #set the domain alias
mkdir -p /etc/letsencrypt/configs domain_alias=$(echo "$domain_name" | head -n1 | cut -d " " -f1)
mkdir -p /var/www/letsencrypt/
#cd $pwd #create an alias when using wildcard dns
#cd "$(dirname "$0")" if [ .$wildcard_domain = ."true" ]; then
echo "*.$domain_name > $domain_name" > /etc/dehydrated/domains.txt
fi
#copy the domain conf #add the domain name to domains.txt
cp letsencrypt/domain_name.conf /etc/letsencrypt/configs/$domain_name.conf if [ .$wildcard_domain = ."false" ]; then
echo "$domain_name" > /etc/dehydrated/domains.txt
fi
#update the domain_name and email_address #request the certificates
sed "s#{domain_name}#$domain_name#g" -i /etc/letsencrypt/configs/$domain_name.conf if [ .$wildcard_domain = ."true" ]; then
sed "s#{email_address}#$email_address#g" -i /etc/letsencrypt/configs/$domain_name.conf ./dehydrated --cron --domain *.$domain_name --preferred-chain "ISRG Root X1" --algo rsa --alias $domain_alias --config /etc/dehydrated/config --out /etc/dehydrated/certs --challenge dns-01 --hook /etc/dehydrated/hook.sh
fi
if [ .$wildcard_domain = ."false" ]; then
./dehydrated --cron --alias $domain_alias --preferred-chain "ISRG Root X1" --algo rsa --config /etc/dehydrated/config --out /etc/dehydrated/certs --challenge http-01
fi
#letsencrypt #make sure the nginx ssl directory exists
#sed "s@#letsencrypt@location /.well-known/acme-challenge { root /var/www/letsencrypt; }@g" -i /etc/nginx/sites-available/fusionpbx mkdir -p /etc/nginx/ssl
#get the certs from letsencrypt
cd /opt/letsencrypt && ./letsencrypt-auto --config /etc/letsencrypt/configs/$domain_name.conf certonly
#update nginx config #update nginx config
sed "s@ssl_certificate /etc/ssl/certs/nginx.crt;@ssl_certificate /etc/letsencrypt/live/$domain_name/fullchain.pem;@g" -i /etc/nginx/sites-available/fusionpbx sed "s@ssl_certificate[ \t]*/etc/ssl/certs/nginx.crt;@ssl_certificate /etc/dehydrated/certs/$domain_alias/fullchain.pem;@g" -i /etc/nginx/sites-available/fusionpbx
sed "s@ssl_certificate_key /etc/ssl/private/nginx.key;@ssl_certificate_key /etc/letsencrypt/live/$domain_name/privkey.pem;@g" -i /etc/nginx/sites-available/fusionpbx sed "s@ssl_certificate_key[ \t]*/etc/ssl/private/nginx.key;@ssl_certificate_key /etc/dehydrated/certs/$domain_alias/privkey.pem;@g" -i /etc/nginx/sites-available/fusionpbx
#read the config #read the config
/usr/sbin/nginx -t && /usr/sbin/nginx -s reload /usr/sbin/nginx -t && /usr/sbin/nginx -s reload
#combine the certs into all.pem #setup freeswitch tls
cat /etc/letsencrypt/live/$domain_name/cert.pem > /etc/letsencrypt/live/$domain_name/all.pem if [ .$switch_tls = ."true" ]; then
cat /etc/letsencrypt/live/$domain_name/privkey.pem >> /etc/letsencrypt/live/$domain_name/all.pem
cat /etc/letsencrypt/live/$domain_name/chain.pem >> /etc/letsencrypt/live/$domain_name/all.pem
#copy the certs to the switch tls directory #make sure the freeswitch directory exists
mkdir -p /etc/freeswitch/tls mkdir -p /etc/freeswitch/tls
cp /etc/letsencrypt/live/$domain_name/*.pem /etc/freeswitch/tls
cp /etc/freeswitch/tls/all.pem /etc/freeswitch/tls/wss.pem #make sure the freeswitch certificate directory is empty
chown -R www-data:www-data /etc/freeswitch rm /etc/freeswitch/tls/*
#combine the certs into all.pem
cat /etc/dehydrated/certs/$domain_alias/fullchain.pem > /etc/freeswitch/tls/all.pem
cat /etc/dehydrated/certs/$domain_alias/privkey.pem >> /etc/freeswitch/tls/all.pem
#cat /etc/dehydrated/certs/$domain_alias/chain.pem >> /etc/freeswitch/tls/all.pem
#copy the certificates
cp /etc/dehydrated/certs/$domain_alias/cert.pem /etc/freeswitch/tls
cp /etc/dehydrated/certs/$domain_alias/chain.pem /etc/freeswitch/tls
cp /etc/dehydrated/certs/$domain_alias/fullchain.pem /etc/freeswitch/tls
cp /etc/dehydrated/certs/$domain_alias/privkey.pem /etc/freeswitch/tls
#add symbolic links
ln -s /etc/freeswitch/tls/all.pem /etc/freeswitch/tls/agent.pem
ln -s /etc/freeswitch/tls/all.pem /etc/freeswitch/tls/tls.pem
ln -s /etc/freeswitch/tls/all.pem /etc/freeswitch/tls/wss.pem
ln -s /etc/freeswitch/tls/all.pem /etc/freeswitch/tls/dtls-srtp.pem
#set the permissions
chown -R www-data:www-data /etc/freeswitch/tls
fi

View File

@@ -0,0 +1,185 @@
<?php
/*
Call Recordings Maintenance
- Convert WAV to MP3
- Reduce the file size
- Move recordings
- Move the recording from the source to a destination directory.
- To move files, you will need to add the destination_path as a setting under category: call_recordings
In my case, I put the file in /usr/src and then run manually like this.
cd /usr/src/fusionpbx-install.sh
git stash
git pull
/usr/bin/php /usr/src/fusionpbx-install.sh/debian/resources/maintenance/call_recordings.php
Debian
crontab -e
0 * * * * /usr/bin/php /usr/src/fusionpbx-install.sh/debian/resources/maintenance/call_recordings.php > /dev/null 2>&1
*/
//add the document root to the included path
if (defined('STDIN')) {
$config_glob = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
$conf = parse_ini_file($config_glob[0]);
set_include_path($conf['document.root']);
}
else {
exit;
}
//set pre-defined variables
$debug = true;
$action_name = 'convert'; //convert, move or both
$action_delay = ''; //number of days before running the action, default empty which means no delay
$audio_format = 'wav';
$preferred_command = 'lame'; //mpg123, lame, sox
//includes files
require_once "resources/require.php";
//create the database connection
$database = new database;
//use settings object instead of session
$settings = new settings(['database' => $database]);
//set the source and destination paths
$source_path = $settings->get('switch','recordings', '');
//set the destination_path
if ($action_name == 'move' || $action_name == 'both') {
$destination_path = $settings->get('call_recordings','destination_path', null);
}
//make sure the directory exists
if ($action_name == 'move' || $action_name == 'both') {
system('mkdir -p '.$destination_path);
}
//get the XML CDR call recordings.
$sql = "select xml_cdr_uuid, domain_uuid, domain_name, ";
$sql .= "record_path, record_name, direction, start_stamp, ";
$sql .= "caller_id_name, caller_id_number from v_xml_cdr ";
//$sql .= "where start_stamp > NOW() - INTERVAL '7 days' ";
$sql .= "where true ";
if ($action_name == 'convert' || $action_name == 'both') {
$sql .= "and record_name like '%.wav' ";
}
if ($action_name == 'move' || $action_name == 'both') {
$sql .= "and length(record_path) > 0 ";
$sql .= "and substr(record_path, 1, length(:source_path)) = :source_path ";
$parameters['source_path'] = $source_path;
}
if (!empty($action_delay) && is_numeric($action_delay)) {
$sql .= "and start_stamp < NOW() - INTERVAL '".$action_delay." days' ";
}
$sql .= "order by start_stamp desc ";
if ($debug) { echo $sql."\n"; }
$call_recordings = $database->select($sql, $parameters, 'all');
unset($parameters);
//process the changes
foreach ($call_recordings as $row) {
//set the record_name
$record_name = $row['record_name'];
//set the source_path
$source_path = realpath($row['record_path']);
//get the file name without the file extension
$path_parts = pathinfo($source_path.'/'.$record_name);
//convert the audio file from WAV to MP3
if ($action_name == 'convert' || $action_name == 'both') {
if ($debug) {
if (!file_exists($source_path."/".$record_name)) {
//echo "file not found: ".$source_path."/".$record_name."\n";
}
else {
echo "found file: ".$source_path."/".$record_name."\n";
}
}
if (file_exists($source_path."/".$record_name)) {
//build the sox command
if ($preferred_command == 'sox' && !file_exists($source_path."/".$path_parts['filename'].".mp3")) {
$command = "sox ".$source_path."/".$record_name." -C 128 ".$source_path."/".$path_parts['filename'].".mp3 \n";
}
//build and run the mpg123 command
if ($preferred_command == 'mpg123' && !file_exists($source_path."/".$path_parts['filename'].".mp3")) {
$command = "mpg123 -w ".$source_path."/".$record_name." ".$source_path."/".$path_parts['filename'].".mp3\n";
}
//build and run the mpg123 command
if ($preferred_command == 'lame' && !file_exists($source_path."/".$path_parts['filename'].".mp3")) {
$command = "lame -b 128 ".$source_path."/".$record_name." ".$source_path."/".$path_parts['filename'].".mp3\n";
}
//show debug information
if ($debug) {
echo $command."\n";
}
//run the command
if (!empty($command)) {
system($command);
}
//update the record name to use the new file extension
if (file_exists($source_path."/".$path_parts['filename'].".mp3")) {
//make sure the mp3 file exists and then delete the wav file
unlink($source_path."/".$path_parts['filename'].".wav");
//set the record_name with the new file extension
$record_name = $path_parts['filename'].".mp3";
}
}
}
//move the files
if ($action_name == 'move' || $action_name == 'both') {
//get breakdown of the date to year, month, and day
$start_time = strtotime($row['start_stamp']);
$start_year = date("Y", $start_time);
$start_month = date("M", $start_time);
$start_day = date("d", $start_time);
//move the recording from the old to the new directory
$old_path = realpath($row['record_path']);
$new_path = realpath($destination_path).'/'.$row['domain_name'].'/archive/'.$start_year.'/'.$start_month.'/'.$start_day;
if (!file_exists($new_path)) { system('mkdir -p '.$new_path); }
$command = "mv ".$old_path."/".$record_name." ".$new_path."/".$record_name;
if ($debug) { echo $command."\n"; }
system($command, $move_result_code);
//skip the database update if the move failed
if ($move_result_code !== 0) {
if ($debug) { echo "mv failed with exit code ".$move_result_code.", skipping database update.\n"; }
continue;
}
}
//set the sql update params
$sql_params = [];
if ($action_name == 'move' || $action_name == 'both') {
$sql_params[] = "record_path = '".$new_path."'";
}
if ($action_name == 'convert' || $action_name == 'both') {
$sql_params[] = "record_name = '".$path_parts['filename'].".mp3'";
}
//update the database to the new directory
$sql = "update v_xml_cdr set " . implode(", ", $sql_params) . " \n";
$sql .= "where xml_cdr_uuid = '".$row['xml_cdr_uuid']."';\n";
if ($debug) { echo $sql."\n"; }
$database->execute($sql);
}
?>

19
debian/resources/monit.sh vendored Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ./config.sh
#install monit
apt-get install -y monit
#make the monit shell script executable
chmod 755 monit/shell.sh
#copy the freeswitch monit config
cp monit/freeswitch /etc/monit/conf.d
#restart monit
service monit restart

3
debian/resources/monit/freeswitch vendored Normal file
View File

@@ -0,0 +1,3 @@
check process freeswitch with pidfile /run/freeswitch/freeswitch.pid
start program = "/usr/src/fusionpbx-install.sh/debian/resources/monit/./shell.sh"
stop program = "/usr/bin/freeswitch -stop"

5
debian/resources/monit/shell.sh vendored Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
mkdir -p /var/run/freeswitch
chown -R www-data:www-data /var/run/freeswitch
/usr/bin/freeswitch -nc -u www-data -g www-data -nonat

114
debian/resources/nftables.sh vendored Executable file
View File

@@ -0,0 +1,114 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#add the includes
. ./config.sh
. ./colors.sh
. ./environment.sh
#send a message
verbose "Configuring nftables"
#download the latest package index
apt update
#install nftables
apt install nftables -y
#remove iptables
apt purge iptables-persistent -y
rm -rf /etc/iptables
#run iptables commands
cat << EOF > /etc/nftables.conf
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0;
policy drop;
# Block specific IP addresses
#ip saddr 10.1.0.3 drop
# Allow loopback interface traffic
iifname "lo" counter accept
# Accept related and established connections
ct state related,established counter accept
# Allow SSH port
tcp dport 22 counter accept
# Allow HTTP/HTTPS
tcp dport {80,443} counter accept
# Secure Websocket port
tcp dport 7443 counter accept
# Allow SIP ports
tcp dport 5060-5091 counter accept
udp dport 5060-5091 counter accept
# Allow RTP Media ports
udp dport 16384-32768 counter accept
# Accept ICMP echo requests (ping)
icmp type echo-request counter accept
# Allow OpenVPN port
udp dport 1194 counter accept
}
chain forward {
type filter hook forward priority 0;
policy drop;
}
chain output {
type filter hook output priority 0;
policy accept;
}
chain sip-auth-ip {
type filter hook input priority -50;
policy accept;
# Block specific IP addresses
#ip saddr 10.1.0.3 counter drop
}
chain sip-auth-fail {
type filter hook input priority -50;
policy accept;
}
}
table inet mangle {
chain output {
type route hook output priority -150;
# Set DSCP value for TCP and UDP traffic from source ports
tcp sport 5060-5091 counter ip dscp set 0x1a
udp sport 5060-5091 counter ip dscp set 0x1a
# Set DSCP value for UDP traffic from source ports
udp sport 16384-32768 counter ip dscp set 0x2e
policy accept;
}
}
EOF
#enable nftables and start the service
systemctl enable nftables
systemctl start nftables
#load the nftable configuration
nft -f /etc/nftables.conf

View File

@@ -11,65 +11,62 @@ cd "$(dirname "$0")"
#send a message #send a message
verbose "Installing the web server" verbose "Installing the web server"
#if [ ."$cpu_architecture" = ."arm" ]; then #change the version of php for arm
#9.x - */stretch/ if [ ."$cpu_architecture" = ."arm" ]; then
#8.x - */jessie/ #set the version of php
#fi if [ ."$os_codename" = ."bullseye" ]; then
if [ ."$php_version" = ."5" ]; then php_version=7.4
#verbose "Switching forcefully to php5* packages" fi
which add-apt-repository || apt-get install -y software-properties-common
#LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
#LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php5-compat
elif [ ."$os_name" = ."Ubuntu" ]; then
#16.10.x - */yakkety/
#16.04.x - */xenial/
#14.04.x - */trusty/
if [ ."$os_codename" = ."trusty" ]; then
which add-apt-repository || apt-get install -y software-properties-common
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
fi
elif [ ."$cpu_architecture" = ."arm" ]; then
#Pi2 and Pi3 Raspbian
#Odroid
if [ ."$os_codename" = ."jessie" ]; then
echo "deb http://packages.moopi.uk/debian jessie main" > /etc/apt/sources.list.d/moopi.list
wget -O - http://packages.moopi.uk/debian/moopi.gpg.key | apt-key add -
fi
else
#9.x - */stretch/
#8.x - */jessie/
if [ ."$os_codename" = ."jessie" ]; then
echo "deb http://packages.dotdeb.org $os_codename all" > /etc/apt/sources.list.d/dotdeb.list
echo "deb-src http://packages.dotdeb.org $os_codename all" >> /etc/apt/sources.list.d/dotdeb.list
wget -O - https://www.dotdeb.org/dotdeb.gpg | apt-key add -
fi
fi fi
apt-get update
#use php version 5 for arm #set the version of php
#if [ .$cpu_architecture = .'arm' ]; then #if [ ."$os_codename" = ."bullseye" ]; then
# php_version=5 # php_version=7.4
#fi #fi
if [ ."$os_codename" = ."buster" ]; then
#install dependencies php_version=7.3
apt-get install -y nginx
if [ ."$php_version" = ."5" ]; then
apt-get install -y php5 php5-cli php5-fpm php5-pgsql php5-sqlite php5-odbc php5-curl php5-imap php5-mcrypt
fi fi
if [ ."$php_version" = ."7" ]; then if [ ."$os_codename" = ."stretch" ]; then
apt-get install -y php7.0 php7.0-cli php7.0-fpm php7.0-pgsql php7.0-sqlite3 php7.0-odbc php7.0-curl php7.0-imap php7.0-mcrypt php7.0-xml php_version=7.1
fi
if [ ."$os_codename" = ."jessie" ]; then
php_version=7.1
fi fi
#enable fusionpbx nginx config #enable fusionpbx nginx config
cp nginx/fusionpbx /etc/nginx/sites-available/fusionpbx cp nginx/fusionpbx /etc/nginx/sites-available/fusionpbx
#prepare socket name #prepare socket name
if [ ."$php_version" = ."5" ]; then if [ ."$php_version" = ."5.6" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php5-fpm.sock;#g' sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php5-fpm.sock;#g'
fi fi
if [ ."$php_version" = ."7" ]; then if [ ."$php_version" = ."7.0" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.0-fpm.sock;#g' sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.0-fpm.sock;#g'
fi fi
if [ ."$php_version" = ."7.1" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.1-fpm.sock;#g'
fi
if [ ."$php_version" = ."7.2" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.2-fpm.sock;#g'
fi
if [ ."$php_version" = ."7.3" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.3-fpm.sock;#g'
fi
if [ ."$php_version" = ."7.4" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.4-fpm.sock;#g'
fi
if [ ."$php_version" = ."8.1" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.1-fpm.sock;#g'
fi
if [ ."$php_version" = ."8.2" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.2-fpm.sock;#g'
fi
if [ ."$php_version" = ."8.3" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.3-fpm.sock;#g'
fi
if [ ."$php_version" = ."8.4" ]; then
sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.4-fpm.sock;#g'
fi
ln -s /etc/nginx/sites-available/fusionpbx /etc/nginx/sites-enabled/fusionpbx ln -s /etc/nginx/sites-available/fusionpbx /etc/nginx/sites-enabled/fusionpbx
#self signed certificate #self signed certificate
@@ -80,14 +77,20 @@ ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/certs/nginx.crt
rm /etc/nginx/sites-enabled/default rm /etc/nginx/sites-enabled/default
#update config if LetsEncrypt folder is unwanted #update config if LetsEncrypt folder is unwanted
if [ .$letsencrypt_folder = .false ]; then # if [ .$letsencrypt_folder = .false ]; then
sed -i '151,155d' /etc/nginx/sites-available/fusionpbx # sed -i '151,155d' /etc/nginx/sites-available/fusionpbx
fi # fi
#add the letsencrypt directory #add the letsencrypt directory
if [ .$letsencrypt_folder = .true ]; then if [ .$letsencrypt_folder = .true ]; then
mkdir -p /var/www/letsencrypt/ mkdir -p /var/www/letsencrypt/
fi fi
#flush systemd cache
systemctl daemon-reload
#restart nginx #restart nginx
service nginx restart #service nginx restart
#restart again
systemctl restart nginx

View File

@@ -14,7 +14,7 @@ server {
} }
location ~ \.php$ { location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
#fastcgi_pass 127.0.0.1:9000; #fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
@@ -23,30 +23,49 @@ server {
# Allow the upgrade routines to run longer than normal # Allow the upgrade routines to run longer than normal
location = /core/upgrade/index.php { location = /core/upgrade/index.php {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
#fastcgi_pass 127.0.0.1:9000; #fastcgi_pass 127.0.0.1:9000;
fastcgi_read_timeout 15m;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name;
fastcgi_read_timeout 15m;
} }
# Disable viewing .htaccess & .htpassword & .db # Disable viewing .htaccess & .htpassword & .db & .git
location ~ .htaccess { location ~ .htaccess {
deny all; deny all;
} }
location ~ .htpassword { location ~ .htpassword {
deny all; deny all;
} }
location ~^.+.(db)$ { location ~^.+.(db)$ {
deny all; deny all;
}
location ~ /\.git {
deny all;
}
location ~ /\.lua {
deny all;
}
location ~ /\. {
deny all;
} }
} }
server { server {
listen [::]:80;
listen 80; listen 80;
server_name fusionpbx; server_name fusionpbx;
if ($uri !~* ^.*(provision|xml_cdr).*$) {
#redirect letsencrypt to dehydrated
location ^~ /.well-known/acme-challenge {
default_type "text/plain";
auth_basic "off";
alias /var/www/dehydrated;
}
#rewrite rule - send to https with an exception for provisioning
if ($uri !~* ^.*(provision|xml_cdr|firmware).*$) {
rewrite ^(.*) https://$host$1 permanent; rewrite ^(.*) https://$host$1 permanent;
break; break;
} }
@@ -57,8 +76,12 @@ server {
break; break;
} }
#algo #algo
rewrite "^.*/provision/algom([A-Fa-f0-9]{12})\.conf" /app/provision/?mac=$1&file=algom%7b%24mac%7d.conf last; rewrite "^.*/provision/algom([A-Fa-f0-9]{12})\.conf" /app/provision/?mac=$1&file=algom%7b%24mac%7d.conf last;
#avaya
rewrite "^.*/provision/J100Supgrade.txt" /resources/templates/provision/avaya/J100Supgrade.txt last;
rewrite "^.*/provision/([A-Fa-f0-9]{12}).txt?$" /app/provision/index.php?mac=$1 last;
#mitel #mitel
rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last; rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last;
@@ -66,113 +89,9 @@ server {
#grandstream #grandstream
rewrite "^.*/provision/cfg([A-Fa-f0-9]{12})(\.(xml|cfg))?$" /app/provision/?mac=$1; rewrite "^.*/provision/cfg([A-Fa-f0-9]{12})(\.(xml|cfg))?$" /app/provision/?mac=$1;
rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/phonebook\.xml$" /app/provision/?mac=$1&file=phonebook.xml; rewrite "^.*/provision/([A-Fa-f0-9]{12})/phonebook\.xml$" /app/provision/?mac=$1&file=phonebook.xml;
#grandstream-wave softphone by ext because Android doesn't pass MAC. rewrite "^.*/provision/(phonebook\.xml)?$" /app/provision/index.php?file=$1 last;
rewrite "^.*/provision/([0-9]{5})/cfg([A-Fa-f0-9]{12}).xml$" /app/provision/?ext=$1; rewrite "^.*/provision/phonebook.xml$" /app/provision/?mac=$1&file=phonebook.xml;
#aastra
rewrite "^.*/provision/aastra.cfg$" /app/provision/?mac=$1&file=aastra.cfg;
#rewrite "^.*/provision/([A-Fa-f0-9]{12})(\.(cfg))?$" /app/provision/?mac=$1 last;
#yealink
#rewrite "^.*/provision/(y[0-9]{12})(\.cfg|\.boot)?$" /app/provision/index.php?file=$1$2;
rewrite "^.*/provision/(y[0-9]{12})(\.cfg)?$" /app/provision/index.php?file=$1.cfg;
rewrite "^.*/provision/([A-Fa-f0-9]{12})(\.(xml|cfg))?$" /app/provision/index.php?mac=$1 last;
#polycom
rewrite "^.*/provision/000000000000.cfg$" "/app/provision/?mac=$1&file={%24mac}.cfg";
#rewrite "^.*/provision/sip_330(\.(ld))$" /includes/firmware/sip_330.$2;
rewrite "^.*/provision/features.cfg$" /app/provision/?mac=$1&file=features.cfg;
rewrite "^.*/provision/([A-Fa-f0-9]{12})-sip.cfg$" /app/provision/?mac=$1&file=sip.cfg;
#rewrite "^.*/provision/([A-Fa-f0-9]{12})-phone.cfg$" /app/provision/?mac=$1;
rewrite "^.*/provision/([A-Fa-f0-9]{12})-registration.cfg$" "/app/provision/?mac=$1&file={%24mac}-registration.cfg";
rewrite "^.*/provision/([A-Fa-f0-9]{12})-directory.xml$" "/app/provision/?mac=$1&file={%24mac}-directory.xml";
#cisco
rewrite "^.*/provision/file/(.*\.(xml|cfg))" /app/provision/?file=$1 last;
#Escene
rewrite "^.*/provision/([0-9]{1,11})_Extern.xml$" "/app/provision/?ext=$1&file={%24mac}_extern.xml" last;
rewrite "^.*/provision/([0-9]{1,11})_Phonebook.xml$" "/app/provision/?ext=$1&file={%24mac}_phonebook.xml" last;
#Vtech
rewrite "^.*/provision/VCS754_([A-Fa-f0-9]{12})\.cfg$" /app/provision/?mac=$1;
rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
client_max_body_size 80M;
client_body_buffer_size 128k;
location / {
root /var/www/fusionpbx;
index index.php;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name;
}
# Allow the upgrade routines to run longer than normal
location = /core/upgrade/index.php {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name;
fastcgi_read_timeout 15m;
}
# Disable viewing .htaccess & .htpassword & .db
location ~ .htaccess {
deny all;
}
location ~ .htpassword {
deny all;
}
location ~^.+.(db)$ {
deny all;
}
}
server {
listen 443;
server_name fusionpbx;
ssl on;
ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!ADH:!MD5:!aNULL;
#ssl_dhparam
#letsencrypt
location /.well-known/acme-challenge {
root /var/www/letsencrypt;
}
#REST api
if ($uri ~* ^.*/api/.*$) {
rewrite ^(.*)/api/(.*)$ $1/api/index.php?rewrite_uri=$2 last;
break;
}
#algo
rewrite "^.*/provision/algom([A-Fa-f0-9]{12})\.conf" /app/provision/?mac=$1&file=algom%7b%24mac%7d.conf last;
#mitel
rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last;
rewrite "^.*/provision/MN_Generic.cfg" /app/provision/index.php?mac=08000f000000&file=MN_Generic.cfg last;
#grandstream
rewrite "^.*/provision/cfg([A-Fa-f0-9]{12})(\.(xml|cfg))?$" /app/provision/?mac=$1;
rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/phonebook\.xml$" /app/provision/?mac=$1&file=phonebook.xml;
#grandstream-wave softphone by ext because Android doesn't pass MAC.
rewrite "^.*/provision/([0-9]{5})/cfg([A-Fa-f0-9]{12}).xml$" /app/provision/?ext=$1;
#aastra #aastra
rewrite "^.*/provision/aastra.cfg$" /app/provision/?mac=$1&file=aastra.cfg; rewrite "^.*/provision/aastra.cfg$" /app/provision/?mac=$1&file=aastra.cfg;
@@ -194,6 +113,7 @@ server {
#cisco #cisco
rewrite "^.*/provision/file/(.*\.(xml|cfg))" /app/provision/?file=$1 last; rewrite "^.*/provision/file/(.*\.(xml|cfg))" /app/provision/?file=$1 last;
rewrite "^.*/provision/directory\.xml$" /app/provision/?file=directory.xml;
#Escene #Escene
rewrite "^.*/provision/([0-9]{1,11})_Extern.xml$" "/app/provision/?ext=$1&file={%24mac}_extern.xml" last; rewrite "^.*/provision/([0-9]{1,11})_Extern.xml$" "/app/provision/?ext=$1&file={%24mac}_extern.xml" last;
@@ -203,6 +123,15 @@ server {
rewrite "^.*/provision/VCS754_([A-Fa-f0-9]{12})\.cfg$" /app/provision/?mac=$1; rewrite "^.*/provision/VCS754_([A-Fa-f0-9]{12})\.cfg$" /app/provision/?mac=$1;
rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml; rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
#Digium
rewrite "^.*/provision/([A-Fa-f0-9]{12})-contacts\.cfg$" "/app/provision/?mac=$1&file={%24mac}-contacts.cfg";
rewrite "^.*/provision/([A-Fa-f0-9]{12})-smartblf\.cfg$" "/app/provision/?mac=$1&file={%24mac}-smartblf.cfg";
#Snom
rewrite "^.*/provision/.*-([A-Fa-f0-9]{12})\.?(cfg|htm)?$" /app/provision/index.php?mac=$1;
rewrite "^.*/provision/C520-WiMi_([A-Fa-f0-9]{12})\.cfg$" /app/provision/index.php?mac=$1;
rewrite "^.*/provision/([A-Fa-f0-9]{12})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
access_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log; error_log /var/log/nginx/error.log;
@@ -215,8 +144,9 @@ server {
} }
location ~ \.php$ { location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
#fastcgi_pass 127.0.0.1:9000; #fastcgi_pass 127.0.0.1:9000;
fastcgi_read_timeout 15m;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name;
@@ -224,15 +154,15 @@ server {
# Allow the upgrade routines to run longer than normal # Allow the upgrade routines to run longer than normal
location = /core/upgrade/index.php { location = /core/upgrade/index.php {
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
#fastcgi_pass 127.0.0.1:9000; #fastcgi_pass 127.0.0.1:9000;
fastcgi_read_timeout 15m;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name;
fastcgi_read_timeout 15m;
} }
# Disable viewing .htaccess & .htpassword & .db # Disable viewing .htaccess & .htpassword & .db & .git
location ~ .htaccess { location ~ .htaccess {
deny all; deny all;
} }
@@ -242,4 +172,163 @@ server {
location ~^.+.(db)$ { location ~^.+.(db)$ {
deny all; deny all;
} }
location ~ /\.git {
deny all;
}
location ~ /\.lua {
deny all;
}
location ~ /\. {
deny all;
}
} }
server {
listen [::]:443 ssl;
listen 443 ssl;
#listen 443 ssl http2;
server_name fusionpbx;
ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key;
#ssl_protocols TLSv1.2 TLSv1.3;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA:AES256-SHA;
ssl_session_cache shared:SSL:40m;
ssl_session_timeout 2h;
ssl_session_tickets off;
#redirect websockets to port 8080
location /websockets/ {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
#redirect letsencrypt to dehydrated
location ^~ /.well-known/acme-challenge {
default_type "text/plain";
auth_basic "off";
alias /var/www/dehydrated;
}
#REST api
if ($uri ~* ^.*/api/.*$) {
rewrite ^(.*)/api/(.*)$ $1/api/index.php?rewrite_uri=$2 last;
break;
}
#message media
rewrite "^/app/messages/media/(.*)/(.*)" /app/messages/message_media.php?id=$1&action=download last;
#algo
rewrite "^.*/provision/algom([A-Fa-f0-9]{12})\.conf" /app/provision/?mac=$1&file=algom%7b%24mac%7d.conf last;
#avaya
rewrite "^.*/provision/J100Supgrade.txt" /resources/templates/provision/avaya/J100Supgrade.txt last;
rewrite "^.*/provision/([A-Fa-f0-9]{12}).txt?$" /app/provision/index.php?mac=$1 last;
#mitel
rewrite "^.*/provision/MN_([A-Fa-f0-9]{12})\.cfg" /app/provision/index.php?mac=$1&file=MN_%7b%24mac%7d.cfg last;
rewrite "^.*/provision/MN_Generic.cfg" /app/provision/index.php?mac=08000f000000&file=MN_Generic.cfg last;
#grandstream
rewrite "^.*/provision/cfg([A-Fa-f0-9]{12})(\.(xml|cfg))?$" /app/provision/?mac=$1;
rewrite "^.*/provision/([A-Fa-f0-9]{12})/phonebook\.xml$" /app/provision/?mac=$1&file=phonebook.xml;
rewrite "^.*/provision/(phonebook\.xml)?$" /app/provision/index.php?file=$1 last;
rewrite "^.*/provision/phonebook.xml$" /app/provision/?mac=$1&file=phonebook.xml;
#aastra
rewrite "^.*/provision/aastra.cfg$" /app/provision/?mac=$1&file=aastra.cfg;
#rewrite "^.*/provision/([A-Fa-f0-9]{12})(\.(cfg))?$" /app/provision/?mac=$1 last;
#yealink
#rewrite "^.*/provision/(y[0-9]{12})(\.cfg|\.boot)?$" /app/provision/index.php?file=$1$2;
rewrite "^.*/provision/(y[0-9]{12})(\.cfg)?$" /app/provision/index.php?file=$1.cfg;
rewrite "^.*/provision/([A-Fa-f0-9]{12})(\.(xml|cfg))?$" /app/provision/index.php?mac=$1 last;
#polycom
rewrite "^.*/provision/000000000000.cfg$" "/app/provision/?mac=$1&file={%24mac}.cfg";
#rewrite "^.*/provision/sip_330(\.(ld))$" /includes/firmware/sip_330.$2;
rewrite "^.*/provision/features.cfg$" /app/provision/?mac=$1&file=features.cfg;
rewrite "^.*/provision/([A-Fa-f0-9]{12})-sip.cfg$" /app/provision/?mac=$1&file=sip.cfg;
rewrite "^.*/provision/([A-Fa-f0-9]{12})-phone.cfg$" /app/provision/?mac=$1;
rewrite "^.*/provision/([A-Fa-f0-9]{12})-registration.cfg$" "/app/provision/?mac=$1&file={%24mac}-registration.cfg";
rewrite "^.*/provision/([A-Fa-f0-9]{12})-directory.xml$" "/app/provision/?mac=$1&file={%24mac}-directory.xml";
#cisco
rewrite "^.*/provision/file/(.*\.(xml|cfg))" /app/provision/?file=$1 last;
rewrite "^.*/provision/directory\.xml$" /app/provision/?file=directory.xml;
#Escene
rewrite "^.*/provision/([0-9]{1,11})_Extern.xml$" "/app/provision/?ext=$1&file={%24mac}_extern.xml" last;
rewrite "^.*/provision/([0-9]{1,11})_Phonebook.xml$" "/app/provision/?ext=$1&file={%24mac}_phonebook.xml" last;
#Vtech
rewrite "^.*/provision/VCS754_([A-Fa-f0-9]{12})\.cfg$" /app/provision/?mac=$1;
rewrite "^.*/provision/pb([A-Fa-f0-9-]{12,17})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
#Digium
rewrite "^.*/provision/([A-Fa-f0-9]{12})-contacts\.cfg$" "/app/provision/?mac=$1&file={%24mac}-contacts.cfg";
rewrite "^.*/provision/([A-Fa-f0-9]{12})-smartblf\.cfg$" "/app/provision/?mac=$1&file={%24mac}-smartblf.cfg";
#Snom
rewrite "^.*/provision/.*-([A-Fa-f0-9]{12})\.?(cfg|htm)?$" /app/provision/index.php?mac=$1;
rewrite "^.*/provision/C520-WiMi_([A-Fa-f0-9]{12})\.cfg$" /app/provision/index.php?mac=$1;
rewrite "^.*/provision/([A-Fa-f0-9]{12})/directory\.xml$" /app/provision/?mac=$1&file=directory.xml;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
client_max_body_size 80M;
client_body_buffer_size 128k;
location / {
root /var/www/fusionpbx;
index index.php;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_read_timeout 15m;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name;
}
# Allow the upgrade routines to run longer than normal
location = /core/upgrade/index.php {
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_read_timeout 15m;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /var/www/fusionpbx$fastcgi_script_name;
}
# Disable viewing .htaccess & .htpassword & .db & .git
location ~ .htaccess {
deny all;
}
location ~ .htpassword {
deny all;
}
location ~^.+.(db)$ {
deny all;
}
location ~ /\.git {
deny all;
}
location ~ /\.lua {
deny all;
}
location ~ /\. {
deny all;
}
}

View File

@@ -6,29 +6,228 @@ cd "$(dirname "$0")"
#includes #includes
. ./config.sh . ./config.sh
. ./colors.sh . ./colors.sh
. ./environment.sh
#send a message #send a message
verbose "Configuring PHP" verbose "Configuring PHP"
#update config if source is being used #add the repository
if [ ."$php_version" = ."5" ]; then if [ ."$os_name" = ."Ubuntu" ]; then
verbose "version 5.x" #16.10.x - */yakkety/
php_ini_file='/etc/php5/fpm/php.ini' #16.04.x - */xenial/
#14.04.x - */trusty/
if [ ."$os_codename" = ."trusty" ]; then
which add-apt-repository || apt-get install -y software-properties-common
LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
fi
elif [ ."$cpu_architecture" = ."arm" ]; then
#Pi2 and Pi3 Raspbian, #Odroid
#if [ ."$os_codename" = ."stretch" ]; then
# php_version=7.0
#fi
if [ ."$os_codename" = ."buster" ]; then
php_version=7.3
fi
if [ ."$os_codename" = ."bullseye" ]; then
php_version=7.4
fi
if [ ."$os_codename" = ."bookworm" ]; then
php_version=8.2
fi
else
#11.x - bullseye
#10.x - buster
#9.x - stretch
#8.x - jessie
apt-get -y install apt-transport-https lsb-release ca-certificates
#make sure keyrings directory exits
mkdir /etc/apt/keyrings
if [ ."$os_codename" = ."jessie" ]; then
wget -O - https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /etc/apt/keyrings/php.gpg
sh -c 'echo "deb [signed-by=/etc/apt/keyrings/php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$os_codename" = ."stretch" ]; then
wget -O - https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /etc/apt/keyrings/php.gpg
sh -c 'echo "deb [signed-by=/etc/apt/keyrings/php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$os_codename" = ."buster" ]; then
wget -O - https://packages.sury.org/php/apt.gpg | gpg --dearmor -o /etc/apt/keyrings/php.gpg
sh -c 'echo "deb [signed-by=/etc/apt/keyrings/php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$os_codename" = ."bullseye" ]; then
if [ ."$php_version" = ."8.1" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/sury-php-8.x.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$php_version" = ."8.2" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/sury-php-8.x.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$php_version" = ."8.3" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/sury-php-8.x.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$php_version" = ."8.4" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/sury-php-8.x.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
fi
if [ ."$os_codename" = ."bookworm" ]; then
if [ ."$php_version" = ."8.1" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/chmod 644 /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/sury-php-8.x.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$php_version" = ."8.2" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/chmod 644 /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/sury-php-8.x.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$php_version" = ."8.3" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/chmod 644 /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/sury-php-8.x.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$php_version" = ."8.4" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/chmod 644 /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/sury-php-8.x.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
fi
if [ ."$os_codename" = ."trixie" ]; then
if [ ."$php_version" = ."8.2" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/chmod 644 /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/sury-php-8.x.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$php_version" = ."8.3" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/chmod 644 /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/sury-php-8.x.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
if [ ."$php_version" = ."8.4" ]; then
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/chmod 644 /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/sury-php-8.x.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
fi
fi
fi fi
if [ ."$php_version" = ."7" ]; then apt-get update -y
verbose "version 7.0"
php_ini_file='/etc/php/7.0/fpm/php.ini' #install dependencies
apt-get install -y nginx
if [ ."$php_version" = ."" ]; then
apt-get install -y php php-cli php-fpm php-pgsql php-sqlite3 php-odbc php-curl php-imap php-xml php-gd php-inotify
fi
if [ ."$php_version" = ."7.1" ]; then
apt-get install -y --no-install-recommends php7.1 php7.1-common php7.1-cli php7.1-fpm php7.1-pgsql php7.1-sqlite3 php7.1-odbc php7.1-curl php7.1-imap php7.1-xml php7.1-gd php7.1-mbstring php7.1-inotify
fi
if [ ."$php_version" = ."7.2" ]; then
apt-get install -y --no-install-recommends php7.2 php7.2-common php7.2-cli php7.2-fpm php7.2-pgsql php7.2-sqlite3 php7.2-odbc php7.2-curl php7.2-imap php7.2-xml php7.2-gd php7.2-mbstring php7.2-inotify
fi
if [ ."$php_version" = ."7.3" ]; then
apt-get install -y --no-install-recommends php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-pgsql php7.3-sqlite3 php7.3-odbc php7.3-curl php7.3-imap php7.3-xml php7.3-gd php7.3-mbstring php7.3-inotify
fi
if [ ."$php_version" = ."7.4" ]; then
apt-get install -y --no-install-recommends php7.4 php7.4-common php7.4-cli php7.4-dev php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-imap php7.4-xml php7.4-gd php7.4-mbstring php7.4-inotify
fi
if [ ."$php_version" = ."8.1" ]; then
apt-get install -y --no-install-recommends php8.1 php8.1-common php8.1-cli php8.1-dev php8.1-fpm php8.1-pgsql php8.1-sqlite3 php8.1-odbc php8.1-curl php8.1-imap php8.1-xml php8.1-gd php8.1-mbstring php8.1-ldap php8.1-inotify php8.1-snmp
fi
if [ ."$php_version" = ."8.2" ]; then
apt-get install -y --no-install-recommends php8.2 php8.2-common php8.2-cli php8.2-dev php8.2-fpm php8.2-pgsql php8.2-sqlite3 php8.2-odbc php8.2-curl php8.2-imap php8.2-xml php8.2-gd php8.2-mbstring php8.2-ldap php8.2-inotify php8.2-snmp
fi
if [ ."$php_version" = ."8.3" ]; then
apt-get install -y --no-install-recommends php8.3 php8.3-common php8.3-cli php8.3-dev php8.3-fpm php8.3-pgsql php8.3-sqlite3 php8.3-odbc php8.3-curl php8.3-imap php8.3-xml php8.3-gd php8.3-mbstring php8.3-ldap php8.3-inotify php8.3-snmp
fi
if [ ."$php_version" = ."8.4" ]; then
apt-get install -y --no-install-recommends php8.4 php8.4-common php8.4-cli php8.4-dev php8.4-fpm php8.4-pgsql php8.4-sqlite3 php8.4-odbc php8.4-curl php8.4-imap php8.4-xml php8.4-gd php8.4-mbstring php8.4-ldap php8.4-inotify php8.4-snmp
fi
#update config if source is being used
if [ ."$php_version" = ."7.1" ]; then
verbose "version 7.1"
php_ini_file='/etc/php/7.1/fpm/php.ini'
fi
if [ ."$php_version" = ."7.2" ]; then
verbose "version 7.2"
php_ini_file='/etc/php/7.2/fpm/php.ini'
fi
if [ ."$php_version" = ."7.3" ]; then
verbose "version 7.3"
php_ini_file='/etc/php/7.3/fpm/php.ini'
fi
if [ ."$php_version" = ."7.4" ]; then
verbose "version 7.4"
php_ini_file='/etc/php/7.4/fpm/php.ini'
fi
if [ ."$php_version" = ."8.1" ]; then
verbose "version 8.1"
php_ini_file='/etc/php/8.1/fpm/php.ini'
fi
if [ ."$php_version" = ."8.2" ]; then
verbose "version 8.2"
php_ini_file='/etc/php/8.2/fpm/php.ini'
fi
if [ ."$php_version" = ."8.3" ]; then
verbose "version 8.3"
php_ini_file='/etc/php/8.3/fpm/php.ini'
fi
if [ ."$php_version" = ."8.4" ]; then
verbose "version 8.4"
php_ini_file='/etc/php/8.4/fpm/php.ini'
fi fi
sed 's#post_max_size = .*#post_max_size = 80M#g' -i $php_ini_file sed 's#post_max_size = .*#post_max_size = 80M#g' -i $php_ini_file
sed 's#upload_max_filesize = .*#upload_max_filesize = 80M#g' -i $php_ini_file sed 's#upload_max_filesize = .*#upload_max_filesize = 80M#g' -i $php_ini_file
sed 's#;max_input_vars = .*#max_input_vars = 8000#g' -i $php_ini_file
sed 's#; max_input_vars = .*#max_input_vars = 8000#g' -i $php_ini_file
#install ioncube
if [ .$cpu_architecture = .'x86' ]; then
. ./ioncube.sh
fi
#restart php-fpm #restart php-fpm
#systemd systemctl daemon-reload
if [ ."$php_version" = ."5" ]; then if [ ."$php_version" = ."7.1" ]; then
systemctl restart php5-fpm systemctl restart php7.1-fpm
fi fi
if [ ."$php_version" = ."7" ]; then if [ ."$php_version" = ."7.2" ]; then
systemctl restart php7.0-fpm systemctl restart php7.2-fpm
fi
if [ ."$php_version" = ."7.3" ]; then
systemctl restart php7.3-fpm
fi
if [ ."$php_version" = ."7.4" ]; then
systemctl restart php7.4-fpm
fi
if [ ."$php_version" = ."8.1" ]; then
systemctl restart php8.1-fpm
fi
if [ ."$php_version" = ."8.2" ]; then
systemctl restart php8.2-fpm
fi
if [ ."$php_version" = ."8.3" ]; then
systemctl restart php8.3-fpm
fi
if [ ."$php_version" = ."8.3" ]; then
systemctl restart php8.3-fpm
fi
if [ ."$php_version" = ."8.4" ]; then
systemctl restart php8.4-fpm
fi fi
#init.d #init.d

View File

@@ -19,58 +19,95 @@ echo "Install PostgreSQL and create the database and users\n"
#included in the distribution #included in the distribution
if [ ."$database_repo" = ."system" ]; then if [ ."$database_repo" = ."system" ]; then
apt-get install -y --force-yes sudo postgresql if [ ."$database_host" = ."127.0.0.1" ] || [ ."$database_host" = ."::1" ] ; then
apt-get install -y sudo postgresql
else
apt-get install -y sudo postgresql-client
fi
fi fi
#make sure keyrings directory exits
mkdir /etc/apt/keyrings
#postgres official repository #postgres official repository
if [ ."$database_repo" = ."official" ]; then if [ ."$database_repo" = ."official" ]; then
echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' > /etc/apt/sources.list.d/postgresql.list apt install -y gpg
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - sh -c 'echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/keyrings/pgdg.gpg
chmod 644 /etc/apt/keyrings/pgdg.gpg
apt-get update && apt-get upgrade -y apt-get update && apt-get upgrade -y
if [ ."$database_version" = ."latest" ]; then if [ ."$database_host" = ."127.0.0.1" ] || [ ."$database_host" = ."::1" ] ; then
apt-get install -y --force-yes sudo postgresql if [ ."$database_version" = ."latest" ]; then
apt-get install -y sudo postgresql
else
apt-get install -y sudo postgresql-$database_version
fi
else
apt-get install -y sudo postgresql-client
fi fi
if [ ."$database_version" = ."9.6" ]; then
apt-get install -y --force-yes sudo postgresql-$database_version
fi
fi fi
#add PostgreSQL and 2ndquadrant repos #add PostgreSQL and 2ndquadrant repos
if [ ."$database_repo" = ."2ndquadrant" ]; then if [ ."$database_repo" = ."2ndquadrant" ]; then
echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' > /etc/apt/sources.list.d/postgresql.list if [ ."$database_host" = ."127.0.0.1" ] || [ ."$database_host" = ."::1" ] ; then
echo 'deb http://packages.2ndquadrant.com/bdr/apt/ jessie-2ndquadrant main' > /etc/apt/sources.list.d/2ndquadrant.list apt install -y curl
/usr/bin/wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - curl https://dl.2ndquadrant.com/default/release/get/deb | bash
/usr/bin/wget --quiet -O - http://packages.2ndquadrant.com/bdr/apt/AA7A6805.asc | apt-key add - if [ ."$os_codename" = ."buster" ]; then
apt-get update && apt-get upgrade -y sed -i /etc/apt/sources.list.d/2ndquadrant-dl-default-release.list -e 's#buster#stretch#g'
apt-get install -y --force-yes sudo postgresql-bdr-9.4 postgresql-bdr-9.4-bdr-plugin postgresql-bdr-contrib-9.4 fi
if [ ."$os_codename" = ."bullseye" ]; then
sed -i /etc/apt/sources.list.d/2ndquadrant-dl-default-release.list -e 's#bullseye#stretch#g'
fi
apt update
apt-get install -y sudo postgresql-bdr-9.4 postgresql-bdr-9.4-bdr-plugin postgresql-bdr-contrib-9.4
fi
fi fi
#install the database backup
#cp backup/fusionpbx-backup /etc/cron.daily
#cp backup/fusionpbx-maintenance /etc/cron.daily
#chmod 755 /etc/cron.daily/fusionpbx-backup
#chmod 755 /etc/cron.daily/fusionpbx-maintenance
#sed -i "s/zzz/$password/g" /etc/cron.daily/fusionpbx-backup
#sed -i "s/zzz/$password/g" /etc/cron.daily/fusionpbx-maintenance
#initialize the database
pg_createcluster $database_version main
#replace scram-sha-256 with md5
sed -i /etc/postgresql/$database_version/main/pg_hba.conf -e '/^#/!s/scram-sha-256/md5/g'
#systemd #systemd
systemctl daemon-reload if [ ."$database_host" = ."127.0.0.1" ] || [ ."$database_host" = ."::1" ] ; then
systemctl restart postgresql systemctl daemon-reload
systemctl restart postgresql
fi
#init.d #init.d
#/usr/sbin/service postgresql restart #/usr/sbin/service postgresql restart
#install the database backup
cp backup/fusionpbx-backup.sh /etc/cron.daily
chmod 755 /etc/cron.daily/fusionpbx-backup.sh
sed -i "s/zzz/$password/g" /etc/cron.daily/fusionpbx-backup.sh
#move to /tmp to prevent a red herring error when running sudo with psql #move to /tmp to prevent a red herring error when running sudo with psql
cwd=$(pwd) cwd=$(pwd)
cd /tmp cd /tmp
#add the databases, users and grant permissions to them if [ ."$database_host" = ."127.0.0.1" ] || [ ."$database_host" = ."::1" ] ; then
sudo -u postgres psql -c "CREATE DATABASE fusionpbx;"; #reload the config
sudo -u postgres psql -c "CREATE DATABASE freeswitch;"; sudo -u postgres psql -c "SELECT pg_reload_conf();"
sudo -u postgres psql -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$password';"
sudo -u postgres psql -c "CREATE ROLE freeswitch WITH SUPERUSER LOGIN PASSWORD '$password';" #set client encoding
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;" sudo -u postgres psql -c "SET client_encoding = 'UTF8';";
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to fusionpbx;"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to freeswitch;" #add the database users and databases
#ALTER USER fusionpbx WITH PASSWORD 'newpassword'; sudo -u postgres psql -c "CREATE DATABASE fusionpbx;";
#add the users and grant permissions
sudo -u postgres psql -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$password';"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;"
#update the fusionpbx user password
#ALTER USER fusionpbx WITH PASSWORD 'newpassword';
fi
cd $cwd cd $cwd
#set the ip address #set the ip address

17
debian/resources/postgresql/create.sh vendored Normal file → Executable file
View File

@@ -11,18 +11,17 @@ cwd=$(pwd)
cd /tmp cd /tmp
#set client encoding #set client encoding
sudo -u postgres psql -c "SET client_encoding = 'UTF8';"; sudo -u postgres psql -p $database_port -c "SET client_encoding = 'UTF8';";
#add the database users and databases #add the database users and databases
sudo -u postgres psql -c "CREATE DATABASE fusionpbx;"; sudo -u postgres psql -p $database_port -c "CREATE DATABASE fusionpbx;";
sudo -u postgres psql -c "CREATE DATABASE freeswitch;";
#add the users and grant permissions #add the users and grant permissions
sudo -u postgres psql -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$database_password';" sudo -u postgres psql -p $database_port -c "CREATE ROLE fusionpbx WITH SUPERUSER LOGIN PASSWORD '$database_password';"
sudo -u postgres psql -c "CREATE ROLE freeswitch WITH SUPERUSER LOGIN PASSWORD '$database_password';" sudo -u postgres psql -p $database_port -c "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE fusionpbx to fusionpbx;"
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to fusionpbx;" #reload the config
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE freeswitch to freeswitch;" sudo -u postgres psql -p $database_port -c "SELECT pg_reload_conf();"
#restart postgres #restart postgres
service postgresql restart #systemctl restart postgresql

View File

@@ -43,9 +43,9 @@ sed -i /etc/freeswitch/autoload_configs/switch.conf.xml -e s:'<!-- <param name="
sudo -u postgres psql -h $database_host -p $database_port -U freeswitch -d fusionpbx -c "update v_sip_profile_settings set sip_profile_setting_enabled = 'true' where sip_profile_setting_name = 'odbc-dsn';"; sudo -u postgres psql -h $database_host -p $database_port -U freeswitch -d fusionpbx -c "update v_sip_profile_settings set sip_profile_setting_enabled = 'true' where sip_profile_setting_name = 'odbc-dsn';";
#add the dsn variables #add the dsn variables
sudo -u postgres psql -h $database_host -p $database_port -U freeswitch -d fusionpbx -c "insert into v_vars (var_uuid, var_name, var_value, var_cat, var_enabled, var_order, var_description, var_hostname) values ('785d7013-1152-4a44-aa15-28336d9b36f9', 'dsn_system', 'pgsql://hostaddr=$database_host port=$database_port dbname=fusionpbx user=fusionpbx password=$database_password options=', 'DSN', 'true', '0', null, null);"; sudo -u postgres psql -h $database_host -p $database_port -U freeswitch -d fusionpbx -c "insert into v_vars (var_uuid, var_name, var_value, var_category, var_enabled, var_order, var_description, var_hostname) values ('785d7013-1152-4a44-aa15-28336d9b36f9', 'dsn_system', 'pgsql://hostaddr=$database_host port=$database_port dbname=fusionpbx user=fusionpbx password=$database_password options=', 'DSN', 'true', '0', null, null);";
sudo -u postgres psql -h $database_host -p $database_port -U freeswitch -d fusionpbx -c "insert into v_vars (var_uuid, var_name, var_value, var_cat, var_enabled, var_order, var_description, var_hostname) values ('0170e737-b453-40ea-99f2-f1375474e5ce', 'dsn', 'pgsql://hostaddr=$database_host port=$database_port dbname=freeswitch user=fusionpbx password=$database_password options=', 'DSN', 'true', '0', null, null);"; sudo -u postgres psql -h $database_host -p $database_port -U freeswitch -d fusionpbx -c "insert into v_vars (var_uuid, var_name, var_value, var_category, var_enabled, var_order, var_description, var_hostname) values ('0170e737-b453-40ea-99f2-f1375474e5ce', 'dsn', 'pgsql://hostaddr=$database_host port=$database_port dbname=freeswitch user=fusionpbx password=$database_password options=', 'DSN', 'true', '0', null, null);";
sudo -u postgres psql -h $database_host -p $database_port -U freeswitch -d fusionpbx -c "insert into v_vars (var_uuid, var_name, var_value, var_cat, var_enabled, var_order, var_description, var_hostname) values ('32e3e364-a8ef-4fe0-9d02-c652d5122bbf', 'dsn_callcenter', 'sqlite:///var/lib/freeswitch/db/callcenter.db', 'DSN', 'true', '0', null, null);"; sudo -u postgres psql -h $database_host -p $database_port -U freeswitch -d fusionpbx -c "insert into v_vars (var_uuid, var_name, var_value, var_category, var_enabled, var_order, var_description, var_hostname) values ('32e3e364-a8ef-4fe0-9d02-c652d5122bbf', 'dsn_callcenter', 'sqlite:///var/lib/freeswitch/db/callcenter.db', 'DSN', 'true', '0', null, null);";
#add the #add the
echo "<!-- DSN -->" >> /etc/freeswitch/vars.xml echo "<!-- DSN -->" >> /etc/freeswitch/vars.xml
@@ -68,3 +68,6 @@ done
#restart freeswitch #restart freeswitch
service freeswitch restart service freeswitch restart
# pgpassword security and conflict avoidance
unset PGPASSWORD

View File

@@ -20,8 +20,11 @@ now=$(date +%Y-%m-%d)
mkdir -p /var/backups/fusionpbx/postgresql mkdir -p /var/backups/fusionpbx/postgresql
#backup the database #backup the database
pg_dump --verbose -Fc --host=$db_host --port=$db_port -U fusionpbx fusionpbx --schema=public -f /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql pg_dump --verbose -Fc --host=$db_host --port=$db_port -U fusionpbx fusionpbx --schema=public -f /var/backups/fusionpbx/postgresql/fusionpbx_auto_$now.sql
#empty the fusionpbx database #empty the fusionpbx database
sudo -u postgres psql -d fusionpbx -c "drop schema public cascade;"; sudo -u postgres psql -d fusionpbx -c "drop schema public cascade;";
sudo -u postgres psql -d fusionpbx -c "create schema public;"; sudo -u postgres psql -d fusionpbx -c "create schema public;";
# pgpassword security and conflict avoidance
unset PGPASSWORD

54
debian/resources/postgresql/iptables.sh vendored Executable file
View File

@@ -0,0 +1,54 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ../config.sh
#set the date
now=$(date +%Y-%m-%d)
#show this server's addresses
server_address=$(hostname -I);
echo "This Server Address: $server_address"
#nodes addresses
read -p "Enter all Node IP Addresses: " nodes
#determine whether to add iptable rules
read -p 'Add iptable rules (y/n): ' iptables_add
#settings summary
echo "-----------------------------";
echo " Summary";
echo "-----------------------------";
echo "All Node IP Addresses: $nodes";
echo "Add iptable rules: $iptables_add";
echo "";
#verify
read -p 'Is the information correct (y/n): ' verified
if [ .$verified != ."y" ]; then
echo "Goodbye";
exit 0;
fi
#iptables rules
if [ .$iptables_add = ."y" ]; then
for node in $nodes; do
/usr/sbin/iptables -A INPUT -j ACCEPT -p tcp --dport 5432 -s ${node}/32
/usr/sbin/iptables -A INPUT -j ACCEPT -p tcp --dport 22000 -s ${node}/32
done
apt-get remove iptables-persistent -y
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections
apt-get install -y iptables-persistent
fi
#set the working directory
cwd=$(pwd)
cd /tmp
#message to user
echo "Completed"

View File

@@ -9,11 +9,6 @@ cd "$(dirname "$0")"
#set the date #set the date
now=$(date +%Y-%m-%d) now=$(date +%Y-%m-%d)
#set the database password
if [ .$database_password = .'random' ]; then
database_password=$(dd if=/dev/urandom bs=1 count=20 2>/dev/null | base64 | sed 's/[=\+//]//g')
fi
#show this server's addresses #show this server's addresses
server_address=$(hostname -I); server_address=$(hostname -I);
echo "This Server Address: $server_address" echo "This Server Address: $server_address"
@@ -21,61 +16,36 @@ echo "This Server Address: $server_address"
#nodes addresses #nodes addresses
read -p "Enter all Node IP Addresses: " nodes read -p "Enter all Node IP Addresses: " nodes
#request the domain and email #determine whether to add iptable rules
read -p 'Create Group (true/false): ' group_create read -p 'Add iptable rules (y,n): ' iptables_add
if [ .$group_create = .true ]; then
read -p 'Enter this Nodes Address: ' node_1;
else
read -p 'Join using node already in group: ' node_1;
read -p 'Enter this Nodes Address: ' node_2;
fi
#determine which database to replicate
read -p 'Replicate the FusionPBX Database (true/false): ' system_replicate
#determine which database to replicate
read -p 'Replicate the FreeSWITCH Database (true/false): ' switch_replicate
#settings summary #settings summary
echo "-----------------------------"; echo "-----------------------------";
echo " Summary"; echo " Summary";
echo "-----------------------------"; echo "-----------------------------";
echo "Create Group: $group_create";
echo "All Node IP Addresses: $nodes"; echo "All Node IP Addresses: $nodes";
if [ .$group_create = .true ]; then echo "Add iptable rules: $iptables_add";
echo "This Nodes Address: $node_1";
else
echo "Join using node in group: $node_1";
echo "This Node Address: $node_2";
fi
echo "Replicate the FusionPBX Database: $system_replicate";
echo "Replicate the FreeSWITCH Database: $switch_replicate";
echo ""; echo "";
#verify #verify
read -p 'Is the information correct (y/n): ' verified read -p 'Is the information correct (y,n): ' verified
if [ .$verified != ."y" ]; then if [ .$verified != ."y" ]; then
echo "Goodbye"; echo "Goodbye";
exit 0; exit 0;
fi fi
#add the 2ndquadrant repo
if [ ."$database_version" = ."9.6" ]; then
echo 'deb http://packages.2ndquadrant.com/bdr/apt/ jessie-2ndquadrant main' > /etc/apt/sources.list.d/2ndquadrant.list
/usr/bin/wget --quiet -O - http://packages.2ndquadrant.com/bdr/apt/AA7A6805.asc | apt-key add -
apt-get update && apt-get upgrade -y
apt-get install -y --force-yes sudo postgresql-9.6-bdr-plugin
fi
#iptables rules #iptables rules
for node in $nodes; do if [ .$iptables_add = ."y" ]; then
iptables -A INPUT -j ACCEPT -p tcp --dport 5432 -s ${node}/32 for node in $nodes; do
iptables -A INPUT -j ACCEPT -p tcp --dport 22000 -s ${node}/32 /usr/sbin/iptables -A INPUT -j ACCEPT -p tcp --dport 5432 -s ${node}/32
done /usr/sbin/iptables -A INPUT -j ACCEPT -p tcp --dport 22000 -s ${node}/32
apt-get remove iptables-persistent -y --force-yes done
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections apt-get remove iptables-persistent -y
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections
apt-get install -y --force-yes iptables-persistent echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections
apt-get install -y iptables-persistent
systemctl restart fail2ban
fi
#setup ssl #setup ssl
sed -i /etc/postgresql/$database_version/main/postgresql.conf -e s:'snakeoil.key:snakeoil-postgres.key:' sed -i /etc/postgresql/$database_version/main/postgresql.conf -e s:'snakeoil.key:snakeoil-postgres.key:'
@@ -86,9 +56,8 @@ chmod 600 /etc/ssl/private/ssl-cert-snakeoil-postgres.key
#postgresql.conf - append settings #postgresql.conf - append settings
cp /etc/postgresql/$database_version/main/postgresql.conf /etc/postgresql/$database_version/main/postgresql.conf-$now cp /etc/postgresql/$database_version/main/postgresql.conf /etc/postgresql/$database_version/main/postgresql.conf-$now
#cat ../postgresql/postgresql.conf > /etc/postgresql/$database_version/main/postgresql.conf #cat ../postgresql/postgresql.conf > /etc/postgresql/$database_version/main/postgresql.conf
echo "listen_addresses = '*'" >> /etc/postgresql/$database_version/main/postgresql.conf
echo "#listen_addresses = '127.0.0.1,xxx.xxx.xxx.xxx'" >> /etc/postgresql/$database_version/main/postgresql.conf echo "#listen_addresses = '127.0.0.1,xxx.xxx.xxx.xxx'" >> /etc/postgresql/$database_version/main/postgresql.conf
echo "shared_preload_libraries = 'bdr'" >> /etc/postgresql/$database_version/main/postgresql.conf echo "listen_addresses = '*'" >> /etc/postgresql/$database_version/main/postgresql.conf
echo "wal_level = 'logical'" >> /etc/postgresql/$database_version/main/postgresql.conf echo "wal_level = 'logical'" >> /etc/postgresql/$database_version/main/postgresql.conf
echo "track_commit_timestamp = on" >> /etc/postgresql/$database_version/main/postgresql.conf echo "track_commit_timestamp = on" >> /etc/postgresql/$database_version/main/postgresql.conf
echo "max_connections = 100" >> /etc/postgresql/$database_version/main/postgresql.conf echo "max_connections = 100" >> /etc/postgresql/$database_version/main/postgresql.conf
@@ -113,52 +82,18 @@ done
#reload configuration #reload configuration
systemctl daemon-reload systemctl daemon-reload
#reload the config
sudo -u postgres psql -p $database_port -c "SELECT pg_reload_conf();"
#restart postgres #restart postgres
service postgresql restart systemctl restart postgresql
#set the working directory #set the working directory
cwd=$(pwd) cwd=$(pwd)
cd /tmp cd /tmp
#add the postgres extensions
sudo -u postgres psql -d fusionpbx -c "CREATE EXTENSION btree_gist;";
sudo -u postgres psql -d fusionpbx -c "CREATE EXTENSION bdr;";
sudo -u postgres psql -d freeswitch -c "CREATE EXTENSION btree_gist;";
sudo -u postgres psql -d freeswitch -c "CREATE EXTENSION bdr;";
#add master nodes
if [ .$group_create = .true ]; then
#add first node
if [ .$system_replicate = .true ]; then
sudo -u postgres psql -d fusionpbx -c "SELECT bdr.bdr_group_create(local_node_name := '$node_1', node_external_dsn := 'host=$node_1 port=5432 dbname=fusionpbx connect_timeout=10 keepalives_idle=5 keepalives_interval=1 sslmode=require');";
fi
if [ .$switch_replicate = .true ]; then
sudo -u postgres psql -d freeswitch -c "SELECT bdr.bdr_group_create(local_node_name := '$node_1', node_external_dsn := 'host=$node_1 port=5432 dbname=freeswitch connect_timeout=10 keepalives_idle=5 keepalives_interval=1 sslmode=require');";
fi
else
#add additional master nodes
if [ .$system_replicate = .true ]; then
sudo -u postgres psql -d fusionpbx -c "SELECT bdr.bdr_group_join(local_node_name := '$node_2', node_external_dsn := 'host=$node_2 port=5432 dbname=fusionpbx connect_timeout=10 keepalives_idle=5 keepalives_interval=1', join_using_dsn := 'host=$node_1 port=5432 dbname=fusionpbx connect_timeout=10 keepalives_idle=5 keepalives_interval=1 sslmode=require');";
fi
if [ .$switch_replicate = .true ]; then
sudo -u postgres psql -d freeswitch -c "SELECT bdr.bdr_group_join(local_node_name := '$node_2', node_external_dsn := 'host=$node_2 port=5432 dbname=freeswitch connect_timeout=10 keepalives_idle=5 keepalives_interval=1', join_using_dsn := 'host=$node_1 port=5432 dbname=freeswitch connect_timeout=10 keepalives_idle=5 keepalives_interval=1 sslmode=require');";
fi
fi
#load the freeswitch database
#sudo -u postgres psql -d freeswitch -f /var/www/fusionpbx/resources/install/sql/switch.sql -L /tmp/switch-sql.log
#sleeping
if [ .$group_create = .false ]; then
echo "Sleeping for 15 seconds";
for i in `seq 1 15`; do
echo $i
sleep 1
done
fi
#add extension pgcrypto #add extension pgcrypto
if [ .$group_create = .false ]; then if [ .$group_create = ."n" ]; then
sudo -u postgres psql -d freeswitch -c "CREATE EXTENSION pgcrypto;"; sudo -u postgres psql -d freeswitch -c "CREATE EXTENSION pgcrypto;";
fi fi

62
debian/resources/postgresql/pg_hba.sh vendored Executable file
View File

@@ -0,0 +1,62 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ../config.sh
#set the date
now=$(date +%Y-%m-%d)
#show this server's addresses
server_address=$(hostname -I);
echo "This Server Address: $server_address"
#nodes addresses
read -p "Enter all Node IP Addresses: " nodes
#determine whether to add iptable rules
read -p 'Add ip address to pg_hba (y/n): ' pg_hba_add
#settings summary
echo "-----------------------------";
echo " Summary";
echo "-----------------------------";
echo "All Node IP Addresses: $nodes";
echo "Add ip addresses to pg_hba: $pg_hba_add";
echo "";
#verify
read -p 'Is the information correct (y/n): ' verified
if [ .$verified != ."y" ]; then
echo "Goodbye";
exit 0;
fi
#pg_hba.conf - append settings
cp /etc/postgresql/$database_version/main/pg_hba.conf /etc/postgresql/$database_version/main/pg_hba.conf-$now
cat ../postgresql/pg_hba.conf > /etc/postgresql/$database_version/main/pg_hba.conf
#chmod 640 /etc/postgresql/$database_version/main/pg_hba.conf
#chown -R postgres:postgres /etc/postgresql/$database_version/main
echo "host all all 127.0.0.1/32 trust" >> /etc/postgresql/$database_version/main/pg_hba.conf
echo "hostssl all all 127.0.0.1/32 trust" >> /etc/postgresql/$database_version/main/pg_hba.conf
echo "hostssl replication postgres 127.0.0.1/32 trust" >> /etc/postgresql/$database_version/main/pg_hba.conf
for node in $nodes; do
echo "host all all ${node}/32 trust" >> /etc/postgresql/$database_version/main/pg_hba.conf
echo "hostssl all all ${node}/32 trust" >> /etc/postgresql/$database_version/main/pg_hba.conf
echo "hostssl replication postgres ${node}/32 trust" >> /etc/postgresql/$database_version/main/pg_hba.conf
done
#reload configuration
systemctl daemon-reload
#restart postgres
service postgresql restart
#set the working directory
cwd=$(pwd)
cd /tmp
#message to user
echo "Completed"

View File

@@ -21,11 +21,22 @@ ARR=()
IFS="," IFS=","
INPUT=$FILE INPUT=$FILE
#Loop through the registrations and reboot #loop through the registrations and reboot
[ ! -f $INPUT ] &while read reg_user realm extra [ ! -f $INPUT ] &while read reg_user realm extra
do do
if [ ."$realm" = ."$domain" ]; then #option reboot all phones
if [ ."$domain" = ."all" ]; then
echo "$reg_user@$realm $vendor"
eval 'fs_cli -x "luarun app.lua event_notify internal reboot $reg_user@$realm $vendor"' eval 'fs_cli -x "luarun app.lua event_notify internal reboot $reg_user@$realm $vendor"'
if [ "$pausetime" > 0 ]; then
sleep $pausetime
fi
fi
#option reboot phones on a specific domain
if [ ."$realm" = ."$domain" ]; then
echo "$reg_user@$realm $vendor"
eval 'fs_cli -x "luarun app.lua event_notify internal reboot $reg_user@$realm $vendor"'
echo ""
if [ "$pausetime" > 0 ]; then if [ "$pausetime" > 0 ]; then
sleep $pausetime sleep $pausetime
fi fi

View File

@@ -8,14 +8,14 @@ cd "$(dirname "$0")"
. ./colors.sh . ./colors.sh
#count the users #count the users
admin_users=$(sudo -u postgres psql fusionpbx -Atc "select count(*) from v_users JOIN v_group_users USING (domain_uuid) where username='$system_username' and group_name = 'superadmin'") admin_users=$(sudo -u postgres psql fusionpbx -Atc "select count(*) from v_users JOIN v_user_groups USING (domain_uuid) where username='$system_username' and group_name = 'superadmin'")
if [ .$admin_users = .'0' ]; then if [ .$admin_users = .'0' ]; then
error "i could not find the user '$system_username' in the database, check your resources/config.sh is correct" error "i could not find the user '$system_username' in the database, check your resources/config.sh is correct"
elif [ .$admin_users = .'' ]; then elif [ .$admin_users = .'' ]; then
error "something went wrong, see errors above"; error "something went wrong, see errors above";
else else
admin_uuids=$(sudo -u postgres psql fusionpbx -Atc "select v_users.user_uuid from v_users JOIN v_group_users USING (domain_uuid) where username='$system_username' and group_name = 'superadmin'") admin_uuids=$(sudo -u postgres psql fusionpbx -Atc "select v_users.user_uuid from v_users JOIN v_user_groups USING (domain_uuid) where username='$system_username' and group_name = 'superadmin'")
for admin_uuid in $admin_uuids; do for admin_uuid in $admin_uuids; do
user_salt=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php); user_salt=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php);
if [ .$system_password = .'random' ]; then if [ .$system_password = .'random' ]; then

View File

@@ -11,15 +11,17 @@ cd "$(dirname "$0")"
#add sngrep #add sngrep
if [ ."$cpu_architecture" = ."arm" ]; then if [ ."$cpu_architecture" = ."arm" ]; then
#source install #source install
apt-get install -y --force-yes git autoconf automake gcc make libncurses5-dev libpcap-dev libssl-dev libpcre3-dev apt-get install -y git autoconf automake gcc make libncurses5-dev libpcap-dev libssl-dev libpcre3-dev
cd /usr/src && git clone https://github.com/irontec/sngrep cd /usr/src && git clone https://github.com/irontec/sngrep
cd /usr/src/sngrep && ./bootstrap.sh cd /usr/src/sngrep && ./bootstrap.sh
cd /usr/src/sngrep && ./configure cd /usr/src/sngrep && ./configure
cd /usr/src/sngrep && make install cd /usr/src/sngrep && make install
else else
#package install #package install
echo 'deb http://packages.irontec.com/debian jessie main' > /etc/apt/sources.list.d/sngrep.list if [ ."$os_codename" = ."jessie" ]; then
wget http://packages.irontec.com/public.key -q -O - | apt-key add - echo "deb http://packages.irontec.com/debian $os_codename main" > /etc/apt/sources.list.d/sngrep.list
apt-get update wget http://packages.irontec.com/public.key -q -O - | apt-key add -
apt-get install -y --force-yes sngrep apt-get update
fi
apt-get install -y sngrep
fi fi

View File

@@ -5,22 +5,30 @@ cd "$(dirname "$0")"
#includes #includes
. ./config.sh . ./config.sh
. ./environment.sh
if [ .$switch_source = .true ]; then if [ .$switch_source = .true ]; then
if [ ."$switch_branch" = "master" ]; then if [ ."$switch_branch" = "master" ]; then
echo "MASTER"
switch/source-master.sh switch/source-master.sh
else else
echo "RELEASE"
switch/source-release.sh switch/source-release.sh
fi fi
#add sounds and music files
switch/source-sounds.sh
#copy the switch conf files to /etc/freeswitch #copy the switch conf files to /etc/freeswitch
switch/conf-copy.sh switch/conf-copy.sh
#set the file permissions #set the file permissions
switch/source-permissions.sh #switch/source-permissions.sh
switch/package-permissions.sh
#systemd service #systemd service
switch/source-systemd.sh #switch/source-systemd.sh
switch/package-systemd.sh
fi fi
if [ .$switch_package = .true ]; then if [ .$switch_package = .true ]; then

View File

@@ -1,3 +1,3 @@
mv /etc/freeswitch /etc/freeswitch.orig mv /etc/freeswitch /etc/freeswitch.orig
mkdir /etc/freeswitch mkdir /etc/freeswitch
cp -R /var/www/fusionpbx/resources/templates/conf/* /etc/freeswitch cp -R /var/www/fusionpbx/app/switch/resources/conf/* /etc/freeswitch

63
debian/resources/switch/dsn.sh vendored Executable file
View File

@@ -0,0 +1,63 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ../config.sh
#set the date
now=$(date +%Y-%m-%d)
#get the database password
if [ .$database_password = .'random' ]; then
read -p "Enter the database password: " database_password
fi
#set PGPASSWORD
#export PGPASSWORD=$database_password
#enable auto create schemas
sed -i /etc/freeswitch/autoload_configs/switch.conf.xml -e s:'<!-- <param name="auto-create-schemas" value="true"/> -->:<param name="auto-create-schemas" value="true"/>:'
sed -i /etc/freeswitch/autoload_configs/switch.conf.xml -e s:'<param name="auto-create-schemas" value="false"/>:<param name="auto-create-schemas" value="true"/>:'
#enable odbc-dsn in the xml
sed -i /etc/freeswitch/autoload_configs/db.conf.xml -e s:'<!--<param name="odbc-dsn" value="$${dsn}"/>-->:<param name="odbc-dsn" value="$${dsn}"/>:'
sed -i /etc/freeswitch/autoload_configs/fifo.conf.xml -e s:'<!--<param name="odbc-dsn" value="$${dsn}"/>-->:<param name="odbc-dsn" value="$${dsn}"/>:'
sed -i /etc/freeswitch/autoload_configs/switch.conf.xml -e s:'<!-- <param name="core-db-dsn" value="$${dsn}" /> -->:<param name="core-db-dsn" value="$${dsn}" />:'
#update the switch database directory
sed -i /etc/fusionpbx/config.conf -e s:'/var/lib/freeswitch/db:/dev/shm:'
#enable odbc-dsn in the sip profiles
sudo -u postgres psql fusionpbx -c "update v_sip_profile_settings set sip_profile_setting_enabled = 'true' where sip_profile_setting_name = 'odbc-dsn';";
#update the switch db directory in default settings
sudo -u postgres psql fusionpbx -c "update v_default_settings set default_setting_value = '/dev/shm' where default_setting_category = 'switch' and default_setting_subcategory = 'db';";
#add the dsn variables
sudo -u postgres psql fusionpbx -c "insert into v_vars (var_uuid, var_name, var_value, var_category, var_enabled, var_order, var_description, var_hostname) values ('785d7013-1152-4a44-aa15-28336d9b36f9', 'dsn_system', 'pgsql://hostaddr=$database_host port=$database_port dbname=fusionpbx user=fusionpbx password=$database_password options=', 'DSN', 'true', '0', null, null);";
sudo -u postgres psql fusionpbx -c "insert into v_vars (var_uuid, var_name, var_value, var_category, var_enabled, var_order, var_description, var_hostname) values ('0170e737-b453-40ea-99f2-f1375474e5ce', 'dsn', 'sqlite:///dev/shm/core.db', 'DSN', 'true', '0', null, null);";
sudo -u postgres psql fusionpbx -c "insert into v_vars (var_uuid, var_name, var_value, var_category, var_enabled, var_order, var_description, var_hostname) values ('32e3e364-a8ef-4fe0-9d02-c652d5122bbf', 'dsn_callcenter', 'sqlite:///dev/shm/callcenter.db', 'DSN', 'true', '0', null, null);";
#update the vars.xml file
echo "<!-- DSN -->" >> /etc/freeswitch/vars.xml
echo "<X-PRE-PROCESS cmd=\"set\" data=\"dsn_system=pgsql://hostaddr=$database_host port=$database_port dbname=fusionpbx user=fusionpbx password=$database_password options=\" />" >> /etc/freeswitch/vars.xml
echo "<X-PRE-PROCESS cmd=\"set\" data=\"dsn=sqlite:///dev/shm/core.db\" />" >> /etc/freeswitch/vars.xml
echo "<X-PRE-PROCESS cmd=\"set\" data=\"dsn_callcenter=sqlite:///dev/shm/callcenter.db\" />" >> /etc/freeswitch/vars.xml
#remove the sqlite database files
dbs="/var/lib/freeswitch/db/core.db /var/lib/freeswitch/db/fifo.db /var/lib/freeswitch/db/call_limit.db /var/lib/freeswitch/db/sofia_reg_*"
for db in ${dbs};
do
if [ -f $db ]; then
echo "Deleting $db";
rm $db
fi
done
#flush the cache
rm -R /var/cache/fusionpbx/*
#restart freeswitch
/usr/sbin/service freeswitch restart

View File

@@ -7,18 +7,21 @@ cd "$(dirname "$0")"
. ../config.sh . ../config.sh
. ../colors.sh . ../colors.sh
. ../environment.sh . ../environment.sh
. ../arguments.sh
apt-get update && apt-get install -y --force-yes ntp curl memcached haveged apt-get update && apt-get install -y ntp curl memcached haveged apt-transport-https
apt-get update && apt-get install -y wget lsb-release gnupg2
if [ ."$cpu_architecture" = ."arm" ]; then if [ ."$cpu_architecture" = ."x86" ]; then
echo "deb http://repo.sip247.com/debian/freeswitch-stable-armhf/ jessie main" > /etc/apt/sources.list.d/freeswitch.list wget -O - https://files.freeswitch.org/repo/deb/debian-release/fsstretch-archive-keyring.asc | apt-key add -
curl http://repo.sip247.com/debian/sip247.com.gpg.key | apt-key add - echo "deb http://files.freeswitch.org/repo/deb/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list
else echo "deb-src http://files.freeswitch.org/repo/deb/debian-release/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
curl http://files.freeswitch.org/repo/deb/freeswitch-1.6/key.gpg | apt-key add -
fi fi
apt-get update && apt-get install -y --force-yes freeswitch-meta-all freeswitch-all-dbg gdb if [ ."$cpu_architecture" = ."arm" ]; then
wget -O - https://files.freeswitch.org/repo/deb/rpi/debian-release/freeswitch_archive_g0.pub | apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/rpi/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src http://files.freeswitch.org/repo/deb/rpi/debian-release/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list
fi
apt-get update && apt-get install -y freeswitch-meta-all freeswitch-all-dbg gdb
#make sure that postgresql is started before starting freeswitch #make sure that postgresql is started before starting freeswitch
sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:' sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:'

View File

@@ -1,9 +1,9 @@
#!/bin/sh #!/bin/sh
apt-get update && apt-get install -y --force-yes ntp curl memcached haveged apt-get update && apt-get install -y ntp curl memcached haveged
curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add - curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" >> /etc/apt/sources.list.d/freeswitch.list echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" >> /etc/apt/sources.list.d/freeswitch.list
apt-get update && apt-get install -y --force-yes freeswitch-meta-all freeswitch-all-dbg gdb apt-get update && apt-get install -y freeswitch-meta-all freeswitch-all-dbg gdb
#make sure that postgresql is started before starting freeswitch #make sure that postgresql is started before starting freeswitch
sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:' sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:'

View File

@@ -1,20 +1,23 @@
#!/bin/sh #!/bin/sh
apt-get update && apt-get install -y --force-yes curl memcached haveged apt-get update && apt-get install -y curl memcached haveged
curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add - curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" >> /etc/apt/sources.list.d/freeswitch.list echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" >> /etc/apt/sources.list.d/freeswitch.list
apt-get update apt-get update
apt-get install -y --force-yes ntp gdb apt-get install -y gnupg gnupg2
apt-get install -y --force-yes freeswitch-meta-bare freeswitch-conf-vanilla freeswitch-mod-commands freeswitch-meta-codecs freeswitch-mod-console freeswitch-mod-logfile freeswitch-mod-distributor apt-get install -y wget lsb-release
apt-get install -y --force-yes freeswitch-lang-en freeswitch-mod-say-en freeswitch-sounds-en-us-callie apt-get install -y ntp gdb
apt-get install -y --force-yes freeswitch-mod-enum freeswitch-mod-cdr-csv freeswitch-mod-event-socket freeswitch-mod-sofia freeswitch-mod-sofia-dbg freeswitch-mod-loopback apt-get install -y freeswitch-meta-bare freeswitch-conf-vanilla freeswitch-mod-commands freeswitch-meta-codecs freeswitch-mod-console freeswitch-mod-logfile freeswitch-mod-distributor
apt-get install -y --force-yes freeswitch-mod-conference freeswitch-mod-db freeswitch-mod-dptools freeswitch-mod-expr freeswitch-mod-fifo libyuv-dev freeswitch-mod-httapi apt-get install -y freeswitch-lang-en freeswitch-mod-say-en freeswitch-sounds-en-us-callie
apt-get install -y --force-yes freeswitch-mod-hash freeswitch-mod-esl freeswitch-mod-esf freeswitch-mod-fsv freeswitch-mod-valet-parking freeswitch-mod-dialplan-xml freeswitch-dbg apt-get install -y freeswitch-mod-enum freeswitch-mod-cdr-csv freeswitch-mod-event-socket freeswitch-mod-sofia freeswitch-mod-sofia-dbg freeswitch-mod-loopback
apt-get install -y --force-yes freeswitch-mod-sndfile freeswitch-mod-native-file freeswitch-mod-local-stream freeswitch-mod-tone-stream freeswitch-mod-lua freeswitch-meta-mod-say apt-get install -y freeswitch-mod-conference freeswitch-mod-db freeswitch-mod-dptools freeswitch-mod-expr freeswitch-mod-fifo libyuv-dev freeswitch-mod-httapi
apt-get install -y --force-yes freeswitch-mod-xml-cdr freeswitch-mod-verto freeswitch-mod-callcenter freeswitch-mod-rtc freeswitch-mod-png freeswitch-mod-json-cdr freeswitch-mod-shout apt-get install -y freeswitch-mod-hash freeswitch-mod-esl freeswitch-mod-esf freeswitch-mod-fsv freeswitch-mod-valet-parking freeswitch-mod-dialplan-xml freeswitch-dbg
apt-get install -y --force-yes freeswitch-mod-skypopen freeswitch-mod-skypopen-dbg freeswitch-mod-sms freeswitch-mod-sms-dbg freeswitch-mod-cidlookup freeswitch-mod-memcache apt-get install -y freeswitch-mod-sndfile freeswitch-mod-native-file freeswitch-mod-local-stream freeswitch-mod-tone-stream freeswitch-mod-lua freeswitch-meta-mod-say
apt-get install -y --force-yes freeswitch-mod-imagick freeswitch-mod-tts-commandline freeswitch-mod-directory freeswitch-mod-flite apt-get install -y freeswitch-mod-xml-cdr freeswitch-mod-verto freeswitch-mod-callcenter freeswitch-mod-rtc freeswitch-mod-png freeswitch-mod-json-cdr freeswitch-mod-shout
apt-get install -y --force-yes freeswitch-music-default apt-get install -y freeswitch-mod-sms freeswitch-mod-sms-dbg freeswitch-mod-cidlookup freeswitch-mod-memcache
apt-get install -y freeswitch-mod-imagick freeswitch-mod-tts-commandline freeswitch-mod-directory freeswitch-mod-flite
apt-get install -y freeswitch-mod-pgsql
apt-get install -y freeswitch-music-default
#make sure that postgresql is started before starting freeswitch #make sure that postgresql is started before starting freeswitch
sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:' sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:'
@@ -22,7 +25,7 @@ sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.tar
#remove the music package to protect music on hold from package updates #remove the music package to protect music on hold from package updates
mkdir -p /usr/share/freeswitch/sounds/temp mkdir -p /usr/share/freeswitch/sounds/temp
mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/temp mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/temp
apt-get remove -y --force-yes freeswitch-music-default apt-get remove -y freeswitch-music-default
mkdir -p /usr/share/freeswitch/sounds/music/default mkdir -p /usr/share/freeswitch/sounds/music/default
mv /usr/share/freeswitch/sounds/temp/* /usr/share/freeswitch/sounds/music/default mv /usr/share/freeswitch/sounds/temp/* /usr/share/freeswitch/sounds/music/default
rm -R /usr/share/freeswitch/sounds/temp rm -R /usr/share/freeswitch/sounds/temp

View File

@@ -1,6 +1,13 @@
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ../config.sh
#default permissions #default permissions
chown -R www-data:www-data /etc/freeswitch chown -R www-data:www-data /etc/freeswitch
chown -R www-data:www-data /var/lib/freeswitch chown -R www-data:www-data /var/lib/freeswitch
chown -R www-data:www-data /usr/share/freeswitch chown -R www-data:www-data /usr/share/freeswitch
chown -R www-data:www-data /var/log/freeswitch chown -R www-data:www-data /var/log/freeswitch
chown -R www-data:www-data /var/run/freeswitch chown -R www-data:www-data /var/run/freeswitch
chown -R www-data:www-data /var/cache/fusionpbx

View File

@@ -8,27 +8,40 @@ cd "$(dirname "$0")"
. ../colors.sh . ../colors.sh
. ../environment.sh . ../environment.sh
apt-get update && apt-get install -y --force-yes curl memcached haveged apt-get update && apt-get install -y curl memcached haveged apt-transport-https
if [ ."$cpu_architecture" = ."arm" ]; then apt-get update && apt-get install -y gnupg gnupg2
echo "deb https://repo.fusionpbx.com/armhf jessie main" > /etc/apt/sources.list.d/freeswitch.list apt-get update && apt-get install -y wget lsb-release sox
curl https://repo.fusionpbx.com/public.key | apt-key add -
else if [ ."$cpu_architecture" = ."x86" ]; then
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list wget --http-user=signalwire --http-password=$switch_token -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg
curl http://files.freeswitch.org/repo/deb/freeswitch-1.6/key.gpg | apt-key add - echo "machine freeswitch.signalwire.com login signalwire password $switch_token" > /etc/apt/auth.conf
echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list
fi fi
if [ ."$cpu_architecture" = ."arm" ]; then
wget --http-user=signalwire --http-password=$switch_token -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://freeswitch.signalwire.com/repo/deb/rpi/debian-release/freeswitch_archive_g0.pub
echo "machine freeswitch.signalwire.com login signalwire password $switch_token" > /etc/apt/auth.conf
echo "deb [signed-by=/etc/apt/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/rpi/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src [signed-by=/etc/apt/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/rpi/debian-release/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list
fi
apt-get update apt-get update
apt-get install -y --force-yes gdb ntp apt-get install -y gdb ntp
apt-get install -y --force-yes freeswitch-meta-bare freeswitch-conf-vanilla freeswitch-mod-commands freeswitch-mod-console freeswitch-mod-logfile apt-get install -y freeswitch-meta-bare freeswitch-conf-vanilla freeswitch-mod-commands freeswitch-mod-console freeswitch-mod-logfile
apt-get install -y --force-yes freeswitch-lang-en freeswitch-mod-say-en freeswitch-sounds-en-us-callie apt-get install -y freeswitch-lang-en freeswitch-mod-say-en freeswitch-sounds-en-us-callie
apt-get install -y --force-yes freeswitch-mod-enum freeswitch-mod-cdr-csv freeswitch-mod-event-socket freeswitch-mod-sofia freeswitch-mod-sofia-dbg freeswitch-mod-loopback apt-get install -y freeswitch-sounds-es-ar-mario freeswitch-mod-say-es freeswitch-mod-say-es-ar
apt-get install -y --force-yes freeswitch-mod-conference freeswitch-mod-db freeswitch-mod-dptools freeswitch-mod-expr freeswitch-mod-fifo freeswitch-mod-httapi apt-get install -y freeswitch-sounds-fr-ca-june freeswitch-mod-say-fr
apt-get install -y --force-yes freeswitch-mod-hash freeswitch-mod-esl freeswitch-mod-esf freeswitch-mod-fsv freeswitch-mod-valet-parking freeswitch-mod-dialplan-xml freeswitch-dbg apt-get install -y freeswitch-mod-enum freeswitch-mod-cdr-csv freeswitch-mod-event-socket freeswitch-mod-sofia freeswitch-mod-sofia-dbg freeswitch-mod-loopback
apt-get install -y --force-yes freeswitch-mod-sndfile freeswitch-mod-native-file freeswitch-mod-local-stream freeswitch-mod-tone-stream freeswitch-mod-lua freeswitch-meta-mod-say apt-get install -y freeswitch-mod-conference freeswitch-mod-db freeswitch-mod-dptools freeswitch-mod-expr freeswitch-mod-fifo freeswitch-mod-httapi
apt-get install -y --force-yes freeswitch-mod-xml-cdr freeswitch-mod-verto freeswitch-mod-callcenter freeswitch-mod-rtc freeswitch-mod-png freeswitch-mod-json-cdr freeswitch-mod-shout apt-get install -y freeswitch-mod-hash freeswitch-mod-esl freeswitch-mod-esf freeswitch-mod-fsv freeswitch-mod-valet-parking freeswitch-mod-dialplan-xml freeswitch-dbg
apt-get install -y --force-yes freeswitch-mod-sms freeswitch-mod-sms-dbg freeswitch-mod-cidlookup freeswitch-mod-memcache apt-get install -y freeswitch-mod-sndfile freeswitch-mod-native-file freeswitch-mod-local-stream freeswitch-mod-tone-stream freeswitch-mod-lua freeswitch-meta-mod-say
apt-get install -y --force-yes freeswitch-mod-imagick freeswitch-mod-tts-commandline freeswitch-mod-directory apt-get install -y freeswitch-mod-xml-cdr freeswitch-mod-verto freeswitch-mod-callcenter freeswitch-mod-rtc freeswitch-mod-png freeswitch-mod-json-cdr freeswitch-mod-shout
apt-get install -y --force-yes freeswitch-mod-skypopen freeswitch-mod-skypopen-dbg freeswitch-mod-flite libyuv-dev freeswitch-mod-distributor freeswitch-meta-codecs apt-get install -y freeswitch-mod-sms freeswitch-mod-sms-dbg freeswitch-mod-cidlookup freeswitch-mod-memcache
apt-get install -y --force-yes freeswitch-music-default apt-get install -y freeswitch-mod-imagick freeswitch-mod-tts-commandline freeswitch-mod-directory
apt-get install -y freeswitch-mod-av freeswitch-mod-flite freeswitch-mod-distributor freeswitch-meta-codecs
apt-get install -y freeswitch-mod-pgsql
apt-get install -y freeswitch-music-default
apt-get install -y libyuv-dev
#make sure that postgresql is started before starting freeswitch #make sure that postgresql is started before starting freeswitch
sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:' sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.target postgresql.service:'
@@ -36,7 +49,8 @@ sed -i /lib/systemd/system/freeswitch.service -e s:'local-fs.target:local-fs.tar
#remove the music package to protect music on hold from package updates #remove the music package to protect music on hold from package updates
mkdir -p /usr/share/freeswitch/sounds/temp mkdir -p /usr/share/freeswitch/sounds/temp
mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/temp mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/temp
apt-get remove -y --force-yes freeswitch-music-default mv /usr/share/freeswitch/sounds/music/default/*000 /usr/share/freeswitch/sounds/temp
apt-get remove -y freeswitch-music-default
mkdir -p /usr/share/freeswitch/sounds/music/default mkdir -p /usr/share/freeswitch/sounds/music/default
mv /usr/share/freeswitch/sounds/temp/* /usr/share/freeswitch/sounds/music/default mv /usr/share/freeswitch/sounds/temp/* /usr/share/freeswitch/sounds/music/default
rm -R /usr/share/freeswitch/sounds/temp rm -R /usr/share/freeswitch/sounds/temp

View File

@@ -1,4 +1,4 @@
apt-get remove -y --force-yes freeswitch-systemd apt-get remove -y freeswitch-systemd
cp "$(dirname $0)/source/freeswitch.service.package" /lib/systemd/system/freeswitch.service cp "$(dirname $0)/source/freeswitch.service.package" /lib/systemd/system/freeswitch.service
cp "$(dirname $0)/source/etc.default.freeswitch.package" /etc/default/freeswitch cp "$(dirname $0)/source/etc.default.freeswitch.package" /etc/default/freeswitch
chmod 644 /lib/systemd/system/freeswitch.service chmod 644 /lib/systemd/system/freeswitch.service

25
debian/resources/switch/repo.sh vendored Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ../config.sh
. ../colors.sh
. ../environment.sh
apt-get update && apt-get install -y curl memcached haveged apt-transport-https
apt-get update && apt-get install -y gnupg gnupg2
apt-get update && apt-get install -y wget lsb-release
if [ ."$cpu_architecture" = ."x86" ]; then
wget --http-user=signalwire --http-password=$switch_token -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg
echo "machine freeswitch.signalwire.com login signalwire password $switch_token" > /etc/apt/auth.conf
echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list
fi
if [ ."$cpu_architecture" = ."arm" ]; then
wget --http-user=signalwire --http-password=$switch_token -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://files.freeswitch.org/repo/deb/rpi/debian-release/freeswitch_archive_g0.pub
echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] http://files.freeswitch.org/repo/deb/rpi/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] http://files.freeswitch.org/repo/deb/rpi/debian-release/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list
fi

View File

@@ -1,14 +1,14 @@
#!/bin/sh #!/bin/sh
echo "Installing the FreeSWITCH source" echo "Installing the FreeSWITCH source"
DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y --force-yes ntpdate libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' python uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev python-dev libsnmp-dev libyaml-dev libmp4v2-dev DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y ntpdate libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' python uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev python-dev libsnmp-dev libyaml-dev libmp4v2-dev
apt-get install -y --force-yes unzip libpq-dev memcached libshout3-dev libvpx-dev libmpg123-dev libmp3lame-dev apt-get install -y unzip libpq-dev libvlc-dev memcached libshout3-dev libvpx-dev libmpg123-dev libmp3lame-dev
apt-get update && apt-get install -y --force-yes ntp curl haveged apt-get update && apt-get install -y ntp curl haveged
curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add - curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" > /etc/apt/sources.list.d/freeswitch.list echo "deb http://files.freeswitch.org/repo/deb/debian-unstable/ jessie main" > /etc/apt/sources.list.d/freeswitch.list
apt-get update && apt-get upgrade apt-get update && apt-get upgrade -y
apt-get install -y --force-yes freeswitch-video-deps-most apt-get install -y freeswitch-video-deps-most
git clone https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch git clone https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
cd /usr/src/freeswitch cd /usr/src/freeswitch
@@ -19,12 +19,13 @@ sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_cidlookup:applic
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_memcache:applications/mod_memcache:' sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_memcache:applications/mod_memcache:'
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_curl:applications/mod_curl:' sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_curl:applications/mod_curl:'
sed -i /usr/src/freeswitch/modules.conf -e s:'#formats/mod_shout:formats/mod_shout:' sed -i /usr/src/freeswitch/modules.conf -e s:'#formats/mod_shout:formats/mod_shout:'
sed -i /usr/src/freeswitch/modules.conf -e s:'#formats/mod_pgsql:formats/mod_pgsql:'
./bootstrap.sh -j ./bootstrap.sh -j
#./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --enable-system-lua --disable-fhs #./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --enable-system-lua --disable-fhs
./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --disable-fhs ./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --disable-fhs
#make mod_shout-install #make mod_shout-install
make make -j $(getconf _NPROCESSORS_ONLN)
rm -rf /usr/local/freeswitch/{lib,mod,bin}/* rm -rf /usr/local/freeswitch/{lib,mod,bin}/*
make install make install
make sounds-install moh-install make sounds-install moh-install

View File

@@ -1,5 +1,24 @@
#old
#setup owner and group, permissions and sticky #setup owner and group, permissions and sticky
chmod -R ug+rw /usr/local/freeswitch #chmod -R ug+rw /usr/local/freeswitch
touch /usr/local/freeswitch/freeswitch.log #touch /usr/local/freeswitch/freeswitch.log
chown -R www-data:www-data /usr/local/freeswitch #chown -R www-data:www-data /usr/local/freeswitch
find /usr/local/freeswitch -type d -exec chmod 2770 {} \; #find /usr/local/freeswitch -type d -exec chmod 2770 {} \;
#current (same paths as package)
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ../config.sh
#default permissions
chown -R www-data:www-data /etc/freeswitch
chown -R www-data:www-data /var/lib/freeswitch
chown -R www-data:www-data /usr/share/freeswitch
chown -R www-data:www-data /var/log/freeswitch
chown -R www-data:www-data /var/run/freeswitch
chown -R www-data:www-data /var/cache/fusionpbx

View File

@@ -1,51 +1,193 @@
#!/bin/sh #!/bin/sh
echo "Installing the FreeSWITCH source" #move to script directory so all relative paths work
DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y --force-yes ntpdate libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' python uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev python-dev libsnmp-dev libyaml-dev libmp4v2-dev cd "$(dirname "$0")"
apt-get install -y --force-yes ntp unzip libpq-dev memcached libshout3-dev libvpx-dev libmpg123-dev libmp3lame-dev
apt-get update && apt-get install -y --force-yes curl haveged #includes
curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add - . ../config.sh
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d/freeswitch.list . ../environment.sh
apt-get update && apt-get upgrade
apt-get install -y --force-yes freeswitch-video-deps-most #upgrade packages
apt update && apt upgrade -y
# install dependencies
apt install -y autoconf automake devscripts g++ git-core libncurses5-dev libtool libtool-bin make libjpeg-dev
apt install -y pkg-config flac libgdbm-dev libdb-dev gettext sudo equivs git dpkg-dev libpq-dev
apt install -y liblua5.2-dev libtiff5-dev libperl-dev libcurl4-openssl-dev libsqlite3-dev libpcre3-dev
apt install -y devscripts libspeexdsp-dev libspeex-dev libldns-dev libedit-dev libopus-dev libmemcached-dev
apt install -y libshout3-dev libmpg123-dev libmp3lame-dev yasm nasm libsndfile1-dev libuv1-dev libvpx-dev
apt install -y libavformat-dev libswscale-dev libvlc-dev sox libsox-fmt-all
#install dependencies that depend on the operating system version
if [ ."$os_codename" = ."noble" ]; then
apt install -y python3-distutils mlocate libvpx9 swig3.0
fi
if [ ."$os_codename" = ."stretch" ]; then
apt install -y python3-distutils mlocate libvpx4 swig3.0
fi
if [ ."$os_codename" = ."buster" ]; then
apt install -y python3-distutils mlocate libvpx5 swig3.0
fi
if [ ."$os_codename" = ."bullseye" ]; then
apt install -y python3-distutils mlocate libvpx6 swig4.0
fi
if [ ."$os_codename" = ."trixie" ]; then
apt install -y python3-distutils-extra plocate
fi
#use master branch for Debian 13 for now
if [ ."$os_codename" = ."trixie" ]; then
switch_branch=master
switch_version=1.10.13
fi
# additional dependencies
apt install -y sqlite3 unzip
#we are about to move out of the executing directory so we need to preserve it to return after we are done #we are about to move out of the executing directory so we need to preserve it to return after we are done
CWD=$(pwd) CWD=$(pwd)
SWITCH_VERSION=1.6.19
echo "Using version $SWITCH_VERSION" #install the following dependencies if the switch version is greater than 1.10.0
if [ ."$switch_branch" = ."master" ] || [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
# libks build-requirements
apt install -y cmake uuid-dev
# libks
cd /usr/src
git clone https://github.com/signalwire/libks.git libks
cd libks
cmake .
make -j $(getconf _NPROCESSORS_ONLN)
make install
# libks C includes
export C_INCLUDE_PATH=/usr/include/libks
# sofia-sip
cd /usr/src
if [ ."$sofia_version" = ."master" ]; then
git clone https://github.com/freeswitch/sofia-sip.git sofia-sip
cd sofia-sip
else
wget https://github.com/freeswitch/sofia-sip/archive/refs/tags/v$sofia_version.zip
unzip v$sofia_version.zip
cd sofia-sip-$sofia_version
fi
sh autogen.sh
./configure --enable-debug
make -j $(getconf _NPROCESSORS_ONLN)
make install
# spandsp
cd /usr/src
git clone https://github.com/freeswitch/spandsp.git spandsp
cd spandsp
if [ ."$sofia_version" != ."master" ] && [ ."$switch_branch" != ."master" ]; then
git reset --hard 0d2e6ac65e0e8f53d652665a743015a88bf048d4
fi
#/usr/bin/sed -i 's/AC_PREREQ(\[2\.71\])/AC_PREREQ([2.69])/g' /usr/src/spandsp/configure.ac
sh autogen.sh
./configure --enable-debug
make -j $(getconf _NPROCESSORS_ONLN)
make install
ldconfig
fi
cd /usr/src cd /usr/src
#git clone -b v1.6 https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$SWITCH_VERSION.zip
unzip freeswitch-$SWITCH_VERSION.zip
rm -R freeswitch
mv freeswitch-$SWITCH_VERSION freeswitch
cd freeswitch
#./bootstrap.sh -j #check for master
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_avmd:applications/mod_avmd:' if [ ."$switch_branch" = ."master" ]; then
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_callcenter:applications/mod_callcenter:' #master branch
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_cidlookup:applications/mod_cidlookup:' echo "Using version master"
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_memcache:applications/mod_memcache:' rm -r /usr/src/freeswitch
sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_curl:applications/mod_curl:' git clone https://github.com/signalwire/freeswitch.git freeswitch-$switch_version
sed -i /usr/src/freeswitch/modules.conf -e s:'#formats/mod_shout:formats/mod_shout:' cd /usr/src/freeswitch-$switch_version
#./configure --help
#./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --enable-system-lua --disable-fhs git remote add fusionpbx https://github.com/fusionpbx/freeswitch.git
./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --disable-fhs git fetch fusionpbx
#make mod_shout-install git checkout 1.10.12
make
rm -rf /usr/local/freeswitch/{lib,mod,bin}/* git rebase fusionpbx/master
./bootstrap.sh -j
fi
#check for stable release
if [ ."$switch_branch" != ."master" ] && [ ."$switch_branch" = ."stable" ]; then
echo "Using version $switch_version"
#1.8 and older
if [ $(echo "$switch_version" | tr -d '.') -lt 1100 ]; then
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.zip
unzip freeswitch-$switch_version.zip
cd /usr/src/freeswitch-$switch_version
# Reset repo just-in-case we are rebuilding
#git reset --hard HEAD && git clean -fdx
fi
#1.10.0 and newer
if [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
# Get the source code using git
git clone https://github.com/fusionpbx/freeswitch freeswitch-$switch_version
# Change the working directory
cd /usr/src/freeswitch-$switch_version
# Get the stable branch
git checkout $switch_version
# Reset repo just-in-case we are rebuilding
#git reset --hard origin/master && git clean -fdx
#wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.-release.zip
#unzip freeswitch-$switch_version.-release.zip
#mv freeswitch-$switch_version.-release freeswitch-$switch_version
# bootstrap is needed if using git
./bootstrap.sh -j
#apply rtp timestamp patch - Fix RTP audio issues use the following for additional information. https://github.com/briteback/freeswitch/commit/9f8968ccabb8a4e0353016d4ea0ff99561b005f1
#patch -u /usr/src/freeswitch-$switch_version/src/switch_rtp.c -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/switch_rtp.diff
#apply pull request 2300 to Fix session deadlock that results in stale or stuck calls. https://github.com/signalwire/freeswitch/pull/2300
#patch -d /usr/src/freeswitch-$switch_version/src -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/pull_2300.diff
#apply mod_pgsql patch
#patch -u /usr/src/freeswitch-$switch_version/src/mod/databases/mod_pgsql/mod_pgsql.c -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/mod_pgsql.patch
fi
fi
# enable required modules
#sed -i /usr/src/freeswitch/modules.conf -e s:'#applications/mod_avmd:applications/mod_avmd:'
sed -i modules.conf -e s:'#applications/mod_av:formats/mod_av:'
sed -i modules.conf -e s:'#applications/mod_callcenter:applications/mod_callcenter:'
sed -i modules.conf -e s:'#applications/mod_cidlookup:applications/mod_cidlookup:'
sed -i modules.conf -e s:'#applications/mod_memcache:applications/mod_memcache:'
sed -i modules.conf -e s:'#applications/mod_nibblebill:applications/mod_nibblebill:'
sed -i modules.conf -e s:'#applications/mod_curl:applications/mod_curl:'
sed -i modules.conf -e s:'#applications/mod_translate:applications/mod_translate:'
sed -i modules.conf -e s:'#formats/mod_shout:formats/mod_shout:'
sed -i modules.conf -e s:'#formats/mod_pgsql:formats/mod_pgsql:'
sed -i modules.conf -e s:'#say/mod_say_es:say/mod_say_es:'
sed -i modules.conf -e s:'#say/mod_say_fr:say/mod_say_fr:'
#disable module or install dependency libks to compile signalwire
sed -i modules.conf -e s:'applications/mod_signalwire:#applications/mod_signalwire:'
sed -i modules.conf -e s:'endpoints/mod_skinny:#endpoints/mod_skinny:'
sed -i modules.conf -e s:'endpoints/mod_verto:#endpoints/mod_verto:'
# prepare the build
#./configure --prefix=/usr/local/freeswitch --enable-core-pgsql-support --disable-fhs
./configure -C --enable-portable-binary --disable-dependency-tracking --enable-debug \
--prefix=/usr --localstatedir=/var --sysconfdir=/etc \
--with-openssl --enable-core-pgsql-support
# compile and install
make -j $(getconf _NPROCESSORS_ONLN)
make install make install
make sounds-install moh-install
make hd-sounds-install hd-moh-install
make cd-sounds-install cd-moh-install
#move the music into music/default directory # create voicemail directory for installer
mkdir -p /usr/local/freeswitch/sounds/music/default mkdir -p /var/lib/freeswitch/storage/voicemail
mv /usr/local/freeswitch/sounds/music/*000 /usr/local/freeswitch/sounds/music/default
#return to the executing directory #return to the executing directory
cd $CWD cd $CWD
#symbolic link for fs_cli
ln -s /usr/local/freeswitch/bin/fs_cli /usr/bin/fs_cli

44
debian/resources/switch/source-sounds.sh vendored Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/sh
# Move to script directory so all relative paths work
cd "$(dirname "$0")"
# Includes
. ../config.sh
. ../environment.sh
# Change the working directory
cd /usr/share/freeswitch/sounds
# Make sure wget is installed
apt-get install -y wget
# Array of sample rates
sample_rates="48000 32000 16000 8000"
# Loop through each sample rate
for sample_rate in $sample_rates; do
# Download the file
/usr/bin/wget "https://files.freeswitch.org/releases/sounds/freeswitch-sounds-en-us-callie-${sample_rate}-1.0.53.tar.gz"
# Extract the file
/usr/bin/tar xvzf "freeswitch-sounds-en-us-callie-${sample_rate}-1.0.53.tar.gz"
done
# Change to directory to the music directory
cd /usr/share/freeswitch/sounds/music
# Loop through each sample rate
for sample_rate in $sample_rates; do
# Download the file
/usr/bin/wget "https://files.freeswitch.org/releases/sounds/freeswitch-sounds-music-${sample_rate}-1.0.52.tar.gz"
# Extract the file
/usr/bin/tar xvzf "freeswitch-sounds-music-${sample_rate}-1.0.52.tar.gz"
done
# Move the music to the default directory
/usr/bin/mv music default
# Remove the tar.gz files
/usr/bin/rm /usr/share/freeswitch/sounds/music/*.tar.gz

View File

@@ -12,3 +12,4 @@ fi
systemctl enable freeswitch systemctl enable freeswitch
systemctl unmask freeswitch.service systemctl unmask freeswitch.service
systemctl daemon-reload systemctl daemon-reload
systemctl start freeswitch

View File

@@ -1,4 +1,2 @@
# /etc/default/freeswitch # /etc/default/freeswitch
FS_USER="www-data" DAEMON_OPTS="-nonat"
FS_GROUP="www-data"
DAEMON_OPTS="-nonat -ncwait -u www-data -g www-data -run /var/run/freeswitch"

0
debian/resources/switch/source/etc.default.freeswitch.source vendored Normal file → Executable file
View File

View File

@@ -2,22 +2,27 @@
[Unit] [Unit]
Description=freeswitch Description=freeswitch
After=syslog.target network.target local-fs.target postgresql.service Wants=network-online.target
Requires=network.target local-fs.target
After=network.target network-online.target local-fs.target
[Service] [Service]
; service ; service
Type=forking Type=forking
PIDFile=/run/freeswitch/freeswitch.pid PIDFile=/run/freeswitch/freeswitch.pid
Environment="DAEMON_OPTS=-nonat" Environment="DAEMON_OPTS=-nonat"
Environment="USER=www-data"
Environment="GROUP=www-data"
EnvironmentFile=-/etc/default/freeswitch EnvironmentFile=-/etc/default/freeswitch
ExecStartPre=/bin/mkdir -p /var/run/freeswitch/ ExecStartPre=/bin/mkdir -p /var/run/freeswitch
ExecStartPre=/bin/chown -R www-data:www-data /var/run/freeswitch/ ExecStartPre=/bin/chown -R ${USER}:${GROUP} /var/lib/freeswitch /var/log/freeswitch /etc/freeswitch /usr/share/freeswitch /var/run/freeswitch
ExecStart=/usr/bin/freeswitch -u www-data -g www-data -ncwait $DAEMON_OPTS ExecStartPre=/bin/sleep 10
ExecStart=/usr/bin/freeswitch -u ${USER} -g ${GROUP} -ncwait ${DAEMON_OPTS}
TimeoutSec=45s TimeoutSec=45s
Restart=always Restart=always
; exec ; exec
User=root ;User=${USER}
Group=daemon ;Group=${GROUP}
LimitCORE=infinity LimitCORE=infinity
LimitNOFILE=100000 LimitNOFILE=100000
LimitNPROC=60000 LimitNPROC=60000
@@ -29,6 +34,7 @@ IOSchedulingPriority=2
CPUSchedulingPolicy=rr CPUSchedulingPolicy=rr
CPUSchedulingPriority=89 CPUSchedulingPriority=89
UMask=0007 UMask=0007
NoNewPrivileges=false
; alternatives which you can enforce by placing a unit drop-in into ; alternatives which you can enforce by placing a unit drop-in into
; /etc/systemd/system/freeswitch.service.d/*.conf: ; /etc/systemd/system/freeswitch.service.d/*.conf:

View File

@@ -0,0 +1,53 @@
--- mod_pgsql.c 2021-10-24 14:22:28.000000000 -0400
+++ mod_pgsql.c.new 2022-08-08 21:16:02.000000000 -0400
@@ -36,6 +36,7 @@
#include <switch.h>
#include <libpq-fe.h>
+#include <pg_config.h>
#ifndef _WIN32
#include <poll.h>
@@ -597,7 +598,7 @@
goto done;
} else {
switch (result->status) {
-#if POSTGRESQL_MAJOR_VERSION >= 9 && POSTGRESQL_MINOR_VERSION >= 2
+#if PG_VERSION_NUM >= 90002
case PGRES_SINGLE_TUPLE:
/* Added in PostgreSQL 9.2 */
#endif
@@ -756,24 +757,29 @@
*result_out = res;
res->status = PQresultStatus(res->result);
switch (res->status) {
-//#if (POSTGRESQL_MAJOR_VERSION == 9 && POSTGRESQL_MINOR_VERSION >= 2) || POSTGRESQL_MAJOR_VERSION > 9
+#if PG_VERSION_NUM >= 90002
case PGRES_SINGLE_TUPLE:
/* Added in PostgreSQL 9.2 */
-//#endif
+#endif
case PGRES_TUPLES_OK:
{
res->rows = PQntuples(res->result);
res->cols = PQnfields(res->result);
}
break;
-//#if (POSTGRESQL_MAJOR_VERSION == 9 && POSTGRESQL_MINOR_VERSION >= 1) || POSTGRESQL_MAJOR_VERSION > 9
+#if PG_VERSION_NUM >= 90001
case PGRES_COPY_BOTH:
/* Added in PostgreSQL 9.1 */
-//#endif
+#endif
case PGRES_COPY_OUT:
case PGRES_COPY_IN:
case PGRES_COMMAND_OK:
break;
+#if PG_VERSION_NUM >= 140001
+ case PGRES_PIPELINE_ABORTED:
+ case PGRES_PIPELINE_SYNC:
+ break;
+#endif
case PGRES_EMPTY_QUERY:
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Query (%s) returned PGRES_EMPTY_QUERY\n", handle->sql);
case PGRES_BAD_RESPONSE:

View File

@@ -0,0 +1,169 @@
diff --git a/src/switch_core_io.c b/src/switch_core_io.c
index 9931f0f3ef7..ee968b63dd9 100644
--- a/src/switch_core_io.c
+++ b/src/switch_core_io.c
@@ -146,13 +146,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
if (session->read_codec && !session->track_id && session->track_duration) {
if (session->read_frame_count == 0) {
switch_event_t *event;
- switch_core_session_message_t msg = { 0 };
+ switch_core_session_message_t *msg = switch_core_session_alloc(session, sizeof(*msg));
session->read_frame_count = (session->read_impl.samples_per_second / session->read_impl.samples_per_packet) * session->track_duration;
- msg.message_id = SWITCH_MESSAGE_HEARTBEAT_EVENT;
- msg.numeric_arg = session->track_duration;
- switch_core_session_receive_message(session, &msg);
+ msg->message_id = SWITCH_MESSAGE_HEARTBEAT_EVENT;
+ msg->numeric_arg = session->track_duration;
+ MESSAGE_STAMP_FFL(msg);
+ switch_core_session_queue_message(session, msg);
+
switch_event_create(&event, SWITCH_EVENT_SESSION_HEARTBEAT);
switch_channel_event_set_data(session->channel, event);
@@ -410,10 +412,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
switch_set_flag(session, SSF_READ_TRANSCODE);
if (!switch_test_flag(session, SSF_WARN_TRANSCODE)) {
- switch_core_session_message_t msg = { 0 };
-
- msg.message_id = SWITCH_MESSAGE_INDICATE_TRANSCODING_NECESSARY;
- switch_core_session_receive_message(session, &msg);
+ switch_core_session_message_t *msg = switch_core_session_alloc(session, sizeof(*msg));
+ msg->message_id = SWITCH_MESSAGE_INDICATE_TRANSCODING_NECESSARY;
+ MESSAGE_STAMP_FFL(msg);
+ switch_core_session_queue_message(session, msg);
switch_set_flag(session, SSF_WARN_TRANSCODE);
}
@@ -562,10 +564,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
status = SWITCH_STATUS_FALSE;
goto done;
} else {
- switch_core_session_message_t msg = { 0 };
- msg.numeric_arg = 1;
- msg.message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
- switch_core_session_receive_message(session, &msg);
+ switch_core_session_message_t *msg = switch_core_session_alloc(session, sizeof(*msg));
+ msg->message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
+ msg->numeric_arg = 1;
+ MESSAGE_STAMP_FFL(msg);
+ switch_core_session_queue_message(session, msg);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Activating read resampler\n");
}
@@ -597,10 +600,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_frame(switch_core_sessi
switch_mutex_unlock(session->resample_mutex);
{
- switch_core_session_message_t msg = { 0 };
- msg.numeric_arg = 0;
- msg.message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
- switch_core_session_receive_message(session, &msg);
+ switch_core_session_message_t *msg = switch_core_session_alloc(session, sizeof(*msg));
+ msg->message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
+ msg->numeric_arg = 0;
+ MESSAGE_STAMP_FFL(msg);
+ switch_core_session_queue_message(session, msg);
+
}
}
diff --git a/src/switch_core_media.c b/src/switch_core_media.c
index 4b6d8aff8b6..e09242ee0d5 100644
--- a/src/switch_core_media.c
+++ b/src/switch_core_media.c
@@ -15945,12 +15945,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
}
if (!switch_test_flag(session, SSF_WARN_TRANSCODE)) {
- switch_core_session_message_t msg = { 0 };
-
- msg.message_id = SWITCH_MESSAGE_INDICATE_TRANSCODING_NECESSARY;
- switch_core_session_receive_message(session, &msg);
+ switch_core_session_message_t *msg = switch_core_session_alloc(session, sizeof(*msg));
+ msg->message_id = SWITCH_MESSAGE_INDICATE_TRANSCODING_NECESSARY;
+ MESSAGE_STAMP_FFL(msg);
+ switch_core_session_queue_message(session, msg);
switch_set_flag(session, SSF_WARN_TRANSCODE);
- }
+ }
if (frame->codec) {
session->raw_write_frame.datalen = session->raw_write_frame.buflen;
@@ -15993,10 +15993,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
if (status != SWITCH_STATUS_SUCCESS) {
goto done;
} else {
- switch_core_session_message_t msg = { 0 };
- msg.numeric_arg = 1;
- msg.message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
- switch_core_session_receive_message(session, &msg);
+ switch_core_session_message_t *msg = switch_core_session_alloc(session, sizeof(*msg));
+ msg->message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
+ msg->numeric_arg = 1;
+ MESSAGE_STAMP_FFL(msg);
+ switch_core_session_queue_message(session, msg);
+
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Activating write resampler\n");
}
@@ -16029,10 +16031,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
switch_mutex_unlock(session->resample_mutex);
{
- switch_core_session_message_t msg = { 0 };
- msg.numeric_arg = 0;
- msg.message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
- switch_core_session_receive_message(session, &msg);
+ switch_core_session_message_t *msg = switch_core_session_alloc(session, sizeof(*msg));
+ msg->message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
+ msg->numeric_arg = 0;
+ MESSAGE_STAMP_FFL(msg);
+ switch_core_session_queue_message(session, msg);
}
}
@@ -16329,11 +16332,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
if (status != SWITCH_STATUS_SUCCESS) {
goto done;
} else {
- switch_core_session_message_t msg = { 0 };
- msg.numeric_arg = 1;
- msg.message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
- switch_core_session_receive_message(session, &msg);
-
+ switch_core_session_message_t *msg = switch_core_session_alloc(session, sizeof(*msg));
+ msg->message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
+ msg->numeric_arg = 1;
+ MESSAGE_STAMP_FFL(msg);
+ switch_core_session_queue_message(session, msg);
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Activating write resampler\n");
}
@@ -16351,7 +16354,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
break;
case SWITCH_STATUS_NOOP:
if (session->write_resampler) {
- switch_core_session_message_t msg = { 0 };
+
int ok = 0;
switch_mutex_lock(session->resample_mutex);
@@ -16363,9 +16366,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_write_frame(switch_core_sess
switch_mutex_unlock(session->resample_mutex);
if (ok) {
- msg.numeric_arg = 0;
- msg.message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
- switch_core_session_receive_message(session, &msg);
+ switch_core_session_message_t *msg = switch_core_session_alloc(session, sizeof(*msg));
+ msg->message_id = SWITCH_MESSAGE_RESAMPLE_EVENT;
+ msg->numeric_arg = 0;
+ MESSAGE_STAMP_FFL(msg);
+ switch_core_session_queue_message(session, msg);
+
}
}

View File

@@ -0,0 +1,12 @@
diff --git a/src/switch_rtp.c b/src/switch_rtp.c
index 1125e2f59bc..7ff161383aa 100644
--- a/src/switch_rtp.c
+++ b/src/switch_rtp.c
@@ -8904,6 +8904,7 @@ SWITCH_DECLARE(int) switch_rtp_write_frame(switch_rtp_t *rtp_session, switch_fra
data = frame->data;
len = frame->datalen;
ts = rtp_session->flags[SWITCH_RTP_FLAG_RAW_WRITE] ? (uint32_t) frame->timestamp : 0;
+ if (!ts) ts = rtp_session->last_write_ts + rtp_session->samples_per_interval;
}
/*

127
debian/resources/upgrade/php.sh vendored Executable file
View File

@@ -0,0 +1,127 @@
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
#includes
. ../config.sh
#remove php5
/usr/bin/apt remove -y php5 php5-cli php5-fpm php5-pgsql php5-sqlite php5-odbc php5-curl php5-imap php5-gd
#remove php 7.0
/usr/bin/apt remove -y php7.0 php7.0-cli php7.0-fpm php7.0-pgsql php7.0-sqlite3 php7.0-odbc php7.0-curl php7.0-imap php7.0-xml php7.0-gd
#remove php 7.1
/usr/bin/apt remove -y php7.1 php7.1-cli php7.1-fpm php7.1-pgsql php7.1-sqlite3 php7.1-odbc php7.1-curl php7.1-imap php7.1-xml php7.1-gd
#remove php 7.2
/usr/bin/apt remove -y php7.2 php7.2-cli php7.2-fpm php7.2-pgsql php7.2-sqlite3 php7.2-odbc php7.2-curl php7.2-imap php7.2-xml php7.2-gd
#remove php 7.3
/usr/bin/apt remove -y php7.3 php7.3-cli php7.3-fpm php7.3-pgsql php7.3-sqlite3 php7.3-odbc php7.3-curl php7.3-imap php7.3-xml php7.3-gd
#remove php 7.4
/usr/bin/apt remove -y php7.4 php7.4-cli php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-imap php7.4-xml php7.4-gd
#remove php 8.1
/usr/bin/apt remove -y php8.1 php8.1-cli php8.1-dev php8.1-fpm php8.1-pgsql php8.1-sqlite3 php8.1-odbc php8.1-curl php8.1-imap php8.1-xml php8.1-gd php8.1-mbstring php8.1-ldap
#remove php 8.2
/usr/bin/apt remove -y php8.2 php8.2-cli php8.2-dev php8.2-fpm php8.2-pgsql php8.2-sqlite3 php8.2-odbc php8.2-curl php8.2-imap php8.2-xml php8.2-gd php8.2-mbstring php8.2-ldap
#remove php 8.3
/usr/bin/apt remove -y php8.3 php8.3-cli php8.3-dev php8.3-fpm php8.3-pgsql php8.3-sqlite3 php8.3-odbc php8.3-curl php8.3-imap php8.3-xml php8.3-gd php8.3-mbstring php8.3-ldap
#remove php 8.4
/usr/bin/apt remove -y php8.4 php8.4-cli php8.4-dev php8.4-fpm php8.4-pgsql php8.4-sqlite3 php8.4-odbc php8.4-curl php8.4-imap php8.4-xml php8.4-gd php8.4-mbstring php8.4-ldap
#install php update and set the unix socket
if [ ."$php_version" = ."8.4" ]; then
#add a repo for php 8.x
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
/usr/bin/apt-get update
#install php 8.4
apt-get install -y php8.4 php8.4-cli php8.4-dev php8.4-fpm php8.4-pgsql php8.4-sqlite3 php8.4-odbc php8.4-curl php8.4-imap php8.4-xml php8.4-gd php8.4-mbstring php8.4-ldap
#update the unix socket name
/usr/bin/sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.2-fpm.sock;#g'
#set the PHP ini file path
php_ini_file='/etc/php/8.4/fpm/php.ini'
fi
if [ ."$php_version" = ."8.3" ]; then
#add a repo for php 8.x
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
/usr/bin/apt-get update
#install php 8.2
apt-get install -y php8.3 php8.3-cli php8.3-dev php8.3-fpm php8.3-pgsql php8.3-sqlite3 php8.3-odbc php8.3-curl php8.3-imap php8.3-xml php8.3-gd php8.3-mbstring php8.3-ldap
#update the unix socket name
/usr/bin/sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.2-fpm.sock;#g'
#set the PHP ini file path
php_ini_file='/etc/php/8.3/fpm/php.ini'
fi
if [ ."$php_version" = ."8.2" ]; then
#add a repo for php 8.x
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
/usr/bin/apt-get update
#install php 8.2
apt-get install -y php8.2 php8.2-cli php8.2-dev php8.2-fpm php8.2-pgsql php8.2-sqlite3 php8.2-odbc php8.2-curl php8.2-imap php8.2-xml php8.2-gd php8.2-mbstring php8.2-ldap
#update the unix socket name
/usr/bin/sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.2-fpm.sock;#g'
#set the PHP ini file path
php_ini_file='/etc/php/8.2/fpm/php.ini'
fi
if [ ."$php_version" = ."8.1" ]; then
#add a repo for php 7.x
/usr/bin/apt -y install apt-transport-https lsb-release ca-certificates curl wget gnupg2
/usr/bin/wget -qO- https://packages.sury.org/php/apt.gpg | gpg --dearmor > /etc/apt/keyrings/sury-php-8.x.gpg
/usr/bin/sh -c 'echo "deb [signed-by=/etc/apt/keyrings/php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
/usr/bin/apt-get update
#install php 8.1
/usr/bin/apt-get install -y php8.1 php8.1-cli php8.1-dev php8.1-fpm php8.1-pgsql php8.1-sqlite3 php8.1-odbc php8.1-curl php8.1-imap php8.1-xml php8.1-gd php8.1-mbstring php8.1-ldap
#update the unix socket name
/usr/bin/sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.1-fpm.sock;#g'
#set the PHP ini file path
php_ini_file='/etc/php/8.1/fpm/php.ini'
fi
if [ ."$php_version" = ."7.4" ]; then
#remove the sury PHP repo
/usr/bin/rm -f -- /etc/apt/sources.list.d/php.list
/usr/bin/apt update
#install php 7.4
/usr/bin/apt-get install -y php7.4 php7.4-cli php7.4-dev php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-imap php7.4-xml php7.4-gd php7.4-mbstring php7.4-ldap
#update the unix socket name
/usr/bin/sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.4-fpm.sock;#g'
#set the PHP ini file path
php_ini_file='/etc/php/7.4/fpm/php.ini'
fi
#update config if source is being used
/usr/bin/sed 's#post_max_size = .*#post_max_size = 80M#g' -i $php_ini_file
/usr/bin/sed 's#upload_max_filesize = .*#upload_max_filesize = 80M#g' -i $php_ini_file
/usr/bin/sed 's#;max_input_vars = .*#max_input_vars = 8000#g' -i $php_ini_file
/usr/bin/sed 's#; max_input_vars = .*#max_input_vars = 8000#g' -i $php_ini_file
#restart nginx
/usr/sbin/service nginx restart

View File

@@ -15,19 +15,35 @@ verbose "Update installed packages"
apt-get -q update && apt-get -q --assume-yes upgrade apt-get -q update && apt-get -q --assume-yes upgrade
#Add dependencies #Add dependencies
apt-get install -q -y lsb-release sudo apt-get install -y wget
apt-get install -y lsb-release
apt-get install -y ca-certificates
apt-get install -y dialog
apt-get install -y nano
apt-get install -y net-tools
#SNMP
apt-get install -y snmpd
echo "rocommunity public" > /etc/snmp/snmpd.conf
service snmpd restart
#IPTables #IPTables
resources/iptables.sh resources/iptables.sh
#Optional CLI SIP monitoring tool
resources/sngrep.sh
#FusionPBX #FusionPBX
resources/fusionpbx.sh resources/fusionpbx.sh
#PHP
resources/php.sh
#NGINX web server #NGINX web server
resources/nginx.sh resources/nginx.sh
#PHP #Postgres
resources/php.sh resources/postgresql.sh
#FreeSWITCH #FreeSWITCH
resources/switch.sh resources/switch.sh
@@ -35,22 +51,8 @@ resources/switch.sh
#Fail2ban #Fail2ban
resources/fail2ban.sh resources/fail2ban.sh
#Optional CLI SIP monitoring tool #set the ip address
resources/sngrep.sh server_address=$(hostname -I)
#Postgres
resources/postgresql.sh
#restart services
if [ ."$php_version" = ."5" ]; then
service php5-fpm restart
fi
if [ ."$php_version" = ."7" ]; then
service php7.0-fpm restart
fi
service nginx restart
service fail2ban restart
#add the database schema, user and groups #add the database schema, user and groups
resources/finish.sh resources/finish.sh

View File

@@ -7,7 +7,7 @@ apt-get -q update && apt-get upgrade -y
apt-get install -y git apt-get install -y git
#get the install script #get the install script
cd /usr/src && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git cd /usr/src && git clone https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh.git
#change the working directory #change the working directory
cd /usr/src/fusionpbx-install.sh/devuan cd /usr/src/fusionpbx-install.sh/devuan

View File

@@ -19,9 +19,9 @@ find /var/backups/fusionpbx/*.tgz -mtime +2 -exec rm {} \;
pg_dump --verbose -Fc --host=$db_host --port=$db_port -U fusionpbx fusionpbx --schema=public -f /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql pg_dump --verbose -Fc --host=$db_host --port=$db_port -U fusionpbx fusionpbx --schema=public -f /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql
#package #package
tar -zvcf /var/backups/fusionpbx/backup_$now.tgz /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql /var/www/fusionpbx /usr/share/freeswitch/scripts /var/lib/freeswitch/storage /var/lib/freeswitch/recordings /etc/fusionpbx /etc/freeswitch #tar --exclude='/var/lib/freeswitch/recordings/*/archive' -zvcf /var/backups/fusionpbx/backup_$now.tgz /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql /var/www/fusionpbx /usr/share/freeswitch/scripts /var/lib/freeswitch/storage /var/lib/freeswitch/recordings /etc/fusionpbx /etc/freeswitch /usr/share/freeswitch/sounds/music/
#source #source
#tar -zvcf /var/backups/fusionpbx/backup_$now.tgz /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql /var/www/fusionpbx /usr/local/freeswitch/scripts /usr/local/freeswitch/storage /usr/local/freeswitch/recordings /etc/fusionpbx /usr/local/freeswitch/conf #tar -zvcf /var/backups/fusionpbx/backup_$now.tgz /var/backups/fusionpbx/postgresql/fusionpbx_pgsql_$now.sql /var/www/fusionpbx /usr/local/freeswitch/scripts /usr/local/freeswitch/storage /usr/local/freeswitch/recordings /etc/fusionpbx /usr/local/freeswitch/conf /usr/local/freeswitch/sounds/music/
echo "Backup Completed" echo "Backup Completed"

View File

@@ -0,0 +1,119 @@
#!/bin/sh
#settings
export PGPASSWORD="zzz"
db_host=127.0.0.1
db_port=5432
switch_package=true # true or false
purge_voicemail=false
purge_call_recordings=false
purge_cdrs=false
purge_fax=false
purge_switch_logs=true
purge_php_sessions=true
purge_database_transactions=true
days_keep_voicemail=90
days_keep_call_recordings=90
days_keep_cdrs=90
days_keep_fax=90
days_keep_switch_logs=7
days_keep_php_sessions=8
days_keep_database_transactions=30
#set the date
now=$(date +%Y-%m-%d)
#make sure the directory exists
if [ -e /var/backups/fusionpbx/postgresql ]; then
echo "postgres backup directory exists"
else
mkdir -p /var/backups/fusionpbx/postgresql
fi
#show message to the console
echo "Maintenance Started"
if [ .$purge_switch_logs = .true ]; then
#delete freeswitch logs older 7 days
if [ .$switch_package = .true ]; then
find /var/log/freeswitch/freeswitch.log.* -mtime +$days_keep_switch_logs -exec rm {} \;
else
find /usr/local/freeswitch/log/freeswitch.log.* -mtime +$days_keep_switch_logs -exec rm {} \;
fi
else
echo "not purging Freeswitch logs"
fi
if [ .$purge_fax = .true ]; then
#delete fax older than 90 days
if [ .$switch_package = .true ]; then
echo ".";
find /var/lib/freeswitch/storage/fax/* -name '*.tif' -mtime +$days_keep_fax -exec rm {} \;
find /var/lib/freeswitch/storage/fax/* -name '*.pdf' -mtime +$days_keep_fax -exec rm {} \;
else
echo ".";
find /usr/local/freeswitch/storage/fax/* -name '*.tif' -mtime +$days_keep_fax -exec rm {} \;
find /usr/local/freeswitch/storage/fax/* -name '*.pdf' -mtime +$days_keep_fax -exec rm {} \;
fi
#delete from the database
psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_fax_files WHERE fax_date < NOW() - INTERVAL '$days_keep_fax days'"
psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_fax_logs WHERE fax_date < NOW() - INTERVAL '$days_keep_fax days'"
else
echo "not purging Faxes"
fi
if [ .$purge_call_recordings = .true ]; then
#delete call recordings older than 90 days
if [ .$switch_package = .true ]; then
find /var/lib/freeswitch/recordings/*/archive/* -name '*.wav' -mtime +$days_keep_call_recordings -exec rm {} \;
find /var/lib/freeswitch/recordings/*/archive/* -name '*.mp3' -mtime +$days_keep_call_recordings -exec rm {} \;
else
find /usr/local/freeswitch/recordings/*/archive/* -name '*.wav' -mtime +$days_keep_call_recordings -exec rm {} \;
find /usr/local/freeswitch/recordings/*/archive/* -name '*.mp3' -mtime +$days_keep_call_recordings -exec rm {} \;
fi
psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_call_recordings WHERE call_recording_date < NOW() - INTERVAL '90 days'"
else
echo "not purging Recordings."
fi
if [ .$purge_voicemail = .true ]; then
#delete voicemail older than 90 days
if [ .$switch_package = .true ]; then
echo ".";
find /var/lib/freeswitch/storage/voicemail/default/* -name 'msg_*.wav' -mtime +$days_keep_voicemail -exec rm {} \;
find /var/lib/freeswitch/storage/voicemail/default/* -name 'msg_*.mp3' -mtime +$days_keep_voicemail -exec rm {} \;
else
echo ".";
find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.wav' -mtime +$days_keep_voicemail -exec rm {} \;
find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.mp3' -mtime +$days_keep_voicemail -exec rm {} \;
fi
psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_voicemail_messages WHERE to_timestamp(created_epoch) < NOW() - INTERVAL '$days_keep_voicemail days'"
else
echo "not purging voicemails."
fi
if [ .$purge_cdrs = .true ]; then
#delete call detail records older 90 days
psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_xml_cdr WHERE start_stamp < NOW() - INTERVAL '$days_keep_cdrs days'"
else
echo "not purging CDRs."
fi
#delete php sessions
if [ .$purge_php_sessions = .true ]; then
find /var/lib/php/sessions/* -name 'sess_*' -mtime +$days_keep_php_sessions -exec rm {} \;
else
echo "not purging PHP Sessions."
fi
#delete database_transactions older 90 days
if [ .$purge_database_transactions = .true ]; then
psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_database_transactions where transaction_date < NOW() - INTERVAL '$days_keep_database_transactions days'"
else
echo "not purging database_transactions."
fi
#completed message
echo "Maintenance Completed";

View File

@@ -1,53 +0,0 @@
#!/bin/sh
#settings
#export PGPASSWORD="zzzzz"
db_host=127.0.0.1
db_port=5432
switch_package=true # true or false
#set the date
now=$(date +%Y-%m-%d)
#make sure the directory exists
mkdir -p /var/backups/fusionpbx/postgresql
#show message to the console
echo "Maintenance Started"
#delete freeswitch logs older 7 days
if [ .$switch_package = .true ]; then
find /var/log/freeswitch/freeswitch.log.* -mtime +7 -exec rm {} \;
else
find /usr/local/freeswitch/log/freeswitch.log.* -mtime +7 -exec rm {} \;
fi
#delete fax older than 90 days
if [ .$switch_package = .true ]; then
echo ".";
#find /var/lib/freeswitch/storage/fax/* -name '*.tif' -mtime +90 -exec rm {} \;
#find /var/lib/freeswitch/storage/fax/* -name '*.pdf' -mtime +90 -exec rm {} \;
else
echo ".";
#find /usr/local/freeswitch/storage/fax/* -name '*.tif' -mtime +90 -exec rm {} \;
#find /usr/local/freeswitch/storage/fax/* -name '*.pdf' -mtime +90 -exec rm {} \;
fi
#delete from the database
#psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_fax_files WHERE fax_date < NOW() - INTERVAL '90 days'"
#delete voicemail older than 90 days
if [ .$switch_package = .true ]; then
echo ".";
#find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.wav' -mtime +90 -exec rm {} \;
#find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.mp3' -mtime +90 -exec rm {} \;
else
echo ".";
#find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.wav' -mtime +90 -exec rm {} \;
#find /usr/local/freeswitch/storage/voicemail/* -name 'msg_*.mp3' -mtime +90 -exec rm {} \;
fi
#psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_voicemail_messages WHERE to_timestamp(created_epoch) < NOW() - INTERVAL '90 days'"
#delete call detail records older 90 days
#psql --host=127.0.0.1 --username=fusionpbx -c "delete from v_xml_cdr WHERE start_stamp < NOW() - INTERVAL '90 days'"
#completed message
echo "Maintenance Completed";

View File

@@ -1,18 +1,26 @@
# FusionPBX Settings # FusionPBX Settings
system_username=admin # default username admin domain_name=ip_address # hostname, ip_address or a custom value
system_password=random # random or as a pre-set value system_username=admin # default username admin
system_branch=stable # master, stable system_password=random # random or a custom value
system_branch=master # master, stable
# FreeSWITCH Settings # FreeSWITCH Settings
switch_branch=stable # master, stable switch_branch=stable # master, stable
switch_source=false # true or false switch_source=false # true (source compile) or false (binary package)
switch_package=true # true or false switch_package=true # true (binary package) or false (source compile)
switch_version=1.10.7 # which source code to download, only for source
switch_tls=true # true or false
switch_token= # Get the auth token from https://signalwire.com
# Signup or Login -> Profile -> Personal Auth Token
# Database Settings # Database Settings
database_password=random # random or as a pre-set value database_password=random # random or a custom value (safe characters A-Z, a-z, 0-9)
database_repo=system # PostgresSQL official, system, 2ndquadrant database_repo=system # PostgreSQL official, system, 2ndquadrant
database_backup=false # true or false database_version=latest # requires repo official
database_host=127.0.0.1 # hostname or IP address
database_port=5432 # port number
database_backup=false # true or false
# General Settings # General Settings
php_version=7 # PHP version 5 or 7 php_version=7.4 # PHP version 7.3, 7.4
letsencrypt_folder=false # true or false

View File

@@ -10,8 +10,25 @@ cpu_name=$(uname -m)
cpu_architecture='unknown' cpu_architecture='unknown'
cpu_mode='unknown' cpu_mode='unknown'
#set the environment path
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
#debian release name
if [ .$os_codename = .'chimaera' ]; then
os_codename_debian='bullseye'
elif [ .$os_codename = .'beowulf' ]; then
os_codename_debian='buster'
else
warning "couldn't set a matching debian codename, are you using an old devuan release?"
fi
#check what the CPU and OS are #check what the CPU and OS are
if [ .$cpu_name = .'armv7l' ]; then if [ .$cpu_name = .'armv6l' ]; then
# RaspberryPi Zero
os_mode='32'
cpu_mode='32'
cpu_architecture='arm'
elif [ .$cpu_name = .'armv7l' ]; then
# RaspberryPi 3 is actually armv8l but current Raspbian reports the cpu as armv7l and no Raspbian 64Bit has been released at this time # RaspberryPi 3 is actually armv8l but current Raspbian reports the cpu as armv7l and no Raspbian 64Bit has been released at this time
os_mode='32' os_mode='32'
cpu_mode='32' cpu_mode='32'
@@ -21,6 +38,10 @@ elif [ .$cpu_name = .'armv8l' ]; then
os_mode='unknown' os_mode='unknown'
cpu_mode='64' cpu_mode='64'
cpu_architecture='arm' cpu_architecture='arm'
elif [ .$cpu_name = .'aarch64' ]; then
os_mode='64'
cpu_mode='64'
cpu_architecture='arm'
elif [ .$cpu_name = .'i386' ]; then elif [ .$cpu_name = .'i386' ]; then
os_mode='32' os_mode='32'
if [ .$(grep -o -w 'lm' /proc/cpuinfo | head -n 1) = .'lm' ]; then if [ .$(grep -o -w 'lm' /proc/cpuinfo | head -n 1) = .'lm' ]; then

View File

@@ -15,20 +15,23 @@ verbose "Installing Fail2ban"
apt-get -q -y install fail2ban apt-get -q -y install fail2ban
#move the filters #move the filters
cp fail2ban/freeswitch-dos.conf /etc/fail2ban/filter.d/freeswitch-dos.conf
cp fail2ban/freeswitch-ip.conf /etc/fail2ban/filter.d/freeswitch-ip.conf
cp fail2ban/freeswitch-404.conf /etc/fail2ban/filter.d/freeswitch-404.conf
cp fail2ban/freeswitch.conf /etc/fail2ban/filter.d/freeswitch.conf cp fail2ban/freeswitch.conf /etc/fail2ban/filter.d/freeswitch.conf
cp fail2ban/freeswitch-acl.conf /etc/fail2ban/filter.d/freeswitch-acl.conf
cp fail2ban/sip-auth-failure.conf /etc/fail2ban/filter.d/sip-auth-failure.conf
cp fail2ban/sip-auth-challenge.conf /etc/fail2ban/filter.d/sip-auth-challenge.conf
cp fail2ban/auth-challenge-ip.conf /etc/fail2ban/filter.d/auth-challenge-ip.conf
cp fail2ban/freeswitch-ip.conf /etc/fail2ban/filter.d/freeswitch-ip.conf
cp fail2ban/fusionpbx.conf /etc/fail2ban/filter.d/fusionpbx.conf cp fail2ban/fusionpbx.conf /etc/fail2ban/filter.d/fusionpbx.conf
cp fail2ban/fusionpbx-mac.conf /etc/fail2ban/filter.d/fusionpbx-mac.conf
cp fail2ban/fusionpbx-404.conf /etc/fail2ban/filter.d/fusionpbx-404.conf
cp fail2ban/nginx-404.conf /etc/fail2ban/filter.d/nginx-404.conf cp fail2ban/nginx-404.conf /etc/fail2ban/filter.d/nginx-404.conf
cp fail2ban/nginx-dos.conf /etc/fail2ban/filter.d/nginx-dos.conf cp fail2ban/nginx-dos.conf /etc/fail2ban/filter.d/nginx-dos.conf
cp fail2ban/jail.local /etc/fail2ban/jail.local cp fail2ban/jail.local /etc/fail2ban/jail.local
#update config if source is being used #update config if source is being used
if [ .$switch_source = .true ]; then #if [ .$switch_source = .true ]; then
sed 's#var/log/freeswitch#usr/local/freeswitch/log#g' -i /etc/fail2ban/jail.local # sed 's#var/log/freeswitch#usr/local/freeswitch/log#g' -i /etc/fail2ban/jail.local
fi #fi
#restart fail2ban
/usr/sbin/service fail2ban restart /usr/sbin/service fail2ban restart
# missing log file will show error

View File

@@ -0,0 +1,21 @@
# Fail2Ban configuration file
#
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
#[WARNING] sofia_reg.c:1792 SIP auth challenge (INVITE) on sofia profile 'internal' for [+972592277524@xxx.xxx.xxx.xxx] from ip 209.160.120.12
failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth challenge \((INVITE|REGISTER)\) on sofia profile \'.*\' for \[.*@\d+.\d+.\d+.\d+\] from ip <HOST>
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =

View File

@@ -0,0 +1,20 @@
# Fail2Ban configuration file
#
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
#2021-02-03 16:27:57.292697 [WARNING] sofia_reg.c:2353 IP 62.210.78.91 Rejected by register acl "domains"
failregex = \[WARNING\] sofia_reg.c:\d+ IP <HOST> Rejected by register acl
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =

View File

@@ -7,8 +7,8 @@
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+) # (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT # Values: TEXT
# #
failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(REGISTER\) on sofia profile \'\w+\' for \[.*\] from ip <HOST> failregex = \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(REGISTER\) on sofia profile \'.*\' for \[.*\] from ip <HOST>
\[WARNING\] sofia_reg.c:\d+ SIP auth failure \(INVITE\) on sofia profile \'\w+\' for \[.*\] from ip <HOST> \[WARNING\] sofia_reg.c:\d+ SIP auth failure \(INVITE\) on sofia profile \'.*\' for \[.*\] from ip <HOST>
# Option: ignoreregex # Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored. # Notes.: regex to ignore. If this regex matches, the line is ignored.

View File

@@ -0,0 +1,20 @@
# Fail2Ban configuration file
#
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
#Oct 9 02:56:16 m1 fusionpbx-provision[28628]: [10.0.0.1] invalid mac address 000000000000
failregex = \[<HOST>\] invalid mac address
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =

View File

@@ -1,80 +1,97 @@
[freeswitch-udp] [ssh]
enabled = true enabled = true
port = 5060,5061,5080,5081 port = 22
protocol = ssh
filter = sshd
logpath = /var/log/auth.log
action = iptables-allports[name=sshd, protocol=all]
maxretry = 6
findtime = 60
bantime = 86400
[freeswitch]
enabled = true
port = 5060:5091
protocol = all protocol = all
filter = freeswitch filter = freeswitch
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-udp, port="5060,5061,5080,5081", protocol=udp] #logpath = /usr/local/freeswitch/log/freeswitch.log
maxretry = 5 action = iptables-allports[name=freeswitch, protocol=all]
findtime = 600 maxretry = 10
bantime = 600 findtime = 60
bantime = 3600
# sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org] #no smtp server installed # sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org] #no smtp server installed
[freeswitch-tcp] [freeswitch-acl]
enabled = true enabled = true
port = 5060,5061,5080,5081 port = 5060:5091
protocol = all protocol = all
filter = freeswitch filter = freeswitch-acl
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-tcp, port="5060,5061,5080,5081", protocol=tcp] #logpath = /usr/local/freeswitch/log/freeswitch.log
maxretry = 5 action = iptables-allports[name=freeswitch-acl, protocol=all]
findtime = 600 maxretry = 900
bantime = 600 findtime = 60
# sendmail-whois[name=FreeSwitch, dest=root, sender=fail2ban@example.org] #no smtp server installed bantime = 86400
[freeswitch-ip-tcp] [freeswitch-ip]
enabled = false enabled = false
port = 5060,5061,5080,5081 port = 5060:5091
protocol = all protocol = all
filter = freeswitch-ip filter = freeswitch-ip
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-ip-tcp, port="5060,5061,5080,5081", protocol=tcp] #logpath = /usr/local/freeswitch/log/freeswitch.log
action = iptables-allports[name=freeswitch-ip, protocol=all]
maxretry = 1 maxretry = 1
findtime = 30 findtime = 60
bantime = 86400 bantime = 86400
[freeswitch-ip-udp] [auth-challenge-ip]
enabled = false enabled = false
port = 5060,5061,5080,5081 port = 5060:5091
protocol = all protocol = all
filter = freeswitch-ip filter = auth-challenge-ip
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-ip-udp, port="5060,5061,5080,5081", protocol=udp] #logpath = /usr/local/freeswitch/log/freeswitch.log
action = iptables-allports[name=auth-challenge-ip, protocol=all]
maxretry = 1 maxretry = 1
findtime = 30 findtime = 60
bantime = 86400 bantime = 86400
[freeswitch-dos-udp] [sip-auth-challenge]
enabled = true enabled = false
port = 5060,5061,5080,5081 port = 5060:5091
protocol = all protocol = all
filter = freeswitch-dos filter = sip-auth-challenge
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-dos-udp, port="5060,5061,5080,5081", protocol=udp] #logpath = /usr/local/freeswitch/log/freeswitch.log
maxretry = 50 action = iptables-allports[name=sip-auth-challenge, protocol=all]
findtime = 30 maxretry = 100
bantime = 6000 findtime = 60
bantime = 7200
[freeswitch-dos-tcp] [sip-auth-failure]
enabled = true enabled = true
port = 5060,5061,5080,5081 port = 5060:5091
protocol = all protocol = all
filter = freeswitch-dos filter = sip-auth-failure
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-multiport[name=freeswitch-dos-tcp, port="5060,5061,5080,5081", protocol=tcp] #logpath = /usr/local/freeswitch/log/freeswitch.log
maxretry = 50 action = iptables-allports[name=sip-auth-failure, protocol=all]
findtime = 30 maxretry = 6
bantime = 6000 findtime = 60
bantime = 7200
[freeswitch-404] [fusionpbx-404]
enabled = true enabled = false
port = 5060,5061,5080,5081 port = 5060:5091
protocol = all protocol = all
filter = freeswitch-404 filter = fusionpbx-404
logpath = /var/log/freeswitch/freeswitch.log logpath = /var/log/freeswitch/freeswitch.log
action = iptables-allports[name=freeswitch-404, protocol=all] #logpath = /usr/local/freeswitch/log/freeswitch.log
maxretry = 3 action = iptables-allports[name=fusionpbx-404, protocol=all]
findtime = 300 maxretry = 6
findtime = 60
bantime = 86400 bantime = 86400
[fusionpbx] [fusionpbx]
@@ -83,11 +100,23 @@ port = 80,443
protocol = tcp protocol = tcp
filter = fusionpbx filter = fusionpbx
logpath = /var/log/auth.log logpath = /var/log/auth.log
action = iptables-multiport[name=fusionpbx, port="http,https", protocol=tcp] action = iptables-allports[name=fusionpbx, protocol=all]
# sendmail-whois[name=fusionpbx, dest=root, sender=fail2ban@example.org] #no smtp server installed # sendmail-whois[name=fusionpbx, dest=root, sender=fail2ban@example.org] #no smtp server installed
maxretry = 20
findtime = 60
bantime = 3600
[fusionpbx-mac]
enabled = true
port = 80,443
protocol = tcp
filter = fusionpbx-mac
logpath = /var/log/syslog
action = iptables-allports[name=fusionpbx-mac, protocol=all]
# sendmail-whois[name=fusionpbx-mac, dest=root, sender=fail2ban@example.org] #no smtp server installed
maxretry = 10 maxretry = 10
findtime = 600 findtime = 60
bantime = 600 bantime = 86400
[nginx-404] [nginx-404]
enabled = true enabled = true
@@ -95,19 +124,20 @@ port = 80,443
protocol = tcp protocol = tcp
filter = nginx-404 filter = nginx-404
logpath = /var/log/nginx/access*.log logpath = /var/log/nginx/access*.log
bantime = 600 action = iptables-allports[name=nginx-404, protocol=all]
bantime = 3600
findtime = 60 findtime = 60
maxretry = 120 maxretry = 300
[nginx-dos] [nginx-dos]
# Based on apache-badbots but a simple IP check (any IP requesting more than # Based on apache-badbots but a simple IP check (any IP requesting more than
# 240 pages in 60 seconds, or 4p/s average, is suspicious) # 300 pages in 60 seconds, or 5p/s average, is suspicious)
# Block for two full days.
enabled = true enabled = true
port = 80,443 port = 80,443
protocol = tcp protocol = tcp
filter = nginx-dos filter = nginx-dos
logpath = /var/log/nginx/access*.log logpath = /var/log/nginx/access*.log
action = iptables-allports[name=nginx-dos, protocol=all]
findtime = 60 findtime = 60
bantime = 172800 bantime = 86400
maxretry = 240 maxretry = 800

Some files were not shown because too many files have changed in this diff Show More