push notifications for VOIP app Max UC

Hello,

we have a problem with fake call on iPhone device for incoming calls. When I leave the iPhone in idle state for 30, 40 seconds and dialed voip app number the iPhone rings and there is no problem. When I leave it in idle for longer time one minute or two minutes I get "Call Failed to Connect" on iPhone's display and after this fake call I get second call with real calling number displays on iPhone. This first fake call is triggered by wake up push notification type 'voip'. If I switched off this wake up push notification type 'voip' and device's token has not expired yet I don't get fake call and iPhone's directly displays calling number. But in this situation we need to use wake up push notification type 'voip' on during a certain time to keep the device's token in our database and continuing to receive calling number without fake call. If we switched off the wake up push notification type 'voip' on certain time we need to activate again wake up push notification type 'voip' for incoming calls to wake up the iPhone. And in this way every time on every incoming call the iPhone's will display first fake call "Call Failed to connect" and after that the call with Calling number.

How we can eliminate this fake call and use only one wake up push notification only for incoming calls not use second type wake up push on certain time?

Thank you, I paste here our code for this:

public ApnClient(IOptions<Settings> settings) { var httpHandler = new HttpClientHandler() { ClientCertificates = { new X509Certificate2(certificate.Export(X509ContentType.Pfx)) }, };

        ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls13;

        this.httpClient = new HttpClient(httpHandler)
        {
            DefaultRequestVersion = HttpVersion.Version20, 
            DefaultVersionPolicy = HttpVersionPolicy.RequestVersionOrHigher, 
            BaseAddress = new Uri(settings.Value.ApnProdBaseUri),
            DefaultRequestHeaders =
            {
                {
                    "apns-topic", ApnsTopic
                },
            },
        };
    }

    public async Task<bool> WakeUpDevice(string deviceToken, string callId)
    {
        this.requestContent = new StringContent(
            $"{{\"aps\":{{\"content-available\":\"1\"}}}}",
            System.Text.Encoding.UTF8,
            "application/json");

        var res = await this.httpClient.PostAsync($"/3/device/{deviceToken}", this.requestContent);
        return res.IsSuccessStatusCode;
    }
Answered by DTS Engineer in 838667022

we have a problem with fake call on iPhone device for incoming calls. When I leave the iPhone in idle state for 30, 40 seconds and dialed voip app number the iPhone rings and there is no problem. When I leave it in idle for longer time one minute or two minutes I get "Call Failed to Connect" on iPhone's display and after this fake call I get second call with real calling number displays on iPhone. This first fake call is triggered by wake up push notification type 'voip'.

So, the first thing I want to clarify here is that here is that none of this is "happening" to your app. The calls you're seeing are the calls you reported to CallKit. CallKit is fundamentally an interface framework and is simply doing exactly what your app told it to do.

But in this situation we need to use wake up push notification type 'voip' on during a certain time to keep the device's token in our database and continuing to receive calling number without fake call.

That is an implementation choice you made. As the API contract stipulates, you are required to report a call for every voip push you receive. That is a fundamental requirement that cannot be bypassed or avoided*.

*You may find references online to the "Unrestricted PushKit" entitlement, which would seem to do what you want. However, that entitlement was only granted for very specific use cases and, more importantly, it was disabled in the iOS 15 SDK. Some apps do still include it, but it does not function on any recent version of iOS.

How we can eliminate this fake call and use only one wake up push notification only for incoming calls not use second type wake up push on certain time?

You need to stop using voip pushes for anything other than incoming call notifications. One alternative I would suggest looking at there are standard push notifications and an NSE (Notification Service Extension). The NSE gives you ~30s of execution time, which is enough to do basic server checkin. High priority alert pushes have the same delivery behavior as voip pushes if you need reliability. Finally, a basic notification is less disruptive than an incoming call and the notification system has other options for reducing the disruption level even more.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

we have a problem with fake call on iPhone device for incoming calls. When I leave the iPhone in idle state for 30, 40 seconds and dialed voip app number the iPhone rings and there is no problem. When I leave it in idle for longer time one minute or two minutes I get "Call Failed to Connect" on iPhone's display and after this fake call I get second call with real calling number displays on iPhone. This first fake call is triggered by wake up push notification type 'voip'.

So, the first thing I want to clarify here is that here is that none of this is "happening" to your app. The calls you're seeing are the calls you reported to CallKit. CallKit is fundamentally an interface framework and is simply doing exactly what your app told it to do.

But in this situation we need to use wake up push notification type 'voip' on during a certain time to keep the device's token in our database and continuing to receive calling number without fake call.

That is an implementation choice you made. As the API contract stipulates, you are required to report a call for every voip push you receive. That is a fundamental requirement that cannot be bypassed or avoided*.

*You may find references online to the "Unrestricted PushKit" entitlement, which would seem to do what you want. However, that entitlement was only granted for very specific use cases and, more importantly, it was disabled in the iOS 15 SDK. Some apps do still include it, but it does not function on any recent version of iOS.

How we can eliminate this fake call and use only one wake up push notification only for incoming calls not use second type wake up push on certain time?

You need to stop using voip pushes for anything other than incoming call notifications. One alternative I would suggest looking at there are standard push notifications and an NSE (Notification Service Extension). The NSE gives you ~30s of execution time, which is enough to do basic server checkin. High priority alert pushes have the same delivery behavior as voip pushes if you need reliability. Finally, a basic notification is less disruptive than an incoming call and the notification system has other options for reducing the disruption level even more.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

push notifications for VOIP app Max UC
 
 
Q