Asterisk shutdown when trying to make a call

Hi Guys,

Strange problem.

When I try to make a call with pjsip through my real-time database the Asterisk 18 gets disconnected and restarted. I have been trying to fix this issue for hours now, but I don’t really know where to look anymore. I hope somebody can help me or sees something that I have missed.

IP-172-31-12-33*CLI> 
  == Setting global variable 'SIPDOMAIN' to '13.231.187.53'
    -- Executing [1000@default:1] Dial("PJSIP/1001-00000000", "PJSIP/1000,60,tT")
ip-172-31-12-33*CLI> 
Disconnected from Asterisk server
Asterisk cleanly ending (0).
Executing last-minute cleanups

I checked the Asterisk log, but I can’t see anything special. (Maybe I am wrong!)

[Jan 20 06:15:45] Asterisk 18.1.1 built by root @ ip-172-31-29-37.ap-northeast-1.compute.internal on a x86_64 running Linux on 2021-01-06 03:26:37 UTC
[Jan 20 06:15:45] NOTICE[3511] loader.c: 337 modules will be loaded.
[Jan 20 06:15:45] NOTICE[3511] res_odbc.c: Registered ODBC class 'asterisk' dsn->[asterisk]
[Jan 20 06:15:45] NOTICE[3511] res_config_ldap.c: No directory user found, anonymous binding as default.
[Jan 20 06:15:45] ERROR[3511] res_config_ldap.c: No directory URL or host found.
[Jan 20 06:15:45] ERROR[3511] res_config_ldap.c: Cannot load LDAP RealTime driver.
[Jan 20 06:15:45] ERROR[3511] res_config_pgsql.c: PostgreSQL RealTime: Failed to connect database asterisk on 127.0.0.1: 
[Jan 20 06:15:45] WARNING[3511] res_config_pgsql.c: PostgreSQL RealTime: Couldn't establish connection. Check debug.
[Jan 20 06:15:45] NOTICE[3511] cdr.c: CDR simple logging enabled.
[Jan 20 06:15:45] WARNING[3511] res_phoneprov.c: Unable to find a valid server address or name.
[Jan 20 06:15:45] NOTICE[3511] res_smdi.c: No SMDI interfaces are available to listen on, not starting SMDI listener.
[Jan 20 06:15:45] NOTICE[3511] chan_skinny.c: Configuring skinny from skinny.conf
[Jan 20 06:15:46] ERROR[3511] ari/config.c: No configured users for ARI
[Jan 20 06:15:46] NOTICE[3511] confbridge/conf_config_parser.c: Adding default_menu menu to app_confbridge
[Jan 20 06:15:46] NOTICE[3511] cdr_radius.c: Cannot load radiusclient-ng configuration file /etc/radiusclient-ng/radiusclient.conf.
[Jan 20 06:15:46] NOTICE[3511] cdr_pgsql.c: cdr_pgsql configuration contains no global section, skipping module load.
[Jan 20 06:15:46] NOTICE[3511] cel_radius.c: Cannot load radiusclient-ng configuration file /etc/radiusclient-ng/radiusclient.conf.
[Jan 20 06:15:46] NOTICE[3511] cel_custom.c: No mappings found in cel_custom.conf. Not logging CEL to custom CSVs.
[Jan 20 06:15:46] WARNING[3511] cel_pgsql.c: CEL pgsql config file missing global section.
[Jan 20 06:15:46] WARNING[3511] loader.c: Some non-required modules failed to load.
[Jan 20 06:15:46] ERROR[3511] loader.c: Error loading module 'cdr_tds.so': libsybdb.so.5: cannot open shared object file: No such file or directory
[Jan 20 06:15:46] ERROR[3511] loader.c: Error loading module 'cel_tds.so': libsybdb.so.5: cannot open shared object file: No such file or directory
[Jan 20 06:15:46] ERROR[3511] loader.c: Error loading module 'res_srtp.so': /usr/lib64/asterisk/modules/res_srtp.so: undefined symbol: crypto_policy_set_aes_cm_128_hmac_sha1_32
[Jan 20 06:15:46] ERROR[3511] loader.c: cdr_sqlite3_custom declined to load.
[Jan 20 06:15:46] ERROR[3511] loader.c: cdr_radius declined to load.
[Jan 20 06:15:46] ERROR[3511] loader.c: cdr_pgsql declined to load.
[Jan 20 06:15:46] ERROR[3511] loader.c: cel_sqlite3_custom declined to load.
[Jan 20 06:15:46] ERROR[3511] loader.c: cel_radius declined to load.

Anybody can help me in the right direction.
My database looks like this.

PS endpoints

	('1000', 'transport-udp', '1000', '1000', 'default', 'all', 'ulaw', 'no', NULL, NULL, NULL, NULL, NULL, NULL, 'yes', 'yes', NULL, NULL, NULL, '1000', NULL, 'yes', NULL, 'yes', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
	('1001', 'transport-udp', '1001', '1001', 'default', 'all', 'ulaw', 'no', NULL, NULL, NULL, NULL, NULL, NULL, 'yes', 'yes', NULL, NULL, NULL, '1001', NULL, 'yes', NULL, 'yes', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

extensions

(1, 'default', '_1X!', 1, 'Dial', 'PJSIP/${EXTEN},60,tT');

extensions.conf

[general]
static => yes
writeprotect => no
clearglobalvars => no

[default]
switch => Realtime/default@extensions

pjsip.conf

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:25060
external_media_address=MYPUBLICIP
external_signaling_address=MYPUBLICIP
local_net=MYPRIVATEIP/255.255.0.0

[transport-tcp]
type = transport
protocol = tcp
bind = 0.0.0.0:25060
external_media_address=MYPUBLICIP
external_signaling_address=MYPUBLICIP
local_net=MYPRIVATEIP/255.255.0.0

Registrations work fine without anyproblems, but making a call will stop asterisk

Entirely possible you are getting hit by this issue[1]. Also be aware that tightly coupling your Asterisk to a database means that ANY issue with the database will be an issue for Asterisk.

[1] https://issues.asterisk.org/jira/browse/ASTERISK-29168

1 Like

@jcolp, It indeed seems to be this bug.
I have fixed it by using the normal extensions.conf file and not the database.
This seems to fix the problem for now.

Thank you for your prompt response.

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