pgw_event field that names why pgw sent it. A push to a browser has no body. To act on each event, see Integrate your app with pgw.
Events
The push service keeps a
refresh push until the registration that it refreshes expires. In passthrough mode, that is the registration at the PBX. In managed mode, it is the registration that pgw granted the app.
A call to a user with several sleeping devices sends one call push to each device. When one device answers, the others get no missed-call push.
On iOS, pgw skips missed, refresh, and test when the app registered no remote token. An app that gets call as an alert registers again when the user taps the alert, and pgw delivers the call if pgw still holds the call.
When pgw sends each push
Fields
On Android, every message carries all six fields in the
data object of the FCM message, and a field that isn’t set for the event is an empty string. On iOS, the fields are top-level keys of the APNs payload, beside aps on an alert or background push. Each iOS push carries only these fields:
Long caller fields
A push must fit the push service’s size limit, so pgw shortensfrom_display to 128 characters, from_uri and to_aor to 256, and call_str to 64. A shortened value ends with …. When the push is still too big, pgw empties the four fields and sends it anyway. pgw never changes the INVITE, so the app reads the full caller from it.
Web Push
A push to a browser has no body, so it carries none of the fields. pgw sends it only forcall and test. The service worker can’t tell the two apart, so it treats each push as a call.
The web app’s VAPID key signs the JWT. Its
aud claim is the push service’s origin, its sub claim is the app’s vapid_subject, and it expires 12 hours after pgw makes it.
Next steps
Integrate your app
Implement the handling that each event needs.
Push log
Check which pushes pgw sent to a device, and what the push service answered.