Class finesse.restservices.Dialog
JavaScript representation of a Dialog object. Also exposes methods to operate
on the object against the server.
Defined in: Dialog.js.
Constructor Attributes | Constructor Name and Description |
---|---|
finesse.restservices.Dialog(options)
|
Field Attributes | Field Name and Description |
---|---|
<static> |
finesse.restservices.Dialog.Actions
Possible participant actions constants.
|
<static> |
finesse.restservices.Dialog.ReasonStates
Possible dialog state reasons code constants.
|
<static> |
finesse.restservices.Dialog.States
Possible dialog state constants.
|
Method Attributes | Method Name and Description |
---|---|
Getter for the callType.
|
|
getDNIS()
Getter for the DNIS.
|
|
Getter for the from address.
|
|
Retrieves a list of media properties a.k.a.
|
|
Getter for the media type.
|
|
Retrieves a list of participants within the Dialog object.
|
|
getState()
Getter for the Dialog state.
|
|
Getter for the to address.
|
|
makeConsultCall(mediaAddress, toAddress, handlers)
Invoke a consult call out to a destination.
|
|
updateWrapUpReason(wrapUpReason, handlers)
Update this dialog's wrap-up reason.
|
Class Detail
finesse.restservices.Dialog(options)
- Parameters:
- {Object} options
- An object with the following properties:
- id: The id of the object being constructed
- onLoad(this): (optional) when the object is successfully loaded from the server
- onChange(this): (optional) when an update notification of the object is received
- onAdd(this): (optional) when a notification that the object is created is received
- onDelete(this): (optional) when a notification that the object is deleted is received
- onError(rsp): (optional) if loading of the object fails, invoked with the error response object:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- parentObj: (optional) The parent object
Field Detail
<static>
finesse.restservices.Dialog.Actions
Possible participant actions constants.
<static>
finesse.restservices.Dialog.ReasonStates
Possible dialog state reasons code constants.
<static>
finesse.restservices.Dialog.States
Possible dialog state constants.
Method Detail
{String}
getCallType()
Getter for the callType.
- Returns:
- {String} The callType.
{String}
getDNIS()
Getter for the DNIS.
- Returns:
- {String} The DNIS.
{String}
getFromAddress()
Getter for the from address.
- Returns:
- {String} The from address.
{Object}
getMediaProperties()
Retrieves a list of media properties a.k.a. call variables from the dialog object
- Returns:
- {Object} Map of call variables; names mapped to values
{String}
getMediaType()
Getter for the media type.
- Returns:
- {String} The media type.
{Object}
getParticipants()
Retrieves a list of participants within the Dialog object.
- Returns:
- {Object} List of
{String}
getState()
Getter for the Dialog state.
- Returns:
- {String} The Dialog state.
{String}
getToAddress()
Getter for the to address.
- Returns:
- {String} The to address.
makeConsultCall(mediaAddress, toAddress, handlers)
Invoke a consult call out to a destination.
- Parameters:
- {String} mediaAddress
- The media address of the user performing the consult call.
- {String} toAddress
- The destination address of the consult call.
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
updateWrapUpReason(wrapUpReason, handlers)
Update this dialog's wrap-up reason.
- Parameters:
- {String} wrapUpReason
- The new wrap-up reason for this dialog
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter: