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

SDK provide APIs to subscribe for push notification using APNS or XMPP notification over websocket using SDK callback. Before invoking notification APIs, make sure you have initialized the SDK and set the mandatory configuration as mentioned here.

XMPP Notification

Both notify and cancel XMPP notifications by default will be received through SDK onNotification callback without any need for subscription.

APNS Notification

Below APIs are for subscribing/unsubscribing the PUSH notification to notify new incoming call. All cancel notification by default will be received through SDK onNotification callback without any need for subscription.

Create Subscriptions

This API will register the subscriber for the PUSH notification and create subscription for topic provided. Implement Rtc555NtmDelegate protocol and pass the delegate to get subscription Id or error report during subscription.

Rtc555Ntm.createSubscriptions(subscriptions: buildSubscriptions(), appDomain: appDomain, rtcNtmDelegate: self)

//build Subscriptions

 private func buildSubscriptions() -> Array<Subscription> {
 
     var subscriptions: [Subscription] = []
     var subtopic : Subscription = Subscription()
     
     let apnsTopic = "\(Bundle.main.bundleIdentifier!).voip"
     subtopic.apnTopic = apnsTopic
     subtopic.deviceToken = <deviceToken> // APNS device token
     subtopic.protocolType = "apns"
     subtopic.topic = "federation/pstn/<Routing Id>"
     
     subscriptions.append(subtopic)
     return subscriptions
 }
ParametersTypeDescription
subscriptionsarrayContains array of subscription object. Subscription contains Device token, apntopic, protocol type, topic
appDomainstringapp domain
rtcNtmDelegateobjectRtc555NtmDelegate

Below is the Subscription object that needs to be built:

ParametersTypeDescription
deviceTokenstringAPNS device token
apnTopicstringcontains topic appended to application bundle identifier
protocolTypestringpass "apns"
topicstringpass "federation/pstn/" for pstn or "/video/" for video, based on the type of subscription required

Delete Subscription

Users need to pass subscriberId, topic, app domain for deleting subscription. Implement Rtc555NtmDelegate protocol and pass the delegate to get status or error report during deletion.

Rtc555Ntm.deleteSubscription(subscriberId :subscriberId,topic :topic,appdomain :appdomain,rtcNtmDelegate :self)
ParametersTypeDescription
subscriberIdstringsubscriber Id received from subscription callback
topicstringsubscribed topic
appDomainstringapp domain
rtcNtmDelegateobjectRtc555NtmDelegate

Delete All Subscriptions

Users need to pass subscriberId for deleting all subscription. Implement Rtc555NtmDelegate protocol and pass the delegate to get status or error report during deletion.

Rtc555Ntm.deleteAllSubscriptions(subscriberId: subscriberId, rtcNtmDelegate: self)
ParametersTypeDescription
subscriberIdstringsubscriber Id received from subscription callback
rtcNtmDelegateobjectRtc555NtmDelegate

APNS Notification Delegates

onSubscriptionSuccess

This callback gets invoked when we receive success status for create subscription API.

    func onSubscriptionSuccess(subscriptions subscriptionInfo: [Any]) {
         
     }
ParametersTypeDescription
subscriptionInfodictionaryContains subscriberId , topic, appdomain

Below is the subscriptionInfo object details:

ParametersTypeDescription
subscriberIdstringsubscriber Id
topicarrayArray of subscribed topics
appdomainstringapp domain

onSubscriptionFailure

This callback gets invoked when we receive error status for create subscription API.

    func onSubscriptionFailure(error errorInfo: Error) {
         
     }
ParametersDescription
errorInfoerror object consists of error code and error message

onSubscriptionDeleted

This callback gets invoked when we receive success status for delete subscription API.

    func onSubscriptionDeleted(topic Topic: NSString, subscriberId subscriberid: NSString) {
         
     }
ParametersTypeDescription
subscriberIdstringsubscriber Id
topicstringsubscribed topic

onSubscriptionDeletionFailure

This callback gets invoked when we receive error status for delete / delete all subscription API.

    func onSubscriptionDeletionFailure(error errorInfo: Error) {
         
     }
ParametersDescription
errorInfoerror object consists of error code and error message

onSubscriberDeleted

This callback gets invoked when we receive success status for delete all subscription API.

    func onSubscriberDeleted(subscriberId subscriberid: NSString) {
         
     }
ParametersDescription
subscriberIdsubscriber Id
← How to do user authenticationHow to initiate or accept PSTN call →
  • XMPP Notification
  • APNS Notification
    • Create Subscriptions
    • Delete Subscription
    • Delete All Subscriptions
  • APNS Notification Delegates
    • onSubscriptionSuccess
    • onSubscriptionFailure
    • onSubscriptionDeleted
    • onSubscriptionDeletionFailure
    • onSubscriberDeleted
Docs
Getting StartedGuidesAPI Reference
More
BlogGitHub
555 Platform
Copyright © 2024 555 Platform ™
555docs-v0.0.94