joelsdc created an issue (kamailio/kamailio#4615)
### Description
The `phonenum` module fails to load on Debian Trixie (13) with Kamailio 6.1.0
due to an undefined symbol `telnum_free`. This indicates that `phonenum.so` is
not properly linked against its required library at build time, even though the
library is installed on the system.
I think this is the same class of issue as the one reported for the geoip2
module, see #4614.
Kamailio fails to start as a result, since the module cannot be loaded during
config parsing.
### Troubleshooting
#### Reproduction
1. Install Kamailio 6.1.0 on Debian 13 (Trixie) with the
`kamailio-phonenum-modules` package
2. Add `loadmodule "phonenum.so"` to the Kamailio configuration
3. Start Kamailio
Expected: Kamailio starts successfully with phonenum module loaded.
Actual: Kamailio fails to start with `undefined symbol: telnum_free`.
#### Debugging Data
```
root@kamailio:~# apt-cache depends kamailio-phonenum-modules
kamailio-phonenum-modules
Depends: kamailio
Depends: libc6
root@kamailio:~#
```
For reference, on Kamailio v6.0:
```
root@kamailio:~# apt-cache depends kamailio-phonenum-modules
kamailio-phonenum-modules
Depends: kamailio
Depends: libc6
Depends: libgcc-s1
Depends: libgeocoding8
Depends: libphonenumber8
root@kamailio:~#
```
#### Log Messages
```
2026-03-03T18:32:15.568039-05:00 kamailio kamailio: ERROR: <core>
[core/sr_module.c:613]: ksr_load_module(): could not open module
</usr/lib/x86_64-linux-gnu/kamailio/modules/phonenum.so>:
/usr/lib/x86_64-linux-gnu/kamailio/modules/phonenum.so: undefined symbol:
telnum_free
2026-03-03T18:32:15.568759-05:00 kamailio kamailio: CRITICAL: <core>
[core/cfg.y:4105]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 170, column 12-24: failed to load module
```
#### SIP Traffic
```
N/A - Kamailio does not start, no SIP traffic processed.
```
### Possible Solutions
The `phonenum.so` module likely needs to be explicitly linked against the
library providing `telnum_free` in its Makefile. The current build appears to
rely on implicit linking that doesn't resolve on Debian Trixie.
This is the same linking issue pattern as reported for the geoip2 module
(#4614). It may be worth auditing other modules for similar missing explicit
link flags, as Debian Trixie (gcc 14 / ld with `--as-needed` by default) is
less forgiving about implicit symbol resolution.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 6.1.0 (x86_64/Linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE,
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC,
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, DBG_QM_MALLOC, DBG_F_MALLOC,
DBG_TLSF_MALLOC, USE_FUTEX, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024,
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll.
id: unknown
compiled with gcc 14.2.0
```
* **Operating System**:
```
Linux kamailio 6.12.63+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.63-1
(2025-12-30) x86_64 GNU/Linux
Debian 13 (Trixie)
```
* **Required packages**:
```
root@kamailio:~# dpkg -l | dpkg -l | grep -e libphonenumber -e libgeocoding
ii libgeocoding8:amd64 8.13.51+ds-4.2 amd64
geocoding phone numbers
ii libphonenumber8:amd64 8.13.51+ds-4.2 amd64
parsing/formatting/validating phone numbers
root@kamailio:~#
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4615
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/[email protected]>_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!