Dialog

Class finesse.restservices.Dialog

Extends finesse.restservices.DialogBase

Represents a call such as a regular phone call, a conference, or a silent monitor session.

Example

Code Snippet
Copyvar _dialogs = _user.getDialogs({
        includeNonVoice: true
    }
    _dialogs.addHandler('load', function() {
        dialog
    }) dialogCollection = _dialogs.getCollection();
    for (dialog in dialogCollection) {
        if (dialogCollection.hasOwnProperty(dialog)) {
            var _dialog = dialogCollection[dialog];
            _dialog.addHandler(‘change’, function() {
                // TODO: on change of dialog do some thing
            }));
    }
}

Methods

cancelCallback(mediaAddress, handlers)

Cancels a scheduled callback.

Parameters

Name

Type

Description

Required

mediaAddress

String

The media address of the user.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

dropParticipant(targetMediaAddress, handlers)

Drops a participant from the call.

Parameters

Name

Type

Description

Required

targetMediaAddress

String

The media address of the participant to drop from the call.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

getCallbackInfo()

Retrieves information about the currently scheduled callback.

Returns

{Object} Undefined if no callback is set. If callback is set, then it returns a map with one or more entries depending on the configured value. The callbackTime refers to the configured callback time and the callbackNumber refers to the configured callback number.

getCallbackNumber()

Retrieves the callback number without the dialer prefix. This is required to schedule a callback if there is any dialer prefix added for Direct Preview Outbound calls.

Returns

{String} The callback number without the dialer prefix.

getDroppableParticipants(filterExtension)

Retrieves the dropable participants, which are participants with an agent extension. A participant can represent an internal user (such as, an agent) or an external user (such as, a customer). It is not a CTI Route Point, IVR Port, or the caller.

Parameters

Name

Type

Description

Required

filterExtension

String

To remove a single extension from the list.

Optional

Returns

{Array} The array of participants that can be dropped. Participant entity properties are as follows:

  • state—The last participant state in a dialog.

  • stateCause—The reason for the last participant state in a dialog. It is applicable to a FAILED participant state. The possible values are BUSY, BAD_DESTINATION, and OTHER.

  • mediaAddress—The media address of the participant.

  • startTime—The start time of the participant.

  • stateChangeTime—The time from when the participant state has changed.

  • actions—The list of actions that a participant can perform.

getFromAddress()

Retrieves the from address, which is the calling line ID of the caller.

Returns

{String} The from address.

getParticipantTimerCounters(participantExt)

Retrieves the participant timer counters.

Parameters

Name

Type

Description

Required

participantExt

String

The extension of the participant.

Yes

Returns

{Object} The array of participants which contains properties:

  • state—The last participant state in a dialog.

  • startTime—The start time of the participant.

  • stateChangeTime—The time when the participant state has changed.

getSecondaryId()

Retrieves the secondaryId of a dialog. A consult call has two call legs (primary leg and a consult leg). When the consult call is completed (either with a transfer or conference), the two call legs would merge. The dropped call's Dialog Id can be found in the secondaryId field of the the surviving call's Dialog object. For Unified CCE deployments, the secondaryId will be populated for direct transfers as well. This is supported from Cisco Finesse, Release 11.6(1) ES1 onwards.

Returns

{String} The Id of the secondary dialog.

getServices()

Retrieves the list of services available for this dialog. Services are only available in Unified CCE deployments.

Example

var services = dialog.getServices();

Returns

{Object} The array list of services.

getToAddress()

Retrieves the to address, which is the destination for the call.

Returns

{String} The to address.

initiateDirectTransfer(mediaAddress, toAddress, handlers)

Initiates a single-step transfer request.

Parameters

Name

Type

Description

Required

mediaAddress

String

The extension of the user performing the single-step transfer.

Yes

toAddress

String

The destination address of the single-step transfer.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

isParticipantDroppable(participantExt)

Determines whether the supervisor can drop the provided extension from a call.

Parameter

Name

Type

Description

Required

participantExt

String

The extension of the participant.

Yes

Returns

{Boolean} True if the extension of the participant is droppable.

makeConsultCall(mediaAddress, toAddress, handlers)

Makes a consult call to a destination.

Parameters

Name

Type

Description

Required

mediaAddress

String

The extension of the user performing the consult call.

Yes

toAddress

String

The destination address of the consult call.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

reclassifyCall(mediaAddress, classification, handlers)

Reclassifies an Outbound Option Direct Preview call. A call can be reclassified as VOICE, FAX, ANS_MACHINE, INVALID, DO_NOT_CALL, or BUSY. The call type is then sent back to Unified CCX for processing.

Parameters

Name

Type

Description

Required

mediaAddress

String

The extension of the user performing the reclassification.

Yes

classification

String

The new classification to assign to the call. Valid values are VOICE, FAX, ANS_MACHINE, INVALID, BUSY, and DO_NOT_CALL.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

requestAction(mediaAddress, action, handlers)

Requests the provided action to be taken for the specified mediaAddress.

Example
Code Snippet
Copydialog.requestAction(_user.getExtension(), 'CONSULT', {
    error: onError,
    success: onSuccess
});

Parameters

Name

Type

Description

Required

mediaAddress

String

The extension of the user which the action is performed on.

Yes

action

String

The action that is invoked on the dialog. For more information, see Dialog.Actions.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

sendDTMFRequest(mediaAddress, handlers, digit)

Sends the DTMF digit tones.

Parameters

Name

Type

Description

Required

mediaAddress

String

The extension of the user sending the DTMF digits.

Yes

digit

String

The DTMF digits to be sent.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

updateCallbackNumber(mediaAddress, callbackNumber, handlers)

Updates the number for a callback.

Parameters

Name

Type

Description

Required

mediaAddress

String

The extension of the user updating the callback number.

Yes

callbackNumber

String

The new number for the callback.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

updateCallbackTime(mediaAddress, callbackTime, handlers)

Updates the time for a callback.

Parameters

Name

Type

Description

Required

mediaAddress

String

The extension of the user updating the callback time.

Yes

callbackTime

String

The new time for the callback. Format: YYYY-MM-DDTHH:MM

For example, 2013-12-24T23:59

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes

updateWrapUpReason(wrapUpReason, handlers)

Updates the wrap-up reason for the dialog.

Parameters

Name

Type

Description

Required

wrapUpReason

String

The new wrap-up reason for the dialog.

Yes

handlers

Object

An object containing the handlers for the request.

For more information on handlers, see Request Handlers.

Yes