Class: Message

wsc. Message

An object that represents the message data to be sent to WebRTC Session Controller server. The message has control, header, payload and optional extension header blocks in it. The control block has the information to associate this message with a particular sub session on the client side (SIP session on the server side). Please refer to "WebRTC Session Control Protocol" for message details.

new Message(msg)

Parameters:
Name Type Description
msg JSON

the message in JSON format.

Properties:
Name Type Description
control Object

the control part of the message.

Properties
Name Type Description
type String

Control type of the JSON message: This can be request, response, message, acknowledgement or error.

package_type String

The package is the type of service or functionality that the message handles.

session_id String

The session object's ID that the message is associated.

subsession_id String

It identifies a particular subsession.

sequence Number

sequence number is a serial number that starts with 1. Each side of the WebSocket connection has its own serial number. Sequence number uniquely identifies a message within a JsonRTC session.

message_state String

Optional. This is used to specify if the message is Initial, Subsequent or Final.

correlation_id String

Optional. This is used to identify a particular message within a JsonRTC session. Typically this is the sequence number of the message that either server or client sends to the server. This appears when the message wants to associate itself to another message.

ack_sequence Number

Optional. It is used by client to confirm that the client has received the message whose sequence equals this header, and vice versa.

version Number

Indicates the protocol version that the client or server supports.

header Object

the header part of the message.

Properties
Name Type Description
action String

This is the action which the message is used for.

initiator String

This is the user who initiated a request.

target String

This is the user the request target to.

error_code Number

Optional: This is the error code of the message, only apply to error type message.

payload Object

the payload part of the message.

Oracle® Communications WebRTC Session Controller JavaScript API Reference, E55131-03
Copyright © 2013, 2015, Oracle and/or its affiliates. All rights reserved.