Skip to content

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

ParameterTypeRequiredDescription
dictDictionary / NSDictionaryYesPush 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 onCallInvite listener callback data as the canonical callId
  • 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
  • answer - Answer an inbound call invite
  • reject - Reject an inbound call invite
  • registerVoipToken - Register iOS VoIP push token for incoming call delivery
  • onCallInvite - Fired when an inbound call invite is received

Built with VitePress.