Skip to content

AWS Pinpoint IOS alert notification send to VOIP Channel

0

Hi,

We are sending alert and voip notifications to your user with SendUsersMessagesCommand API A user is register with 2 Enpoints (one with ChannelType=APNS, another one with ChannelType=APNS_VOIP) When we send a notification with apns-push-type=voip, the notification is send only to the endpoint with ChannelType=APNS_VOIP When we send a notification with apns-push-type=alert, the notification is send to all endpoints (ChannelType APNS and APNS_VOIP)

Why push of type alert are send to both enpoints ? Is there away to prevent this ?

JSON Payload: { ApplicationId: "APPID", SendUsersMessageRequest: { Users: { "USERID": {}, }, MessageConfiguration: { APNSMessage: { TimeToLive: 86000, RawContent: {"aps" : {"alert" : {"title" : "${title}","body" : "${description}" }}, "content-available": 0,"mutable-content":0, "apns-push-type" : "alert"}, }, }, },

thanks for your help.

asked 2 years ago166 views

1 Answer
0

The behavior you're observing is related to how Amazon Pinpoint handles different push notification types and channels for iOS devices.

When you send a notification with 'apns-push-type=voip', it's specifically targeted for VoIP services, so Pinpoint correctly sends it only to the endpoint with ChannelType=APNS_VOIP. This is the expected behavior for VoIP notifications.

However, when you send a notification with 'apns-push-type=alert', it's considered a standard push notification. Pinpoint is designed to send standard push notifications to all valid iOS endpoints associated with the user, regardless of whether they are APNS or APNS_VOIP. This is because both channel types are capable of receiving and displaying alert notifications.

To prevent alert notifications from being sent to the APNS_VOIP endpoint, you have a few options:

  1. Use separate user IDs for APNS and APNS_VOIP endpoints. This way, you can target specific users (and thus specific endpoint types) when sending messages.

  2. If possible, modify your app to register only one endpoint type per device - either APNS or APNS_VOIP, depending on the primary purpose of your notifications.

  3. Use the SendMessages API instead of SendUsersMessages. With SendMessages, you can specify exact endpoints to send to, giving you more control over which channels receive the notification.

  4. If you need to use SendUsersMessages, you could potentially add custom attributes to your endpoints and use them in combination with user attributes to filter which endpoints receive the message.

Remember that the ability to receive standard push notifications on VoIP endpoints can be beneficial in some use cases, so consider carefully whether preventing this behavior aligns with your app's requirements.
Sources
Amazon Pinpoint push notifications - Amazon Pinpoint
APNs VoIP Channel - Amazon Pinpoint
APNs VoIP Sandbox Channel - Amazon Pinpoint

answered 2 years ago

EXPERT

reviewed 2 years ago

  • I'm not sure that alert notification should be push to endoint with ChannelType APNS_VOIP. Following apple documentation: On iOS 13.0 and later, if you fail to report a call to CallKit, the system will terminate your app. Repeatedly failing to report calls may cause the system to stop delivering any more VoIP push notifications to your app. If you want to initiate a VoIP call without using CallKit, register for push notifications using the User Notifications framework instead of PushKit.

    If an alert notification is sent to an APNS_VOIP Enpoint, the app will crash (we are not able to report call)

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.