RCS ( Rich Communication Suite )

What is this fuss about RCS ? For the past few weeks I’ve been trying to find the answer to this one. After much information gathering I understood that majority of communicatio platform provider’s mostly OTT such as imessage from apple , RBM already support this features. And it is partially a term coined by Google to bring smart communication festures in Android and other smart phones. In essence RCSe is a part of broader IMS archietcture pulished by GSMA

Update : after 2019 plenty of carriers also already provide RCSe as a replacement of SMS . OEM providers like Samsung also have RCS feature inbuild in phones.

The Rich Communication Services programme is a global initiative to deploy inter-operator services within an industry ecosystem.

Marketed by the GSMA under the brand name joyn,  RCS is an upgrade that marks the transition of messaging and voice capabilities from Circuit Switched technology to an all-IP world.

Wider and large scale IMS deployment, interoperability between different terminal vendor RCS clients and RCS service interworking between operators are the key aims of the RCS Initiative.

Whats special about RCS ?

  • Enhanced Phonebook: service capabilities and enhanced contacts information such as presence and service discovery.
  • Enhanced Messaging: enables a large variety of messaging options including chat, emoticons, location share and file sharing.
  • Enriched Calls: enables multimedia content sharing during a voice call, video call and video sharing (see what I see).

RCS releases

Five releases of the RCS specifications have been made to date. Each release expanded the scope of its predecessor.

Release 1 : Offered the first definitions for the enrichment of voice and chat with content sharing, driven from an RCS enhanced address book.

Release 2 : Added broadband access to RCS features: enhancing the messaging and enabling sharing of files.

Release 3: Focused on the broadband device as a primary device.

Release 4: Included support for LTE.

Release 5: The most recent release, global interoperability is a key aspect of these specifications.

As the team developed a web client for making and receiving SIP calls over websockets through a proxy SIP server , I felt its an  achievement big enough. To integrate it with RCS ( Rich Communication Suite ) stack appeared as a very complicated job .

I began by adding RCS specific standards modules one by one instead of importing the whole stack / library all together.

So the modules for XCAP for buddylist , MSRP for file transfer , geolocation  mapping , cloud sync of phonebook and message book have begun taking shape . In essence following features set are expected out of a RCS enabled Client  ( short outline ) Provisioning

OAUTH integration with operator customer portal

RCS HTTP Auto-Configuration

Manual IMS credentials, typically reserved for testing / troubleshooting

RCS services:

  • Service Discovery
    o OPTIONS and Presence supported
    o Address book polling
  • Delivery & display notifications o Message composing indication
  • 1-1 Chat
    o IMDN
    o Is-Composing
    o Store & forward / deferred message and notification delivery
    o Hotfixes compliant
  • Group Chat
    • Hotfixes compliant
    • Is-Composing
    • IMDN
    • Geo-location Push
    • Start and end a group chat session
    • Add or remove participants
    • Broadcast / Send messages to all participants
  • File Transfer
    • Send file via URL or as MIME attachment o Accept or Reject file transfer
    • MSRP based
    • HTTP based
    • Store & forward
    • Geo-location push via FT
    • vCard sharing
    • Thumbnail support
  • Voice & video
    o Best effort voice
    o Transcode
  • Network Address Book Support
    o Synchronization to SyncML based network address book
    o Contact import from Google, Facebook etc.

RCS APIs

( published under Joyn in GSMS RDC Devloepr documents in http://rcs.oneapi-gw.gsma.com)

There are many individual RCS APIs available. Brief details are as follows.

  1. Log user in and out of the RCS server Allows address book contacts to receive periodic updates of user availability for chat, file transfer and other services. This is essential for use of the RCS services.

2. Subscribe application to server-originated notifications This is one of the most important aspects of RCS as events are asynchronous; the notifications channel is used by your application to know how an API call is proceeding and to receive updates from other users such as messages, files and status updates. You can subscribe to certain types of notifications if your application is focused on particular RCS services.

3. Network address book access and management RCS provides each registered user with a server managed address book. Though the other APIs are not restricted to contacts in the network address book this makes it much more convenient to connect with other users. The network address book can have contacts added, removed, attributes changed, and is available to any application the user signs in to.

4. Individual chat services Unlike SMS, which is broadly a ‘fire and forget’ service, the RCS chat services allow much more sophisticated messaging services to be built. Depending on user configuration you can check out whether the user has received the message, and displayed it. RCS chat also allows feedback to other parties when a user is composing a message. There are also group chat services allowing multiple parties to collaboratively message. RCS provides API features for setting up a group chat session, adding or removing chat participants.

5. File Transfer These APIs allow applications to send content between users – whether this is a picture or a document, and whether it is stored originally on the user’s device or elsewhere located on the Internet. They allow the recipient to receive information about the file separately from the file itself so the recipient can choose whether or not to accept the file.

6. User capabilities API Enables the application to retrieve and amend system managed common capabilities of the user.

At this stage I will also put in a bit more about RCS e

RCS e ( enhanced )

What is the difference between RCS-e and RCS?

RCS-enhanced (RCS-e) is the currently available version of RCS, developed to speed time to market. It offers enhanced features such as instant messaging, live video sharing, and file transfer across any device on any network operator

RCS e Benefits :

  • Focus on advanced communication
    chat , file transfer , video sharing
  • Easy to Use
    zero touch from end user perspective
    minimal setup for subscribers
    Interoperability across devices , infrastructure components and service providers
  • Low barrier to entry / simplify networks
    Capability discovery using SIP OPTIONS
    Less impact on network elements and handset battery
    Lack of presence server reduces cost and time to market
  • Universal
    Allows implementation in lower range devices
    One common device specification

RCS-e Customer Value Proposition

New IP Communication Services , Profile Sharing , Native Device Integration

rcs5
rcs6

RCS e Characteristics

Dynamic Capability Discovery
User Perspective
network detects when user attaches with RCs e device
detection triggers network provisioning and client configuration
authentication by network
SSO / GIBA in 3G coverage
SIP Digest in Wifi
Encryption for Wifi access
TLS for SIP and TCP media or IPsec
SRTP for UDP or IPsec
NAT traversal and Keep-alives

Realted Terms

MSRP

File Transfer using   MSRP (or Message Session Relay Protocol) is an instant messaging or chat protocol, defined by the IETF in RFC4975. MSRP is a text-based, connection-oriented protocol for exchanging  arbitrary (binary) MIME content, especially instant messages.

References

Wikipedia – https://en.wikipedia.org/wiki/Rich_Communication_Services

GSMA Rich Communication Services APIs Developer Guide vs1.2

WebRTC SIP / IMS solution

We started in winters on 2012 with Webrtc . At time time it just looked like a new tech jargon that might fade away when new ones comes . In many many WebRTC’s buzz has died down since its massive adoption. But i nevertheless still see a lot of potential and development around it.

What really is WebRTC ? I made an entry on it  here .

Around nov – dec 2012 , team and I spend the time learning the nitty-grities of HTML5 based media operation and Javascript sip stack of SIPML. I remember toward the end of the year ie before Christmas , We were done with the explanation and education aspects of WebRTC , a technology that will revolutionise communication in ages to come , at-least so says the numerous other blogs ,  and documents i read so far .


Usecases for WebRTC range across a wide variety , of them the most revenue generating ones are around video conferencing with realtime HD audio-video-data streams ,

To bridge the flow between a webrtc client to a PSTN endpoint via IMS , interworking between webrtc media standards and codecs with that of gateways in IMS is critical . For instance WebRTC mandates secure RTP ( SRTP) the media engine / gateway should be able to support and connect with RTP from PSTN endpoints.

client BOB -> webrtc2sip Gateway -> SIP server -> client Alice

can be  understood with the callflow of a simple SIP Invite initiated from one html page towards another which passes through the configuration of gateway to IMS world ,  SIP Telecom Application server , Database , nodes of IMS environment etc.

For the purpose of a simple Explanation a simplified call flow ca be depicted as ,

webrtccallflow

A very high level architecture of solution deployment in IMS world could be

solution arch2

As the solution matures into a full fleshed project . The alpha version has been released with the following feature set . The WebRTC platform Suite offers a easily deploy-able solution to enable communication

Alpha Release WebRTC platform Suite

  • Single Sign On
  • Login with id and password to access all services
  • Audio / Video Call
    • Call Hold / Call Transfer
  • Messaging:
    • SIP Instant Messaging
    • Message to Facebook Messenger
    • Message delivered as Email
  • Chatroom
    • group chat between multiple users . Room is created for set of users .
  • Video Conferencing
    • video chat between multiple parties . Room is created for set of users .
  • File Transfer
    • Sharing of files from local to remote , in peer-to-peer and broadcasting fashion .
  • Third party Webservices
    • Widgets like calendar , weather , stocks , twitter are embedded.
  • Visual Voice Mail
    • Record and deliver voice message to recipients voice mail inbox which can be accessed/ played from web client .
  • Phonebook
    • cloud integration
    • add new entries
    • add photos to contacts identity
    • import contacts from google account
  • Click to Call :
    • Drop down list of contacts form mail call console
    • 2 step Click to call from Phonebook
  • Presence :
    • Publish online / offline status
    • Use Subscribe / notify requests of SIP
  • Web Ssocket to SIP Gateway
    • Conversion between the signal coming from the WebRTC and SIP client to the IMS core
    • Conversion of “voice/video ” media between sRTP and RTP
    • Conversion of other media (data channel) towards MSRP and Transcoding.
    • Support of ICE procedure
    • Implementation of a STUN server
  • QoS Support

Beta Release WEBRTC PLATFORM SUITE

  • Logs
    • calls logs
    • Message logs
  • User Profile
    • user details like address , email and social networking accounts
    • Phonenumber for GSM integration through SMS
    • User’s Media storage like Pictures , profile picture , Audio , video
    • File sharing documents storage for future access in the same format
  • Real Time and Offline Analytics
  • service usage with graphical and tabular history trends
  • Session Management
    • Single Sign-on
    • Forgot password regeneration using secure question
    • Registration of new user account
    • Logout and clearance of session parameters
  • Security
    • No redirection to any page through url entry without valid session
    • No going back to home page after logout by back button on browser
    • No data vulnerability
    • Multiple login through different devices handled
  • OAuth
    • Login via IMAP / token through facebook and Google
  • Phonebook with Presence functionality inbuilt
  • Directory Service based on country / region
  • Geolocation of approximate location detection of device logged in and visibility to others
webrtc solution
WebRTC client deployment view , accessible devices , network elements
WebRTC deploymenet overview and inetraction with other network elemets such as gateway , cloud storage ,  sipserver , IMS
WebRTC deploymenet overview and inetraction with other network elemets such as gateway , cloud storage , sipserver , IMS

Commercial release features specs for WebRTC over IMS

  • Integration with new age CSP deployments like VoLTE, ViLTE, VoWiFi
  • Multi vendor support
  • Interactive webrtc services
  • Media Services
    • Automated Natural language Speech recognition
    • Semantic processing via ML
    • Enhanced incall services replacing IVR ( touch -tone)
    • VQE (voice Quality Enhancements)
    • Encoding and Decoding – Multiple Codec Support
    • Transcoding
    • Silence Suppression
  • Security via TLS, encryption and AAA
  • Http, NFS caching
  • NAT using Xirsys TURN
  • Recording, playback and media file compression
  • active frame selection
  • DTMF (Dual Tone Multi Frequency)
    • SIP info messages (out-of-band)
    • SIP notify messages (out-of-band)
    • Inband DTMF not supported yet
  • Audio
    • mixing
    • announcements ( VXML, MSML )
    • filters
    • gain control ( AGC using webrtc stack)
    • noise suppresesion ( webrtc stack)
    • speakers notification
    • Narrowband, Wideband, and Super Wideband
    • dynamic sample rate
  • Video
    • continuous presence ( Face detetion )
    • floor control
    • video lipsync (sync)
    • speaker tile selection
  • VQE (Voice Quality Enhancement )
    • Acoustic Echo Cancelation
    • noise reduction
    • noise line detection
    • noise gating
    • Packet Loss concealment
  • Call analyics
    • progress analysis
    • MOS , R-factor ( derived from latency , jitter , packet loss )
  • CDR (Call detail records ) and accounting
  • Lawful interception

Updating this article 2019

There was a long journey from traditional telecom architectures to NFV cloud based architectures ( like openstack). supported over web , 4G , LTE or other upcoming networks. Many OTT providers prefer using the public cloud over a NFV data centre.

Multinode / Multiedge computing platforms like Media Resource Function are expected to meet the need for quick delivery with additional features like hardware accelerated media , algorithms for optimised data flow (packetization, decongesting , security ) etc . With th decomposed architecture they can better utilise the

  • CPU – contains couple of cores optimised for sequential serial processing such as   graphics or video processing
  • GPU – contains many smaller cores to accelerate creation of images for computer display . Can include texture mapping, image rotation, translation, shading or more enhanced features like motion compensation, calculation of inverse DCT, etc. for accelerated video decoding.
  • DSP- processing data representing analog signals

Although IMS based solutions are more suited to telephony applications and CSPs ( Communication service providers like telecom companies ) but similar or same architectures are widely finding their into newer developed cloud communications solutions supporting tens of millions of subscribers and hyper scale deployment . It could be around applications such as

  • HD (High Definition ) calls
  • UCC ( conf , draw-board, speech recognition , realtime streaming)
  • immersive experiences ( Augmented reality , virtual reality , face recognition , tracking )
  • contextual communication ( transcription etc)
  • video content delivery with deep media analytics

Demand these says is for a decentralised system of pool of servers ( media and signalling ) that can scale independently to match up to peak traffic at any moment , with ofcourse carrier class performance . Not only these flexible solutions reduce complexity but also OpEX .

Ref:

Unified Communicator and Collaborator for Enterprise

Modular enterprise communicator solution for enterprise based communication and collaboration . Use sipml5 client side library to provide webRTC based media stream capture and propagation from client side without external plugins.

Github Repo – https://github.com/altanai/unifiedCommunicator

Unified Communications and Collaborations ( UC&C ) – https://telecom.altanai.com/2013/07/12/unified-communication/

VPN ( Virtual Public Network ) over SIP

People working at different locations need a fast, secure and reliable way to share information across computer networks . This is were a way to connect private networks over and top of public network becomes necessary and Virtual Private Network comes into picture .

vpn

SIP ( Session Initiation Protocol ) for VPN

VOIP across an SSL-based VPN is achieved in good quality by encapsulating the UDP VOIP packets ( SIP and RTP ) in TCP/IP .

Data used for defining a VPN like its Groups, its Members and the associated profiles is organized hierarchically.It includes information like who is the operator, subscriber of VPN, group ID and member ID.

vpn+ service broker

Grouping :

Groups created to implement policies and restrictions common to a set of users.These include:

  • Apply permissions to call between the Groups and to the outside world
  • Apply pricing between distinct types of of PNP (Mobile, Fixed, Privileged list)
  • Some numbers assigned a preferential tariff plan. These numbers are not part of the VPN ( Virtual On-Net) .
  • privileged list within a VPN across multiple groups

performance issues

VPN has no negative influence on latency, jitter and packet loss

With enabling authentication, encryption, HMAC, anti-replay attack, and initialization vector, and use small RTP size for Codec, the vpn overhead is high

Counters

For developing a VPN application counters are employed , some of which could be as follows

  • * Number of calls On-Net and Off-Net
  • * Numbers of Calls VPN
  • * Number of calls with Forced On-Net

Calls between endpoints like

  • * MS to MS Normal (mobile)
  • * MS to MS Privilege
  • * MS toward PABX

Success Fail rate

  • Number of calls successful without rerouting
  • Number of calls with successful rerouting
  • Number of calls with Failure (Failed = No answer, Busy, Not reachable, Congestion)
  • Number of calls on non-response (No Answer)
  • Number of calls on Not Reachable
  • Number of calls Route Select Failure
  • Number of calls on busy
  • Number of calls barred by VPN service.

other parameters

  • Total number of queries
  • Number of States created/modified
  • Number of change in the rights of calls
  • Number of issuance of observation Reports

Service Overview

Lets see how would a SIP based VPN services over telecom application server with Service Broker works .

Leveraging the Service Broker to offer voice VPN service to existing Subscribers is an arduous task. The Subscriber shall benefit from reduced charging rates for VPN calls (ON-Net), improved employee connectivity (within the VPN scope) and a consistent user experience across fixed and mobile phones.

VPN services shall be integrated with the R-IM-SSF component of the service broker. R-IM-SSF shall provide mediation as well as session and state management capabilities that shall make VPN service available over multiple networks including SS7 and IMS networks.

note : R-IM-SSF = reverse IMS gateway to IN

The subscriber base can be interfaces via a SMP that might also be used to add groups and assign right and privilege to member

note : SMP is the Provisioning interface for VPN service subscriber

Features of VPN application

1.Private numbering plan for both mobile and fixed subscribers (Short number dialing).

2.Distribution of subscriber under a hierarchical Data Model :

  1. Subscriber VPN( Enterprise Level)
  2. Group of Users ( Group level. Can be either of type Mobile or PABX )
  3. State (End user of service)

3.Grouping of a short number on the basis of following types:

  1. Member of mobile VPN
  2. Privileged user
  3. PABX user

4. Forced On-Net call handling, which shall allow user to dial the public number of another On-Net user with On-Net call Features.

5.Virtual On-Net Call Handling which allocates On-Net extension to non VPN users( Privileged list)

6.Off-Net call Handling via exhaust code which shall allow vpn users to access non-vpn public numbers

7. Prohibit the call based on a set of rules like ( all off-net calls barred).

8.Allow calls based on destination numbers. For example allow off-net calls for numbers provisioned in the white list(allowed list)

9.Outgoing call screening on the basis of time( Time based barring)


What is WebRTC?

webrtc draft
 

WebRTC 1.0: Real-time Communication Between Browsers – W3C Candidate Recommendation 13 December 2019 https://www.w3.org/TR/webrtc/

Read more in the layers of webrtc  and their functionalities here :  WebRTC layers

webrtc_development_logowebrtcdevelopment
Open Source WebRTC SDK and its implementation steps https://github.com/altanai/webrtc

What is WebRTC ?

WebRTC (Web Real-Time Communication) is an API definition drafted by the World Wide Web Consortium (W3C) that supports browser-to-browser applications for voice calling, video chat, and P2P file sharing without the need of either internal or external plugins.

  • Enables browser to browser media streaming over secure RTP profile
  • Standardization , on a API level at the W3C and at the protocol level at the IETF.
  • Enables web browsers with Real-Time Communications (RTC) capabilities
  • written in c++ and javascript
  • BSDD style license
  • free, open project avaiable in all major borwsers 

As of the 2019 update the W3C defines it as

a set of ECMAScript APIs in WebIDL to allow media to be sent to and received from another browser or device implementing the appropriate set of real-time protocols. The specification being developed in conjunction with a protocol specification developed by the IETF RTCWEB group and an API specification to get access to local media devices.

 The following is the browser side stack for webrtc media .  

WebRTC media stack Solution Architecture
WebRTC Media Stack

Open and Free Codecs

Codecs signifies the media stream’s compession and decompression. For peers to have suceesfull excchange of media, they need a common set of codecs to agree upon for the session . The list codecs are sent  between each other as part of offeer and answer or SDP in SIP.

WebRTC uses bare MediaStreamTrack objects for each track being shared from one peer to another. Codecs associated in those tracks is not mandated by webrtc soecification.

For video as per RFC 7742 WebRTC Video Processing and Codec Requirements , the manadatory codesc to be supported by webrtc clients are : VP8 and H.264‘s Constrained Baseline profile

For Audio as per RFC 7874 WebRTC Audio Codec and Processing Requirements ,browser must support  Opus codec as well as G.711‘s PCMA and PCMU formats.

Video Resolution handling

Unless the SDP specifically signals otherwise, the web browser receiving a WebRTC video stream must be able to handle video at at least 20 FPS at a minimum resolution of 320 pixels wide by 240 pixels tall.

In the best scenarios ( avaible bandwidth and media devices ) VP8 had no upper mark set on resolution of vdieo stream hence the stream can even go asfar as  maximum resolution of 16384×16384 pixels.

Independant of Signalling 

Webrtc does not specify any signalling / telecommunication protocl and it is upto the adoptor to perform ofeer/answer exchaneg in any way deemed fit for the usecase . For ex maple for a web only application on may use only plain websockets, whereas for a teelcom endpoints compatible app one should SIP as the protocol . 

Read more about WebRTC handshakes :

NAT-traversal technologies such as ICE, STUN, and TURN

Have written in detail about TURN based WebRTC flow diagrams .

https://telecom.altanai.com/2015/03/11/nat-traversal-using-stun-and-turn/. The post describe ICE  (Interactive Connectivity Establishment )  framework which is  mandatory by WebRTC standards.  It is find network interfaces and ports in Offer / Answer Model to exchange network based information with participating communication clients. ICE makes use of the Session Traversal Utilities for NAT (STUN) protocol and its extension, Traversal Using Relay NAT (TURN) 

NAT and TURN Relay

Learn about hosting / integrating different TURN servers for WebRTC

TURN server for WebRTC – RFC5766-TURN-Server , Coturn , Xirsys – https://telecom.altanai.com/2015/03/28/turn-server-for-webrtc-rfc5766-turn-server-coturn-xirsys/

Why is WebRTC importatnt ?

Significantly better video qualityWebRTC video quality is noticeably better than Flash.
Up to 6x faster connection timesUsing JavaScript WebSockets, also an HTML5 standard, improves session connection times and accelerates delivery of other OpenTok events.
Reduced audio/video latencyWebRTC offers significant improvements in latency through WebRTC, enabling more natural and effortless conversations.
Freedom from FlashWith WebRTC and JavaScript WebSockets, you no longer need to rely on Flash for browser-based RTC.
Native HTML5 elementsCustomize the look and feel and work with video like you would any other element on a web page with the new video tag in HTML5.

The major players behind conception and advancement of WebRTC standards and libraries are  :

IETF , W3C , Java community , GSMA .   The idea is to develop a Light -weight browser based call console , to make SIP calls from Web page .This was successfully achieved using fundamental technologies as Javascript , html5 , web-sockts  and TCP /UDP , open source sip server.It is good to note that there is no extra extension, plugin or gateway required , such as flash support  .Also it bears cross platform support ,  including Mozilla , chrome so on .

 Peer to peer Communication

 WebRTC forms a p2p communication channel between all the peers . that means as the participant count grows  , it converts to  a mesh networking topology with incoming and outgoing stream towards direction of each of its peers .

Two party call p2p

Peer to peer calling

two party call
p2p call

Multiparty Call and mesh network

Mesh based arrangement .

Multiparty party call
Mesh based webrtc video confeerncing

 In special case of broadcasting or  large number of viewers ( without outgoing media stream ) it is recommended to setup a Media Control Unit ( MCU) which will replay the incoming stream to large number of users without putting traffic load on the clients from where the stream is actually originating .   Important note :     1.It should be notes that these diagrams do not depict the ICE and NAT traversal and have been simplifies for better understanding. In real world scenarios there is almost all the time a STUN and TURN server involved .  

More on TURN Servers is given here : NAT traversal using STUN and TURN

2.Also the webrtc mandates the use of secure origin ( https ) on the webpage which invoke getusermedia to capture user media devices like audio , video and location .

Browser Adoption

As of March 2020 , webrtc is supported on following client’s browsers

  • Desktop PC
    Microsoft Edge 12+[25]
    Google Chrome 28+
    Mozilla Firefox 22+[26]
    Safari 11+[27]
    Opera 18+[28]
    Vivaldi 1.9+
  • Android
    Google Chrome 28+ (enabled by default since 29)
    Mozilla Firefox 24+[29]
    Opera Mobile 12+
  • Chrome OS
  • Firefox OS
  • BlackBerry 10
  • iOS
    MobileSafari/WebKit (iOS 11+)
  • Tizen 3.0

Furthermore , read about the Steps for building and deploying WebRTC solution – https://telecom.altanai.com/2014/12/04/steps-for-building-and-deploying-webrtc-solution/

TURN based media Relay

WebRTC APIs

Javascript functions  to access and process the browser media stack

getUserMedia

acquires the audio and video media (e.g., by accessing a device’s camera and microphone)

Properties

ondevicechange

Methods

enumerateDevices()
getDisplayMedia()
getSupportedConstraints()
getUserMedia()

navigator.mediaDevices.getUserMedia({ audio: true, video: true })
.then(function(stream) {
  var video = document.querySelector('video');
  // Older browsers may not have srcObject
  if ("srcObject" in video) {
    video.srcObject = stream;
  } else {
    // Avoid using this in new browsers, as it is going away.
    video.src = window.URL.createObjectURL(stream);
  }
  video.onloadedmetadata = function(e) {
    video.play();
  };
})
.catch(function(err) {
  console.log(err.name + ": " + err.message);
});

DOMException Error on getusermedia

Rejections of the returned promise are made by passing a DOMException error object to the promise’s failure handler. Possible errors are:

AbortError
Although the user and operating system both granted access to the hardware device, problem occurred which prevented the device from being used.

NotAllowedError
One or more of the requested source devices cannot be used at this time. This will happen if the browsing context is insecure( http instead of https) or if the user has specified that the current browsing instance /sessionis not permitted access to the device or has denied all access to user media devices globally.

NotFoundError
No media tracks of the type specified were found that satisfy the given constraints.

NotReadableError
Although the user granted permission to use the matching devices, a hardware error occurred at the operating system, browser, or Web page level which prevented access to the device.

OverconstrainedError
no candidate devices which met the criteria requested. string value is the name of a constraint which was not meet, and a message property containing a human-readable string explaining the problem.

exmaple conatraints :

var constraints = { video: { facingMode: (front? "user" : "environment") } };

SecurityError
User media support is disabled on the Document on which getUserMedia() was called.

TypeError
The list of constraints specified is empty, or has all constraints set to false.

RTCPeerConnection

enables audio and video communication between peers. It performs signal processing, codec handling, peer-to-peer communication, security, and bandwidth management.

Properties

canTrickleIceCandidates
connectionState
currentLocalDescription
currentRemoteDescription
getDefaultIceServers()
iceConnectionState
iceGatheringState
localDescription
onaddstream
onconnectionstatechange
ondatachannel
onicecandidate
oniceconnectionstatechange
onicegatheringstatechange
onidentityresult
onnegotiationneeded
onremovestream
onsignalingstatechange
ontrack
peerIdentity
pendingLocalDescription
pendingRemoteDescription
remoteDescription
sctp
signalingState

Methods

addIceCandidate()
addStream()
addTrack()
close()
createAnswer()
createDataChannel()
createOffer()
generateCertificate()
getConfiguration()
getIdentityAssertion()
getReceivers()
getSenders()
getStats()
getStreamById()
getTransceivers()
removeStream()
removeTrack()
restartIce()
setConfiguration()
setIdentityProvider()
setLocalDescription()
setRemoteDescription()

 signalling state transitions diagram , source W3C

RTC Signalling states

stable
There is no offer/answer exchange in progress. This is also the initial state, in which case the local and remote descriptions are empty.

have-local-offer
Local description, of type “offer”, has been successfully applied.

have-remote-offer
Remote description, of type “offer”, has been successfully applied.

have-local-pranswer
Remote description of type “offer” has been successfully applied and a local description of type “pranswer” has been successfully applied.

have-remote-pranswer
Local description of type “offer” has been successfully applied and a remote description of type “pranswer” has been successfully applied.
closed The RTCPeerConnection has been closed; its [[IsClosed]] slot is true.

RTCSDPType

offer
SDP offer.

pranswer
An RTCSdpType of pranswer indicates that a description MUST be treated as an [SDP] answer, but not a final answer.

answer
treated as an [SDP] final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer.

rollback
canceling the current SDP negotiation and moving the SDP [SDP] offer back to what it was in the previous stable state.

RTCPeerConfiguration

Defines a set of parameters to configure how the peer-to-peer communication established via RTCPeerConnection

iceServers of type sequence
array of objects describing servers available to be used by ICE, such as STUN and TURN servers.

iceTransportPolicy of type RTCIceTransportPolicy.

bundle policy affects which media tracks are negotiated if the remote endpoint is not bundle-aware, and what ICE candidates are gathered. If the remote endpoint is bundle-aware, all media tracks and data channels are bundled onto the same transport.

  • relay
    ICE Agent uses only media relay candidates such as candidates passing through a TURN server.
  • all
    The ICE Agent can use any type of candidate when this value is specified.

bundlePolicy of type RTCBundlePolicy.
media-bundling policy to use when gathering ICE candidates.
Types :

  • balanced
    Gather ICE candidates for each media type in use (audio, video, and data). If the remote endpoint is not bundle-aware, negotiate only one audio and video track on separate transports.
  • max-compat
    Gather ICE candidates for each track. If the remote endpoint is not bundle-aware, negotiate all media tracks on separate transports.
  • max-bundle
    Gather ICE candidates for only one track. If the remote endpoint is not bundle-aware, negotiate only one media track.

rtcpMuxPolicy of type RTCRtcpMuxPolicy.
rtcp-mux policy to use when gathering ICE candidates.

certificates of type sequence
A set of certificates that the RTCPeerConnection uses to authenticate.

iceCandidatePoolSize of type octet, defaulting to 0
Size of the prefetched ICE pool as defined in [JSEP]

RTCDataChannel

allows bidirectional communication of arbitrary data between peers. It uses the same API as WebSockets and has very low latency.

getStats

allows the web application to retrieve a set of statistics about WebRTC sessions. These statistics data are being described in a separate W3C document

Peer to Peer DTMF

-tbd

Call Setup betweeb WebRTC Endpoints

updates in W3C 13 Dec , 2019

Over the years since its adoption many of the associated tech were depricated from the Webrtc based platforms and enviornments , some of which are: OAuth as a credential method for ICE servers
Negotiated RTCRtcpMuxPolicy (previously marked at risk)
voiceActivityDetection
RTCCertificate.getSupportedAlgorithms()
RTCRtpEncodingParameters: ptime, maxFrameRate, codecPayloadType, dtx, degradationPreference
RTCRtpDecodingParameters: encodings
RTCDatachannel.priority

Some of the newly added featufres include:

restartIce() method added to RTCPeerConnection
Introduced the concept of “perfect negotiation”, with an example to solve signalling races.
Implicit rollback in setRemoteDescription to solve races.
Implicit offer/answer creation in setLocalDescription to solve races.

References :

WebRTC 1.0: Real-time Communication Between Browsers – W3C Candidate Recommendation 13 December 2019https://www.w3.org/TR/webrtc/

IP Multimedia Subsystem ( IMS )

 IMS is a an architectural framework for IP based multimedia rich communications. It was standardized by a group called 3GPP formed in 1999.
It started as an enabler for 3rd generation mobile networks in European market and later spread to wirelne networks too . IMS became the key to  Fixed Mobile Convergence (FMC).
Based on IETF Protocols (such as SIP, RTP, RTSP, COPS, DIAMETER, etc.) , IMS is  now crucial for controlling conmmunication in a IP based Next Genration Network ( NGN ).
Communication service providers and telecom operators are migrating from circuit-switched networks to IMS technology with the increasing bandwidth (5G) and user expectations.
ims layers

Why IMS ?

Early days TDM networks were not robust enough to support emerging technologies and data networking. There was a need to migrate from voic eonly network to Triple play network ( voice , video and data ).

Other factors included :

  • rapid service development
  • service availiability in both home and roaming network
  • wireline and wireless convergence

Due to these above mentioned reasons TDM was outdated and IMS gained support .

 

What benefits does IMS bring ?

It offers counteless applications around rich multimedia services on wireless , packet swtched and even tradional circuit switched networks.

Easier to Create and Deploy New Applications and Services
  •  Enhanced applications are easier to develop due to open APIs and common network services.
  • Third-party developers can offer their own applications and use common network services, sharing profits with minimal risk
  •  New services involving concurrent sessions of multimedia (voice, video, and data) during the same call are now possible
  • Reduced time-to-market for new services is possible because service providers are not tied to the timescales and functions of their primary NEPs
Capture New Subscribers, Retain Current Subscribers
  • Better voice quality for business applications, such as conferencing, is possible
  • Wireless applications (like SMS, and so on) can be offered to wire line or broadband subscribers.
  • Service providers can more easily offer bundled services.
Lower Operating and Capital Costs
  • Cost-effective implementation of services is possible across multiple transports, such as Push-To-Talk (PTT), presence and Location-Based Services (LBS), Fixed-Mobile Convergence (FMC), mobile video services, and so on.
  • Common provisioning, management, and billing systems are supported for all networks.
  • Significantly lower transport costs result when moving from time-switched to packet-switched channels.
  • Service providers can take advantage of competitive offerings from multiple NEPs for most network elements.
  • IMS results in reduced expenses for delivering licensed content to subscribers of different types of devices, encodings, or networks.

 

The reason for widespread adoption of IMS is also that it follows standards and open interfaces  from 3GPP and ETSI, also is flexible for policy control , OSS/BSS , Value Added Services etc .

 

IMS features

1. Abstraction from Underlying Network :
IMS is essentially leading towards an open and standardized network and interface ,  irrespective of underlay network.
2. Fixed /Mobile Convergence 
Inter operability with Circuit Switched (CS) Mobile application Part (MAP)
3. Roaming 
Location awareness between home and visiting network.
4. Application layer Call Control
IMS application layer has the provision for defining proxy or B2BUA based call flow completion . This leads to operator being able to introduce business logic into call sessions.
IMS is supplemented by SIP (IETF ) , Diameter ( IETF) and H248(ITU-T). The release cycle of IMS is as follows :
  • 2002-03-14 Rel-5  : IMS was introduced with SIP. Qos voice over MGW.
  • 2004-12-16 Rel-6 : Services like emergency , voice call continuity , IPCAN ( IP connectivity Access Network )
  • 2005-09-28 Rel-7 : Single Radio Voice Call Continuity , multimedia telephony,eCall ,ICS
  • 2008-12-11 Rel-8 : IMS centralized services , supplementary services and internetworking between  IMS and  Circuit Switched Networks,charging , QoS
  • 2009-12-10 Rel-9 : IMS emergency numbers on GPRS , EPS(Enhanced packet system) , Custom alert tone , MM broadcast/Multicast
  • 2011-3-23 Rel-10 : home NodeB, M2M, Roaming and Inter UE transfer
  • 2012-09-12 Rel-11 :-tbd
  • 2014-09-17 Rel-12 :- tbd
  • 2015-12-11 Rel-13 :- tbd

IMS Layers

Majorly IMS is divided into 3 horizontal layers given below :

2014-05-24_0015

•Transport / MediaEndpoint Layer

Unifies transports and media from analog, digital, or broadband formats to Real-time Transport Protocol (RTP) and SIP protocols. This is accomplished by media gateways and signaling gateways.

It also includes media servers with media processing elements to allow for announcements, in-band signaling, and conferencing. These media servers are shared across all applications (voicemail, interactive response systems, push-to-talk, and so on), maximizing statistical use of the equipment and creating a common base of media services without “hard-coding” these services into the applications.

•Session and Control Layer

This layer arranges logical connections between various other network elements. It provides registration of end-points, routing of SIP messages, and overall coordination of media and signaling resources.

IMS core which is part of this layer primarily contains 2 important elements Call Session Control Function (CSCF) and Home Subscriber Server (HSS) database. These are explained below 

HSS Home Subscriber Server

It is a database of user profiles and location information . It is responsible for name/address resolution and also authorization/authentication .

CSCF Call Session Control Function

Handles most routing, session and security related operation for SIP messages . It is further divided into 3 parts :

  • Proxy CSCF: P_CSCF is the first point of contact from any SIP UA. It proxies UE requests to subsystem.
  • Serving CSCF: S-CSCF is a powerful part of IMS Core as it decides how UE request will be forwarded to the application servers.
  • Interrogating CSCF: I-CSCF initiates the assignment of a user to an S-CSCF (by querying the HSS) during registration.

•Application Services Layer

 The Application Services Layer contains multiple Application Servers (AS), such as:
  • Telephony Application Server (TAS) – for defining custom call flow logic
  • IP Multimedia Services Switching Function (IM-SSF)
  • Open Service Access Gateway (OSA-GW), and so on.

Additional Links :


Update on IMS :

IMS has been mandated as the control architecture for Voice over LTE (VoLTE) networks. Also IMS is being widely adopted to mange traffic for Voice over WiFi (VoWiFi) systems.