Skip to content

Commit 33353b7

Browse files
committed
install: target 20.3.0, temporarily disable conflicting patches
Fixes #10
1 parent f944327 commit 33353b7

File tree

2 files changed

+41
-12
lines changed

2 files changed

+41
-12
lines changed

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ A utility to automate the installation, maintenance, and debugging of Asterisk/D
33

44
PhreakScript installs:
55

6-
- Asterisk 20.2.1 (latest LTS release of Asterisk)
6+
- Asterisk 20.3.0 (latest LTS release of Asterisk)
77
- DAHDI Linux 3.2.0 (with optional DAHDI install flag)
88
- DAHDI Tools 3.2.0 (with optional DAHDI install flag)
99
- many additional features and stability improvements
@@ -123,6 +123,14 @@ PhreakScript must be run as root, even if Asterisk does not run as root.
123123

124124
PhreakScript is primarily supported on Debian-based Linux systems. Support has also been added for FreeBSD. Pull requests to add support for other Linux distros or BSD are welcome.
125125

126+
### License
127+
128+
PhreakScript itself is licensed under the Apache 2.0 License. This includes any scripts in this repository.
129+
130+
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.
131+
132+
If you have copyright or licensing doubts, please refer to any copyrights and licensing terms in individual source files.
133+
126134
### Documentation
127135

128136
Please refer to the PhreakNet Asterisk documentation for PhreakScript-specific module documentation: https://asterisk.phreaknet.org/

phreaknet.sh

+32-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# PhreakScript
44
# (C) 2021-2023 Naveen Albert, PhreakNet, and others - https://github.com/InterLinked1/phreakscript ; https://portal.phreaknet.org ; https://docs.phreaknet.org
5-
# v0.3.2 (2023-03-16)
5+
# v0.3.3 (2023-05-25)
66

77
# Setup (as root):
88
# cd /usr/local/src
@@ -13,6 +13,7 @@
1313
# phreaknet install
1414

1515
## Begin Change Log:
16+
# 2023-05-25 0.3.3 Asterisk: target 20.3.0
1617
# 2023-03-16 0.3.2 Asterisk: target 20.2.0
1718
# 2023-03-03 0.3.1 DAHDI: disable XPP drivers on all 32-bit architectures to fix build failures
1819
# 2023-02-26 0.2.7 PhreakScript: fix install user (again)
@@ -224,6 +225,8 @@ DEBUG_LEVEL=0
224225
FREEPBX_GUI=0
225226
GENERIC_HEADERS=0
226227
EXTERNAL_CODECS=0
228+
RTPULSING=0 # XXX: Change to 1 as soon as we can
229+
HAVE_COMPATIBLE_SPANDSP=0 # XXX: Change to 1 as soon as we can
227230

228231
handler() {
229232
kill $BGPID
@@ -1280,8 +1283,9 @@ install_dahdi() {
12801283
tar -zxvf ${LIBPRI_SOURCE_NAME}.tar.gz
12811284
rm ${LIBPRI_SOURCE_NAME}.tar.gz
12821285
cd ${LIBPRI_SOURCE_NAME}
1283-
# Unmerged compiler fix patch for q921/q931 in libpri:
1284-
gerrit_patch 19311 "https://gerrit.asterisk.org/changes/libpri~19311/revisions/8/patch?download"
1286+
# Unreleased compiler fix patch for q921/q931 in libpri:
1287+
gerrit_patch 19967 "https://gerrit.asterisk.org/changes/libpri~19967/revisions/1/patch?download"
1288+
git_custom_patch "https://github.com/asterisk/libpri/commit/a7a2245b12288fc0657e0a8f8071bdf8ed840f4b.diff"
12851289
make && make install
12861290

12871291
# Wanpipe
@@ -1455,7 +1459,9 @@ phreak_patches() { # $1 = $PATCH_DIR, $2 = $AST_SRC_DIR
14551459
phreak_tree_module "apps/app_remoteaccess.c"
14561460
phreak_tree_module "apps/app_saytelnumber.c"
14571461
phreak_tree_module "apps/app_selective.c"
1458-
phreak_tree_module "apps/app_softmodem.c"
1462+
if [ "$HAVE_COMPATIBLE_SPANDSP" = "1" ]; then
1463+
phreak_tree_module "apps/app_softmodem.c"
1464+
fi
14591465
phreak_tree_module "apps/app_streamsilence.c"
14601466
phreak_tree_module "apps/app_tonetest.c"
14611467
phreak_tree_module "apps/app_verify.c"
@@ -1478,14 +1484,18 @@ phreak_patches() { # $1 = $PATCH_DIR, $2 = $AST_SRC_DIR
14781484
if [ "$DEVMODE" = "1" ]; then
14791485
phreak_tree_module "res/res_deadlock.c" # this is not possibly useful to non-developers
14801486
fi
1481-
phreak_tree_module "res/res_dialpulse.c"
1487+
if [ "$RTPULSING" = "1" ]; then
1488+
phreak_tree_module "res/res_dialpulse.c"
1489+
fi
14821490
phreak_tree_module "res/res_digitmap.c"
14831491
phreak_tree_module "res/res_irc.c"
14841492
phreak_tree_module "res/res_phreaknet.c"
14851493
phreak_tree_module "res/res_pjsip_presence.c"
14861494

14871495
## Third Party Modules
1488-
custom_module "apps/app_tdd.c" "https://raw.githubusercontent.com/dgorski/app_tdd/main/app_tdd.c"
1496+
if [ "$HAVE_COMPATIBLE_SPANDSP" = "1" ]; then
1497+
custom_module "apps/app_tdd.c" "https://raw.githubusercontent.com/dgorski/app_tdd/main/app_tdd.c"
1498+
fi
14891499
custom_module "apps/app_fsk.c" "https://raw.githubusercontent.com/alessandrocarminati/app-fsk/master/app_fsk_18.c"
14901500
sed -i 's/<defaultenabled>no<\/defaultenabled>//g' apps/app_fsk.c # temporary bug fix
14911501

@@ -1538,8 +1548,10 @@ phreak_patches() { # $1 = $PATCH_DIR, $2 = $AST_SRC_DIR
15381548

15391549
gerrit_patch 18577 "https://gerrit.asterisk.org/changes/asterisk~18577/revisions/2/patch?download" # app_confbridge: Fix bridge shutdown race condition
15401550
gerrit_patch 17655 "https://gerrit.asterisk.org/changes/asterisk~17655/revisions/25/patch?download" # func_groupcount: GROUP VARs
1541-
gerrit_patch 19897 "https://gerrit.asterisk.org/changes/asterisk~19897/revisions/6/patch?download" # res_pjsip_stir_shaken: Fix JSON field ordering
1542-
git_patch "ast_rtoutpulsing.diff" # chan_dahdi: add rtoutpulsing
1551+
if [ "$RTPULSING" = "1" ]; then
1552+
# XXX Temporarily disabled because it causes a patch conflict in chan_dahdi, line 938. We'll get this fixed soon.
1553+
git_patch "ast_rtoutpulsing.diff" # chan_dahdi: add rtoutpulsing
1554+
fi
15431555

15441556
git_patch "blueboxing.diff" # dsp: make blue boxing easier
15451557
git_patch "prefixinclude.diff" # pbx: prefix includes
@@ -1549,7 +1561,7 @@ phreak_patches() { # $1 = $PATCH_DIR, $2 = $AST_SRC_DIR
15491561

15501562
if [ "$EXPERIMENTAL_FEATURES" = "1" ]; then
15511563
printf "Installing patches for experimental features\n"
1552-
git_custom_patch "https://code.phreaknet.org/asterisk/pubsub.diff"
1564+
git_custom_patch "https://code.phreaknet.org/asterisk/pubsub.diff" # NOTE: Already merged into master.
15531565
custom_module "include/asterisk/res_pjsip_body_generator_types.h" "https://code.phreaknet.org/asterisk/res_pjsip_body_generator_types.h"
15541566
custom_module "res/res_pjsip_device_features.c" "https://code.phreaknet.org/asterisk/res_pjsip_device_features.c"
15551567
custom_module "res/res_pjsip_device_features_body_generator.c" "https://code.phreaknet.org/asterisk/res_pjsip_device_features_body_generator.c"
@@ -1560,8 +1572,6 @@ phreak_patches() { # $1 = $PATCH_DIR, $2 = $AST_SRC_DIR
15601572
if [ "$DEVMODE" = "1" ]; then # highly experimental
15611573
# does not cleanly patch, do not uncomment:
15621574
# this does not apply even with gerrit_fuzzy_patch:
1563-
# gerrit_patch 18304 "https://gerrit.asterisk.org/changes/asterisk~18304/revisions/3/patch?download" # chan_dahdi: add dialmode
1564-
# this does not apply even with gerrit_fuzzy_patch:
15651575
# gerrit_patch 17719 "https://gerrit.asterisk.org/changes/asterisk~17719/revisions/8/patch?download" # res_pbx_validate
15661576
:
15671577
fi
@@ -2126,6 +2136,17 @@ elif [ "$cmd" = "mancached" ]; then
21262136
mandb
21272137
elif [ "$cmd" = "install" ]; then
21282138
preinstall_warn=0
2139+
2140+
# XXX: Warnings so we don't forget to fix these:
2141+
if [ "$RTPULSING" != "1" ]; then
2142+
echoerr "Real time pusling is not compatible or has been disabled for this build."
2143+
sleep 1
2144+
fi
2145+
if [ "$HAVE_COMPATIBLE_SPANDSP" != "1" ]; then
2146+
echoerr "SpanDSP is not compatible or has been disabled for this build."
2147+
sleep 1
2148+
fi
2149+
21292150
if [ ${#AST_USER} -eq 0 ]; then
21302151
echoerr "WARNING: You are installing Asterisk to run as root. This is not recommended."
21312152
echoerr "Specify -u or --user to specify a run user"

0 commit comments

Comments
 (0)