Cannot move subscription_persistence to our DB in PJSIP


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:


[res_pjsip] ; Realtime PJSIP configuration wizard


registration = realtime,ps_registrations

subscription = realtime,ps_subscription_persistence


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].


I will open a ticket thanks.