Unable to use PostgreSQL w/ Realtime & PJSIP malfunctioning

Hello,

I have a working PostgreSQL database installed locally with Asterisk 13 installed via package on OpenBSD 5.9. I also downloaded from source to obtain the SQL in the contribs section for the database schema. My alembic database version is 28ce1e718f05

After populating the tables with the example data my two endpoints don’t have stable connections, and the AORs/Contacts are not working. Calls between Endpoints fail. The AOR record is never updated (I initially populate with @10.0.0.0:5060), and contacts are never inserted. I do have remove_existing set to true and max_contacts set to 1, so I was expecting at least an update statement for the initial AOR with the new Contact information. I’m tailing the PostgreSQL logfile and can see only SELECT statements being run against the database for pjsip tables. I double checked all the privileges, and CDR records are being written. While there are tables for transports and systems, they seemingly are not connected.

The stock configurations included in OpenBSD do not result in a working Asterisk instance. My previous experience was with Asterisk 1.6.2 and ODBC and it’s confusing about what is required. Since ‘pjsip show endpoints’ is listing the endpoints I think I have the configuration in the ball park

Can anyone contribute a working example where PJSIP is entirely run from file? Although, in that case where are the AOR and Contact records being updated? I don’t mind working with Realtime, but so far Asterisk seems to refuse to pull/update the data it needs from PostgreSQL.

Any advice or working examples is appreciated. My configurations:

module.conf

[modules]
autoload=yes
preload=res_config_pgsql.so
noload=res_phoneprov.so
noload=res_pjsip_phoneprov_provider.so
noload=chan_sip.so

Starting Asterisk I see a lot of modules starting and failing so I wanted to not load modules I wasn’t going to use.

res_pgsql.conf

[general]
dbhost=127.0.0.1
dbport=5432
dbname=asteriskops
dbuser=asteriskops
dbpass=asterisk
requirements=createclose

extconfig.conf

[settings]
ps_endpoints => pgsql,asteriskops
ps_auths => pgsql,asteriskops
ps_aors => pgsql,asteriskops
ps_domain_aliases => pgsql,asteriskops
ps_endpoint_id_ips => pgsql,asteriskops
ps_contacts => pgsql,asteriskops

pjsip.transports.conf

[0.0.0.0-udp]
type=transport
protocol=udp
bind=10.10.10.2:5060
external_media_address=x.x.x.x
external_signaling_address=x.x.x.x
local_net=10.0.0.0/8

[0.0.0.0-tcp]
type=transport
protocol=tcp
bind=10.10.10.2:5060
external_media_address=x.x.x.x
external_signaling_address=x.x.x.x
local_net=10.0.0.0/8

pjsip.conf

#include pjsip.transports.conf

[general]
tos=cs3
tos_audio=ef
tos_video=af41
cos=3
cos_audio=5
cos_video=3

sorcery.conf

[res_pjsip]
;endpoint/cache = memory_cache,object_lifetime_stale=600,object_lifetime_maximum=1800,expire_on_reload=yes,full_backend_cache=yes
;auth/cache = memory_cache,expire_on_reload=yes,full_backend_cache=yes
;aor/cache = memory_cache,object_lifetime_stale=1500,object_lifetime_maximum=1800,expire_on_reload=yes,full_backend_cache=yes

endpoint=realtime,ps_endpoints
auth=realtime,ps_auths
aor=realtime,ps_aors
domain_alias=realtime,ps_domain_aliases
contacts=realtime,ps_contacts
transports=realtime,ps_transports

[res_pjsip_endpoint_identifier_ip]
identify=realtime,ps_endpoint_id_ips