Error loading module 'res_pjsip.so': pjsip_tls_transport_restart

Hello,

I tried to install asterisk 20 according to the wiki, but pjsip fails to lod with the following error:

[Oct 31 14:56:06] ERROR[441436]: loader.c:283 module_load_error: Error loading module ‘res_pjsip.so’: /usr/lib/asterisk/modules/res_pjsip.so: undefined symbol: pjsip_tls_transport_restart

What did I do wrong please?

What instructions did you actually follow? Do you have a system install of PJSIP?

Hello,

I am trying to install asterisk 20 from the asterisk download site on raspberry 4 2 GB Linux 11 (bullseye, 32bit), using this as a howto:
https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+Asterisk

sudo ./configure
sudo make menuconfig
sudo make install
sudo make config
sudo make examples

in my second try, I tried “sudo ./configure --with-pjproject-bundled”
but with no effect.

In menuconfig, pjsip is enabled an I can see the message that it is built.

When I try to “sudo ./install_prereq install” then I get a warning that package “bash” will be removed among other essential files.

That’s not a platform I’m familiar with or have experience with. It’s entirely possible that stuff is lacking in an unexpected fashion resulting in the expectation of TLS support being present being incorrect.

I think I have found the reason: the error described in [ASTERISK-28933] res_pjsip.so fails to load when bundled pjproject is compiled without libssl - Digium/Asterisk JIRA covers what I have experienced. It seems that I build pjsip without libssl-dev first and when I later installed libssl-dev and ran the “make all” again, pjsip was not built correctly.

Now, it fails again, but with “undefined symbol: pj_ssl_cipher_name”

It sounds like your environment is just not… right. That should only happen if the headers say that PJSIP was built with OpenSSL support when it wasn’t.

I’m getting the same error on RockyLinux 8.

It appears that optimization is removing global symbols from the library, as enabling DONT_OPTIMIZE solves the missing symbol issue. I’ve opened an issue on Jira with the particulars. I’d ask the OP to enable DONT_OPTIMIZE and see if that solves the issue for them, too.

Hello tilghman,

sorry for my late reply. I gave up and just used the asterisk packages available in the raspberry repositories. While it is certainly not the newest release, it just works without the many pitfalls.