Cannot move subscription_persistence to our DB in PJSIP

Hi,

I’m using Asterisk 14.1 ARA and I want to move the subscriptions from astdb to our SQL database.
I cannot get it to work with the following:

sorcery.conf:

[res_pjsip] ; Realtime PJSIP configuration wizard
endpoint=config,pjsip.conf,criteria=type=endpoint
endpoint=realtime,ps_endpoints
auth=config,pjsip.conf,criteria=type=auth
auth=realtime,ps_auths
aor=config,pjsip.conf,criteria=type=aor
aor=realtime,ps_aors
domain_alias=realtime,ps_domain_aliases
contact=realtime,ps_contacts



[res_pjsip_endpoint_identifier_ip]
identify=config,pjsip.conf,criteria=type=identify
identify=realtime,ps_endpoint_id_ips

[res_pjsip_outbound_registration]
registration = realtime,ps_registrations

[res_pjsip_pubsub]
subscription = realtime,ps_subscription_persistence

extconfig.conf:

voicemail =>  odbc,asterisk,voicemail_users
ps_endpoints => odbc,asterisk
ps_auths => odbc,asterisk
ps_aors => odbc,asterisk
ps_domain_aliases => odbc,asterisk
ps_endpoint_id_ips => odbc,asterisk
ps_contacts => odbc,asterisk
extensions  => odbc,asterisk,extensions
queues => odbc,asterisk
queue_members => odbc,asterisk
ps_subscription_persistence => odbc,asterisk
ps_registrations => odbc,asterisk
queue_log => odbc,asterisk,Queue_log

My mapping seems fine but nothing get populated in our ps_subscription_persistence table:

dti-asterisk*CLI> core show config mappings
Config Engine: odbc
===> queue_log (db=asterisk, table=Queue_log)
===> ps_registrations (db=asterisk, table=ps_registrations)
===> ps_subscription_persistence (db=asterisk, table=ps_subscription_persistence)
===> queue_members (db=asterisk, table=queue_members)
===> queues (db=asterisk, table=queues)
===> extensions (db=asterisk, table=extensions)
===> ps_contacts (db=asterisk, table=ps_contacts)
===> ps_endpoint_id_ips (db=asterisk, table=ps_endpoint_id_ips)
===> ps_domain_aliases (db=asterisk, table=ps_domain_aliases)
===> ps_aors (db=asterisk, table=ps_aors)
===> ps_auths (db=asterisk, table=ps_auths)
===> ps_endpoints (db=asterisk, table=ps_endpoints)
===> voicemail (db=asterisk, table=voicemail_users)
Config Engine: mysql
Config Engine: curl
Config Engine: sqlite3

I’m not sure that is something anyone has explicitly tested. What happens exactly when it tries to persist? Are any queries done? If you turn up core debug (debug in logger.conf to console and core set debug 9 on CLI) what do you see?

I have set core debug to 9 as well as pjsip to on but I do not see any queries to the ps_subscription_persistence table.
I can see other queries but it’s for ps_endpoints,ps_contacts,ps_auths and so on. Subscription remain in the astdb.
It looks like it’s not even trying to use the ps_subscription_persistence table.

We may not have added what is needed to do that, as it was never expected someone would want to persist outside. I’d file an issue[1].

[1] https://issues.asterisk.org/jira

I will open a ticket thanks.