Closed SVolkert closed 2 years ago
Have you run a health audit? I skimmed https://bugs.freebsd.org/ but couldn't find anything that would match your observiation.
Have you run a health audit?
Not yet. Here is the output:
***GOT REQUEST TO AUDIT HEALTH***
>>> Check installed kernel version
Version 20.7.1 is correct.
>>> Check for missing or altered kernel files
No problems detected.
>>> Check installed base version
Version 20.7.1 is correct.
>>> Check for missing or altered base files
No problems detected.
>>> Check for and install missing package dependencies
Checking all packages: .......... done
>>> Check for missing or altered package files
Checking all packages: .......... done
>>> Check for core packages consistency
Checking core packages: .................................................................... done
***DONE***
First I reinstalled Asterisk. The problem still exists. Then I searched for relating bugs in Asterisk on bugs.freebsd.org...
I skimmed https://bugs.freebsd.org/ but couldn't find anything that would match your observiation.
You're right, there is no matching bug on freebsd.org imho.
Thanks for your quick response! :-)
Would this bring it back for now?
# opnsense-revert -r 20.7.r1 asterisk16
Trying to find out if this broke on update or because of 20.7. For one reason or another, asterisk16 package never carried *.so files for pjsip as witnessed by the pkg-plist from ports.
Moving this issue to correct repo now...
Cheers, Franco
Would this bring it back for now?
# opnsense-revert -r 20.7.r1 asterisk16
Unfortunately no.
Version 16.11.1_1 worked in OPNsense 20.1 without issues.
What I did to reproduce:
# pkg install asterisk16
# service asterisk onestart
# rasterisk
Connected to Asterisk 16.12.0 currently running on sensey (pid = 50044)
sensey*CLI> pjsip reload
No such command 'pjsip reload' (type 'core show help pjsip' for other possible commands)
Then lots of debug output happening...
pjsip reload
No such module 'res_pjsip.so'
No such module 'res_pjsip_authenticator_digest.so'
No such module 'res_pjsip_endpoint_identifier_ip.so'
No such module 'res_pjsip_mwi.so'
No such module 'res_pjsip_notify.so'
No such module 'res_pjsip_outbound_publish.so'
No such module 'res_pjsip_publish_asterisk.so'
No such module 'res_pjsip_outbound_registration.so'
On FreeBSD this doesn't happen. Will try to test build toggles for HBSD...
Any further step on this? Quite a huge problem for me.
So, I believe you are missing the entire PJSIP lib. Usually it is built with the Asterisk package but I do not see it. Here is a lib of PJSIP file in OPNsense 20.1.9_1
root@sbc02:/usr/local/etc/asterisk # pkg list | grep pjsip
/usr/local/etc/asterisk/pjsip.conf.sample
/usr/local/etc/asterisk/pjsip_notify.conf.sample
/usr/local/etc/asterisk/pjsip_wizard.conf.sample
/usr/local/include/asterisk/res_pjsip.h
/usr/local/include/asterisk/res_pjsip_body_generator_types.h
/usr/local/include/asterisk/res_pjsip_cli.h
/usr/local/include/asterisk/res_pjsip_outbound_publish.h
/usr/local/include/asterisk/res_pjsip_presence_xml.h
/usr/local/include/asterisk/res_pjsip_pubsub.h
/usr/local/include/asterisk/res_pjsip_session.h
/usr/local/lib/asterisk/modules/chan_pjsip.so
/usr/local/lib/asterisk/modules/func_pjsip_aor.so
/usr/local/lib/asterisk/modules/func_pjsip_contact.so
/usr/local/lib/asterisk/modules/func_pjsip_endpoint.so
/usr/local/lib/asterisk/modules/res_hep_pjsip.so
/usr/local/lib/asterisk/modules/res_pjsip.so
/usr/local/lib/asterisk/modules/res_pjsip_acl.so
/usr/local/lib/asterisk/modules/res_pjsip_authenticator_digest.so
/usr/local/lib/asterisk/modules/res_pjsip_caller_id.so
/usr/local/lib/asterisk/modules/res_pjsip_config_wizard.so
/usr/local/lib/asterisk/modules/res_pjsip_dialog_info_body_generator.so
/usr/local/lib/asterisk/modules/res_pjsip_diversion.so
/usr/local/lib/asterisk/modules/res_pjsip_dlg_options.so
/usr/local/lib/asterisk/modules/res_pjsip_dtmf_info.so
/usr/local/lib/asterisk/modules/res_pjsip_empty_info.so
/usr/local/lib/asterisk/modules/res_pjsip_endpoint_identifier_anonymous.so
/usr/local/lib/asterisk/modules/res_pjsip_endpoint_identifier_ip.so
/usr/local/lib/asterisk/modules/res_pjsip_endpoint_identifier_user.so
/usr/local/lib/asterisk/modules/res_pjsip_exten_state.so
/usr/local/lib/asterisk/modules/res_pjsip_header_funcs.so
/usr/local/lib/asterisk/modules/res_pjsip_history.so
/usr/local/lib/asterisk/modules/res_pjsip_logger.so
/usr/local/lib/asterisk/modules/res_pjsip_messaging.so
/usr/local/lib/asterisk/modules/res_pjsip_mwi.so
/usr/local/lib/asterisk/modules/res_pjsip_mwi_body_generator.so
/usr/local/lib/asterisk/modules/res_pjsip_nat.so
/usr/local/lib/asterisk/modules/res_pjsip_notify.so
/usr/local/lib/asterisk/modules/res_pjsip_one_touch_record_info.so
/usr/local/lib/asterisk/modules/res_pjsip_outbound_authenticator_digest.so
/usr/local/lib/asterisk/modules/res_pjsip_outbound_publish.so
/usr/local/lib/asterisk/modules/res_pjsip_outbound_registration.so
/usr/local/lib/asterisk/modules/res_pjsip_path.so
/usr/local/lib/asterisk/modules/res_pjsip_phoneprov_provider.so
/usr/local/lib/asterisk/modules/res_pjsip_pidf_body_generator.so
/usr/local/lib/asterisk/modules/res_pjsip_pidf_digium_body_supplement.so
/usr/local/lib/asterisk/modules/res_pjsip_pidf_eyebeam_body_supplement.so
/usr/local/lib/asterisk/modules/res_pjsip_publish_asterisk.so
/usr/local/lib/asterisk/modules/res_pjsip_pubsub.so
/usr/local/lib/asterisk/modules/res_pjsip_refer.so
/usr/local/lib/asterisk/modules/res_pjsip_registrar.so
/usr/local/lib/asterisk/modules/res_pjsip_rfc3326.so
/usr/local/lib/asterisk/modules/res_pjsip_sdp_rtp.so
/usr/local/lib/asterisk/modules/res_pjsip_send_to_voicemail.so
/usr/local/lib/asterisk/modules/res_pjsip_session.so
/usr/local/lib/asterisk/modules/res_pjsip_sips_contact.so
/usr/local/lib/asterisk/modules/res_pjsip_t38.so
/usr/local/lib/asterisk/modules/res_pjsip_transport_websocket.so
/usr/local/lib/asterisk/modules/res_pjsip_xpidf_body_generator.so
/usr/local/include/pjsip-simple/errno.h
/usr/local/include/pjsip-simple/evsub.h
/usr/local/include/pjsip-simple/evsub_msg.h
/usr/local/include/pjsip-simple/iscomposing.h
/usr/local/include/pjsip-simple/mwi.h
/usr/local/include/pjsip-simple/pidf.h
/usr/local/include/pjsip-simple/presence.h
/usr/local/include/pjsip-simple/publish.h
/usr/local/include/pjsip-simple/rpid.h
/usr/local/include/pjsip-simple/types.h
/usr/local/include/pjsip-simple/xpidf.h
/usr/local/include/pjsip-ua/sip_100rel.h
/usr/local/include/pjsip-ua/sip_inv.h
/usr/local/include/pjsip-ua/sip_regc.h
/usr/local/include/pjsip-ua/sip_replaces.h
/usr/local/include/pjsip-ua/sip_timer.h
/usr/local/include/pjsip-ua/sip_xfer.h
/usr/local/include/pjsip.h
/usr/local/include/pjsip/print_util.h
/usr/local/include/pjsip/sip_auth.h
/usr/local/include/pjsip/sip_auth_aka.h
/usr/local/include/pjsip/sip_auth_msg.h
/usr/local/include/pjsip/sip_auth_parser.h
/usr/local/include/pjsip/sip_autoconf.h
/usr/local/include/pjsip/sip_autoconf.h.in
/usr/local/include/pjsip/sip_config.h
/usr/local/include/pjsip/sip_dialog.h
/usr/local/include/pjsip/sip_endpoint.h
/usr/local/include/pjsip/sip_errno.h
/usr/local/include/pjsip/sip_event.h
/usr/local/include/pjsip/sip_module.h
/usr/local/include/pjsip/sip_msg.h
/usr/local/include/pjsip/sip_multipart.h
/usr/local/include/pjsip/sip_parser.h
/usr/local/include/pjsip/sip_private.h
/usr/local/include/pjsip/sip_resolve.h
/usr/local/include/pjsip/sip_tel_uri.h
/usr/local/include/pjsip/sip_transaction.h
/usr/local/include/pjsip/sip_transport.h
/usr/local/include/pjsip/sip_transport_loop.h
/usr/local/include/pjsip/sip_transport_tcp.h
/usr/local/include/pjsip/sip_transport_tls.h
/usr/local/include/pjsip/sip_transport_udp.h
/usr/local/include/pjsip/sip_types.h
/usr/local/include/pjsip/sip_ua_layer.h
/usr/local/include/pjsip/sip_uri.h
/usr/local/include/pjsip/sip_util.h
/usr/local/include/pjsip_auth.h
/usr/local/include/pjsip_simple.h
/usr/local/include/pjsip_ua.h
/usr/local/lib/libpjsip-amd64-portbld-freebsd11.2.a
/usr/local/lib/libpjsip-simple-amd64-portbld-freebsd11.2.a
/usr/local/lib/libpjsip-simple.so
/usr/local/lib/libpjsip-simple.so.2
/usr/local/lib/libpjsip-ua-amd64-portbld-freebsd11.2.a
/usr/local/lib/libpjsip-ua.so
/usr/local/lib/libpjsip-ua.so.2
/usr/local/lib/libpjsip.so
/usr/local/lib/libpjsip.so.2
/usr/local/share/licenses/pjsip-extsrtp-2.9_4/GPLv2+
/usr/local/share/licenses/pjsip-extsrtp-2.9_4/LICENSE
/usr/local/share/licenses/pjsip-extsrtp-2.9_4/catalog.mk
Compared to OPNsense 21.1.5
root@sbc01:/usr/local/etc/asterisk # pkg list | grep pjsip
/usr/local/etc/asterisk/pjsip.conf.sample
/usr/local/etc/asterisk/pjsip_notify.conf.sample
/usr/local/etc/asterisk/pjsip_wizard.conf.sample
/usr/local/include/asterisk/res_pjsip.h
/usr/local/include/asterisk/res_pjsip_body_generator_types.h
/usr/local/include/asterisk/res_pjsip_cli.h
/usr/local/include/asterisk/res_pjsip_outbound_publish.h
/usr/local/include/asterisk/res_pjsip_presence_xml.h
/usr/local/include/asterisk/res_pjsip_pubsub.h
/usr/local/include/asterisk/res_pjsip_session.h
/usr/local/lib/asterisk/modules/chan_pjsip.so
/usr/local/lib/asterisk/modules/func_pjsip_aor.so
/usr/local/lib/asterisk/modules/func_pjsip_contact.so
/usr/local/lib/asterisk/modules/func_pjsip_endpoint.so
/usr/local/lib/asterisk/modules/res_hep_pjsip.so
/usr/local/lib/asterisk/modules/res_pjsip.so
/usr/local/lib/asterisk/modules/res_pjsip_acl.so
/usr/local/lib/asterisk/modules/res_pjsip_authenticator_digest.so
/usr/local/lib/asterisk/modules/res_pjsip_caller_id.so
/usr/local/lib/asterisk/modules/res_pjsip_config_wizard.so
/usr/local/lib/asterisk/modules/res_pjsip_dialog_info_body_generator.so
/usr/local/lib/asterisk/modules/res_pjsip_diversion.so
/usr/local/lib/asterisk/modules/res_pjsip_dlg_options.so
/usr/local/lib/asterisk/modules/res_pjsip_dtmf_info.so
/usr/local/lib/asterisk/modules/res_pjsip_empty_info.so
/usr/local/lib/asterisk/modules/res_pjsip_endpoint_identifier_anonymous.so
/usr/local/lib/asterisk/modules/res_pjsip_endpoint_identifier_ip.so
/usr/local/lib/asterisk/modules/res_pjsip_endpoint_identifier_user.so
/usr/local/lib/asterisk/modules/res_pjsip_exten_state.so
/usr/local/lib/asterisk/modules/res_pjsip_header_funcs.so
/usr/local/lib/asterisk/modules/res_pjsip_history.so
/usr/local/lib/asterisk/modules/res_pjsip_logger.so
/usr/local/lib/asterisk/modules/res_pjsip_messaging.so
/usr/local/lib/asterisk/modules/res_pjsip_mwi.so
/usr/local/lib/asterisk/modules/res_pjsip_mwi_body_generator.so
/usr/local/lib/asterisk/modules/res_pjsip_nat.so
/usr/local/lib/asterisk/modules/res_pjsip_notify.so
/usr/local/lib/asterisk/modules/res_pjsip_one_touch_record_info.so
/usr/local/lib/asterisk/modules/res_pjsip_outbound_authenticator_digest.so
/usr/local/lib/asterisk/modules/res_pjsip_outbound_publish.so
/usr/local/lib/asterisk/modules/res_pjsip_outbound_registration.so
/usr/local/lib/asterisk/modules/res_pjsip_path.so
/usr/local/lib/asterisk/modules/res_pjsip_phoneprov_provider.so
/usr/local/lib/asterisk/modules/res_pjsip_pidf_body_generator.so
/usr/local/lib/asterisk/modules/res_pjsip_pidf_digium_body_supplement.so
/usr/local/lib/asterisk/modules/res_pjsip_pidf_eyebeam_body_supplement.so
/usr/local/lib/asterisk/modules/res_pjsip_publish_asterisk.so
/usr/local/lib/asterisk/modules/res_pjsip_pubsub.so
/usr/local/lib/asterisk/modules/res_pjsip_refer.so
/usr/local/lib/asterisk/modules/res_pjsip_registrar.so
/usr/local/lib/asterisk/modules/res_pjsip_rfc3326.so
/usr/local/lib/asterisk/modules/res_pjsip_sdp_rtp.so
/usr/local/lib/asterisk/modules/res_pjsip_send_to_voicemail.so
/usr/local/lib/asterisk/modules/res_pjsip_session.so
/usr/local/lib/asterisk/modules/res_pjsip_sips_contact.so
/usr/local/lib/asterisk/modules/res_pjsip_stir_shaken.so
/usr/local/lib/asterisk/modules/res_pjsip_t38.so
/usr/local/lib/asterisk/modules/res_pjsip_transport_websocket.so
/usr/local/lib/asterisk/modules/res_pjsip_xpidf_body_generator.so
If you notice, it is missing the underlying PJSIP libs "/usr/local/lib/libpjsip*" and the includes.
So either the flag to build the PJSIP libs with Asterisk is turned OFF, or you need to also build the FreeBSD net/pjsip package so it can be installed with Asterisk.
I elect to flag it on the build with Asterisk, because they usually develop to a certain version.
Reason I am interested in this is because I have been developing a SBC plugin for OPNSense and when I moved from 20.1.9_1 to 20.7 and 21.1 I was receiving the same issue. I just took the time to look into it a bit more because I want to get off of 20.1.
Also,
pjsip-extsrtp | 2.9_4 | 9.68MiB | GPLv2+ | Multimedia communication library written in C language
-- | -- | -- | -- | --
is present in 20.1 but not starting from 20.7. Not sure if it matters.
Ok, The way I see it. In 20.1 Asterisk 13 was the default port at one point. If I remember somewhere in 20.1 Asterisk 16 became the default port. Then when moving from 20.1 to 20.7 the libs were cleared and pjsip was no longer on the system (I think Asterisk 16 was using Asterisk 13 pjsip...theory). Now, looking at the Makefiles between Asterisk 13 and Asterisk 16, Asterisk 16 Makefile defaults to 'no' on the pjproject bundled. Asterisk 13 Makefile - https://svnweb.freebsd.org/ports/head/net/asterisk13/Makefile?view=markup&pathrev=568513#l167 Asterisk 16 Makefile - https://svnweb.freebsd.org/ports/head/net/asterisk16/Makefile?view=markup&pathrev=483629#l37
Or it could be this https://svnweb.freebsd.org/ports/head/net/asterisk13/Makefile?view=markup&pathrev=483629#l218 where shown above that libpj and/or pjsip-extsrtp is needed (in both Asterisk 13 and 16).
So I think libpj is required either as a bundle (patch to Makefile) or the ports pjsip package.
Just my opinion.
Ok. I spun up a FreeBSD 12.2 instance in my Proxmox lab and did a 'pkg install asterisk16' and it works as the other post have mentioned. I then did the following
cd /usr/local/lib
tar zcvf asterisk16.tar.gz ./libasteriskpj* asterisk/modules/*
I then scp'd that tarball to the /usr/local/lib that the OPNsense instance has Asterisk installed via 'pkg install asterisk16'. and then did that following...
cd /usr/local/lib
tar zxvf asterisk16.tar.gz
I then started asterisk on the OPNsense instance and it ran without any issues...No 'PJ_AF_INET' errors. And pjproject and pjsip commands are available inside Asterisk.
I know and understand that the practice that I just executed might not be optimal or "right' but maybe it will help diagnose the issue.
The current version is 16.17.0 on the OPNsense and FreeBSD ports, so I don't know what the difference is between the two ports. So I am not sure about my posts above it they are totally factual.
I have attached the tarball incase anybody wishes to test or try it out.
Unfortunately I ran into this issue as well. I worked around it, the same way as @TheGrandWazoo described. Thanks for the detailed description, of how you worked around 👍 saved me a lot of time figuring this one out.
Is this still the case with 21.7.2 or higher? Because we changed back to FreeBSD ports and their less problematic build behaviour (not using -s
in make invokes).
@fichtner Thanks for the update. I'm still having the issue, do you think it's an issue in the FreeBSD ports after all? 🤔 What I did:
asterisk16
using pkg remove asterisk16
./usr/local/lib/asterisk
.pkg install asterisk16
.Error loading module 'chan_pjsip.so': /usr/local/lib/asterisk/modules/chan_pjsip.so: Undefined symbol "ast_sip_cli_traverse_objects"
I'm not really experienced with FreeBSD, did I miss an important step like purging some caches? Maybe the other people experiencing the issue can double check this one, to confirm/falsify.
@pgrupp are you using LibreSSL?
No that's not it.
So ast_sip_cli_traverse_objects is exported by res_pjsip.so, but loading res_pjsip.so first results in missing PJ_AF_INET.
I can't find PJ_AF_INET exported anywhere...
# cat test.sh
for FILE in $(find /usr/local/lib/asterisk/modules -name "*.so" ) ; do
nm -D ${FILE} | grep PJ_AF_INET
done
# sh test.sh
U PJ_AF_INET
U PJ_AF_INET6
U PJ_AF_INET
U PJ_AF_INET6
U PJ_AF_INET
U PJ_AF_INET6
U PJ_AF_INET
U PJ_AF_INET6
U PJ_AF_INET
U PJ_AF_INET6
U PJ_AF_INET
U PJ_AF_INET6
U PJ_AF_INET6
U PJ_AF_INET
It looks like internally when these should be built they are not, likely for a system comparison (HBSD!=FreeBSD) and I can't find where they should be exported at all.
(I suspect when you run the script on FreeBSD there will be two "T"s in there for the actual module exporting these.)
@fichtner No, I'm using OpenSSL 1.1.1d-freebsd 24 Aug 2021
:)
This is so strange. Maybe it's really a HBSD bug in the dynamic library loading. I couldn't track the origin of the missing symbols -- at least there is no difference in FreeBSD build.
Cheers, Franco
You may wish to also do the following:
nm -D /usr/local/lib/libasteriskpj.so | grep PJ_AF_INET
On OPNSense it returns:
root@sbc02:/usr/local/lib # ls -l /usr/local/lib/libasteriskpj.so
lrwxr-xr-x 1 root wheel 18 Sep 20 23:12 /usr/local/lib/libasteriskpj.so -> libasteriskpj.so.2
root@sbc02:/usr/local/lib # nm -D /usr/local/lib/libasteriskpj.so | grep PJ_AF_INET
root@sbc02:/usr/local/lib # nm -D /usr/local/lib/libasteriskpj.so | grep PJ_AF_INET
root@sbc02:/usr/local/lib #
but on FreeBSD it returns:
root@freebsd:~ # nm -D /usr/local/lib/libasteriskpj.so | grep PJ_AF_INET
0000000000050edc R PJ_AF_INET
0000000000050ede R PJ_AF_INET6
root@freebsd:~ #
I believe that is the KEY file that holds the precious PJ_AF_INET[|6] and for some reason it is missing.
Cheers, Waz
From my tarball example above, I am going to attempt to just load in that file and see if Asterisk will run instead of ALL the files in the asterisk/modules directory.
Currently just upgraded my SBC to 21.7.3_1 and Asterisk 16.20.0 came along with it.
That was successful.
root@sbc02:/usr/local/lib # opnsense-version
OPNsense 21.7.3_1 (amd64/LibreSSL)
root@sbc02:/usr/local/lib # tar zxvf asterisk16-libpj.tar.gz
x ./libasteriskpj.so
x ./libasteriskpj.so.2
root@sbc02:/usr/local/lib # nm -D /usr/local/lib/libasteriskpj.so | grep PJ_AF_INET
0000000000050edc R PJ_AF_INET
0000000000050ede R PJ_AF_INET6
root@sbc02:/usr/local/lib # asterisk -r
Asterisk 16.20.0, Copyright (C) 1999 - 2021, Sangoma Technologies Corporation and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 16.20.0 currently running on sbc02 (pid = 98825)
sbc02*CLI> pjsip show aors
No such command 'pjsip show aors' (type 'core show help pjsip show' for other possible commands)
sbc02*CLI> core restart now
sbc02*CLI>
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last minute cleanups
root@sbc02:/usr/local/lib # asterisk -r
Asterisk 16.20.0, Copyright (C) 1999 - 2021, Sangoma Technologies Corporation and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 16.20.0 currently running on sbc02 (pid = 15423)
sbc02*CLI> pjsip show aors
Aor: <Aor..............................................> <MaxContact>
Contact: <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================
Hope this helps.
Cheers, Waz
Just a little update to the script to show which files hold the SYMBOLS.
for FILE in $(find /usr/local/lib -name "*.so" ) ; do
check=`nm -D ${FILE} | grep PJ_AF_INET | tr -s '\n' ' '`
if [ "$check" != '' ]; then
echo ${FILE}: ${check}
fi
done
root@sbc02:~ # sh pjsip_test.sh
/usr/local/lib/asterisk/modules/res_pjsip_transport_websocket.so: U PJ_AF_INET6
/usr/local/lib/asterisk/modules/res_rtp_asterisk.so: U PJ_AF_INET U PJ_AF_INET6
/usr/local/lib/asterisk/modules/res_pjsip_sdp_rtp.so: U PJ_AF_INET U PJ_AF_INET6
/usr/local/lib/asterisk/modules/res_pjsip_session.so: U PJ_AF_INET U PJ_AF_INET6
/usr/local/lib/asterisk/modules/res_pjproject.so: U PJ_AF_INET U PJ_AF_INET6
/usr/local/lib/asterisk/modules/res_pjsip_t38.so: U PJ_AF_INET U PJ_AF_INET6
/usr/local/lib/asterisk/modules/res_pjsip_logger.so: U PJ_AF_INET
/usr/local/lib/asterisk/modules/res_pjsip.so: U PJ_AF_INET U PJ_AF_INET6
/usr/local/lib/libasteriskpj.so: 0000000000050edc R PJ_AF_INET 0000000000050ede R PJ_AF_INET6
root@sbc02:~ #
Cheers, Waz
Hi Waz,
Hmm so the build of libasteriskpj does not include these symbols on HBSD for one reason or another? Maybe an issue with the static linker used or the build not detecting the OS correctly? I remember HBSD deviated from the stock FreeBSD behaviour there.
Cheers, Franco
It's working now on OPNsense 22.1. I'm sure this was a HardenedBSD issue of some sort.
Asterisk Ready.
sensey*CLI> pjsip reload
Module 'res_pjsip.so' reloaded successfully.
Module 'res_pjsip_authenticator_digest.so' reloaded successfully.
Module 'res_pjsip_endpoint_identifier_ip.so' reloaded successfully.
Module 'res_pjsip_mwi.so' reloaded successfully.
Module 'res_pjsip_notify.so' reloaded successfully.
Module 'res_pjsip_outbound_publish.so' reloaded successfully.
Module 'res_pjsip_publish_asterisk.so' reloaded successfully.
Module 'res_pjsip_outbound_registration.so' reloaded successfully.
[Feb 1 09:26:30] NOTICE[106417]: sorcery.c:1348 sorcery_object_load: Type 'system' is not reloadable, maintaining previous values
Important notices Before you add a new report, we ask you kindly to acknowledge the following:
[x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[x] I have searched the existing issues and I'm convinced that mine is new.
Describe the bug The latest update ( 16.11.1_1 -> 16.12.0) broke PJSIP in Asterisk. Last known working version: 16.11.1_1
To Reproduce Steps to reproduce the behavior:
OPNsense*CLI> pjsip reload
No such module 'res_pjsip.so'
No such module 'res_pjsip_authenticator_digest.so'
No such module 'res_pjsip_endpoint_identifier_ip.so'
No such module 'res_pjsip_mwi.so'
No such module 'res_pjsip_notify.so'
No such module 'res_pjsip_outbound_publish.so'
No such module 'res_pjsip_publish_asterisk.so'
No such module 'res_pjsip_outbound_registration.so'
OPNsense*CLI> pjsip show registrations
No such command 'pjsip show registrations' (type 'core show help pjsip show registrations' for other possible commands)
Expected behavior All PJSIP Commands should available.
pjsip dump endpt -- Dump the res_pjsip endpt internals
pjsip export config_wizard primitives [to] -- Export config wizard primitives
pjsip list aors -- List PJSIP Aors
pjsip list auths -- List PJSIP Auths
pjsip list channels -- List PJSIP Channels
pjsip list ciphers -- List available OpenSSL cipher names
pjsip list contacts -- List PJSIP Contacts
pjsip list endpoints -- List PJSIP Endpoints
pjsip list identifies -- List PJSIP Identifies
pjsip list registrations -- List PJSIP Registrations
pjsip list subscriptions {inbound|outbound} [like] -- List active inbound/outbound subscriptions
pjsip list transports -- List PJSIP Transports
pjsip qualify -- Send an OPTIONS request to a PJSIP endpoint
pjsip reload -- <no description available>
pjsip send notify -- Send a NOTIFY request to a SIP endpoint
pjsip send register -- Registers an outbound registration target
pjsip send unregister -- Unregisters outbound registration target
pjsip set logger {on|off|host} -- Enable/Disable PJSIP Logger Output
pjsip show aors -- Show PJSIP Aors
pjsip show aor -- Show PJSIP Aor
pjsip show auths -- Show PJSIP Auths
pjsip show auth -- Show PJSIP Auth
pjsip show channels -- Show PJSIP Channels
pjsip show channel -- Show PJSIP Channel
pjsip show channelstats -- Show PJSIP Channel Stats
pjsip show contacts -- Show PJSIP Contacts
pjsip show contact -- Show PJSIP Contact
pjsip show endpoints -- Show PJSIP Endpoints
pjsip show endpoint -- Show PJSIP Endpoint
pjsip show identifiers -- List registered endpoint identifiers
pjsip show identifies -- Show PJSIP Identifies
pjsip show identify -- Show PJSIP Identify
pjsip show registrations -- Show PJSIP Registrations
pjsip show registration -- Show PJSIP Registration
pjsip show scheduled_tasks -- Show all scheduled tasks
pjsip show settings -- Show global and system configuration options
pjsip show subscription {inbound|outbound} -- Show active subscription details
pjsip show subscriptions {inbound|outbound} [like] -- Show active inbound/outbound subscriptions
pjsip show transports -- Show PJSIP Transports
pjsip show transport -- Show PJSIP Transport
pjsip show unidentified_requests -- Show PJSIP Unidentified Requests
pjsip show version -- Show the version of pjproject in use
Relevant log files [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_rtp_asterisk.so': /usr/local/lib/asterisk/modules/res_rtp_asterisk.so: Undefined symbol "PJ_AF_INET" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'chan_pjsip.so': /usr/local/lib/asterisk/modules/chan_pjsip.so: Undefined symbol "ast_sip_cli_traverse_objects" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'func_pjsip_aor.so': /usr/local/lib/asterisk/modules/func_pjsip_aor.so: Undefined symbol "ast_sip_get_sorcery" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'func_pjsip_contact.so': /usr/local/lib/asterisk/modules/func_pjsip_contact.so: Undefined symbol "ast_sip_get_sorcery" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'func_pjsip_endpoint.so': /usr/local/lib/asterisk/modules/func_pjsip_endpoint.so: Undefined symbol "ast_sip_get_sorcery" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_header_funcs.so': /usr/local/lib/asterisk/modules/res_pjsip_header_funcs.so: Undefined symbol "ast_sip_session_register_supplement_with_module" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_history.so': /usr/local/lib/asterisk/modules/res_pjsip_history.so: Undefined symbol "PJ_AF_UNSPEC" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_authenticator_digest.so': /usr/local/lib/asterisk/modules/res_pjsip_authenticator_digest.so: Undefined symbol "ast_sip_get_sorcery" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_endpoint_identifier_ip.so': /usr/local/lib/asterisk/modules/res_pjsip_endpoint_identifier_ip.so: Undefined symbol "ast_sip_get_sorcery" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_mwi.so': /usr/local/lib/asterisk/modules/res_pjsip_mwi.so: Undefined symbol "ast_sip_register_subscription_handler" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_nat.so': /usr/local/lib/asterisk/modules/res_pjsip_nat.so: Undefined symbol "pjsip_notify_method" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_notify.so': /usr/local/lib/asterisk/modules/res_pjsip_notify.so: Undefined symbol "ast_sip_push_task" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_outbound_publish.so': /usr/local/lib/asterisk/modules/res_pjsip_outbound_publish.so: Undefined symbol "ast_sip_get_sorcery" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjproject.so': /usr/local/lib/asterisk/modules/res_pjproject.so: Undefined symbol "PJ_AF_INET" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip.so': /usr/local/lib/asterisk/modules/res_pjsip.so: Undefined symbol "PJ_AF_INET" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_acl.so': /usr/local/lib/asterisk/modules/res_pjsip_acl.so: Undefined symbol "ast_sip_get_sorcery" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_caller_id.so': /usr/local/lib/asterisk/modules/res_pjsip_caller_id.so: Undefined symbol "ast_sip_session_register_supplement_with_module" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_config_wizard.so': /usr/local/lib/asterisk/modules/res_pjsip_config_wizard.so: Undefined symbol "ast_sip_get_sorcery" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_dialog_info_body_generator.so': /usr/local/lib/asterisk/modules/res_pjsip_dialog_info_body_generator.so: Undefined symbol "ast_sip_pubsub_register_body_generator" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_diversion.so': /usr/local/lib/asterisk/modules/res_pjsip_diversion.so: Undefined symbol "ast_sip_session_register_supplement_with_module" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_dlg_options.so': /usr/local/lib/asterisk/modules/res_pjsip_dlg_options.so: Undefined symbol "ast_sip_session_register_supplement_with_module" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_dtmf_info.so': /usr/local/lib/asterisk/modules/res_pjsip_dtmf_info.so: Undefined symbol "ast_sip_session_register_supplement_with_module" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_empty_info.so': /usr/local/lib/asterisk/modules/res_pjsip_empty_info.so: Undefined symbol "ast_sip_session_register_supplement_with_module" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_endpoint_identifier_anonymous.so': /usr/local/lib/asterisk/modules/res_pjsip_endpoint_identifier_anonymous.so: Undefined symbol "ast_sip_register_endpoint_identifier_with_name" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_session.so': /usr/local/lib/asterisk/modules/res_pjsip_session.so: Undefined symbol "PJ_AF_INET" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_sips_contact.so': /usr/local/lib/asterisk/modules/res_pjsip_sips_contact.so: Undefined symbol "ast_sip_register_service" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_t38.so': /usr/local/lib/asterisk/modules/res_pjsip_t38.so: Undefined symbol "PJ_AF_INET" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_transport_websocket.so': /usr/local/lib/asterisk/modules/res_pjsip_transport_websocket.so: Undefined symbol "PJ_AF_INET6" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_xpidf_body_generator.so': /usr/local/lib/asterisk/modules/res_pjsip_xpidf_body_generator.so: Undefined symbol "ast_sip_pubsub_register_body_generator" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_outbound_authenticator_digest.so': /usr/local/lib/asterisk/modules/res_pjsip_outbound_authenticator_digest.so: Undefined symbol "ast_sip_register_outbound_authenticator" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_outbound_registration.so': /usr/local/lib/asterisk/modules/res_pjsip_outbound_registration.so: Undefined symbol "ast_sip_get_sorcery" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_path.so': /usr/local/lib/asterisk/modules/res_pjsip_path.so: Undefined symbol "ast_sip_register_supplement" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_phoneprov_provider.so': /usr/local/lib/asterisk/modules/res_pjsip_phoneprov_provider.so: Undefined symbol "ast_sip_get_sorcery" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_pidf_body_generator.so': /usr/local/lib/asterisk/modules/res_pjsip_pidf_body_generator.so: Undefined symbol "ast_sip_pubsub_register_body_generator" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_pidf_digium_body_supplement.so': /usr/local/lib/asterisk/modules/res_pjsip_pidf_digium_body_supplement.so: Undefined symbol "ast_sip_pubsub_register_body_supplement" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_rfc3326.so': /usr/local/lib/asterisk/modules/res_pjsip_rfc3326.so: Undefined symbol "pjsip_bye_method" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_sdp_rtp.so': /usr/local/lib/asterisk/modules/res_pjsip_sdp_rtp.so: Undefined symbol "PJ_AF_INET" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_send_to_voicemail.so': /usr/local/lib/asterisk/modules/res_pjsip_send_to_voicemail.so: Undefined symbol "ast_sip_session_register_supplement_with_module" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_publish_asterisk.so': /usr/local/lib/asterisk/modules/res_pjsip_publish_asterisk.so: Undefined symbol "ast_sip_publish_client_alloc_datastore" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_pubsub.so': /usr/local/lib/asterisk/modules/res_pjsip_pubsub.so: Undefined symbol "PJ_GUID_STRING_LENGTH" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_refer.so': /usr/local/lib/asterisk/modules/res_pjsip_refer.so: Undefined symbol "pjsip_invite_method" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_registrar.so': /usr/local/lib/asterisk/modules/res_pjsip_registrar.so: Undefined symbol "pjsip_register_method" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_logger.so': /usr/local/lib/asterisk/modules/res_pjsip_logger.so: Undefined symbol "PJ_AF_INET" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_messaging.so': /usr/local/lib/asterisk/modules/res_pjsip_messaging.so: Undefined symbol "ast_sip_register_service" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_mwi_body_generator.so': /usr/local/lib/asterisk/modules/res_pjsip_mwi_body_generator.so: Undefined symbol "ast_sip_pubsub_register_body_generator" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_pidf_eyebeam_body_supplement.so': /usr/local/lib/asterisk/modules/res_pjsip_pidf_eyebeam_body_supplement.so: Undefined symbol "ast_sip_pubsub_register_body_supplement" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_endpoint_identifier_user.so': /usr/local/lib/asterisk/modules/res_pjsip_endpoint_identifier_user.so: Undefined symbol "ast_sip_register_endpoint_identifier_with_name" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_exten_state.so': /usr/local/lib/asterisk/modules/res_pjsip_exten_state.so: Undefined symbol "ast_sip_subscription_get_endpoint" [Sep 1 20:56:28] ERROR[100172] loader.c: Error loading module 'res_pjsip_one_touch_record_info.so': /usr/local/lib/asterisk/modules/res_pjsip_one_touch_record_info.so: Undefined symbol "ast_sip_session_register_supplement_with_module"
Environment OPNsense: 20.7.1 amd64 OpenSSL: 1.1.1g 21 Apr 2020 CPU: AMD GX-416RA SOC PHP: 7.3.20