When a call is ended on your end, such as the recipient hungs up or the user ends the call from your UI, we'll need to be notified to close the phone widget in Upsales.
Just in case, we'll poll the /ongoing endpoint with a few seconds delay, but for instant feedback to the user this is an important part.
This is done by initiating your app manually and adding a notification property to the body you send and the correct event will be triggered.
{
"notification": {
"event": "voice.hangup"
}
}