oracle communications webrtc session controller client sdk … · call rehydration .....2-35 update...
TRANSCRIPT
Oracle Communications WebRTC Session Controller: Client SDK
Student Guide
Edition 1.0
May 2015
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Disclaimer This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. This document is not warranted to be error-free. Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS The U.S. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. Trademark Notice Oracle and Java are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Table of Contents
Overview ...........................................................................................................................................................1-1 WebRTC Session Controller Overview of SDKs ............................................................................................1-3 Agenda ...........................................................................................................................................................1-4 WebRTC Session Controller SDKs ................................................................................................................1-5 Mobile Application Development Landscape .................................................................................................1-6 WebRTC Session Controller Support for Mobile Applications ........................................................................1-7 Agenda ...........................................................................................................................................................1-8 WebRTC Session Controller Architecture ......................................................................................................1-9 SDK Architecture ............................................................................................................................................1-10 Agenda ...........................................................................................................................................................1-11 Concepts: WSCSession .................................................................................................................................1-12 Concepts: Package and SubSession .............................................................................................................1-13 Relationship between the major classes. .......................................................................................................1-14 Agenda ...........................................................................................................................................................1-15 Supported Features .......................................................................................................................................1-16
JavaScript .........................................................................................................................................................2-1 WebRTC Session Controller JavaScript SDK ................................................................................................2-3 Agenda ...........................................................................................................................................................2-4 WebRTC API..................................................................................................................................................2-5 Agenda ...........................................................................................................................................................2-6 WebRTC Session Controller Signaling Path ..................................................................................................2-7 WebRTC Session Controller Components .....................................................................................................2-8 Accessing WebRTC Session Controller JavaScript API ................................................................................2-9 JavaScript SDK Docs .....................................................................................................................................2-10 Agenda ...........................................................................................................................................................2-11 Overview ........................................................................................................................................................2-12 Caller side flows .............................................................................................................................................2-13 Callee side flows ............................................................................................................................................2-14 Session ..........................................................................................................................................................2-15 CallPackage ...................................................................................................................................................2-16 Call .................................................................................................................................................................2-17 CallConfig and MEDIADIRECTION ................................................................................................................2-18 Packages that support the Rich Communication Services (RCS) specification .............................................2-19 Protocols that are used ..................................................................................................................................2-20 ChatPackage..................................................................................................................................................2-21 FileTransferPackage ......................................................................................................................................2-22 MessagingPackage and Messaging ...............................................................................................................2-23 CapabilityPackage and CapabilityExchange ..................................................................................................2-24 Package – MessageAlertPackage .................................................................................................................2-25 Agenda ...........................................................................................................................................................2-26 Scenarios intro ...............................................................................................................................................2-27 Register ..........................................................................................................................................................2-28 Making a call – Audio/Video ...........................................................................................................................2-29 Making a call – Call with data channel ...........................................................................................................2-31 Subscribe/Notify .............................................................................................................................................2-32 Call rehydration ..............................................................................................................................................2-34
Call Rehydration .............................................................................................................................................2-35 Update a Call .................................................................................................................................................2-36 Auth Handler ..................................................................................................................................................2-37 Using the Auth Handler ..................................................................................................................................2-38 Using the Auth Handler (continued) ...............................................................................................................2-39 Agenda ...........................................................................................................................................................2-40 Class Hierarchy ..............................................................................................................................................2-41 Class Diagrams, Session ...............................................................................................................................2-42 Class Diagrams, Call Package .......................................................................................................................2-43 Class Diagrams, Chat Package .....................................................................................................................2-44 Class Diagrams, File Transfer Package .........................................................................................................2-45 Class Diagrams, Messaging Package ............................................................................................................2-46 Class Diagrams, Capability Package .............................................................................................................2-47 Class Diagrams, Message Alert Package ......................................................................................................2-48 Class Diagrams, Constants ............................................................................................................................2-49
Android .............................................................................................................................................................3-1 WebRTC Session Controller Android SDK ....................................................................................................3-3 Agenda ...........................................................................................................................................................3-4 SDK Architecture ............................................................................................................................................3-5 SDK Overview ................................................................................................................................................3-6 Supported Features .......................................................................................................................................3-7 API Main Classes ...........................................................................................................................................3-8 Class relationship ...........................................................................................................................................3-9 Code Examples ..............................................................................................................................................3-10 Code Sample - Authentication........................................................................................................................3-11 Code Sample – Session establishment ..........................................................................................................3-12 Code Sample – Outgoing Call ........................................................................................................................3-13 Code Sample – Incoming Call ........................................................................................................................3-14 Code Sample - Configuration .........................................................................................................................3-15 Code Sample - PeerConnectionFactory .........................................................................................................3-17 SDK Docs ......................................................................................................................................................3-18 SDK Files .......................................................................................................................................................3-19 Application Permissions .................................................................................................................................3-20 Things to know & Best Practices ....................................................................................................................3-21 Troubleshooting .............................................................................................................................................3-22 Troubleshooting - Device/Platform Issues ......................................................................................................3-23 Troubleshooting - Network .............................................................................................................................3-24 Troubleshooting - SDK ...................................................................................................................................3-25 Troubleshooting - Logging .............................................................................................................................3-26
iOS .....................................................................................................................................................................4-1 WebRTC Session Controller iOS SDK ...........................................................................................................4-3 Agenda ...........................................................................................................................................................4-4 Architecture ....................................................................................................................................................4-5 SDK Contents ................................................................................................................................................4-7 API Overview .................................................................................................................................................4-8 Class relationship ...........................................................................................................................................4-9 SDK Docs ......................................................................................................................................................4-10 Code Sample: Authentication .........................................................................................................................4-12
Code Sample: Establishing a session ............................................................................................................4-13 Code Sample: Outgoing call ..........................................................................................................................4-14 Code Sample: Incoming call ..........................................................................................................................4-15 Best Practices ................................................................................................................................................4-16 Troubleshooting .............................................................................................................................................4-17
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 1
Overview
Chapter 1
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 2
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 3
WebRTC Session Controller Overview of SDKs
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 4
Agenda
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 5
WebRTC Session Controller SDKs
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 6
Mobile Application Development Landscape
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 7
WebRTC Session Controller Support for Mobile Applications
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 8
Agenda
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 9
WebRTC Session Controller Architecture
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 10
SDK Architecture
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 11
Agenda
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 12
Concepts: WSCSession
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 13
Concepts: Package and SubSession
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 14
Relationship between the major classes.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 15
Agenda
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Overview
Chapter 1 - Page 16
Supported Features
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 1
JavaScript
Chapter 2
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 2
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 3
WebRTC Session Controller JavaScript SDK
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 4
Agenda
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 5
WebRTC API
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 6
Agenda
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 7
WebRTC Session Controller Signaling Path
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 8
WebRTC Session Controller Components
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 9
Accessing WebRTC Session Controller JavaScript API
Modular JS API libraries
The APIs are defined in different source files so that you can choose only the ones that are necessary for your application's functionality.
• wsc-common.js: contains the essential classes to setup a session between a client and the WebRTC Session Controller Signaling Engine.
• wsc-call.js: contains classes to configure WebRTC-based audio/video/datachannel communications.
• wsc-chat.js: contains classes to setup MSRP-based chat.
• wsc-filetransfer.js: contains classes to setup an MSRP-based file transfer.
• wsc-messaging.js: contains classes to setup a Paging mode messaging application.
• wsc-capability.js: contains the classes used to provide capability discovery functions.
• wsc-msgalert.js: contains the classes to implement Message alert applications that follow RFC-3842,
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 10
JavaScript SDK Docs
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 11
Agenda
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 12
Overview
List of all available packages
• CallPackage
• ChatPackage
• FileTransferPackage
• MessagingPackage
• CapabilityPackage
• MessageAlertPackage
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 13
Caller side flows
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 14
Callee side flows
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 15
Session
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 16
CallPackage
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 17
Call
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 18
CallConfig and MEDIADIRECTION
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 19
Packages that support the Rich Communication Services (RCS) specification
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 20
Protocols that are used
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 21
ChatPackage
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 22
FileTransferPackage
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 23
MessagingPackage and Messaging
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 24
CapabilityPackage and CapabilityExchange
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 25
Package – MessageAlertPackage
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 26
Agenda
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 27
Scenarios intro
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 28
Register
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 29
Making a call – Audio/Video
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 30
Making a call – Audio/Video
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 31
Making a call – Call with data channel
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 32
Subscribe/Notify
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 33
Subscribe/Notify
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 34
Call rehydration
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 35
Call Rehydration
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 36
Update a Call
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 37
Auth Handler
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 38
Using the Auth Handler
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 39
Using the Auth Handler (continued)
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 40
Agenda
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 41
Class Hierarchy
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 42
Class Diagrams, Session
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 43
Class Diagrams, Call Package
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 44
Class Diagrams, Chat Package
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 45
Class Diagrams, File Transfer Package
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 46
Class Diagrams, Messaging Package
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 47
Class Diagrams, Capability Package
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 48
Class Diagrams, Message Alert Package
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 49
Class Diagrams, Constants
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
JavaScript
Chapter 2 - Page 50
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 1
Android
Chapter 3
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 2
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 3
WebRTC Session Controller Android SDK
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 4
Agenda
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 5
SDK Architecture
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 6
SDK Overview
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 7
Supported Features
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 8
API Main Classes
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 9
Class relationship
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 10
Code Examples
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 11
Code Sample - Authentication
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 12
Code Sample – Session establishment
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 13
Code Sample – Outgoing Call
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 14
Code Sample – Incoming Call
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 15
Code Sample - Configuration
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 16
Code Sample - Configuration
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 17
Code Sample - PeerConnectionFactory
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 18
SDK Docs
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 19
SDK Files
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 20
Application Permissions
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 21
Things to know & Best Practices
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 22
Troubleshooting
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 23
Troubleshooting - Device/Platform Issues
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 24
Troubleshooting - Network
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 25
Troubleshooting - SDK
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 26
Troubleshooting - Logging
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 27
Troubleshooting - Logging
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
Android
Chapter 3 - Page 28
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 1
iOS
Chapter 4
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 2
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 3
WebRTC Session Controller iOS SDK
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 4
Agenda
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 5
Architecture
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 6
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 7
SDK Contents
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 8
API Overview
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 9
Class relationship
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 10
SDK Docs
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 11
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 12
Code Sample: Authentication
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 13
Code Sample: Establishing a session
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 14
Code Sample: Outgoing call
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 15
Code Sample: Incoming call
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 16
Best Practices
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 17
Troubleshooting
Copyright © 2014, Oracle and/or its affiliates. All rights reserved.
iOS
Chapter 4 - Page 18