Func_pjsip_aor.so: Undefined Symbol: Ast_sip_location_retrieve_aor_contacts

Home » Asterisk Users » Func_pjsip_aor.so: Undefined Symbol: Ast_sip_location_retrieve_aor_contacts
Asterisk Users 4 Comments

asterisk-16.13.0-rc2. Fedora 32

pjsip won’t load because of undefined symbols:

[Sep 4 14:19:25] ERROR[141137]: loader.c:2396 load_modules: Error loading module ‘func_pjsip_aor.so’:
/usr/lib64/asterisk/modules/func_pjsip_aor.so: undefined symbol:
ast_sip_location_retrieve_aor_contacts
[Sep 4 14:19:25] ERROR[141137]: loader.c:2396 load_modules: Error loading module ‘res_pjsip_dlg_options.so’:
/usr/lib64/asterisk/modules/res_pjsip_dlg_options.so: undefined symbol:
ast_sip_add_header
[Sep 4 14:19:25] ERROR[141137]: loader.c:2396 load_modules: Error loading module ‘res_pjsip_transport_websocket.so’:
/usr/lib64/asterisk/modules/res_pjsip_transport_websocket.so: undefined symbol: ast_sip_create_serializer
[Sep 4 14:19:25] ERROR[141137]: loader.c:2396 load_modules: Error loading module ‘func_pjsip_contact.so’:
/usr/lib64/asterisk/modules/func_pjsip_contact.so: undefined symbol:
ast_sip_get_contact_status_label
[Sep 4 14:19:25] ERROR[141137]: loader.c:2396 load_modules: Error loading module ‘chan_pjsip.so’:
/usr/lib64/asterisk/modules/chan_pjsip.so: undefined symbol:
ast_sip_cli_traverse_objects

and so on.

module show like res_pjproject Module Description Use Count Status Support Level res_pjproject.so PJPROJECT Log and Utility Support
1 Running core
1 modules loaded

module load res_pjsip Unable to load module res_pjsip Command ‘module load res_pjsip’ failed. ERROR[141535]: loader.c:281 module_load_error: Error loading module
‘res_pjsip’: /usr/lib64/asterisk/modules/res_pjsip.so: undefined symbol:
ast_statsd_log_full_va

module load chan_pjsip Unable to load module chan_pjsip Command ‘module load chan_pjsip’ failed. ERROR[141780]: loader.c:281 module_load_error: Error loading module
‘chan_pjsip’: /usr/lib64/asterisk/modules/chan_pjsip.so: undefined symbol: ast_sip_cli_traverse_objects

/usr/include/asterisk exists, with all the .h files, owned by root, permissions 644. For instance:

grep ast_sip_cli_traverse_objects /usr/include/asterisk/*

/usr/include/asterisk/res_pjsip_cli.h:char
*ast_sip_cli_traverse_objects(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);

Do I need to preload some module?

Any help appreciated.

4 thoughts on - Func_pjsip_aor.so: Undefined Symbol: Ast_sip_location_retrieve_aor_contacts

  • This means, that your pjsip library doesn’t match the asterisk binary. It’s best to remove the independent pjsip library and compile asterisk[1] with the bundled pjsip library. Doing it this way ensures that pjsip and asterisk match for sure (and some additional patches are applied to pjsip on top regarding usage of pjsip in asterisk).

    Greetings Michael

    [1] https://downloads.asterisk.org/pub/telephony/asterisk

  • Sure seems I’m using the bundled pjproject:

    ./bootstrap.sh Generating the configure script for Asterisk …
    ……….
    ./configure –build=x86_64-redhat-linux-gnu
    –host=x86_64-redhat-linux-gnu –program-prefix=
    –disable-dependency-tracking –prefix=/usr –exec-prefix=/usr
    –bindir=/usr/bin –sbindir=/usr/sbin –sysconfdir=/etc
    –datadir=/usr/share –includedir=/usr/include –libdir=/usr/lib64
    –libexecdir=/usr/libexec –localstatedir=/var –sharedstatedir=/var/lib
    –mandir=/usr/share/man –infodir=/usr/share/info –with-imap=system
    –with-gsm=/usr –with-ilbc=/usr –with-libedit=yes –with-srtp
    –with-pjproject-bundled ‘LDFLAGS=-m64
    -Wl,–as-needed,–library-path=/usr/lib64 -Wl,-z,relro -Wl,–as-needed
    -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld’
    ……. checking for embedded pjproject (may have to download)… configuring
    [pjproject] Downloading https://raw.githubusercontent.com/asterisk/third-party/master/pjproject/2.10/pjproject-2.10.tar.bz2
    to /tmp/pjproject-2.10.tar.bz2
    [pjproject] Verifying /tmp/pjproject-2.10.tar.bz2
    [pjproject] Verify successful
    [pjproject] Verifying /tmp/pjproject-2.10.tar.bz2
    [pjproject] Verify successful
    [pjproject] Unpacking /tmp/pjproject-2.10.tar.bz2
    [pjproject] Applying patches
    /home/asterisk/rpmbuild/BUILD/asterisk-16.13.0-rc2/third-party/pjproject/patches
    /home/asterisk/rpmbuild/BUILD/asterisk-16.13.0-rc2/third-party/pjproject/source
    [pjproject] Applying user.mak
    [pjproject] Applying custom include file patches/config_site.h
    [pjproject] Applying custom include file patches/asterisk_malloc_debug.h
    [pjproject] Rebuilding
    [pjproject] Configuring with –build=x86_64-redhat-linux-gnu
    –host=x86_64-redhat-linux-gnu –prefix=/opt/pjproject
    –disable-speex-codec –disable-speex-aec –disable-bcg729
    –disable-gsm-codec –disable-ilbc-codec –disable-l16-codec
    –disable-g722-codec –disable-g7221-codec –disable-opencore-amr
    –disable-silk –disable-opus –disable-video –disable-v4l2
    –disable-sound –disable-ext-sound –disable-sdl –disable-libyuv
    –disable-ffmpeg –disable-openh264 –disable-ipp –disable-libwebrtc
    –without-external-pa –without-external-srtp –disable-resample
    –disable-g711-codec –enable-epoll checking for bundled pjproject… yes
    ………. checking for bridges/bridge_softmix/include/hrirs.h… yes checking for mandatory modules: PJPROJECT GSM ILBC IMAP_TK LIBEDIT
    SRTP… ok configure: creating ./config.status config.status: creating build_tools/menuselect-deps config.status: creating makeopts config.status: creating include/asterisk/autoconfig.h

    And then asterisk builds pjproject :

    ………. make -C
    /home/asterisk/rpmbuild/BUILD/asterisk-16.13.0-rc2/third-party/pjproject/source/pjlib//build libpj-x86_64-redhat-linux-gnu.a make -f
    /home/asterisk/rpmbuild/BUILD/asterisk-16.13.0-rc2/third-party/pjproject/source/build/rules.mak APP=PJLIB app=pjlib ../lib/libpj-x86_64-redhat-linux-gnu.a make[4]: Entering directory
    ‘/home/asterisk/rpmbuild/BUILD/asterisk-16.13.0-rc2/third-party/pjproject/source/pjlib/build’
    ………..

    Very puzzled.

    sean

  • Your PJSIP has built requiring the res_statsd module, loading that before res_pjsip should allow it to load. If not you’d need to provide the new output.

  • The problem was that I was not building app_statsd so the res_statsd wasn’t built.

    I can’t figure out where I configured pjproject to use statsd.

    sean