Process Call Invite Push Data
Parses and processes an incoming iOS VoIP push payload for a voice invite. This method validates the Vonage payload and returns the callId when the payload contains a voice call invite.
Signature
func processCallInvitePushData(
_ dict: [AnyHashable: Any]
) -> String?
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dict | Dictionary / NSDictionary | Yes | Push payload dictionary received from PushKit |
Return Type
Returns callId when payload parsing succeeds, or nil when payload is not a valid voice invite.
Usage Example
let payloadData: [AnyHashable: Any] = [:] // Push payload from PKPushRegistryDelegate.didReceiveIncomingPushWith
let vonageType = VGVoiceClient.vonagePushType(payloadData)
if vonageType == .incomingCall {
let callId = client.processCallInvitePushData(payloadData)
print("Processing call invite for call: \(callId ?? "unknown")")
}
Notes
- Call this from your PushKit incoming push handler after confirming the payload type is Vonage incoming call
- On success, this method triggers the normal invite delivery flow (delegate callback) and returns the same invite call ID
- Do not rely on this return value as your source of truth for active call state; use
onCallInvitelistener callback data as the canonicalcallId - On iOS push handlers, keep processing fast and defer heavy work to app call flow logic
- This action is iOS-only; Android uses
processPushCallInvite, and Web does not expose push-invite processing
Related Actions
answer- Answer an inbound call invitereject- Reject an inbound call inviteregisterVoipToken- Register iOS VoIP push token for incoming call delivery
Related Events
onCallInvite- Fired when an inbound call invite is received