Notification Online & Offline Status by push method in asterisk

Is there any way that asterisk can tell us about online and offline and state change status of clients. I am currently using ARI for knowing these thing every time by using API request(data pulling method) but is there any way that where asterisk can notify us about this by push method.

You can use DeviceStateChange - Asterisk Documentation to detect such changes for servers and registrants. Note this only applies to SIP. The terms client and server are not used for circuit switched technologies, and are widely misused for SIP. I don’t believe that Asterisk updates status when it is the server, receiving an OPTIONS request, from a phone, and I don’t think phones normally send OPTIONS requests.

I have made a module which can retrieve device status , incoming and outgoing call status from Asterisk CLI. But thank you for giving me the direction.