Class: CapabilityExchange

wsc. CapabilityExchange

new CapabilityExchange(subSession)

Controller class to send query and handle response.

Parameters:
Name Type Description
subSession Object

the subSession(for example: wsc.Call) object

Methods

enquiry(selfCapability, target)

Sends a capability enquiry message.

Parameters:
Name Type Description
selfCapability String

The initiator's capability of this enquiry

target String

The target user identity of this enquiry

respond(Query, selfCapability)

Sends a capability enquiry response message.

Parameters:
Name Type Description
Query Query

An object contains the query information; this function will respond for the enquiry represented by this object

selfCapability String

The capability to return

Events

onError

Event handler that is called when an error message is received, for example, the enquiry target is not reachable, or the enquiry request has timed out and so on.

Parameters:
Name Type Description
Error Object

An error object that contains the properties "action", "errorCode" and "errorReason"

onQueryRequest

Event handler that is called when the capability enquiry request is received. An object contains the enquiry information to be passed to the application. This Query object contains properties like initiator, target, initiatorCapability, and targetCapability.

Parameters:
Name Type Description
Query Query

An object that represents a capability enquiry

onQueryResponse

Event handler called when the capability enquiry response is received. An object contains the enquiry information to be passed to the application. This Query object contains properties like initiator, target, initiatorCapability, and targetCapability.

Parameters:
Name Type Description
Query Query

An object that represents a capability query

Oracle® Communications WebRTC Session Controller Javascript API Reference 7.2.0.1.1, E69512-02
Copyright © 2013, 2017, Oracle and/or its affiliates. All rights reserved.