Best way to check if agent registered

We are using PJSIP and wish to have a count maintained if an agent is registered at at least one place. The current way is querying the ps_contacts table for that endpoint; better than cli and grep I think, but we have some issues with that approach. Is there any way I could trigger a script when asterisk receives a successful inbound registration request? This can be done through AMI maybe, we have been using AGI till now.
Anyway, please suggest what would be the best way to do so.


You could use the AMI PeerStatus Event.

1 Like

Working well, thanks a lot :smiley:

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