Platform

Platform

  • Getting Started
  • API

›IOS SDK

Getting Started

  • Create Your App

Quick Starts

  • 555 Samples

Mobile SDK (v1.0)

  • Overview
  • IOS SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to initiate or accept video call
    • How to set log level for SDK
    • Release Notes

    Android SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to initiate or accept video call
    • How to set log level for SDK
    • Release Notes

Mobile SDK (v2.0)

  • Overview
  • IOS SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to initiate or accept VIDEO call
    • How to initiate or join ANONYMOUS VIDEO call
    • Release Notes
    • Reference code - How to initiate or accept PSTN Call
    • Reference code - How to initiate or accept Video Call
    • Reference code - How to initiate or join Anonymous Video Call

    Android SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • How to intiate or accept Video Call
    • How to intiate or accept ANONYMOUS VIDEO Call
    • Release Notes
    • Reference code - How to initiate or accept PSTN Call
    • Reference code - How to initiate or accept Video Call
    • Reference code - How to initiate or join Anonymous Video Call

    React Native SDK

    • Getting started
    • Installation Guide
    • How to do user authentication
    • How to subscribe for notifications
    • How to initiate or accept PSTN call
    • Release Notes

WebRTC JS SDK

  • Overview
  • Getting Started
  • How to do user authentication
  • How to subscribe for notifications
  • How to initialize SDK
  • How to initiate or accept PSTN call
  • How to initiate or accept video call
  • How to create a screen share session
  • Release Notes

Notification Service

The user should subscribe to the notification server to receive notifications. The Iris Notification manager (ntm) is the server provided by Iris platform for notification subscription. On request to ntm for notification service , the user must specify which service should be used, APNs or XMPP.

Register a Subscriber

The request must specify the protocol to be used and pass the token accordingly along with Iris token received in response from Auth Manager during the login process.

Using APNs Protocol

App on the device can register with APNs to receive their app-specific device token for remote notifications.

Request :
    HTTP POST https://ntm.iris.comcast.net/v1/subscriber
Headers:
    "Content-Type": "application/x-www-form-urlencoded",
    "User-Agent": "apple/phone/iPhone/<OS version>/<App name>/<App version>",
    "Authorization": "Bearer <Iris token>"
Requestbody:
    {"proto":"apns","token":"<apn device token>","app_domain":"<App domain>","lang":"en","badge":"0"}

On successful invocation, notification server will issue a subscriber Id.

Response:
    Status Code: 200
Headers:
    "Access-Control-Allow-Origin" = "*"
    Connection = close
    "Content-Length" = 40
    "Content-Type" = "application/json"
    Date = Tue, 26 Feb 2019 11:40:59 GMT
    "Trace-Id" = <ntm traceId>
    Vary = Origin
Responsebody:
    "id": "<subscriber Id>"

Using XMPP Protocol

The app can use the routing id of the registered user as the token to request for XMPP notification service.

Request :
    HTTP POST https://ntm.iris.comcast.net/v1/subscriber
Headers:
    "Content-Type": "application/x-www-form-urlencoded",
    "User-Agent": "apple/phone/iPhone/<OS version>/<App name>/<App version>",
    "Authorization": "Bearer <Iris token>"
Requestbody:
    {"proto":"xmpp","token":"<routing id>","app_domain":"<App domain>","lang":"en","badge":"0"}

On successful invocation, notification server will issue a subscriber Id.

Response:
    Status Code: 200
Headers:
    Access-Control-Allow-Origin = "*"
    Connection = close
    Content-Length = 40
    Content-Type = "application/json"
    Date =  "Tue, 26 Feb 2019 11:45:40 GMT"
    Trace-Id = <ntm traceId>
    Vary = Origin
Response.body :
    "id": "<subscriber Id>"

Request Subscription for Topics

The user can subscribe to multiple topics. Even if the user is already registered for a topic, the request will still be successful. 200 OK will be the response for the successful topic subscription request. Iris user can subscribe to the following topics:

Subscribe for Video Call Notification

In order to receive incoming call notifications for video call, the user should request the ntm server with the following content:

Request :
    HTTP POST https://ntm.iris.comcast.net/v1/subscription/subscriber/<subscriber id>/topic/<app domain>/video/<routing id with double encoded strings>
Headers :
    Content-Type : application/json
    User-Agent : apple/phone/iPhone/<OS version>/<App name>/<App version>
    Authorization : Bearer <Iris token>
Request payload :
    {"apn_topic": "com.comcast.irisrefclient.voip"}

Subscribe for PSTN Call Notification

In order to receive incoming call notifications for PSTN call, the user should request the ntm server with the following content:

Request :
    HTTP POST https://ntm.iris.comcast.net/v1/subscription/subscriber/<subscriber id>/topic/federation/pstn/<routing id>
Headers :
    Content-Type : application/json
    User-Agent : apple/phone/iPhone/<OS version>/<App name>/<App version>
    Authorization :  Bearer <Iris token>
Request payload :
    {"apn_topic": "com.comcast.irisrefclient.voip"}

Subscribe for Chat Notification

In order to receive incoming message notifications, the user should request the ntm server with the following content:

Request :
    HTTP POST https://ntm.iris.comcast.net/v1/subscription/subscriber/<subscriber id>/topic/<app domain>/chat/<routing id>
Headers :
    Content-Type : application/json
    User-Agent : apple/phone/iPhone/<OS version>/<App name>/<App version>
    Authorization :  Bearer <Iris token>
Request payload :
    {"apn_topic": "com.comcast.irisrefclient.voip"}

Deregister a Subscriber

The user can deregister a subscriber in the following cases:

  • Stop receiving incoming notification

  • While logging out

  • Stop using a specific subscriber and to use the other one. Eg: When the app is subscribed to APNs and want to use XMPP to receive notification, it should deregister APNs subscription before registering to XMPP

    Request:
      HTTP DELETE https://ntm.iris.comcast.net/v1/subscriber/<subscriber id>
    Headers :
      User-Agent : apple/phone/iPhone/<OS version>/<App name>/<App version>
      Authorization :  Bearer <Iris token>
    

    User will receive a 200 OK response when the current subscription gets revoked. To reuse notification service, the user should again sent a registration request.

Deregister Subscription for Topics

The user can revoke subscription to a topic to stop receiving incoming notification from it. 200 OK response will be received, when the current topic subscription gets revoked. To receive notification again, the user should send a subscription request for topics.

Deregister Video Call Subscription

The user will not receive video call notifications, once the request for revoking subscription is successfully executed.

Request:
    HTTP DELETE https://ntm.iris.comcast.net/v1/subscription/subscriber/<subscriber id>/topic/<app domain>/video/<routing id>
Headers :
    User-Agent : apple/phone/iPhone/<OS version>/<App name>/<App version>
    Authorization :  Bearer <Iris token>

Deregister PSTN Call Subscription

The user will not receive pstn call notification once the request for revoking subscription is successfully executed.

Request:
    HTTP DELETE https://ntm.iris.comcast.net/v1/subscription/subscriber/<subscriber id>/topic/<app domain>/federation/pstn/<routing id>
Headers :
    User-Agent : apple/phone/iPhone/<OS version>/<App name>/<App version>
    Authorization :  Bearer <Iris token>

Deregister Chat Subscription

The user will not receive chat notification once the request for revoking subscription is successfully executed.

Request:
    HTTP DELETE https://ntm.iris.comcast.net/v1/subscription/subscriber/<subscriber id>/topic/<app domain>/chat/<routing id>
Headers :
    User-Agent : apple/phone/iPhone/<OS version>/<App name>/<App version>
    Authorization :  Bearer <Iris token>
← How to do user authenticationHow to initiate or accept PSTN call →
  • Register a Subscriber
    • Using APNs Protocol
    • Using XMPP Protocol
  • Request Subscription for Topics
    • Subscribe for Video Call Notification
    • Subscribe for PSTN Call Notification
    • Subscribe for Chat Notification
  • Deregister a Subscriber
  • Deregister Subscription for Topics
    • Deregister Video Call Subscription
    • Deregister PSTN Call Subscription
    • Deregister Chat Subscription
Docs
Getting StartedGuidesAPI Reference
More
BlogGitHub
555 Platform
Copyright © 2024 555 Platform ™
555docs-v0.0.94