ARI endpoints/PJSIP not showing up to date info

Hello,

We are using ari to show the total number of PJSIP endpoints(ari/endpoints/PJSIP) in our interface.
From that list we show the endpoints that are online:

2/14.

We have detected that when we erase one or several endpoints from the database, ARI is not returning the new number of endpoints until we issue a ‘core restart’ on asterisk.

Initially I had 14 extensions. I erased 6 but keeps showing 14. On the other hand, it’s working correctly to show when an endpoint goes online after just a few seconds.

Is this a bug? I haven’t been able to find any configuration option to “refresh” the results more frequently.

I’m using Asterisk certified/13.21-cert2.

Thanks in advance.

There is no current mechanism to reconcile the persistent endpoint state with the backends. It’s been talked about, but noone has as of yet tackled it or provided a patch.

1 Like

This isn’t really about ARI, it is about chan _pjsip and ARA. Note that ARA is community supported, and not part of the Asterisk core.

Different modules have different policies about how aggressively they check the ARA database, but, in general, it is more expensive to to check for deletions than additions, and I wouldn’t expect most modules to revalidate their cache for every reference.

1 Like

Thanks to both of you for the answer, in the end we chose to get the number of pjsip_endpoints directly from the database and use ARI to check the endpoints’ status, which apparently works fine.