telephony/WakeupDevices

Long-lived registrations of SIP devices awaiting push notifications for wakeup and SIP registration.

Used by the B2B service during registration and calls, and by the MWARE service — to place the service push-relay contact in Registrar. Created and updated during SIP registration of a mobile application passing push parameters (RFC 8599) and the device identifier in Contact:

Contact: <sip:...;pn-provider=apns;pn-param=7RBDZ62MF9.com.eraplatform.mobile.voip;pn-prid=966b8e...4f61>;reg-id=1;+sip.instance="<urn:uuid:3ea39328-...>"
  • pn-provider — push service, field type;

  • pn-param — application, field app;

  • pn-prid — application instance token, field token;

  • +sip.instance — device identifier, field instance.

Deleted on device logout (deregistration without pn-prid), when the push service confirms the application instance is absent, after a series of temporary push failures, or when the lifetime expires.

More about the operation and configuration of the SIP device wakeup service in the article settings.wakeup_device_options.

Storage type: runtime.

Table 1. Class fields
Field Description

id

Identifier. Hash of username and instance.

instance

Device identifier: the +sip.instance parameter from Contact without quotes and angle brackets, lowercase. Does not change when the token changes.

type

Push service, the pn-provider parameter from Contact. Determines the sending module and settings section. Possible variants:

  • "fcm" (usually Android);

  • "apns" (usually iOS).

app

Application, the pn-param parameter from Contact. Settings section record key: for fcm — application name, for apns — <TeamID>.<Topic>.

token

Application instance token on the device, the pn-prid parameter from Contact (decoded). Updated on every SIP registration.

username

SIP account username associated with this wakeup registration. Populated during SIP registration.

registerTime

Time of the last record overwrite during SIP registration (see ts).

ua

Device User-Agent.

ts

Timestamp of the last record overwrite during SIP registration; ttl is counted from it. The record is overwritten during SIP registration if device data changed, there were push failures, or more than a day has passed since the last update (repeated registrations without changes do not overwrite the record).

ttl

Lifetime in seconds from the last overwrite (ts). Used for automatic deletion of the wakeup registration.

failureTime

Time of the earliest failed push notification since the last overwrite during SIP registration or successful wakeup. Used to decide on early termination of the wakeup registration.

failureCount

Number of failed push notifications since the last overwrite during SIP registration or successful wakeup. Used to decide on early termination of the wakeup registration.