diff --git a/README.md b/README.md index 99a6dc9..ba634c1 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,40 @@ # PhreakScript -A utility to automate the installation, maintenance, and debugging of Asterisk/DAHDI, while integrating additional patches to provide the richest telephony experience. + +**A utility to automate the installation, maintenance, and debugging of Asterisk/DAHDI, while integrating additional patches to provide the richest telephony experience.** PhreakScript installs: -- Asterisk 21.4.3 (latest standard release[1] of Asterisk) +- Asterisk 22.0.0 (latest LTS release[1] of Asterisk) - DAHDI Linux 3.4.0 (with optional DAHDI install flag) - DAHDI Tools 3.4.0 (with optional DAHDI install flag) - wanpipe 7.0.38 (with optional wanpipe install flag) -- many additional features and stability improvements - - Restores the "great purge" of DAHDI drivers that were removed in 2018 by Sangoma - - DAHDI/wanpipe/LibPRI compilation fixes - - Native coin detection and blue boxing support - - Class 4 and Class 5 coin trunk support - - Real time dial pulsing support - - "Hearpulsing" patches - - Automatic dialplan context to digit map generation - - Broadworks compatible device feature key synchronization (PJSIP) - - Broadworks compatible Shared Call Appearances (PJSIP) - - Presence publishing (PJSIP) +- Bug fixes and stability improvements + - Restores the "great purge" of DAHDI drivers that were removed in 2018 by Sangoma (either by default, or with `--drivers` flag) + - Numerous DAHDI/wanpipe/LibPRI compilation fixes + - Bug fixes for reading and writing configuration file templates + - Bug fix for ConfBridge shutdown race condition + - Enhances performance by completely removing Newexten AMI event +- Many additional features and improvements + - Adds prefix capabilities to `include => ` + - Signaling enhancements + - Native coin detection and blue boxing support + - Class 4 and Class 5 coin trunk support + - Analog enhancements + - Real time dial pulsing support + - "Hearpulsing" patches + - SMDR support for "WHOZZ Calling?" call accounting devices + - SIP enhancements + - Automatic dialplan context to digit map generation (`res_digitmap`) + - Broadworks compatible device feature key synchronization (PJSIP) (with `--experimental` flag) + - Broadworks compatible Shared Call Appearances (PJSIP) (with `--experimental` flag) + - Presence publishing (PJSIP) + - Restored and enhanced [`chan_sip`](https://github.com/InterLinked1/chan_sip) for master / versions 21+ (removed by Sangoma) (with `--sip` flag) + - Adds fax timing and parameter control to `chan_sip` + - Cisco Call Manager support for `chan_sip` (with `--cisco` flag) + - `chan_sccp` (improved community Skinny/SCCP channel driver), with compilation fixes (with `--sccp` flag) - Message Send Protocol send support - - SMDR support for "WHOZZ Calling?" call accounting devices - AGI `RECORD FILE` option to require noise before silence detection - - Optional build enhancements - - `chan_sccp` (improved community Skinny/SCCP channel driver), with compilation fixes - - Cisco Call Manager support for `chan_sip` - - Restored and enhanced [`chan_sip`](https://github.com/InterLinked1/chan_sip) for master / versions 21+ (removed by Sangoma) + - Build system support for ALSA-dependent modules - Adds the following applications: - ``Assert`` - ``ReturnIf`` @@ -51,8 +61,6 @@ PhreakScript installs: - ``RevertivePulse`` - ``SendFrame`` - ``WaitForFrame`` - - ``Signal`` - - ``WaitForSignal`` - ``WaitForDeposit`` - ``CoinDisposition`` - ``LocalCoinDisposition`` @@ -76,6 +84,7 @@ PhreakScript installs: - ``AlarmEventReceiver`` (not to be confused with ``AlarmReceiver``) - ``Softmodem`` (third-party, with compiler fixes and enhancements, including TDD modem) - ``TddRx``, ``TddTx`` (third-party) + - ``SendFSK``, ``ReceiveFSK`` (third-party) - Adds the following functions: - ``TECH_EXISTS`` - ``DTMF_FLASH`` @@ -97,11 +106,6 @@ PhreakScript installs: - ``MESSAGE_INTERCEPT_SUB`` - ``GROUP_VAR`` (third-party) - ``GROUP_MATCH_LIST_START`` (third-party) - - Miscellaneous improvements - - Enhances performance by completely removing Newexten AMI event - - Adds fax timing and parameter control to `chan_sip` - - Adds prefix capabilities to `include => ` - - Fixes ulaw/gsm codec translation bug PhreakScript is also useful for: - automating installation and maintenance of Asterisk, Asterisk Test Suite, Asterisk Test Framework, DAHDI Linux, DAHDI Tools, and related resources @@ -114,14 +118,15 @@ PhreakScript is also useful for: - generating core dumps - automating PhreakNet boilerplate dialplan installation -[1] Normally, PhreakScript installs the latest LTS version of Asterisk. However, version 21 will be installed by default until version 22 is released, - due to the significant change in functionality from version 20 which allows for a richer installation by default. - To install the latest LTS version (20), you can specify the version explicitly e.g. `--version=20.5.0`. - However, there should not be a need to do so unless you are using obsolete modules that were removed in Asterisk 21. +> [!NOTE] +> [1] Currently, PhreakScript installs the latest LTS version of Asterisk. However, + when a standard release is the most recent release, it may be installed by default. + To install a specific major version, you can specify it explicitly e.g. `--version=22`. -### Installation +> [!NOTE] +> PhreakScript is primarily an automation tool, but it also adds a significant amount of functionality to Asterisk beyond what is available upstream, making it a superset of "vanilla Asterisk". We aim to upstream our patches whenever practical; in fact, we are among the most active and frequent contributors to the Asterisk and DAHDI projects. This repository includes enhancements that are not available upstream as well as those that may be in the future but are not currently. A list of upstreamed Asterisk patches can be found at https://phreaknet.org/changes -Please refer to the Docs: https://docs.phreaknet.org/#phreakscript +### Installation In a nutshell, run: @@ -133,19 +138,29 @@ In a nutshell, run: ```pkg install -y wget && cd /usr/local/src && wget https://docs.phreaknet.org/script/phreaknet.sh && chmod +x phreaknet.sh && ./phreaknet.sh make``` +> [!WARNING] +> BSD is not recommended for Asterisk, see below. + Then, you can use PhreakScript. Run ```phreaknet help``` or ```phreaknet examples``` to get started. -For a basic install, you can run `phreaknet install` +For a basic install, you can run `phreaknet install`. This installs all the pre-requisites for Asterisk and then downloads and builds Asterisk, completely non-interactively. To install with DAHDI, run `phreaknet install --dahdi` (add `--drivers` to also restore drivers that were removed upstream in DAHDI 3). -For a guided, interactive installation, you can also run `phreaknet wizard`. The wizard will determine what installation options are best for you, based on your preferences. +For a guided, interactive installation, you can also run `phreaknet wizard`. The wizard will determine what installation options are best for you, based on your preferences. However, the wizard tool is not comprehensive for all available options. + +For further details, please refer to the Docs: https://docs.phreaknet.org/#phreakscript -PhreakScript must be run as root, even if Asterisk will not be installed to run as root. +> [!TIP] +> There are a plethora of flags available that modify the installation process in various ways. It is highly recommended that you run ```phreaknet help``` and spend some time reading through the available options to craft the installation command that is appropriate for your system. Flags are available for most commonly used installation scenarios. -PhreakScript is primarily supported on Debian-based Linux systems, and DAHDI and Asterisk are best supported on these platforms. -Limited support is available for other Linux distros (Fedora, RHEL, Rocky Linux, SUSE, Arch Linux, etc.). -Extremely limited support exists for FreeBSD, and BSDs (and UNIX in general) are not recommended for running Asterisk/DAHDI - use Linux instead if possible. +> [!IMPORTANT] +> PhreakScript must be run as root, even if Asterisk will not be installed to run as root. + +> [!CAUTION] +> PhreakScript is primarily supported on Debian-based Linux systems, and DAHDI and Asterisk are best supported on these platforms. +> Limited support is available for other Linux distros (Fedora, RHEL, Rocky Linux, SUSE, Arch Linux, etc.). +> Extremely limited support exists for FreeBSD, and BSDs (and UNIX in general) are not recommended for running Asterisk/DAHDI - use Linux instead if possible. ### License @@ -153,7 +168,8 @@ PhreakScript itself is licensed under the Apache 2.0 License. This includes any However, any Asterisk modules ("C" code) in this repository (such as those that may be installed by PhreakScript) are licensed under the GNU General Public License Version 2 (GPLv2), per the Asterisk licensing terms. -If you have copyright or licensing doubts, please refer to any copyrights and licensing terms in individual source files. +> [!TIP] +> If you have copyright or licensing doubts, please refer to any copyrights and licensing terms in individual source files. ### Documentation @@ -163,11 +179,18 @@ Please refer to the PhreakNet Asterisk documentation for PhreakScript-specific m Please run ```phreaknet about``` +> [!NOTE] +> Note that the change log is no longer updated for every change. For a complete history, please refer to the commit history. + ### Reporting Issues -The preferred issue reporting procedure is by cutting us a ticket at InterLinked Issues: https://issues.interlinked.us/ +To report an issue, you may do one of the following: + +- (Preferred) Cut us a ticket at InterLinked Issues: https://issues.interlinked.us/ + + Choose "PhreakScript" as the category, *not* Asterisk, DAHDI, or anything else! -Choose "PhreakScript" as the category. +- Open a new issue in this GitHub repository ### Pull Requests diff --git a/phreaknet.sh b/phreaknet.sh index 4b32a16..678453c 100755 --- a/phreaknet.sh +++ b/phreaknet.sh @@ -2,7 +2,7 @@ # PhreakScript # (C) 2021-2024 Naveen Albert, PhreakNet, and others - https://github.com/InterLinked1/phreakscript ; https://portal.phreaknet.org ; https://docs.phreaknet.org -# v1.1.8 (2024-10-16) +# v1.2.0 (2024-11-03) # Setup (as root): # cd /usr/local/src @@ -13,6 +13,7 @@ # phreaknet install ## Begin Change Log: +# 2024-11-03 1.2.0 Asterisk: Install Asterisk 22 by default # 2024-10-16 1.1.8 wanpipe: Installation procedure improvements # 2024-09-19 1.1.7 DAHDI: Slipstream critical build fixes, fix build issues on various distros and kernels # 2024-09-16 1.1.6 DAHDI: Add patch to enable building of XPP drivers on 32-bit architectures @@ -191,8 +192,8 @@ AST_SOURCE_PARENT_DIR="/usr/src" # Script environment variables AST_ALT_VER="" AST_MIN_PREFERRED_VER=20 -AST_DEFAULT_MAJOR_VER=21 -AST_NEXT_MAJOR_VER=22 +AST_DEFAULT_MAJOR_VER=22 +AST_NEXT_MAJOR_VER=23 AST_MAJOR_VER=$AST_DEFAULT_MAJOR_VER AST_MM_VER=0 AST_SOURCE_NAME="asterisk-${AST_DEFAULT_MAJOR_VER}-current" @@ -201,8 +202,6 @@ AST_RC_SOURCE_NAME="asterisk-${AST_DEFAULT_MAJOR_VER}-testing" # DAHDI_MM_VER="${DAHDI_VERSION:0:1}${DAHDI_VERSION:2:1}" Requires bash DAHDI_MM_VER=34 DAHDI_VERSION="3.4.0" -#DAHLIN_SRC_NAME="dahdi-linux-${DAHDI_VERSION}.tar.gz" -#DAHTOOL_SRC_NAME="dahdi-tools-${DAHDI_VERSION}.tar.gz" #DAHLIN_SRC_URL="https://github.com/asterisk/dahdi-linux/releases/download/v${DAHDI_VERSION}/${DAHLIN_SRC_NAME}" #DAHTOOL_SRC_URL="https://github.com/asterisk/dahdi-tools/releases/download/v${DAHDI_VERSION}/${DAHTOOL_SRC_NAME}" DAHLIN_SRC_NAME="dahdi-linux-current.tar.gz" @@ -214,7 +213,7 @@ LIBPRI_SOURCE_NAME="libpri-1.6.1" LIBSS7_VERSION="2.0.1" WANPIPE_SOURCE_NAME="wanpipe-current" # wanpipe-latest (7.0.38, 2024-02-05) ODBC_VER="3.1.14" -CISCO_CM_SIP="cisco-usecallmanager-18.15.0" +CISCO_CM_SIP="cisco-usecallmanager-20.10.0" MIN_ARGS=1 FILE_DIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" FILE_NAME=$( basename $0 ) # grr... why is realpath not in the POSIX standard? @@ -2719,7 +2718,7 @@ get_source() { fi if [ "$CHAN_SIP" = "1" ]; then # somebody still wants chan_sip, okay... if [ "$ENHANCED_CHAN_SIP" != "1" ]; then - echoerr "chan_sip is deprecated and will be removed in Asterisk 21. Consider migrating to chan_pjsip at your convenience." + echoerr "chan_sip is deprecated and was removed in Asterisk 21. Consider migrating to chan_pjsip at your convenience." else echoerr "chan_sip was deprecated and removed in Asterisk 21. It is still present for your usage, but consider migrating to chan_pjsip at your convenience." printf "Fetching chan_sip to readd to source tree\n"