- Install build prerequisites (once)
On the Issabel / Rocky 8 VM:
dnf groupinstall -y "Development Tools"
dnf install -y \
libtiff-devel \
libjpeg-turbo-devel \
ncurses-devel
(These are needed even for the static build; spandsp still needs headers for TIFF/JPEG.)
You can leave the existing iaxmodem-1.3.0-2.el7.centos RPM installed; you will simply not use its binary.
- Download IAXmodem source and build static
cd /usr/src
curl -LO https://downloads.sourceforge.net/project/iaxmodem/iaxmodem/1.3.4/iaxmodem-1.3.4.tar.gz
tar xzf iaxmodem-1.3.4.tar.gz
cd iaxmodem-1.3.4
Now run the static build:
./build static
This script:
Builds the private lib/libiax2 and lib/spandsp trees inside the source.
Produces a single iaxmodem binary linked against those static libraries (no dependency on system libiax2/spandsp).
Confirm you have the new binary:
ls -l iaxmodem
file iaxmodem
file should show it linked with static libspandsp.a and libiax.a (you will see those in lib/spandsp/src/.libs and lib/libiax2/src/.libs).
- Install the static binary safely
Place it under /usr/local and version it:
cp iaxmodem /usr/local/sbin/iaxmodem-1.3.4-static
chmod 755 /usr/local/sbin/iaxmodem-1.3.4-static
ln -sf /usr/local/sbin/iaxmodem-1.3.4-static /usr/local/sbin/iaxmodem
This keeps the old RPM binary in /usr/sbin/iaxmodem untouched, but you will point the service at /usr/local/sbin/iaxmodem instead.
- Point the iaxmodem service to the static binary
Edit the existing init script (SysV wrapper that systemd is using):
vi /etc/rc.d/init.d/iaxmodem
Locate the line similar to:
DAEMON=/usr/sbin/iaxmodem
Change it to:
DAEMON=/usr/local/sbin/iaxmodem
Save and exit.
Then restart:
systemctl restart iaxmodem
systemctl status iaxmodem
ps aux | grep iaxmodem
You should now see /usr/local/sbin/iaxmodem (the static 1.3.4 build) in the process list.
Your existing /etc/iaxmodem/iaxmodem-cfg.ttyIAX1 and Issabel fax configuration remain exactly as they are; only the executable has changed.
- Restart HylaFAX and test
service hylafax restart
faxstat -s
Then from the Asterisk CLI:
asterisk -rvvvvv
core set verbose 4
console dial 300@from-internal
Watch simultaneously:
tail -f /var/log/iaxmodem/iaxmodem
If the static 1.3.4 build is sound you should now see:
No new status 0xB lines in the iaxmodem log.
Asterisk completing the IAX2/300 call without “Max retries exceeded”.
faxstat -s showing the modem as Receiving during the test and then back to Ready.
That is the complete “static library method” for your Issabel / Rocky 8 system: build IAXmodem with its own bundled spandsp and libiax2, install that binary, and leave the rest of the stack unchanged.
You said:
[root@VicInn src]# tar xzf iaxmodem-1.3.4.tar.gz
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
[root@VicInn src]#
ChatGPT said:
That error means the file you downloaded is not a gzip archive at all (almost certainly an HTML page from SourceForge), so tar xzf quite correctly refuses to unpack it.
Check and redownload it cleanly.
- Inspect what you actually downloaded
cd /usr/src
file iaxmodem-1.3.4.tar.gz
head -n 5 iaxmodem-1.3.4.tar.gz
If you see something like “HTML document” or the first line starts with <!DOCTYPE html> or similar, it is just a web page, not the tarball.
Remove it:
rm -f iaxmodem-1.3.4.tar.gz
- Download the real tarball (follow redirects)
Use curl -L so it follows the SourceForge mirror redirects:
cd /usr/src
curl -L -o iaxmodem-1.3.4.tar.gz \
"https://downloads.sourceforge.net/project/iaxmodem/iaxmodem/1.3.4/iaxmodem-1.3.4.tar.gz"
Verify it is a gzip archive:
file iaxmodem-1.3.4.tar.gz
You want something like:
iaxmodem-1.3.4.tar.gz: gzip compressed data, ...
Only once that looks correct, unpack:
tar xzf iaxmodem-1.3.4.tar.gz
cd iaxmodem-1.3.4
Then continue with the static build:
./build static
and the install / service changes as described earlier.
You said:
[root@VicInn src]# file iaxmodem-1.3.4.tar.gz
iaxmodem-1.3.4.tar.gz: HTML document, ASCII text
[root@VicInn src]#
ChatGPT said:
That confirms it: you have an HTML page, not the archive. You just need to download the real tarball with curl -L and a correct URL.
Do this step-by-step.
cd /usr/src
1. Remove the bogus file
rm -f iaxmodem-1.3.4.tar.gz
2. Download the actual tarball (follow redirects)
curl -L -o iaxmodem-1.3.4.tar.gz \
"https://downloads.sourceforge.net/project/iaxmodem/iaxmodem/1.3.4/iaxmodem-1.3.4.tar.gz"
3. Verify it is really gzip data now
file iaxmodem-1.3.4.tar.gz
You want the file output to say something like:
iaxmodem-1.3.4.tar.gz: gzip compressed data, ...
If that is correct, then unpack and continue:
tar xzf iaxmodem-1.3.4.tar.gz
cd iaxmodem-1.3.4
static build
./build static
Once ./build static completes, you will have the iaxmodem binary in that directory ready to install as per the earlier instructions.
You said:
compiled and linked with some warnings: libtool: link: ranlib .libs/libspandsp.a
libtool: link: ( cd ".libs" && rm -f "libspandsp.la" && ln -s "../libspandsp.la" "libspandsp.la" )
make[2]: Leaving directory '/usr/src/iaxmodem-1.3.4/lib/spandsp/src'
make[1]: Leaving directory '/usr/src/iaxmodem-1.3.4/lib/spandsp/src'
make[1]: Entering directory '/usr/src/iaxmodem-1.3.4/lib/spandsp'
make[1]: Nothing to be done for 'all-am'.
make[1]: Leaving directory '/usr/src/iaxmodem-1.3.4/lib/spandsp'
iaxmodem.c: In function ‘iaxmodem’:
iaxmodem.c:788:62: warning: ‘%s’ directive output may be truncated writing up to 63 bytes into a region of size 45 [-Wformat-truncation=]
snprintf(dspnowaudiofile, sizeof(dspnowaudiofile), "/tmp/%s-dsp.raw.recording", regpeer);
~ ~
iaxmodem.c:788:5: note: ‘snprintf’ output between 24 and 87 bytes into a destination of size 50
snprintf(dspnowaudiofile, sizeof(dspnowaudiofile), "/tmp/%s-dsp.raw.recording", regpeer);
~~~~~~~~~~~~~~~~~
iaxmodem.c:789:62: warning: ‘%s’ directive output may be truncated writing up to 63 bytes into a region of size 45 [-Wformat-truncation=]
snprintf(iaxnowaudiofile, sizeof(iaxnowaudiofile), "/tmp/%s-iax.raw.recording", regpeer);
~ ~
iaxmodem.c:789:5: note: ‘snprintf’ output between 24 and 87 bytes into a destination of size 50
snprintf(iaxnowaudiofile, sizeof(iaxnowaudiofile), "/tmp/%s-iax.raw.recording", regpeer);
~~~~~~~~~~~~~~~~~
iaxmodem.c:790:56: warning: ‘%s’ directive output may be truncated writing up to 63 bytes into a region of size 45 [-Wformat-truncation=]
snprintf(dspaudiofile, sizeof(dspaudiofile), "/tmp/%s-dsp.raw", regpeer);
~ ~
iaxmodem.c:790:5: note: ‘snprintf’ output between 14 and 77 bytes into a destination of size 50
snprintf(dspaudiofile, sizeof(dspaudiofile), "/tmp/%s-dsp.raw", regpeer);
~~~~~~~~~~~~~~~
iaxmodem.c:791:56: warning: ‘%s’ directive output may be truncated writing up to 63 bytes into a region of size 45 [-Wformat-truncation=]
snprintf(iaxaudiofile, sizeof(iaxaudiofile), "/tmp/%s-iax.raw", regpeer);
~ ~
iaxmodem.c:791:5: note: ‘snprintf’ output between 14 and 77 bytes into a destination of size 50
snprintf(iaxaudiofile, sizeof(iaxaudiofile), "/tmp/%s-iax.raw", regpeer);
~~~~~~~~~~~~~~~
iaxmodem.c: In function ‘spawn_modems’:
iaxmodem.c:1792:54: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 242 [-Wformat-truncation=]
snprintf(filename, sizeof(filename), "/etc/iaxmodem/%s", cf->d_name);
~
iaxmodem.c:1792:2: note: ‘snprintf’ output between 15 and 270 bytes into a destination of size 256
snprintf(filename, sizeof(filename), "/etc/iaxmodem/%s", cf->d_name);
~~~~~~~~~~~~~~~
[root@VicInn iaxmodem-1.3.4]#
ChatGPT said:
Those warnings are from snprintf format-truncation checks; they are not fatal and are in non-critical debug/recording paths. The build has completed successfully.
Next step is to install this new static binary and point the existing service at it.
- Verify the new binary
From /usr/src/iaxmodem-1.3.4:
ls -l iaxmodem
./iaxmodem -h | head
You should see it identify itself as 1.3.4.
- Install it alongside the old one
Keep the RPM version as a backup:
Backup old EL7 binary
cp /usr/sbin/iaxmodem /usr/sbin/iaxmodem.el7-rpm
Install the new static build
cp /usr/src/iaxmodem-1.3.4/iaxmodem /usr/local/sbin/iaxmodem-1.3.4-static
chmod 755 /usr/local/sbin/iaxmodem-1.3.4-static
Optional convenience symlink
ln -sf /usr/local/sbin/iaxmodem-1.3.4-static /usr/local/sbin/iaxmodem
- Point the service at the new binary
Edit the init script that systemd is wrapping:
vi /etc/rc.d/init.d/iaxmodem
Find the line:
DAEMON=/usr/sbin/iaxmodem
Change it to:
DAEMON=/usr/local/sbin/iaxmodem
Save and exit.
Restart the service and confirm:
systemctl restart iaxmodem
systemctl status iaxmodem
ps aux | grep iaxmodem
You should now see /usr/local/sbin/iaxmodem (or iaxmodem-1.3.4-static) in the command column, not /usr/sbin/iaxmodem.
- Restart HylaFAX and check modem
service hylafax restart
faxstat -s
You should see ttyIAX1 listed and “Ready” or “Waiting for modem to come ready”.
- Test a fax call
Tail the iaxmodem log:
tail -f /var/log/iaxmodem/iaxmodem
In another shell:
asterisk -rvvvvv
core set verbose 4
console dial 300@from-internal
Watch for:
No new status 0xB entries in /var/log/iaxmodem/iaxmodem.
In Asterisk: the IAX2/300 leg stays up; no “Max retries exceeded”.
faxstat -s shows the modem as receiving, then back to “Ready”.
If all of that is clean, the static 1.3.4 build is working and you can leave it in place. If it still dies, the next step would be to run this static binary once under gdb and capture a backtrace, but installation of the static build is now complete.