API Docs for: 2.6
Show:

Conversation Class

Module: ast_proxy

Abstraction of a phone conversation.

It can throw exceptions.

Constructor

Conversation

() Object

Returns:

Object:

The conversation object.

Methods

getCounterpartNum

() String

Returns the counterpart number.

Returns:

String:

The number of the counterpart.

getDestinationChannel

() Channel

Return the destination channel.

Returns:

Channel:

The destination channel object.

getDuration

() Number

Return the duration of the conversation.

Returns:

Number:

The conversation duration expressed in seconds.

getId

() String

Return the conversation identification.

Returns:

String:

The conversation identification.

getQueueId

() Channel

Returns the queue identifier if the conversation involves the queue, undefined otherwise.

Returns:

Channel:

The queue identifier.

getSourceChannel

() Channel

Return the source channel.

Returns:

Channel:

The source channel object.

isIncoming

() Boolean

Returns true if the conversation is incoming.

Returns:

Boolean:

True if the conversation is incoming.

isInConference

() Boolean

True if the conversation involves a meetme conference.

Returns:

Boolean:

Returns true if the conversation involves a meetme conference.

isRecording

() Booelan

Returns true if the conversation is recording or is in mute recording.

Returns:

Booelan:

true if the conversation is recording or is in mute recording, false otherwise.

setRecording

(
  • value
)

Sets the recording status.

It can throw an Exception.

Parameters:

  • value Boolean

    The value for the recording status.

setRecordingMute

()

Sets the recording status to mute.

It can throw an Exception.

toJSON

(
  • [privacyStrOutQueue]
  • [privacyStrInQueue]
)
Object

Returns the JSON representation of the object. If the conversation isn't connected, one between the source channel and the destination channel can be null.

{
    id:              "SIP/214-000002f4>SIP/209-000002f5",
    owner:           "214",
    chDest:          Channel.toJSON(),                    // the source channel of the call
    queueId:         "401",                               // the queue identifier if the conversation has gone through a queue
    chSource:        Channel.toJSON(),                    // the destination channel of the call
    duration:        26,
    recording:       "false",                             // it's "true" or "mute" if the conversation is recording, "false" otherwise
    direction:       "in",
    inConference:    true,                               // if the conversation involves a meetme conference
    throughQueue:    true,                               // if the call has gone through a queue
    counterpartNum:  "209",
    counterpartName: "user"
}

Parameters:

  • [privacyStrOutQueue] String optional

    If it is specified, it obfuscates the number of all calls that does not pass through a queue

  • [privacyStrInQueue] String optional

    If it is specified, it obfuscates the number of all calls that pass through a queue

Returns:

Object:

The JSON representation of the object.

toString

() String

Return the string representation of the conversation.

Returns:

String:

The representation of the conversation.

updateDuration

() private

Update the duration in seconds.

Properties

chDest

Channel private

The destination channel.

chSource

Channel private

The source channel.

connected

Boolean private

It is true only if the parties involved in the conversation are connected.

counterpartName

String private

The name of the counterpart.

counterpartNum

String private

The number of the counterpart.

DIRECTION

Object private

The possible values for conversation direction.

Default: { IN: "in", OUT: "out" }

direction

String private

The conversation direction.

duration

Number private

The duration of the conversation in seconds.

id

String private

The conversation identifier.

inConference

Boolean private

The timestamp of the starting time. This is necessary to

owner

String private

The owner of the channel.

queueId

String private

The queue identifier if the conversation has gone through a queue, undefined otherwise.

recording

String private

The recordig status. It can be one of the "RECORDING_STATUS" property.

Default: RECORDING_STATUS.FALSE

RECORDING_STATUS

Object private

The possible values for conversation recording.

Default: { "MUTE": "mute", "TRUE": "true", "FALSE": "false" }

startime

Number private

The timestamp of the starting time. This is necessary to update the duration value.

throughQueue

Boolean private

True if the conversation has gone through a queue.