[INTERLINKED-8] Cannot use phreaknet wizard

PHREAKNET-29

Requested Line

PHREAKNET-28

Phone Verification Failed

INTERLINKED-10

Telegrams can be sent by phone to non-subscribers

INTERLINKED-9

Phreaknet Directory link broken

INTERLINKED-8

Cannot use phreaknet wizard

PHREAKSCRIPT-12

Cannot utilize script because of patch issues

ASTERISK-13

Asterisk Framehook: DTMF to MF

INTERLINKED-7

TTY BBS lines (45.5+50) issues

PHREAKNET-22

Weather line international lookup problem

PHREAKNET-24

[REQ] TTY Telegrams

PHREAKNET-23

Wakeup calls not dialling at scheduled time

PHREAKNET-20

Billing based on individual CLLI zip codes

DOCS-2

Website not allowing me to log in

PHREAKNET-17

Director Listing Bulk Uploads Not Showing

PHREAKNET-16

RCMAC Provisioning is broken

ASTERISK-12

chan_dahdi: Make pulsemaketime, etc configurable

PHREAKNET-14

1+ calls do not work for single numbers

DOCS-1

Kickstart the wiki

ASTERISK-9

indications: Add support for >2 frequencies

INTERLINKED-6

PhreakNet Forums

ASTERISK-7

Improve sound control capabilities

PHREAKNET-11

Yealink T33G: add provisioning support

PHREAKNET-10

Enhanced utilization of Feature Group D

ASTERISK-11

chan_dahdi: Add wink guard

ASTERISK-10

Proctor application for DAHDI

PHREAKNET-9

General WKSHWIAXCG0 enhancements

PHREAKNET-8

Setup a Patreon to cover expenses

INTERLINKED-5

Update blue box

PHREAKSCRIPT-10

Update CiscoCallManager patch URL

ASTERISK-8

Optimize boilerplate RSA to MD5 fallback

INTERLINKED-4

InterLinked Issues API

PHREAKNET-7

Subscriber Service Disconnect Request Option

INTERLINKED-3

InterLinked API site is down

PHREAKNET-6

Verification flags international calls

ASTERISK-4

XML documentation examples

INTERLINKED-2

PhreakNet Email for BoD Members

PHREAKSCRIPT-8

Boilerplate force MD5 broken

ASTERISK-6

Resonant Filter To Simulate N-Carrier

PHREAKNET-3

Provide commissions to 976 number owners

PHREAKSCRIPT-9

Add DAHDI to build tests

PHREAKSCRIPT-7

Boilerplate musiconhold.conf is wrong

PHREAKSCRIPT-6

Trace autosend

INTERLINKED-1

Phone verification is broken

PHREAKSCRIPT-5

coindsp patch missing

PHREAKNET-5

Semipublic inward boilerplate broken

PHREAKSCRIPT-4

Add less invasive/deterministic modes

PHREAKNET-4

Hosted lines defaults exchange on error

PHREAKNET-2

Asterisk reload following unsuccessful call

PHREAKSCRIPT-3

Report failure as requested

ASTERISK-5

Various ADSI issues

PHREAKNET-1

Add third-party billing integration

ASTERISK-3

Asterisk Wiki issues

PHREAKSCRIPT-2

Remove absolute sbin path

PHREAKSCRIPT-1

Hangs when certain invalid commands entered

ASTERISK-2

func_notchfilter: ISO C90 compiler fixes

ASTERISK-1

Add Assert application

← Issues Home || New Issue →

Sort Normal || Priority

Details

Category: InterLinked
Type: Bug
Severity: Trivial
Visibility: Public
Reported: 10/24/2023 12:27 PM
Last Active: 11/2/2023 11:30 AM
Status: Resolved 11/7/2023 9:13 AM
Reporter: cli0019
Watching: cli0019
Assigned To: Nobody

Failed to download file: https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-20-current.tar.gz [root@sudbur02 /]#


Comments

10/24/2023 3:57 PM — InterLinked

Please post the full output script.

10/24/2023 4:49 PM — InterLinked

I think I see what you did here - did you run phreaknet install --version=20 or something like that?
20 is the default and it would've worked had that not been specified.
In any case, that should now work if you run "phreaknet update" and retry what you did.

10/25/2023 3:58 AM — cli0019

[root@sudbur02 ~]# phreaknet update
Updating PhreakScript...
Upstream: https://docs.phreaknet.org/script/phreaknet.sh
Successfully updated PhreakScript from 1.0.5 (2023-09-27) to 1.0.5 (2023-09-27)
[root@sudbur02 ~]# phreaknet install
Real time pusling is not compatible or has been disabled for this build.
WARNING: You are installing Asterisk to run as root. This is not recommended.
Specify -u or --user to specify a run user

Starting installation with country code 1
Installing prerequisites...
Could not determine what package manager to use...
/usr/local/sbin/phreaknet: line 580: apt: command not found
wget: unrecognized option '--show-progress'
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
Failed to download file: https://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-20-current.tar.gz
[root@sudbur02 ~]#

10/25/2023 7:22 AM — InterLinked

Looks like it failed to install packages automatically. What distro are you running? What's the output of:

(lsb_release -ds || cat /etc/*release || uname -om ) 2>/dev/null | head -n1 | cut -d'=' -f2

As well as "phreaknet info"

10/25/2023 10:48 AM — cli0019

Distro:

[root@sudbur02 ~]# cat /etc/os-release
NAME="Sangoma Linux"
VERSION="7 (Core)"
ID="sangoma"
ID_LIKE="centos rhel fedora"
VERSION_ID="7"
PRETTY_NAME="Sangoma Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:sangoma:sng:7::server:utf8"
HOME_URL="https://distro.sangoma.net/"
BUG_REPORT_URL="https://issues.sangoma.net/"

CENTOS_MANTISBT_PROJECT="Sangoma-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="sangoma"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

Output of...
[root@sudbur02 ~]# (lsb_release -ds || cat /etc/*release || uname -om ) 2>/dev/null | head -n1 | cut -d'=' -f2
"Sangoma Linux"

Output of [phreaknet info]

[root@sudbur02 ~]# phreaknet info
Hostname: sudbur02.xxxxx.xx
Sangoma Linux
Linux sudbur02.xxxxx.xx 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Package Manager: yum
Asterisk 18.19.0
DAHDI Tools Version - 2.11.1
PhreakScript 1.0.5 (2023-09-27)
https://github.com/InterLinked1/phreakscript
(C) 2021-2023 PhreakNet - https://portal.phreaknet.org https://docs.phreaknet.org
To report bugs or request feature additions, please report at https://issues.interlinked.us (also see
https://docs.phreaknet.org/#contributions) and/or post to the PhreakNet mailing list: https://groups.io/g/phreaknet


10/25/2023 10:56 AM — InterLinked

Okay, I see, Sangoma Linux (I'm assuming this is one something that was running FreePBX) isn't as well supported as mainstream distros like Debian.

I've addressed some of the issues you were having, try running phreaknet update and retrying the install now.

10/25/2023 11:03 AM — cli0019

[line number] = line in phreaknet.sh

Error Message on running phreaknet install:

/usr/local/sbin/phreaknet: line 580: apt: command not found

CHANGED: [580] apt autoremove
EXPLANATION: change command from apt to yum

Error Message on running phreaknet install after above change:
wget: unrecognized option '--show-progress'
Usage: wget [OPTION]... [URL]...

CHANGED: [200] WGET="wget -q " # --show-progress"
EXPLANATION: commented out [--show progress"]

Error Message on running phreaknet install after above change:

Applying git patch: sipcustparams.patch
/usr/local/sbin/phreaknet: line 1013: git: command not found
Failed to apply git patch... this should be reported...

found in the neighbourhood of [1013]:
git_patch() {
printf "Applying git patch: %s\n" "$1"
wget -q "https://raw.githubusercontent.com/InterLinked1/phreakscript/master/patches/$1" -O /tmp/$1 --no-cache
git apply "/tmp/$1"
if [ $? -ne 0 ]; then
echoerr "Failed to apply git patch... this should be reported..."
exit 2
fi
rm "/tmp/$1"

found in the neighbourhood of [1484]:
# Enhanced chan_sip already has this included
if [ "$ENHANCED_CHAN_SIP" != "1" ] && [ "$SIP_CISCO" != "1" ]; then # XXX this patch has a merge conflict with S$
git_patch "sipcustparams.patch" # chan_sip: Add custom parameter support, adds SIP_PARAMETER function.
fi

10/25/2023 11:04 AM — cli0019

Oh! I just saw your comment, and ran phreaknet update:

[root@sudbur02 /]# phreaknet update
Updating PhreakScript...
Downloading auto-completion binding script
sed: can't read /etc/bash.bashrc: No such file or directory
sed: can't read /etc/bash.bashrc: No such file or directory
sed: can't read /etc/bash.bashrc: No such file or directory
sed: can't read /etc/bash.bashrc: No such file or directory
sed: can't read /etc/bash.bashrc: No such file or directory
sed: can't read /etc/bash.bashrc: No such file or directory
sed: can't read /etc/bash.bashrc: No such file or directory
Upstream: https://docs.phreaknet.org/script/phreaknet.sh
Successfully updated PhreakScript from 1.0.5 (2023-09-27) to 1.0.5 (2023-09-27)

10/25/2023 11:04 AM — cli0019

I'm going to start back at scratch again...hold the phone, no pun intended!

10/25/2023 11:10 AM — cli0019

Okay, I deleted all the phreaknet files, and started again:

cd /usr/src && wget https://docs.phreaknet.org/script/phreaknet.sh && chmod +x phreaknet.sh && ./phreaknet.sh make
(WORKED)

phreaknet install
(RESULT)
...
Applying git patch: sipcustparams.patch
/usr/local/sbin/phreaknet: line 1013: git: command not found
Failed to apply git patch... this should be reported...



10/25/2023 11:11 AM — cli0019

Installed GIT... trying again!

10/25/2023 11:15 AM — cli0019

Okay, I deleted all the phreaknet files again, and started over:

cd /usr/src && wget https://docs.phreaknet.org/script/phreaknet.sh && chmod +x phreaknet.sh && ./phreaknet.sh make
(WORKED)

phreaknet install
(RESULT)
[CC] func_notchfilter.c -> func_notchfilter.o
func_notchfilter.c: In function ‘eval’:
func_notchfilter.c:216:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = npz; i >= 0; i--) {
^
func_notchfilter.c:216:2: note: use option -std=c99 or -std=gnu99 to compile your code
func_notchfilter.c: In function ‘compute_bpres’:
func_notchfilter.c:293:3: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i=0; i < 50 && !cvg; i++) {
^
func_notchfilter.c: In function ‘multin’:
func_notchfilter.c:370:2: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = npz; i >= 1; i--) {
^
[CC] func_callerid.c -> func_callerid.o
make[1]: *** [func_notchfilter.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [funcs] Error 2

10/25/2023 11:35 AM — cli0019

also threw the following error messages when executing phreaknet install:

Custom patching completed...
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
No package speexdsp-devel available.
Package 1:mariadb-devel-5.5.65-1.el7.x86_64 already installed and latest version
No package hoard available.


app_ccsa.c: In function ‘ccsa_try_route.isra.11’:
app_ccsa.c:1583:7: warning: ‘res’ may be used uninitialized in this function [-Wmaybe-uninitialized]
if (!res) {
^


[CC] app_getcpeid.c -> app_getcpeid.o
In file included from /usr/src/asterisk-20.5.0/include/asterisk/lock.h:63:0,
from app_selective.c:41:
app_selective.c: In function ‘selective_clear’:
/usr/src/asterisk-20.5.0/include/asterisk/logger.h:465:17: warning: ‘privates’ may be used uninitialized in this function [-Wmaybe-uninitialized]
__ast_verbose(_A_, level, __VA_ARGS__); \
^
app_selective.c:1228:6: note: ‘privates’ was declared here
int privates, entries = get_number_entries(chan, strbuf, f, ENTRY_ANY);
^
app_selective.c: In function ‘remove_entry.isra.8’:
app_selective.c:1354:13: warning: ‘res’ may be used uninitialized in this function [-Wmaybe-uninitialized]
} else if (res == AST_GETDATA_EMPTY_END_TERMINATED && ast_strlen_zero(buf)) { /* just pressed # */
^
app_selective.c: In function ‘add_entry’:
app_selective.c:1467:13: warning: ‘res’ may be used uninitialized in this function [-Wmaybe-uninitialized]
} else if (res == AST_GETDATA_EMPTY_END_TERMINATED && ast_strlen_zero(buf)) { /* just pressed # */
^


app_softmodem.c: In function ‘softmodem_communicate’:
app_softmodem.c:776:3: warning: implicit declaration of function ‘TLS_client_method’ [-Wimplicit-function-declaration]
ctx = SSL_CTX_new(TLS_client_method());
^
app_softmodem.c:776:3: warning: passing argument 1 of ‘SSL_CTX_new’ makes pointer from integer without a cast [enabled by default]
In file included from app_softmodem.c:41:0:
/usr/include/openssl/ssl.h:2087:10: note: expected ‘const struct SSL_METHOD *’ but argument is of type ‘int’
SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
^

irc2pc.c: In function ‘irc2pc_’:
irc2pc.c:145:12: warning: ‘temp[8]’ may be used uninitialized in this function [-Wmaybe-uninitialized]
pc[j] = temp[j - 1];
^

10/25/2023 1:07 PM — InterLinked

Thanks, I will get those fixed later today. Incidentally, what gcc version do you have? (gcc -v I think)

10/26/2023 9:48 AM — InterLinked

Give this another try, it should work better now.

10/26/2023 10:58 AM — cli0019

Good morning! Thanks for all your help with this!

Here's my gcc -v:

[root@sudbur02 ~]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC)

trying it again!

10/26/2023 11:01 AM — cli0019

oops - ran into:

Applying git patch: func_groupcount_GROUP_VARs.patch
fatal: unrecognized input
Failed to apply git patch... this should be reported...

10/26/2023 11:02 AM — cli0019

[root@sudbur02 ~]# git --version
git version 1.8.3.1

10/26/2023 4:49 PM — InterLinked

func_groupcount_GROUP_VARs.patch doesn't exist in the latest version, might need to do phreaknet update again?

10/27/2023 7:54 AM — cli0019

Ok, i see what the issue is. I am running Freepbx 15, and it is not compatible with Asterisk 21. Any chance any of this is in Asterisk 19?

10/27/2023 8:28 AM — InterLinked

You could try `--version=19.x` and see what happens, but Asterisk 19 is no longer supported. Only Asterisk 20 and 21 are really supported by PhreakScript. Why do you still need FreePBX 15?

10/27/2023 9:00 AM — cli0019

That was my stable production machine.

I've just downloaded the latest FreePBX available:

SNG7-PBX16-64bit-2302-1
Release Date: February 2023
FreePBX 16 • Linux 7.8 • Asterisk 16, 18 or 19

10/27/2023 9:27 AM — InterLinked

You could try installing it separately using something like `phreaknet install --version=20 --freepbx` to install version 20 with FreePBX on top of it. The FreePBX project itself is kind of a mess and lags way behind upstream Asterisk, but this would manually install the FreePBX UI on top of a more recent version. There aren't really any incompatibilities I can think of between 18 and 20 that I can think of would cause an issue.

10/27/2023 9:27 AM — InterLinked

Should be `phreaknet install --dahdi --sip --version=20.5.0 --freepbx` actually, to be more complete (--sip if you still need chan_sip).

10/27/2023 9:28 AM — cli0019

Ok cool! Will try that!

10/31/2023 11:57 PM — cli0019

Tried fresh install on a different machine and got:

Applying patch kewl2.diff to kewl2.diff
/usr/local/sbin/phreaknet: line 1440: patch: command not found
Failed to apply patch kewl2.diff
-rw-r--r-- 1 root root 987 Nov 1 03:56 /tmp/kewl2.diff

11/1/2023 7:14 AM — InterLinked

Looks like that was due to patch not being installed. Try phreaknet update again, it will now get installed.

11/1/2023 3:35 PM — cli0019

Oh! I think it may have worked this time!

11/1/2023 7:05 PM — cli0019

Skipping sample config installation, since /etc/asterisk already exists
if [ ! -d "/etc/asterisk/../logrotate.d" ]; then \
/usr/bin/install -c -d "/etc/asterisk/../logrotate.d" ; \
fi
sed 's#__LOGDIR__#/var/log/asterisk#g' < contrib/scripts/asterisk.logrotate | sed 's#__SBINDIR__#/usr/sbin#g' > contrib/scripts/asterisk.logrotate.tmp
/usr/bin/install -c -m 0644 contrib/scripts/asterisk.logrotate.tmp "/etc/asterisk/../logrotate.d/asterisk"
rm -f contrib/scripts/asterisk.logrotate.tmp
● asterisk.service - LSB: Asterisk PBX
Loaded: loaded (/etc/rc.d/init.d/asterisk; bad; vendor preset: disabled)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
Starting asterisk (via systemctl): Job for asterisk.service failed. See "systemctl status asterisk.service" and "journalctl -xe" for details.
[FAILED]
● asterisk.service - LSB: Asterisk PBX
Loaded: loaded (/etc/rc.d/init.d/asterisk; bad; vendor preset: disabled)
Active: failed (Result: protocol) since Wed 2023-11-01 23:02:33 UTC; 17ms ago
Docs: man:systemd-sysv-generator(8)
Process: 18891 ExecStart=/etc/rc.d/init.d/asterisk start (code=exited, status=0/SUCCESS)

Nov 01 23:02:33 freepbx.sangoma.local systemd[1]: Starting LSB: Asterisk PBX...
Nov 01 23:02:33 freepbx.sangoma.local asterisk[18891]: Asterisk is already running.
Nov 01 23:02:33 freepbx.sangoma.local systemd[1]: New main PID 10339 does not belong to service, and PID file is ...sing.
Nov 01 23:02:33 freepbx.sangoma.local systemd[1]: New main PID 10339 does not belong to service, and PID file is ...sing.
Nov 01 23:02:33 freepbx.sangoma.local systemd[1]: Failed to start LSB: Asterisk PBX.
Nov 01 23:02:33 freepbx.sangoma.local systemd[1]: Unit asterisk.service entered failed state.
Nov 01 23:02:33 freepbx.sangoma.local systemd[1]: asterisk.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
Asterisk 19.8.0
Asterisk 19.8.0 built by mockbuild @ jenkins7 on a x86_64 running Linux on 2023-01-16 07:07:49 UTC
0
Asterisk installation has completed. You may now connect to the Asterisk CLI: asterisk -r
If you upgraded Asterisk, you will need to run 'core restart now' for the new version to load.

11/1/2023 7:07 PM — InterLinked

Is there an issue? Seems like the script ran to completion, might have to manually restart Asterisk though, as it says.

11/1/2023 7:42 PM — cli0019

Here's what I did:

-downloaded fresh copy of SNG7-PBX16-64bit-2302-1.iso (https://www.freepbx.org/downloads/)

-selected Asterisk 19 on install screen.

-open putty, log in and execute:

cd /usr/local/src && wget https://docs.phreaknet.org/script/phreaknet.sh && chmod +x phreaknet.sh && ./phreaknet.sh make

then:

phreaknet install

resulted in the last bunch of messages - and Asterisk 19.x.x continued to run, even when rebooted.

then, issued:

fwconsole stop

and

phreaknet install -f

Now it will not start asterisk after reboot. Apparently freepbx does not support asterisk 21?

arrgggg!




11/1/2023 8:13 PM — InterLinked

PhreakScript installs Asterisk (and FreePBX, if you ask it to). You're doing redundant things by first installing FreePBX/Asterisk and then running the tool.

If you are doing a fresh install, I would recommend starting with a clean version of Debian or another Linux distro and running. Like I said, FreePBX distro may not support 21, but when installed separately as with PhreakScript, it will probably work.

11/1/2023 8:15 PM — cli0019

Ok, so now I have done:

asterisk-version-switch and upgraded to asterisk 20.4.0

fwconsole stop

and

phreaknet install -f

lets see what this does!

11/2/2023 6:37 AM — cli0019

Ok
- clean install Debian 12

Applying patch returnif.patch to apps/app_stack.c
/usr/local/sbin/phreaknet: 1425: patch: not found
Failed to apply patch returnif.patch

11/2/2023 7:11 AM — InterLinked

That's really strange... can you post the script output from the beginning to that point?
It SHOULD be installing patch using apt-get for you. Really curious why it's not.

11/2/2023 11:30 AM — cli0019

WOW! I just reran the script to get the output:

phreaknet install -f

This time, it downloaded and unpacked a WHOLE LOT MORE stuff and seems to have executed all the way to the end!

Now lets see what this baby can do!

You must be logged in to leave a comment.