Realtime registration needs pjsip reload or show

Hi all,
I have an issue with PJSIP registration using realtime database (ARA).

So first I set config files to accept realtime database inputs:
in extconfig.conf:

ps_registrations => odbc,asterisk,public.ps_registrations 

in sorcery.conf


Then I start my asterisk and start adding registrations in ps_registrations. These properly show up in database.

  • First issue was that the registration to trunk was “Rejected”, which I “fixed” by a “core restart now” before I start adding registrations.
  • Now I have a second issue with registration: asterisk only start sending registrations messages after I use “pjsip reload” or (as weird as it seems) “pjsip show registrations”. Once I run one of those commands the registration starts and works properly but it just waits as “Unregistered” if I don’t.

Here are the fields I fill with values I thought would have an impact on registration trigger:

  • id
  • auth_rejection_permanent : no
  • client_uri
  • expiration : 360
  • max_retries: 100
  • outbound_auth
  • retry_interval: 2
  • server_uri
  • transport

I would need the registration to start quite as soon as the registration is added to the database.
Does anyone have any idea why this would not work?


It requires a reload, that’s the way it works. It is not constantly polling the database for new outbound registrations and reconciling state. Something else to remember: the more you tightly couple Asterisk and a database, the more area of risk you introduce.

Hi @jcolp, Thanks for your quick answer.

I was just wondering if that was possible as it works for res_pjsip module (e.g. when adding an endpoint/aor/auth/transport/… to the database, asterisk adds it even if I am not reloading pjsip or polling the database any other way).

Thanks again, it saved me some time.

Transports require a reload. The rest don’t because they have minimal to no state, and their retrieval is instead done based on actual usage. If you place a call into Asterisk then it knows it needs to go and retrieve relevant things from the database for it (endpoint, auth). Same goes for inbound registration.

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