It looks like it's not possible to use some functionality like this out of the box in Ejabberd Community Edition
Check this page https://www.process-one.net/en/ejabberd/protocols/ and you will see that all mobile P1-Spec extensions are available only at Business Edition
However, I believe you can do what you want with Community Edition following these steps:
- Implement new plugin for Ejabberd which will listen for messages and understand whether you opponent(s) is offline.
- If someone is offline - this plugin can make a request (HTTP) to you App Server API to initiate a push delivery
I did this flow for Tigase XMPP Server and it works great for me, so I'm sure the same can be replicated for Ejabberd