Error on reloading the res_pjsip.so

Scenario:

[astmin@localhost ~]$ sudo asterisk -rvvvvv
[sudo] password for astmin: 
Asterisk 16.14.0, Copyright (C) 1999 - 2018, Digium, Inc. 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.
=========================================================================
Running as user 'asterisk'
Running under group 'asterisk'
Connected to Asterisk 16.14.0 currently running on localhost (pid = 1861)

Command:

localhost*CLI> module reload res_pjsip.so

Errors:

Module 'res_pjsip.so' reloaded successfully.
    -- Reloading module 'res_pjsip.so' (Basic SIP resource)
[Nov  9 20:46:17] ERROR[6186]: res_pjsip_config_wizard.c:1091 object_type_loaded_observer: Unable to load config file 'pjsip_wizard.conf'
[Nov  9 20:46:17] ERROR[6186]: res_pjsip_config_wizard.c:1091 object_type_loaded_observer: Unable to load config file 'pjsip_wizard.conf'
[Nov  9 20:46:17] WARNING[6186]: res_pjsip/config_transport.c:506 transport_apply: Transport 'transport-udp' is not reloadable, maintaining previous values
[Nov  9 20:46:17] ERROR[6186]: res_pjsip/config_transport.c:705 transport_tls_file_handler: Transport: transport-tls: cert_file /home/asterisk/certs/self-signed.crt #if you used certbot, the location is either missing or not readable
[Nov  9 20:46:17] ERROR[6186]: config_options.c:798 aco_process_var: Error parsing cert_file=/home/asterisk/certs/self-signed.crt #if you used certbot, the location at line 10 of 
[Nov  9 20:46:17] ERROR[6186]: res_sorcery_config.c:418 sorcery_config_internal_load: Could not create an object of type 'transport' with id 'transport-tls' from configuration file 'pjsip.conf'
[Nov  9 20:46:17] ERROR[6186]: res_pjsip_config_wizard.c:1091 object_type_loaded_observer: Unable to load config file 'pjsip_wizard.conf'
[Nov  9 20:46:17] ERROR[6186]: res_pjsip_config_wizard.c:1091 object_type_loaded_observer: Unable to load config file 'pjsip_wizard.conf'
[Nov  9 20:46:17] NOTICE[6186]: sorcery.c:1345 sorcery_object_load: Type 'system' is not reloadable, maintaining previous values
[Nov  9 20:46:17] ERROR[6186]: res_pjsip_config_wizard.c:1091 object_type_loaded_observer: Unable to load config file 'pjsip_wizard.conf'
localhost*CLI> 

Trey creating this file

curl http://svn.digium.com/svn/asterisk/trunk/configs/samples/pjsip_wizard.conf.sample > /etc/asterisk/pjsip_wizard.conf

Hi Sir,
Thanks for your reply. Most of the Errors were gone. But I still have some errors:

localhost*CLI> module reload res_pjsip.so
Module 'res_pjsip.so' reloaded successfully.
    -- Reloading module 'res_pjsip.so' (Basic SIP resource)
[Nov 10 11:47:06] WARNING[2856]: res_pjsip/config_transport.c:506 transport_apply: Transport 'transport-udp' is not reloadable, maintaining previous values
[Nov 10 11:47:06] ERROR[2856]: res_pjsip/config_transport.c:705 transport_tls_file_handler: Transport: transport-tls: cert_file /home/asterisk/certs/self-signed.crt #if you used certbot, the location is either missing or not readable
[Nov 10 11:47:06] ERROR[2856]: config_options.c:798 aco_process_var: Error parsing cert_file=/home/asterisk/certs/self-signed.crt #if you used certbot, the location at line 10 of 
[Nov 10 11:47:06] ERROR[2856]: res_sorcery_config.c:418 sorcery_config_internal_load: Could not create an object of type 'transport' with id 'transport-tls' from configuration file 'pjsip.conf'
[Nov 10 11:47:06] NOTICE[2856]: sorcery.c:1345 sorcery_object_load: Type 'system' is not reloadable, maintaining previous values
localhost*CLI> 

With Hope,
Prabhakaran

That’s because of the use of “#” for indicating a comment. That’s not how it works in Asterisk config files. The character “;” should be used instead.

Hi J,
Thanks for your reply…
Now I have removed the “#” along with the comments also:

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[transport-tls]
type=transport
protocol=tls
bind=0.0.0.0
cert_file=/home/asterisk/certs/self-signed.crt
priv_key_file=/home/asterisk/certs/self-signed.key

But still I am getting errors…

localhost*CLI> module reload res_pjsip.so
Module 'res_pjsip.so' reloaded successfully.
    -- Reloading module 'res_pjsip.so' (Basic SIP resource)
[Nov 10 17:17:10] WARNING[2857]: res_pjsip/config_transport.c:506 transport_apply: Transport 'transport-udp' is not reloadable, maintaining previous values
[Nov 10 17:17:10] ERROR[2857]: res_pjsip/config_transport.c:705 transport_tls_file_handler: Transport: transport-tls: cert_file /home/asterisk/certs/self-signed.crt is either missing or not readable
[Nov 10 17:17:10] ERROR[2857]: config_options.c:798 aco_process_var: Error parsing cert_file=/home/asterisk/certs/self-signed.crt at line 10 of 
[Nov 10 17:17:10] ERROR[2857]: res_sorcery_config.c:418 sorcery_config_internal_load: Could not create an object of type 'transport' with id 'transport-tls' from configuration file 'pjsip.conf'
[Nov 10 17:17:10] NOTICE[2857]: sorcery.c:1345 sorcery_object_load: Type 'system' is not reloadable, maintaining previous values
localhost*CLI> 

And is the file missing or not readable as the message states?

On the book:
The author says:

*CLI> pjsip show transports
Transport: <TransportId........> <Type> <cos> <tos> <BindAddress....................>
==========================================================================================
Transport: transport-tls tls 0 0 0.0.0.0:5061
Transport: transport-udp udp 0 0 0.0.0.0:5060

But in my system, I am not getting the transport-tls. I don’t know why it is missing:

Running as user 'asterisk'
Running under group 'asterisk'
Connected to Asterisk 16.14.0 currently running on localhost (pid = 1854)
localhost*CLI> pjsip show transports

Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress....................>
==========================================================================================

Transport:  transport-udp             udp      0      0  0.0.0.0:5060

Objects found: 1

localhost*CLI> 

Please Help…

With Hope,
Prabhakaran

Does the file explicitly mentioned in the error message exist on the system and is Asterisk able to access it?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.