| Code | Description |
|---|---|
| 408 | Call is not answered within 60 seconds |
| 603 | Call is rejected |
| 486 | Destination number is busy |
| 487 | Request terminated |
| Code | Description |
|---|---|
| 486 | Destination number is busy |
| 487 | Request terminated |
| 404 | Invalid number |
| 480 | Destination number is unavailable |
| 402 | Insufficient funds |
| 603 | Call was rejected |
| 408 | Call was not answered within 60 seconds |
IVR.ttsOptions = { "pitch": "low", "rate": "slow", "volume": "loud" }
*/
say: string;
/**
* TTS language for pronouncing a value of the say parameter. List of all supported voices: [VoiceList].
*/
lang: string;
/**
* Voice message url to play. Supported formats are mp3 and ogg.
*/
play: string;
}
/**
* IVR menu state settings. Can be passed via the [IVRState.settings] parameter.
* e.cancel() method inside the event manually to cancel the task.
* @typedef _SmartQueueClientDisconnectedEvent
*/
ClientDisconnected = 'SmartQueue.ClientDisconnected',
/**
* The task is cancelled.
* @typedef _SmartQueueTaskCanceledEvent
*/
TaskCanceled = 'SmartQueue.TaskCanceled',
/**
* An error occurred.
* @typedef _SmartQueueErrorEvent
*/
Error = 'SmartQueue.Error',
}
/**
* @private
*/
declare interface _SmartQueueEvents {
/**
* The task is waiting for distribution to an agent. This event occurs every 10 or 15 seconds and contains information about task's position in a queue and approximate response time.
*/
[SmartQueueEvents.Waiting]: _SmartQueueWaitingEvent;
/**
* An agent responded to the task, e.g. answered the call. This event indicates that SmartQueue processed the task successfully.
*/
[SmartQueueEvents.OperatorReached]: _SmartQueueOperatorReachedEvent;
/**
* The task has been enqueued successfully.
*/
[SmartQueueEvents.EnqueueSuccess]: _SmartQueueEnqueueSuccessEvent;
/**
* SmartQueue distributed the task to an agent. This event can occur multiple times if an agent does not respond during the timeout.
*/
[SmartQueueEvents.TaskDistributed]: _SmartQueueTaskDistributedEvent;
/**
* The task has ended because the client disconnected.
*/
[SmartQueueEvents.ClientDisconnected]: _SmartQueueClientDisconnectedEvent;
/**
* The task is cancelled.
*/
[SmartQueueEvents.TaskCanceled]: _SmartQueueTaskCanceledEvent;
/**
* An error occurred.
*/
[SmartQueueEvents.Error]: _SmartQueueErrorEvent;
}
/**
* @private
*/
declare interface _SmartQueueEvent {
/**
* A [SmartQueue] task
*/
task: SmartQueueTask;
}
/**
* @private
*/
declare interface _SmartQueueWaitingEvent extends _SmartQueueEvent {
/**
* Estimated time of agent's response in milliseconds
*/
ewt: number;
/**
* The task's position in the queue
*/
position: number;
/**
* The task's waiting code
*/
code: TaskWaitingCode;
/**
* The task's waiting status
*/
message: string;
}
/**
* @private
*/
declare interface _SmartQueueOperatorReachedEvent extends _SmartQueueEvent {
/**
* The agent's Call object
*/
agentCall: Call;
}
/**
* @private
*/
declare interface _SmartQueueEnqueueSuccessEvent extends _SmartQueueEvent {
}
/**
* @private
*/
declare interface _SmartQueueTaskDistributedEvent extends _SmartQueueEvent {
/**
* The id of the task's responsible agent
*/
operatorId: number;
/**
* The name of the task's responsible agent
*/
operatorName: string;
}
/**
* @private
*/
declare interface _SmartQueueClientDisconnectedEvent extends _SmartQueueEvent {
/**
* Cancels the pending request and removes it from the queue
*/
cancel: Function;
}
/**
* @private
*/
declare interface _SmartQueueTaskCanceledEvent extends _SmartQueueEvent {
/**
* The [SmartQueue] termination status
*/
status: TerminationStatus;
/**
* The [SmartQueue] task's error description
*/
description: string;
}
/**
* @private
*/
declare interface _SmartQueueErrorEvent extends _SmartQueueEvent {
/**
* The [SmartQueue] error code
*/
type: TerminationStatus;
/**
* The [SmartQueue] task's error description
*/
description: string;
}
/**
* The [SmartQueue] task distribution mode. Can be passed via the [SmartQueueOperatorSettings.mode] parameter.
*/
declare enum SmartQueueOperatorSettingsMode {
/**
* Cancels the task if it is impossible to select the specific operator
*/
STRICT = 'STRICT',
/**
* Distributes the task to another operator if it is impossible to select the specific operator
*/
SMART = 'SMART',
}
/**
* The [SmartQueueTask] operator settings. Can be passed via the [SmartQueueTaskParameters.operatorSettings] parameter.
*/
declare interface SmartQueueOperatorSettings {
/**
* Operator's id.
*/
operatorId: number;
/**
* Task distribution mode.
*/
mode: SmartQueueOperatorSettingsMode;
/**
* Timeout in seconds to search for a specific operator. The default value is **0**.
*/
timeout: number;
}
/**
* The [SmartQueue] skill level is used to characterize an agent or a requirement for a task. Can be passed via the [SmartQueueTaskParameters.skills] parameter.
*/
declare interface SmartQueueSkill {
/**
* A readable skill name.
*/
name: string;
/**
* The skill level from 1 to 5.
*/
level: (1 | 2 | 3 | 4 | 5)[];
}
/**
* Settings of a certain [SmartQueueTask]. Can be passed as arguments to the [VoxEngine.enqueueTask] method.
*/
declare interface SmartQueueTaskParameters {
/**
* Current task's Call object.
*/
call?: Call;
/**
* Task's operator settings.
*/
operatorSettings?: SmartQueueOperatorSettings;
/**
* A timeout in seconds for the task to be accepted by an agent.
*/
timeout: number;
/**
* The task's priority. Accept values from 1 to 100. The default value is **50**.
*/
priority: number;
/**
* Required [skills](/docs/references/voxengine/smartqueueskill) for the task.
*/
skills: SmartQueueSkill[];
/**
* Queue for the current task.
*/
queue: SmartQueue;
/**
* Custom data text string for the current task. After you specify the data in this field, you can find it in the [SmartQueueState_Task](/docs/references/httpapi/structure/smartqueuestate_task) object for this task. To get this object, call the [GetSQState](/docs/references/httpapi/smartqueue#getsqstate) method.
*/
customData: string;
/**
* Optional. Custom parameters (SIP headers) to be passed with the task. Custom header names have to begin with the 'X-' prefix. The "X-" headers can be handled by a SIP phone or WEB SDK (e.g. see the [incomingCall](/docs/references/websdk/voximplant/events#incomingcall) event). Example: {'X-header':'value'}
*/
extraHeaders?: { [header: string]: string };
/**
* Whether the call has video support. Please note that prices for audio only and video calls are different.
*/
video: boolean;
/**
* Internal information about codecs.
*/
scheme: { [id: string]: { audio: any, video: any } };
/**
* Maximum possible video bitrate for the customer device in kbps
*/
maxVideoBitrate: number;
}
/**
* A [SmartQueueTask] status enumeration value.
*/
declare interface SmartQueueTaskStatus {
/**
* Smartqueue is distributing the task to a suitable agent.
*/
DISTRIBUTING: 'DISTRIBUTING',
/**
* Smartqueue is connecting the task to an agent.
*/
CONNECTING: 'CONNECTING',
/**
* The agent connected to the task.
*/
CONNECTED: 'CONNECTED',
/**
* The agent has ended the task.
*/
ENDED: 'ENDED',
/**
* An error occurred.
*/
FAILED: 'FAILED',
}
/**
* A [SmartQueue] task is for a certain agent, which can be a call or a chat.
* | 0 | Voxengine limits are violated (e.g. HTTP request count exceeded) |
| -1 | Unknown error |
| -2 | Malformed URL |
| -3 | Host not found |
| -4 | Connection error |
| -5 | Too many redirects |
| -6 | Network error |
| -7 | Timeout |
| -8 | Internal error |
| -9 | Server response is larger than 2 MB |