-
Notifications
You must be signed in to change notification settings - Fork 354
Quickstart Guide (Calling)
/*<![CDATA[*/ div.rbtoc1695302837758 {padding: 0px;} div.rbtoc1695302837758 ul {list-style: disc;margin-left: 0px;} div.rbtoc1695302837758 li {margin-left: 0px;padding-left: 0px;} /*]]>*/
The Calling SDK helps in developing applications that leverage Webex Calling workflows across browsers. It comprises of a suite of modules that provide a host of features.
- Device Registration
- Inbound/outbound calls
- Supplementary services like hold/resume, call transfer(blind/consult)
- Voicemail
- Call Settings (Call forwarding, do not disturb, call waiting).
- Call History
- Contacts
Details about these features are covered later in the document.
To import the latest stable version of the Calling SDK one can use NPM or CDN.
import Calling from 'webex/calling'
A built, minified version of the Calling SDK is also provided. It can be accessed as mentioned below:
<script src="../calling.min.js"></script>
// TODO: Add the location of the published calling SDK
To initialize Calling SDK, either a Webex object or Webex configuration is required.
- Initialize Webex object. (Refer to Web SDK Wiki | Quick Start guide to find the steps)
- Register with Webex Device Manager (WDM) and establish mercury connection.
- Pass Webex object and calling configuration as arguments and create new Calling instance which will initialize different client modules that it offers. (Refer to the table in the Calling Configuration section to identify Calling Configuration attributes)
const calling = new Calling(webex, callingConfig);
- Pass Webex configuration and calling configuration and create new Calling instance. (Refer to Web SDK Wiki | Quick Start guide to identify configuration attributes for Webex Configuration)
- Wait for Calling instance to be ready by listening for the event.
- Once the event is received, call the register API to trigger Webex Device Manager registration, establishing mercury connection and initializing the various client modules within Calling.
const calling = new Calling({webexConfig, callingConfig});
calling.on("ready", () => {
calling.register().then(() => {
// insert code to register with Mobius
});
});
Note: Client objects will be created based on calling configuration inside Calling instance.
This is the example of calling configuration.
callingConfig: {
clientConfig: {
calling: boolean,
contact: boolean,
callHistory: boolean,
callSettings: boolean,
voicemail: boolean,
},
callingClientConfig: {
logger: {
level: string
},
discovery: {
country: string,
region: string,
},
serviceData: {
domain: string,
indicator: string,
}
},
logger: {
level: string
}
}
Following tables cover different configuration attributes present inside calling configuration.
| S.no
|
Attribute
|
Description
|
Data type
|
Default attribute?
|
Public attribute?
| | --- | --- | --- | --- | --- | --- | | 1. | calling | Toggles the availability of the callingClient module | Boolean | No | YES | | 2. | contact | Toggles the availability of the contactClient module | Boolean | No | YES | | 3. | callHistory | Toggles the availability of the callHistory module | Boolean | No | YES | | 4. | callSettings | Toggles the availability of the callSettings module | Boolean | No | YES | | 5. | voicemail | Toggles the availability of the voicemailClient module | Boolean | No | YES |
| S.no
|
Attribute
|
Description
|
Data type
|
Default attribute?
|
Public attribute?
|
| --- | --- | --- | --- | --- | --- |
| 1. | discovery |
| Object | No | Yes |
| 1.a. | country | Country from where the device registration is triggered | String | No | Yes |
| 1.b. | region | Region from where the device registration is triggered | String | No | Yes |
| 2. | serviceIndicator |
| String | No | Yes |
| 2.a. | domain | Identifies which service is using Calling SDK | String | Yes | Yes |
| 2.b. | indicator |
| String | No | No |
| 3. | logger | Logger Configuration | Object |
|
|
| S.no
|
Attribute
|
Description
|
Data type
|
Default attribute?
|
Public attribute?
|
| --- | --- | --- | --- | --- | --- |
| 1. | level | Maximum log level that should be printed to the console. One of silent|error|warn|log|info|debug|trace
| String |
| YES |
There are multiple client modules available within the Calling Instance as mentioned in the introduction. They are created based on the configuration provided during initialization.
This module provides functionalities for:
- Fetching line objects
- Line registration
- Inbound/outbound calls
- Supplementary services like hold/resume, call transfer(blind and consult)
This module is required for contact management. Functionalities available are:
- Fetch contacts
- Create contacts
- Create contact groups
This module is used to provide access to voicemail functionalities like:
- Fetching voicemails
- Marking voicemails read/unread
- Deleting voicemails
- Fetching transcript for voicemails
This module helps in fetching call records across different types of calls and meetings in Webex. It also provides options to filter these records.
This module allows user-specific setting changes. Some of them are listed below.
- Call Forwarding
- Call Waiting
- Do not Disturb(DND)
Caution
- Introducing the Webex Web Calling SDK
- Core Concepts
- Quickstart guide
- Authorization
- Basic Features
- Advanced Features
- Introduction
- Quickstart Guide
- Basic Features
- Advanced Features
- Multistream
- Migrating SDK version 1 or 2 to version 3