When using Version PhreakScript 1.1.7 (2024-09-19) I get a Syntax Error on compiling chan_dahdi. It's trying to generate Asterisk 21.5.0-rc2. I removed the Version that PhreakScript installed and downloaded a fresh copy. That one compiled without problems. I'm on Linux Ubuntu 24.04.
10/3/2024 5:05 PM — InterLinked
More information is required, including a trace/log of the issue. What syntax/compilation error? What command was used for the installation?
10/3/2024 5:27 PM — KFKHome
Installed with: wget https://docs.phreaknet.org/script/phreaknet.sh
Then I did: chmod 755 ph*
: ./phreaknet.sh make
: phreaknet install --dahdi --drivers --wanpipe
I have not been able to find any logs
Several Errors like:
chan_dahdi.c:2669:14: error: ‘DAHDI_EVENT_PULSE’ undeclared (first use in this function); did you mean ‘DAHDI_EVENT_NONE’?
2669 | case DAHDI_EVENT_PULSE:
| ^~~~~
| DAHDI_EVENT_NONE
chan_dahdi.c:2669:14: note: each undeclared identifier is reported only once for each function it appears in
chan_dahdi.c:2672:14: error: ‘DAHDI_EVENT_PULSE_BREAK’ undeclared (first use in this function); did you mean ‘ANALOG_EVENT_PULSE_BREAK’?
2672 | case DAHDI_EVENT_PULSE_BREAK:
| ^~~~~~~
| ANALOG_EVENT_PULSE_BREAK
[CC] sig_analog.c -> sig_analog.o
chan_dahdi.c: In function ‘dahdi_handle_event’:
chan_dahdi.c:7907:14: error: ‘DAHDI_EVENT_PULSE’ undeclared (first use in this function); did you mean ‘DAHDI_EVENT_NONE’?
7907 | case DAHDI_EVENT_PULSE:
| ^~~~~
| DAHDI_EVENT_NONE
chan_dahdi.c:7908:14: error: ‘DAHDI_EVENT_PULSE_BREAK’ undeclared (first use in this function); did you mean ‘ANALOG_EVENT_PULSE_BREAK’?
7908 | case DAHDI_EVENT_PULSE_BREAK:
| ^~~~~~~
| ANALOG_EVENT_PULSE_BREAK
make[1]: *** [/usr/src/asterisk-21.5.0-rc2/Makefile.rules:165: chan_dahdi.o] Error 1
10/3/2024 5:29 PM — InterLinked
Logs refer to the console output, there is no other log.
It looks like you are trying to install Asterisk using PhreakScript without installing DAHDI using PhreakScript. This is not a supported configuration.
It should work if you first/also install DAHDI, e.g. phreaknet install --dahdi
(in addition to any other flags you may be using). This will compile DAHDI and Asterisk together.
10/3/2024 5:32 PM — InterLinked
Will also add, you may need to add the --force
flag to overwrite existing installations.
10/3/2024 5:35 PM — KFKHome
I did use --dahdi plus --drivers --wanpipe
I'm in the process of reloading the server software. That way it'll be a "clean" install.
I'll add --force the next time.
10/3/2024 5:39 PM — InterLinked
Yeah, I see that, that's why I suggested --force
, as sometimes it can be skipped if already present otherwise.
If it's still an issue, please include a full trace of the console output on your next try and I will take a look. You can upload the paste to https://paste.interlinked.us if needed.
10/3/2024 10:41 PM — KFKHome
Well good news and a little bad news. With a "clean" install of Ubuntu 24.04 chan_dahdi compiled just fine. But wanpipe would not install as the version of linux is too new.
Also, one of your new Modules was generating lots and lots of Error/Warning Messages. res_alarmsystem.so was added to the noload list of modules.conf.
Thanks for all of your Help.
Ken
10/4/2024 8:25 AM — InterLinked
I'm assuming you mean log warnings and not compiler errors? res_alarmsystem
will generate warnings if loaded but not configured, so yes, it should be disabled if not needed.
What is the error you are getting with wanpipe? I have some cases open on that so that would be a useful data point.
10/4/2024 11:01 AM — KFKHome
The wanpipe error message was something to do about the version of linux. I was watching the install process and the message was only visible for a few seconds. That Message was something to do with the version of linux.
On a different system I have Debian 12 running. Its version of linux is 6.1.0-25 and wanpipe will install there by using the FreePBX install script with the options "--dahdi --nofreepbx --noasterisk". The version of Ubuntu 24.04 uses linux 6.8.0-45.
When I try to install wanpipe directly by its "./Setup install" I get syntax Errors. That problem has been reported to Sangoma Support. They logged in to my Ubuntu 24.04 System with SSH and reproduced the problem. Reported back that Sangoma engineering was backed up and it'll be 6 to 12 months (or longer) before they can get to it. On my Debian 12 system when I try to get wanpipe running by use of "wanrouter start" I get errors. And that has also been reported to Sangoma Support. They asked for SSH access and I'm waiting to hear back from them.
10/4/2024 12:07 PM — InterLinked
Yeah, wanpipe is a dumpster fire, honestly. I would never use wanpipe or a Sangoma card on any of my production systems, they suck (Digium cards, on the other hand, have no known issues). But I recognize there is already an install base out there that people have as a sunk cost.
I have two Debian 12 systems at home and one of them was just fine with wanpipe and the other I haven't been able to get working, so it might be the issue you are describing there. That side of Sangoma engineering is grossly incompetent so I wouldn't hold your breath for a fix anytime soon, either.
10/4/2024 12:39 PM — KFKHome
Before I knew about Phreaknet I tried to use my older Digium Card. A TDM400 that I had used before. But for some strange reason I get Kernel Faults when I try to load the Digium Driver. So I went to ebay and purchased replacement cards. They came in as TDM410 Cards (Version I). They didn't work either. After some google searching I found out that Sangoma had removed support for that card. So back to ebay and purchased Sangoma's A200 Cards. Thus the need for wanpipe.
Then I found out about Phreaknet and that it could restore driver support for the TDM410 Cards. I tested both the old TDM400 and the newer TDM410 after installing Phreaknet. Same problem with Kernel Faults.
Been a very strange 6 weeks just trying to test on some Analog Phones! It's a "Good Thing" that my Servers are just for testing!
10/4/2024 1:05 PM — InterLinked
Hmm... what kind of kernel faults are you seeing? Somebody reported a similar issue with not working in the newer kernels, but it sounds like yours is different: https://github.com/asterisk/dahdi-linux/issues/54
I think I have a TDM 400 or 410 working (the 4-port PCIe analog card? Or maybe that's the P-suffix). But even if the older Digium cards didn't work for some reason (really just Sangoma trying to force obsolescence and sabotage the project, no other reason), a current Digium card is likely to work much better than any Sangoma card. Can't tell you how many folks have reported issues with them to me (and I've reproduced many myself). Digium cards don't require wanpipe and is probably one reason they work much better.
Circling back to your earlier note though, I'm curious if you can share any more details on those kernel faults (maybe in a new issue here). It's possible a regression was introduced at some point if it used to work before, and maybe that's something that requires an additional patch we're not applying at the moment.
10/4/2024 1:06 PM — InterLinked
Also, just to confirm, you installed DAHDI with the --drivers
option, right? That's required to restore all the old drivers.
10/4/2024 1:46 PM — KFKHome
Yes I did use --drivers. I don't recall the Kernel Panic error message. Is there a log file somewhere?
10/4/2024 2:50 PM — InterLinked
No, you could use tee to send the console output to one but it's not persisted anywhere on its own.
10/4/2024 3:43 PM — KFKHome
I went and redid the phreaknet.sh install and captured the wanpipe error message
----- Befin Capture -----
make[3]: [scripts/Makefile.build:243: /usr/src/wanpipe-7.0.38/kdrvtmp/wanpipe_cdev_linux.o] Error 1
make[2]: [/usr/src/linux-headers-6.8.0-45-generic/Makefile:1925: /usr/src/wanpipe-7.0.38/kdrvtmp] Error 2
make[1]: [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.8.0-45-generic'
make: [Makefile:33: all] Error 2
wanpipe install failed: unsupported kernel?
Installation of other items will proceed anyways...
DAHDI and friends have finished installing
----- End Capture -----
Also, How do I make New Feature Requests for phreaknet?
10/4/2024 4:07 PM — KFKHome
I found how to make New Features Request and posted two of them.
10/4/2024 4:15 PM — InterLinked
Can you post a fuller log for the wanpipe error message? At the very least, the entire compilation process starting from the wanpipe part of the script. The error alone is only part of that.
10/4/2024 7:54 PM — KFKHome
Here is part of the output.
----- Begin -----
Length: 15041883 (14M) [application/x-gzip]
Saving to: ‘wanpipe-current.tgz’
wanpipe-current.tgz 100%[===============================================================================>] 14.34M 2.27MB/s in 6.4s
2024-10-04 18:26:26 (2.23 MB/s) - ‘wanpipe-current.tgz’ saved [15041883/15041883]
wanpipe install failed: unsupported kernel?
DAHDI and friends have finished installing
asterisk-21-testing.tar.gz 100%[===============================================================================>] 25.14M 2.22MB/s in 12s
----- End -----
The rest of the output was sent to a file, but it's 380,000 Bytes long. It shows several syntax errors. It's the same thing I see if I run "./Setup install" myself.
Sangoma Support says that wanpipe need a linux kernel of 6.1.0 or less. This Ubuntu is on 6.8.0. So untill they fix it we're kind of stuck.
10/5/2024 7:36 AM — InterLinked
Feel free to post the specific syntax errors if you like.
Usually, I don't look at wanpipe issues myself, but if there's something obvious, I could see about digging into it.
10/6/2024 5:53 PM — KFKHome
And now for something really strange.
The first time I used phreaknet.sh everything worked just fine. Later I needed to reload everything. This time when I used phreaknet.sh it got an error while doing wanpipe. It didn't like the version of Debian 12 linux. Using "uname -r" it used to say 6.1.0-25-and64 and now it says 6.1.0-26-amd26. I went into the wanpipe-7.0.36 directory and did "./Setup install" and that fixed everything.
And now the really strange part. I've reloaded things again. And using phreaknet.sh gets the same error on the linux version. Then in order to capture the actual error message I ran phreaknet.sh again with the same options (install --dahdi --drivers --wanpipe --force --manselect) and everything worked. No errors.
10/7/2024 6:18 AM — KFKHome
A couple of errors in the last post. Uname -r was 6.1.0-25-amd64 then 6.1.0-26-amd64.
I started over (again) and captured the error message.
----- Begin Error Messages -----
!!! WANPIPE Tools Compilation Failed !!!
Possible solution:
Wanpipe header files were not installed properly
in /usr/include/wanpipe directory
wanpipe install failed: unsupported kernel?
----- End Error Messages -----
I checked the /usr/include/wanpipe directory and there are a lot of files there.
Starting the second run of phreaknet.sh
Even stranger. This time the second run of phreaknet.sh the wanpipe also failed. So I went into the
wanpipe-7.0.38 directory and ran "./Setup install". Everything worked just fine.
10/7/2024 7:49 AM — InterLinked
Did you run with the --force
flag in the last wanpipe case? I think it will skip wanpipe if the same version is already detected otherwise.
10/7/2024 7:54 AM — KFKHome
Yes --force was used both times.
10/7/2024 5:42 PM — InterLinked
Could you try running phreaknet update
and then repeat the wanpipe install? (phreaknet wanpipe --force
)
And if it fails again, please provide full log output again.
10/8/2024 9:27 AM — KFKHome
At what point do I run phreaknet update. After the first failure and before the second run?
10/8/2024 9:39 AM — InterLinked
Run phreaknet update
before doing anything, and then run phreaknet wanpipe --force
10/8/2024 9:43 AM — KFKHome
Do I do this this a "clean" system. Just after phreaknet install --dahdi --drivers ?
10/8/2024 11:33 AM — InterLinked
If you can on a clean system, that wouldn't hurt, but even an existing one should yield useful insights
10/8/2024 11:57 AM — KFKHome
Ok. What I'm going to do:
1) Install Debian 10
2) Run phreaknet.sh --dahdi --drivers --force --manselect
3) Run phreaknet.sh update
4) Run phreaknet.ch --wanpipe --force
In Step 4) I'll send all the output to a File.
10/8/2024 1:57 PM — KFKHome
I should learn to read before I post. Step 1) Debian 12, Step 2) included install and Step 54) was .sh.
I've done the phreaknet.sh update and will be starting the --wanpipe --force next. The output from the update was:
----- Begin Output -----
root@asterisk3:/usr/src# ./phreaknet.sh update
Updating PhreakScript...
Downloading auto-completion binding script
Upstream: https://docs.phreaknet.org/script/phreaknet.sh
Successfully updated PhreakScript from 1.1.7 (2024-09-19) to 1.1.7 (2024-09-19)
root@asterisk3:/usr/src#
----- End Output -----
10/8/2024 2:39 PM — KFKHome
Phreaknet.sh didn't line --wanpipi so I used wanpipe
----- Screen Output -----
root@asterisk3:/usr/src# ./phreaknet.sh wanpipe --force > phreaknet.log
Checking file: /lib/modules/6.1.0-26-amd64/build/Makefile
Following include to /usr/src/linux-headers-6.1.0-26-common/Makefile
Checking file: /usr/src/linux-headers-6.1.0-26-common/Makefile
Actual makefile is /usr/src/linux-headers-6.1.0-26-common/Makefile
--2024-10-08 13:02:25-- https://ftp.sangoma.com/linux/current_wanpipe/wanpipe-current.tgz
Resolving ftp.sangoma.com (ftp.sangoma.com)... 199.248.63.88
Connecting to ftp.sangoma.com (ftp.sangoma.com)|199.248.63.88|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15041883 (14M) [application/x-gzip]
Saving to: ‘wanpipe-current.tgz’
wanpipe-current.tgz 100%[===================>] 14.34M 2.04MB/s in 7.3s
2024-10-08 13:02:37 (1.97 MB/s) - ‘wanpipe-current.tgz’ saved [15041883/15041883]
----- Compile Running Now -----
cp: -r not specified; omitting directory 'doc/man'
Can't locate Card.pm in @INC (you may need to install the Card module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at ./wancfg_zaptel.pl line 88.
BEGIN failed--compilation aborted at ./wancfg_zaptel.pl line 88.
--- End Screen Output -----
This time I got different Errors. The list few lines in the log file were:
----- Log File -----
ERROR: wanpipe configuration file not found:
/etc/wanpipe/wanpipe1.conf
----- End Log File -----
I checked the /etc/wanpipe Directory. There is no wanpipe1.conf file.
10/8/2024 3:13 PM — KFKHome
I went to the wanpipe-7.0.38 directory and entered "./Setup install" and everything worked.
10/8/2024 5:19 PM — InterLinked
I see, so your consistent observation is the wanpipe installation fails as part of the script, but if you run ./Setup install
again afterwards, then it works the second time? What's the output in that case?
10/8/2024 6:12 PM — KFKHome
That's the wanpipe works via the ./Setup install. The output is the normal stull. No errors.
10/8/2024 6:13 PM — KFKHome
stull -> stuff
10/8/2024 6:14 PM — InterLinked
All right, if you're able to try the same thing again (phreaknet update
, then phreaknet wanpipe --force
) I'd be curious if it works for you now, without you having to manually run anything.
10/9/2024 12:03 AM — KFKHome
Much better. It generated all of winpipe. Even the wancfg_? utilities that were not built before when things failed. I checked the timestamps of the files before and after. But phreaknet.sh did everything twice and regenerated everything again.
After everything was compiled phreaknet.sh went back to the start of ./Setup install. Recompiled everything again and then did the configuration stuff.
10/9/2024 8:44 AM — InterLinked
But just to clarify, you didn't need to manually run ./Setup install
to make anything work? When the script finished running, everything was in the expected state?
10/9/2024 10:24 AM — KFKHome
Correct on both.
10/9/2024 6:36 PM — InterLinked
Okay, thanks! And sorry, looks like I omitted the silent flag accidentally, though not sure if that would make a difference for you. Any chance you'd be able to give it one more test, same thing as before (update + rerun wanpipe command?)
If everything's still working well for you, I'll go ahead and publish those changes.
10/9/2024 6:41 PM — KFKHome
Ok. I'm going to start the process now.
10/9/2024 7:14 PM — KFKHome
No good. It's doing the compile part a second time.
10/9/2024 7:28 PM — InterLinked
Hmm, didn't you say it did that the second time previously also? (did everything twice and regenerated everything again)
10/9/2024 8:09 PM — KFKHome
Yes, like the last time it did all of the compiles twice. I checked the timestamps of wancfg_* and they changed after the first set of compiles and after the second.
10/9/2024 8:29 PM — InterLinked
Okay, but I take it still worked, right? It just compiled twice?
I made another change so it should only compile once, and hopefully it still works. Let me know if this works better for you!
10/9/2024 8:33 PM — KFKHome
Yes everything worked. I'll try it again
10/9/2024 9:27 PM — KFKHome
This time it only did the compiles once. I think I missed this last time, but after the compiles I get an error:
----- Begin Error Messages -----
Shutting down device: wanpipe1
No devices running. Unloading Modules
Starting WAN Router...
Loading WAN drivers: wanpipe modprobe: ERROR: could not insert 'wanpipe': Invalid argument
Failed to load wanpipe modules !
----- End Error Messages -----
This may be related to a different error that I'm having. I have a problem loading any of the DAHDI drivers. Reported it to Sangoma Support and they had Engineering look at it. Got back: "Engineering has confirmed there seems to be a compiling issue on their side". This problem has something to do with IRQ 0 (timer).
But the older versions of phreaknet.sh didn't care and went on the the configuration stuff.
If I use "./Setup install" I don't get this error.
10/13/2024 1:16 PM — InterLinked
As part of some of the changes, it now prints out the log on failure, so that's probably why it didn't show up before.
The script is just running ./Setup install at that part of the install, so it's not clear to me why running that manually would yield a different result. It's strange enough that I'll try to reproduce what you're describing on an Ubuntu 24.04 when I have some time.
10/13/2024 4:57 PM — KFKHome
The script won't work on Ubuntu 24.04. It's version of the linux kernel is too new. It's something 6.8-something. I can't check as my Ubuntu server is now on Debian. Thats why I switched to Debian.
The script will run and compile wanpipe then fail on the version of linux. This was reported to Sangoma Support and they SSH-ed to my Ubuntu System and reported back that the problem is in the Backlog Queue of "things to do" and it'll be 6-12 months (or longer) before someone gets to it.
10/16/2024 10:57 AM — InterLinked
Okay, I think I'm missing something here. You say it works if you run ./Setup install
manually, and then you say that it doesn't work at all on Ubuntu 24.04? Are we talking about two different systems here? I'm not completely following.
I did just do a test on Ubuntu 24.04 and can confirm wanpipe fails for me, whether using the script or automatic. I will look at that later, but first I want to reproduce what you were talking about with the script not working but running Setup manually made it work.
10/16/2024 2:42 PM — KFKHome
It works on Debian 12 as its version of the linux kernel is 6.1.0, but Ubuntu 24.04 is version more than 6.1. Wanpipe must have a linux kernel version of no more than 6.1.0. That's why I switched my Ubuntu 24.04 system to Debian 12.
I got the same results as you did on Ubuntu 24.04.
10/16/2024 3:37 PM — InterLinked
Okay, thanks for clarifying. I think it sounds like as far as the Debian system, everything is good with the script. I'll go ahead and publish the changes for that soon, and close this issue out at that time.
For the wanpipe compilation issues, I've opened a linked issue here at [PHREAKSCRIPT-49].
10/16/2024 7:36 PM — InterLinked
Closed by https://github.com/InterLinked1/phreakscript/commit/2571432a04e5ab75038f6e4844a915664830e630
You must be
10/3/2024 5:05 PM — InterLinked
Recategorized to proper category: DOCS -> PHREAKSCRIPT