Working in background - notifications
When the application goes to the background it still keeps the SIP registration with the server, so when there is an inbound call or inbound message the app should be able to receive them. In some cases however the application may be closed by the system, for example when there is not enough resources to perform tasks with higher priorities. This happen quite often on iOS.
Incoming calls notification
When incoming arrives a popup is shown and a ringtone played from a file stored on the device. The limitation is that the file can be played only once, its duration is set arbitrary to 15 seconds. These are iOS settings and limitations.
When the iPhone or iPad is in locked mode you have to first unlock it and only then the incoming call can be accepted.
When the call ended before you answered the server sends additional “missed call” notification.
Chats and voicemail notifications
When you click on the notification popup the dialler wakes up and registers to the server. On registration all new messages are downloaded.
Same notifications are also used for new voicemails.