Re: [sipcore] Push notifications with iOS 13 (RFC 8599)

Christer Holmberg <christer.holmberg@ericsson.com> Mon, 12 October 2020 14:55 UTC

Return-Path: <christer.holmberg@ericsson.com>
X-Original-To: sipcore@ietfa.amsl.com
Delivered-To: sipcore@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 938853A1544 for <sipcore@ietfa.amsl.com>; Mon, 12 Oct 2020 07:55:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.2
X-Spam-Level:
X-Spam-Status: No, score=-3.2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VpPZwCeqZ8PH for <sipcore@ietfa.amsl.com>; Mon, 12 Oct 2020 07:55:30 -0700 (PDT)
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2082.outbound.protection.outlook.com [40.107.20.82]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1F8523A1535 for <sipcore@ietf.org>; Mon, 12 Oct 2020 07:55:29 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ph8l9tSPtQSqcIpS16aRHCRyq+18a2/9r68bEoDMqI1xwtDrTi4EiDWkTDLiArNO8jiiY6fnkmXiMSCaxFjffci1oSaAfTskl57I66Fs8niIXa+sN6c+AhfSrxl/uiJJwrqStxR4Zt7OnxMQpzJ9LhG2JsydnxmTTdiyvkDrsh8VLJmumaftYPOpnxLwIPB13oWj1fyYN1iZYMjiinlE7p+C2la1qSMaD5ECB+Qwy+gBCtyBeR+d6wgLTf3GIELPA13fD7b9l/d+8iJCq+aGbav4Z+G9l6+Ugz/uUwBeGoE91ECRPSYxjFSljEMijptYiDuM/8XZQe+ShGz7CiQJwQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XuGlnHFLUx6RgJiS/dk2uj+u1s+Y/y4ZrXgdXuSYxco=; b=X8oBXQ/YgOYQ7Zb9PgZngLMOw/Fd4XrMksLyxBSe5Y7J+Kk+MMDAEeW0dkMz5E6g6cCcKX6eFSt9e41TxPcZq0Y9eKAcc9JESexC0++mvvRagflbDCVWDNVsw3/iiaAcWcCL8yoSisA6CARbw3j9v/OSMjacFEoAd9EsSS01Qjr2nOBeFTnvlYxr+0OublEgSFOFbw8VdpegyMLtTqHKjS/vCGTx36O9xQmbYl4Q5/8k1og73TGIT3mFpH0bJyWiEgF0Nu/LzAYbuvwkYDJG115xJ3T53CFCt8tNojn+VBgsh6WuJqVKSs/jFg5nMU7QAsy5dGW1mR40jDfGWhG9Gg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XuGlnHFLUx6RgJiS/dk2uj+u1s+Y/y4ZrXgdXuSYxco=; b=YMF/PLbEOEFvrFEAEWRV6IuwUrhRwatcT9LsfExI3eDUG9Mm8+Ap64RDv74FT/B43+OG/4WRbMsqCr0uempBgZpVKSDQLpWty38FqG6wfxW85yKN7WWBy2FYnnhm21t2TMIQ1jRqD/8X3ASwtHa/X/drueyZbb4I8M0IJjXXyFo=
Received: from AM0PR07MB3860.eurprd07.prod.outlook.com (2603:10a6:208:4c::18) by AM0PR07MB6402.eurprd07.prod.outlook.com (2603:10a6:20b:15e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.11; Mon, 12 Oct 2020 14:55:28 +0000
Received: from AM0PR07MB3860.eurprd07.prod.outlook.com ([fe80::6cc3:4783:280b:d741]) by AM0PR07MB3860.eurprd07.prod.outlook.com ([fe80::6cc3:4783:280b:d741%7]) with mapi id 15.20.3477.018; Mon, 12 Oct 2020 14:55:28 +0000
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: Simon MORLAT <simon.morlat@gmail.com>, Yehoshua Gev <yoshigev@gmail.com>
CC: sipcore <sipcore@ietf.org>
Thread-Topic: [sipcore] Push notifications with iOS 13 (RFC 8599)
Thread-Index: AQHWn+BDUTnEZITSgUW2d71fVS8LKKmS3pmAgAEvHcA=
Date: Mon, 12 Oct 2020 14:55:28 +0000
Message-ID: <AM0PR07MB3860F48A7A45C799B59466B993070@AM0PR07MB3860.eurprd07.prod.outlook.com>
References: <CAF_j7yb_UeGsODVz1tYw021XCf7AxZOySLghcgAxa0sHr-ysbw@mail.gmail.com> <CAH_g9RxcXZV8KjaN6boLckKJywrZx_XCPaqEUdFowtHQn8kvkA@mail.gmail.com>
In-Reply-To: <CAH_g9RxcXZV8KjaN6boLckKJywrZx_XCPaqEUdFowtHQn8kvkA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=ericsson.com;
x-originating-ip: [188.127.223.154]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 235f41ce-b882-449b-4e3d-08d86ebedba4
x-ms-traffictypediagnostic: AM0PR07MB6402:
x-microsoft-antispam-prvs: <AM0PR07MB6402942AE703FAB223C3F7CF93070@AM0PR07MB6402.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: i0iWsOxhWIjVHS3RuFeJAB8A0i2VBallDFpQDzb55u2C0pu80YJjtVgsOjfSj9aNrhsRo5jWVtsVL7NX/5UQwBttNUdddKUiD3ZbZ1cnUzI72uMQpprTz3qRII6c4mZozIGF5TQrMbqM80xOoHVjWUYwcLuZaWIWW9rJK22A7eNtwjKh3PPy68DRKw+SVNl2CzHE5Sq+VWIHNXDzBIYsV9cPfOz048/7TwF5gIyUPRwY1Y3s6Q9J/EZkVde1rosbk7Ah4g71TUeC0to403QaVL7NqEXl/WQkJwC2wagovPEDmcgPeLdPE+9AjeyT6gwoEd0miJIps/KKWQ6Y+0El4oUZuYmOTxxjXg+6WIZ+zxmQXeY6M+Vo494jhba/M2sSzRs35NvZOCOQdZIEbq0EEQ==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR07MB3860.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(346002)(39860400002)(376002)(366004)(76116006)(66476007)(66556008)(64756008)(66946007)(66446008)(52536014)(5660300002)(83080400001)(4326008)(7696005)(166002)(9686003)(55016002)(478600001)(44832011)(2906002)(83380400001)(15650500001)(186003)(33656002)(966005)(26005)(66574015)(6506007)(8676002)(8936002)(110136005)(316002)(86362001)(71200400001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata: DnaG3IS1JyONavbB1UJlX3Deirw0+tmItjbkwxI9FD4zo0YnYWpQokj15jTnxv4KDCoEoKuduGZtagCm6SNRIeoLN0pml45EQ//oltkwEosxz6ESFecmwb+p8rQTyWe33Gsmp2taKcg1bC8xZzmX+KoCOS+NObgRuTNGaJ1P6tDGe8akSoH65/Zu7y8d8pBjZCWkXzd0rk6A5GwyxZPg+wl19MQqg8IQsvHC6ozXYP4/i/MVBAluGeFcRkE6ugZ/jszqHVf0Xt0FTrRA6OaG8vDCMcyldpJB9OOASu+CZxyvWZ8O7KzqQbENRIO1a7+YghyuIFQRIyMTyqnExune6okF09364HOFZk/H//hTNQAUd/IAdbx/cjQwknKnjcPBRNXctvpZAx/vO1/Zni1NLRso8WtKavVeTYbm9VXmVkfS2KVTCyFlRsrXjG/vW2Xaqp6KG0TEsHEIdjOPYonbJe/qiNhnYNbUcHaKAcKqpKmRf+37QS6c7G0HA4wmlHxBaYoH0ty2VkQiMyP+/x/AX7ktXBe6557OlAIJH8I9Cw80RukIC8gW7tJ6uQhNxBKmR50H48BcHZWXDZ1LPn0oKzJKkRY4OFPYgMXrH9WuGnkc+IcF8a8df8jT0Z4G+MIA49A5hJrsDIX6kXBJzGE70Q==
x-ms-exchange-transport-forked: True
Content-Type: multipart/alternative; boundary="_000_AM0PR07MB3860F48A7A45C799B59466B993070AM0PR07MB3860eurp_"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: AM0PR07MB3860.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 235f41ce-b882-449b-4e3d-08d86ebedba4
X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2020 14:55:28.0425 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: dUP8rCG6zTrD9C/uf9sIXdk7hTj/r2lnh7tg1lSEGRY3tHPpmt1YYnzLtBrHaCUCqRPBT9Kgup5ZV+N+weQk8LRgQpdtCWFJfsSeD3K24yM=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR07MB6402
Archived-At: <https://mailarchive.ietf.org/arch/msg/sipcore/1A0-RUBiU-kwQug2inijn5_MLMM>
Subject: Re: [sipcore] Push notifications with iOS 13 (RFC 8599)
X-BeenThere: sipcore@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SIP Core Working Group <sipcore.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sipcore>, <mailto:sipcore-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/sipcore/>
List-Post: <mailto:sipcore@ietf.org>
List-Help: <mailto:sipcore-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sipcore>, <mailto:sipcore-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Oct 2020 14:55:33 -0000

Hi,

As you suggest, one solution is to use a different (non-VoIP) push notification in order to trigger re-registrations.

The only issue with those, AFAIK, is that there is no guarantee when/if they will actually wake up the application. It depends on a number of factors, e.g., energy mode, how often the app is used, etc etc. However, I don’t have any data regarding that.

Regards,

Christer

From: sipcore <sipcore-bounces@ietf.org> On Behalf Of Simon MORLAT
Sent: sunnuntai 11. lokakuuta 2020 23.43
To: Yehoshua Gev <yoshigev@gmail.com>
Cc: sipcore <sipcore@ietf.org>
Subject: Re: [sipcore] Push notifications with iOS 13 (RFC 8599)

Hi Yehoshua,

Thank you for starting this discussion.
My company is developing the Linphone software (https://linphone.org<https://protect2.fireeye.com/v1/url?k=10c8d06e-4e6830fa-10c890f5-86d2114eab2f-d8cadb53839f1f91&q=1&e=5b0ee252-62e3-4113-9072-c4697431936c&u=https%3A%2F%2Flinphone.org%2F>), an cross platform open-source SIP softphone and SDK.
The last version we published was for adding compatibility for iOS 13. I admit it was a nightmare to comply with the new restrictions.
For push notifications, we based our work on RFC 8599 , but indeed we had to somewhat extend the RFC in order to transmit 2 different push notification tokens:
- the one for calls (PushKit kind of notifications)
- the one for IMs (using Remote push notification service).

To answer your question: the "remote push notification" token could apparently also be used for "Background push notifications" (https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app?language=objc ), which are the push notifications we need to refresh a REGISTER that is about to expire (or expired). So yes you need two different push services and tokens.

As of today, the Linphone app doesn't use push notifications for triggering REGISTER refreshes: we use a very long expire time (one year) instead. However we would prefer to switch to push-triggered REGISTER refresh as soon as possible.

The syntax extension we made to RFC8599 is described in our wiki:

https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Getting%20started/iOS/#HUpdateContactURIparameters<https://protect2.fireeye.com/v1/url?k=ad9b335e-f33bd3ca-ad9b73c5-86d2114eab2f-81e0945f1c7861ec&q=1&e=5b0ee252-62e3-4113-9072-c4697431936c&u=https%3A%2F%2Fwiki.linphone.org%2Fxwiki%2Fwiki%2Fpublic%2Fview%2FLib%2FGetting%2520started%2FiOS%2F%23HUpdateContactURIparameters>

We designed this syntax to be compatible with RFC8599 syntax. To summarize, here is a quick example to understand how we convey push tokens for an app that needs to advertise calls and IMs:

pn-prid=00fc13adff78512:voip&c11292f7b74733d:remote;pn-param=DEF123GHIJ.org.linphone.phone.voip&remote;pn-provider=apns

Notice the ":voip" and ":remote" token suffixes, and the "&".
We decided not to go with a multiple contact headers approach, each contact uri bearing a pn-prid for either voip or remote service: the forking by a proxy that is unaware of push notifications could result in INVITEs to be duplicated.

We had to go fast otherwise our app would stop working, but from the beginning we have in mind that this issue should be raised and hopefully resolved here at IETF, with or without our proposed syntax extension.

Today due to Apple's recent changes, it looks like RFC8599 cannot be used "as is" to make a SIP app for iOS. The risk that Google does the same in near future exists.
Are there people interested here in collaborating to an RFC8599 update to address this iOS platform evolution ? In other words, we need to solve how to convey multiple pn-prid and pn-param for a same user-agent instance.

Best regards,

Simon







Le dim. 11 oct. 2020 à 17:07, Yehoshua Gev <yoshigev@gmail.com<mailto:yoshigev@gmail.com>> a écrit :
Hi All,

I hope it is ok to post this here and not on sip-implementors...

We are trying to implement RFC 8599 for performing push notifications for Apple devices.

Starting with iOS 13, there is a restriction on VoIP pushes [1]: "Apps receiving VoIP push notifications must report the call quickly to CallKit, so it can alert the user to the presence of the incoming call."

According to RFC 8599, pushes are used for (at least) two different goals:
  1) Initiating registration refreshes (section 5.5)
  2) Notifying of incoming calls (section 5.6.2)

Now, for a reasonable user experience, the registration refresh pushes must not trigger the UI of incoming call.
However, when an INVITE is received, the UA must be awoken immediately, which is the purpose of VoIP push.

Does it make sense to make a different push type for registration refresh and for incoming calls?

I'm not sure this is possible with the current RFC (and it is also against the spirit of the RFC), but I can't think of another way around it (besides using regular pushes instead of VoIP pushes, which might introduce delays, or having a registration with infinite expiration that will not require refreshes, which might leave many zomby registrations).

See some discussion here: [2], [3].

Thanks,
Yehoshua

[1] https://developer.apple.com/documentation/pushkit/pkpushtype/1614481-voip
[2] https://developer.apple.com/forums/thread/117939
[3] https://www.linphone.org/news/ios-13-important-changes-voipim-apps<https://protect2.fireeye.com/v1/url?k=3b41d605-65e13691-3b41969e-86d2114eab2f-a70c1febdc656b21&q=1&e=5b0ee252-62e3-4113-9072-c4697431936c&u=https%3A%2F%2Fwww.linphone.org%2Fnews%2Fios-13-important-changes-voipim-apps>

_______________________________________________
sipcore mailing list
sipcore@ietf.org<mailto:sipcore@ietf.org>
https://www.ietf.org/mailman/listinfo/sipcore