🔔 VoIP Push Notification Setup (iOS)
⚠️ Important Notes:
- Physical Device Only: iOS VoIP Push only works on physical devices (iPhone/iPad). It does not work on the iOS Simulator because the Simulator cannot generate valid PushKit APNs tokens.
- Annual VoIP Certificate Renewal (1-Year Expiry): Apple VoIP Services Certificates (
.p12) expire every 1 year. You must generate a renewed certificate on the Apple Developer Portal and re-upload the updated.p12file to the Pitel Portal periodically each year to maintain uninterrupted VoIP push notification delivery.
🌟 Overview
When someone calls your extension, the Pitel VoIP Server sends an Apple PushKit VoIP notification to your device. iOS wakes up the app in the background and native Apple CallKit immediately displays the incoming call interface.
Caller ---> Pitel VoIP PBX ---> APNs (Apple VoIP Push) ---> iOS Device (PushKit) ---> CallKit UI
Native Call Experience
| iOS (Banner / Alert) | iOS (Lock Screen) | iOS (In-Call UI) |
🛠 Step-by-Step Guide
📌 Step 1: Apple Developer Configuration
You need to generate two items from your Apple Developer Account:
- VoIP Services Certificate (
.p12) — Used by the VoIP Server to send PushKit notifications to wake up CallKit. - APNs Authentication Key (
.p8) — Used by Firebase Cloud Messaging.
1.1 Create VoIP Services Certificate
- Go to Certificates, Identifiers & Profiles $\rightarrow$ Certificates.
- Click (+) to create a new certificate.
- Under Services, select VoIP Services Certificate.

- Choose your App ID (Bundle Identifier) and click Continue.

- Upload your Certificate Signing Request (CSR) generated from Keychain Access, then download the
.cerfile.
- Double-click the downloaded
.cerfile to install it into Keychain Access. - In Keychain Access, find the newly installed VoIP Services certificate under My Certificates.
- Right-click the certificate and select Export "..." $\rightarrow$ Save as a
.p12file (set a password if needed, or leave blank). (Keep this file for Step 4).
1.2 Create APNs Authentication Key (For Firebase)
- Go to Keys in the Apple Developer sidebar.
- Click (+) to register a new key, enter a name (e.g.
Pitel VoIP APNs Key), and enable Apple Push Notifications service (APNs).
- Download the
.p8key file and note your Key ID and Team ID. (Keep this file for Step 3).
📌 Step 2: Xcode & iOS Project Configuration
2.1 Enable Required Capabilities
Open your project in Xcode $\rightarrow$ select your Target $\rightarrow$ Signing & Capabilities:
-
Click + Capability and add Push Notifications.
-
Click + Capability and add Background Modes, then check all of the following:
- ✅ Voice over IP (
voip) - ✅ Audio, AirPlay, and Picture in Picture (
audio) - ✅ Background fetch (
fetch) - ✅ Remote notifications (
remote-notification)

- ✅ Voice over IP (
(Alternatively, ensure your Info.plist contains:)
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>fetch</string>
<string>remote-notification</string>
<string>voip</string>
</array>
<!-- Microphone Permission -->
<key>NSMicrophoneUsageDescription</key>
<string>This app requires microphone access to make and receive VoIP calls.</string>
2.2 Add Firebase Configuration File
- In the Firebase Console, download
GoogleService-Info.plistfor your iOS App. - Drag and drop
GoogleService-Info.plistinto your Xcode project root folder. - Ensure "Copy items if needed" and your target membership are checked.

2.3 Configure AppDelegate.swift
In native iOS applications using PitelVoIPFramework, your AppDelegate should inherit from PitelVoIPDelegate and implement MessagingDelegate:
import UIKit
import FirebaseCore
import FirebaseMessaging
import PushKit
import PitelVoIPFramework
@main
class AppDelegate: PitelVoIPDelegate, MessagingDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// 1. Initialize PitelVoIP SDK via parent delegate (handles PushKit VoIP registration)
_ = super.application(application, didFinishLaunchingWithOptions: launchOptions)
// 2. Configure Firebase Messaging
FirebaseApp.configure()
Messaging.messaging().delegate = self
// 3. Register presentation host so PitelCallView presents automatically over active window
PitelVoIP.registerCallPresentationHostProvider {
guard let scene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let window = scene.windows.first(where: { $0.isKeyWindow }) ?? scene.windows.first else {
return nil
}
return window.rootViewController
}
return true
}
// Forward APNs device token to Firebase Messaging
override func onAPNsTokenReceived(_ deviceToken: Data) {
Messaging.messaging().apnsToken = deviceToken
}
// Deliver FCM token to PitelVoIP SDK
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
if let token = fcmToken {
onFCMTokenReceived(token)
}
}
// Handle remote notification fallback (VoIP push / background notification)
override func application(
_ application: UIApplication,
didReceiveRemoteNotification userInfo: [AnyHashable: Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
) {
PitelVoIP.handleRemoteNotification(userInfo)
completionHandler(.newData)
}
}
📌 Step 3: Firebase Configuration
3.1 Upload APNs Key to Firebase Console
- Open Firebase Console $\rightarrow$ Project Settings $\rightarrow$ Cloud Messaging tab.
- Under Apple app configuration, find your iOS app.

- Upload the
.p8key file downloaded from Step 1.2. - Fill in your Key ID and Team ID.

3.2 Generate Firebase Service Account (.json)
The VoIP server uses this service account to authenticate with Firebase Cloud Messaging.
- In Firebase Console $\rightarrow$ Project Settings $\rightarrow$ Service accounts tab.
- Click Generate new private key.

- Confirm by clicking Generate key. A
.jsonfile will be downloaded. (Keep this file for Step 4).
📌 Step 4: Configure Pitel VoIP Portal
Finally, upload the credentials to the Pitel SDK Portal:
- Log in to the Pitel SDK Portal and navigate to your application configuration.
- Upload
.p12File: The VoIP Certificate exported in Step 1.1 (and enter certificate password if any). - Upload
.jsonFile: The Firebase Service Account private key file from Step 3.2. - Save the configuration.
Annual Renewal Requirement: Apple VoIP Certificates expire every 1 year. Remember to set an annual reminder to renew your certificate and re-upload the updated .p12 to the Portal.
✅ Step 5: Verification & Testing
- Connect a Physical iPhone to your Mac.
- In Xcode, set your Development Team and verify the Bundle Identifier matches your Apple App ID and Firebase configuration.
- Build and run the app onto your physical device.
- Log in with your SIP Extension credentials.
- Lock the iPhone screen or put the app in the background.
- Make a call to your extension from another phone/softphone:
- Native Apple CallKit incoming call screen will ring immediately.
- Accept the call to verify two-way audio.