Endpoints doesn't load from database

I have configured db, and asterisk. While it shows connected to db , ”pjsip show endpoints” doesn’t show that one. Yesterday postgres’s log file showed “ssl unexpected eof” but today i don’t see anything on logs + still “odbc show“ tells it is connected and realtime load shows endpoint. Datatypes of all columns are varchar except maxcontacts(int).

realtime load ps_endpoints id 101
Column Name Column Value
-------------------- --------------------
transport transport
direct_media no
rtp_symmetric yes
rewrite_contact yes
force_rport yes
ice_support yes
allow !all,h264,ulaw,alaw
auth 101
aors 101
context dial
id 101

realtime load ps_aors id 101
Column Name Column Value
-------------------- --------------------
max_contacts 10
id 101

realtime load ps_auths id 101
Column Name Column Value
-------------------- --------------------
auth_type userpass
password 101
username 101
id 101

sudo cat postgresql-18-main.log

2025-12-18 14:07:27.861 +04 [469699] rashad@rashad LOG:  SSL error: unexpected eof while reading
2025-12-18 14:07:27.861 +04 [469699] rashad@rashad LOG:  could not receive data from client: Connection reset by peer
2025-12-18 14:08:46.441 +04 [469821] rashad@rashad LOG:  SSL error: unexpected eof while reading
2025-12-18 14:08:46.441 +04 [469821] rashad@rashad LOG:  could not receive data from client: Connection reset by peer
2025-12-18 14:34:28.245 +04 [469961] rashad@rashad LOG:  SSL error: unexpected eof while reading
2025-12-18 14:34:28.246 +04 [469961] rashad@rashad LOG:  could not receive data from client: Connection reset by peer
2025-12-18 14:41:52.430 +04 [472204] asterisk@rashad FATAL:  password authentication failed for user “asterisk”
2025-12-18 14:41:52.430 +04 [472204] asterisk@rashad DETAIL:  Role “asterisk” does not exist.
Connection matched file “/etc/postgresql/18/main/pg_hba.conf” line 127: “host    all             all             ::1/128                 scram-sha-256”
2025-12-18 15:02:19.381 +04 [381462] LOG:  checkpoint starting: time
2025-12-18 15:02:20.207 +04 [381462] LOG:  checkpoint complete: wrote 8 buffers (0.0%), wrote 1 SLRU buffers; 0 WAL file(s) added, 0 removed, 0 recycled; write=0.806 s, sync=0.008 s, total=0.826 s; sync files=8, longest=0.005 s, average=0.001 s; distance=45 kB, estimate=2106 kB; lsn=0/29820A8, redo lsn=0/2982050
2025-12-18 15:07:19.709 +04 [472583] rashad@rashad LOG:  SSL error: unexpected eof while reading
2025-12-18 15:07:19.709 +04 [472583] rashad@rashad LOG:  could not receive data from client: Connection reset by peer
2025-12-18 15:47:46.246 +04 [475958] rashad@rashad LOG:  SSL error: unexpected eof while reading
2025-12-18 15:47:46.246 +04 [475958] rashad@rashad LOG:  could not receive data from client: Connection reset by peer
2025-12-18 15:53:16.687 +04 [381458] LOG:  received SIGHUP, reloading configuration files
2025-12-18 15:53:16.688 +04 [381458] LOG:  parameter “ssl” changed to “off”
2025-12-19 13:53:02.173 +04 [544647] rashad@rashad ERROR:  permission denied to examine “log_directory”
2025-12-19 13:53:02.173 +04 [544647] rashad@rashad DETAIL:  Only roles with privileges of the “pg_read_all_settings” role may examine this parameter.
2025-12-19 13:53:02.173 +04 [544647] rashad@rashad STATEMENT:  show log_directory;

cat odbc.ini
[asterisk-connector]
Description = Asterisk PostgreSQL connection
Driver = PostgreSQL
Servername = localhost
Port = 5432
Database = rashad
Username = rashad
Password = XXX
SSLmode = disable

cat odbcinst.ini
[PostgreSQL]
Description = PostgreSQL ODBC driver
Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbcw.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so
FileUsage = 1

sudo cat extconfig.conf

[settings]

; PJSIP Endpoints table
ps_endpoints => odbc,asterisk-connector,ps_endpoints

; PJSIP Auth table
ps_auths => odbc,asterisk-connector,ps_auths

; PJSIP AORs table
ps_aors => odbc,asterisk-connector,ps_aors

cat res_odbc.conf
[asterisk-connector]
enabled => yes
dsn => asterisk-connector
username => rashad
password => XXX
pre-connect => yes
logging=>yes

And is sorcery.conf configured?

1 Like

thanks. If i have to add to sorcery file to load from db, that optionally statement is problem in doc.

You’re going to need to be more specific about what “optionally statement” and also what “doc”.

header Optionally configuring sorcery for realtime and non-realtime data sources

That’s if you want to configure it to come from both realtime and non-realtime, which is optional.

understand that but as you see after configuring db i was expecting it will be loaded right after. I have skipped optionally part as it is not necessary.

ops sorry i have also skipped sorcery part . Nevermind

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