Unable to load pjsip modules

Hi,

I am running Raspbx on a Pi3. Asterisk 13.17.1 is preinstalled so I did not compile anything on it.
The first day, I made my configurations and all chan_sip and chan_pjsip extensions were working fine.
Then something happened and now pjsip extensions are not being connected.
When I check, I see that it is not listening on port 5060. Only 5160 (which is for chan_sip)

When I look at the logs , I see that lot of pjsip modules are not loaded , with undefined symbol errors.

I don’T understand. Since I didn’t change any binaries on the system, why these errors came up ?

How can I make it work ?

[2017-12-11 22:39:05] WARNING[18616] loader.c: Error loading module ‘res_pjsip_pidf_digium_body_supplement.so’: /usr/lib/asterisk/mo
dules/res_pjsip_pidf_digium_body_supplement.so: undefined symbol: ast_sip_presence_xml_create_node
[2017-12-11 22:39:05] WARNING[18616] loader.c: Module ‘res_pjsip_pidf_digium_body_supplement.so’ could not be loaded.
[2017-12-11 22:39:05] WARNING[18616] loader.c: Error loading module ‘res_pjsip_mwi_body_generator.so’: /usr/lib/asterisk/modules/res
pjsip_mwi_body_generator.so: undefined symbol: ast_sip_get_pjsip_endpoint
[2017-12-11 22:39:05] WARNING[18616] loader.c: Module ‘res_pjsip_mwi_body_generator.so’ could not be loaded.
[2017-12-11 22:39:05] WARNING[18616] loader.c: Error loading module ‘res_pjsip_sips_contact.so’: /usr/lib/asterisk/modules/res_pjsip
sips_contact.so: undefined symbol: ast_sip_get_pjsip_endpoint
[2017-12-11 22:39:05] WARNING[18616] loader.c: Module ‘res_pjsip_sips_contact.so’ could not be loaded.
[2017-12-11 22:39:06] WARNING[18616] loader.c: Error loading module ‘res_pjsip_send_to_voicemail.so’: /usr/lib/asterisk/modules/res

pjsip_send_to_voicemail.so: undefined symbol: ast_sip_session_register_supplement
[2017-12-11 22:39:06] WARNING[18616] loader.c: Module ‘res_pjsip_send_to_voicemail.so’ could not be loaded.
[2017-12-11 22:39:06] WARNING[18616] loader.c: Error loading module ‘res_pjsip_pidf_body_generator.so’: /usr/lib/asterisk/modules/re
s_pjsip_pidf_body_generator.so: undefined symbol: ast_sip_get_pjsip_endpoint
[2017-12-11 22:39:06] WARNING[18616] loader.c: Module ‘res_pjsip_pidf_body_generator.so’ could not be loaded.
[2017-12-11 22:39:06] WARNING[18616] loader.c: Error loading module ‘res_pjsip_empty_info.so’: /usr/lib/asterisk/modules/res_pjsip_e
mpty_info.so: undefined symbol: ast_sip_session_register_supplement
[2017-12-11 22:39:06] WARNING[18616] loader.c: Module ‘res_pjsip_empty_info.so’ could not be loaded.
[2017-12-11 22:39:06] WARNING[18616] loader.c: Error loading module ‘res_pjsip_dialog_info_body_generator.so’: /usr/lib/asterisk/mod
ules/res_pjsip_dialog_info_body_generator.so: undefined symbol: ast_sip_presence_xml_create_node
[2017-12-11 22:39:06] WARNING[18616] loader.c: Module ‘res_pjsip_dialog_info_body_generator.so’ could not be loaded.
[2017-12-11 22:39:06] WARNING[18616] loader.c: Error loading module ‘res_pjsip_dlg_options.so’: /usr/lib/asterisk/modules/res_pjsip

dlg_options.so: undefined symbol: ast_sip_session_register_supplement
[2017-12-11 22:39:06] WARNING[18616] loader.c: Module ‘res_pjsip_dlg_options.so’ could not be loaded.
[2017-12-11 22:39:06] WARNING[18616] loader.c: Error loading module ‘res_pjsip_publish_asterisk.so’: /usr/lib/asterisk/modules/res_p
jsip_publish_asterisk.so: undefined symbol: ast_sip_register_publish_handler
[2017-12-11 22:39:06] WARNING[18616] loader.c: Module ‘res_pjsip_publish_asterisk.so’ could not be loaded.
[2017-12-11 22:39:06] WARNING[18616] loader.c: Error loading module ‘func_pjsip_aor.so’: /usr/lib/asterisk/modules/func_pjsip_aor.so
: undefined symbol: ast_sip_location_retrieve_aor_contacts
[2017-12-11 22:39:06] WARNING[18616] loader.c: Module ‘func_pjsip_aor.so’ could not be loaded.
[2017-12-11 22:39:06] WARNING[18616] loader.c: Error loading module ‘res_pjsip_pidf_eyebeam_body_supplement.so’: /usr/lib/asterisk/m
odules/res_pjsip_pidf_eyebeam_body_supplement.so: undefined symbol: ast_sip_presence_xml_create_node
[2017-12-11 22:39:06] WARNING[18616] loader.c: Module ‘res_pjsip_pidf_eyebeam_body_supplement.so’ could not be loaded.
[2017-12-11 22:39:06] WARNING[18616] loader.c: Error loading module ‘res_pjsip_history.so’: /usr/lib/asterisk/modules/res_pjsip_hist
ory.so: undefined symbol: ast_copy_pj_str
[2017-12-11 22:39:06] WARNING[18616] loader.c: Module ‘res_pjsip_history.so’ could not be loaded.
[2017-12-11 22:39:06] WARNING[18616] loader.c: Error loading module ‘res_pjsip_transport_management.so’: /usr/lib/asterisk/modules/r
es_pjsip_transport_management.so: undefined symbol: ast_sip_get_pjsip_endpoint
[2017-12-11 22:39:06] WARNING[18616] loader.c: Module ‘res_pjsip_transport_management.so’ could not be loaded.
[2017-12-11 22:39:06] WARNING[18616] loader.c: Error loading module ‘func_pjsip_contact.so’: /usr/lib/asterisk/modules/func_pjsip_co
ntact.so: undefined symbol: ast_sip_get_contact_status_label
[2017-12-11 22:39:06] WARNING[18616] loader.c: Module ‘func_pjsip_contact.so’ could not be loaded.

Did the res_pjsip.so module fail to load? If you manually try to load it what happens?

it fails (see below), but if I load first res_pjproject.so , it works.
still there are many missing res_pjsip* modules. so it does not work.

raspbxCLI> module load res_pjsip.so
Unable to load module res_pjsip.so
Command ‘module load res_pjsip.so’ failed.
raspbx
CLI>
raspbxCLI>
raspbx
CLI>
raspbxCLI> module load res_pjproject.so
Loaded res_pjproject.so
[2017-12-11 23:16:51] ERROR[27208]: res_sorcery_config.c:230 sorcery_config_internal_load: Unable to load config file ‘pjproject.conf’
Loaded res_pjproject.so => (PJPROJECT Log and Utility Support)
raspbx
CLI> module load res_pjproject.so
Unable to load module res_pjproject.so
Command ‘module load res_pjproject.so’ failed.
[2017-12-11 23:16:53] WARNING[27208]: loader.c:1042 load_resource: Module ‘res_pjproject.so’ already exists.
raspbxCLI> module load res_pjsip.so
raspbx
CLI>

If you configure modules.conf to load res_pjproject.so and then res_pjsip.so explicitly what happens?

how can I do that ?
I currently have these in the modules.conf :

noload = chan_pjsip.so
noload = res_pjsip_endpoint_identifier_anonymous.so
noload = res_pjsip_messaging.so
noload = res_pjsip_pidf.so
noload = res_pjsip_session.so
noload = func_pjsip_endpoint.so
noload = res_pjsip_endpoint_identifier_ip.so
noload = res_pjsip_mwi.so
noload = res_pjsip_pubsub.so
noload = res_pjsip.so
noload = res_pjsip_acl.so
noload = res_pjsip_endpoint_identifier_user.so
noload = res_pjsip_nat.so
noload = res_pjsip_refer.so
noload = res_pjsip_t38.so
noload = res_pjsip_authenticator_digest.so
noload = res_pjsip_exten_state.so
noload = res_pjsip_notify.so
noload = res_pjsip_registrar_expire.so
noload = res_pjsip_transport_websocket.so
noload = res_pjsip_caller_id.so
noload = res_pjsip_header_funcs.so
noload = res_pjsip_one_touch_record_info.so
noload = res_pjsip_registrar.so
noload = res_pjsip_diversion.so
noload = res_pjsip_log_forwarder.so
noload = res_pjsip_outbound_authenticator_digest.so
noload = res_pjsip_rfc3326.so
noload = res_pjsip_dtmf_info.so
noload = res_pjsip_logger.so
noload = res_pjsip_outbound_registration.so
noload = res_pjsip_sdp_rtp.so
noload = res_pjsip_outbound_publish.so
noload = res_pjsip_config_wizard.so
noload = res_pjproject.so

Those lines explicitly don’t load PJSIP modules… are you using something like FreePBX to manage Asterisk?

yes. FreePBX is coming with Raspbx.

Now I removed them from modules.conf and everything about pjsip is working.
But why did they get into the modules.conf ?

FreePBX manages the configuration files, it could have done it.

but I didn’t disable pjsip anywhere. why does it do such a weird thing, I really don’t understand.

anyway, thanks. since you pointed out modules.conf…