Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleAdd a task or multiple tasks to task_scheduler

Add tasks (one can be added)

POST /client/{client_id}/task_scheduler/{scheduler_id}/tasks/

URL Parameters

Name

Type

Description

scheduler_id

string

Mandatory

client_id

string

Mandatory

Request Parameters (JSON)

Name

Type

Description

tasks

array of tasks

Array of tasks - the required parameter

Must contain one or more tasks

The array of tasks JSON:

Name

Type

Description

name

string

A task name

a_number

string

The number that will be called first

b_number

string

The number that will be called second

extension_id

integer

ID of the extension at the expense of which the call will be made

try_count

integer

The maximum number of callback attempts. By default: 1 maximum 50

try_again_pause

string

Pause before next dialing attempt (in seconds)

url_before

string

URL where the event will go before the task starts

url_before_again

string

URL where the event will go before trying to call again

url_success

string

URL where the event will go if the task is successful (successful connection of A and B numbers)

url_after

string

URL where the event will go by the result of the task

start_time_utc

string

The time of the start task by utc in the format YYYY-MM-DD HH: MM: SS

(the number of seconds can be specified, after this time the task will start)

callback_params

object

A set of optional callback parameters + extended_a_numbers, except for a_number, b_number, variables

extended_a_numbers - list of additional a_numbers
Format:

{"caller_id_name": "string",
"caller_id_number": "string",
"extended_a_numbers": list}

Respond field

Name

Type

Description

status

string

One of the 'scheduled', 'executed', 'delayed', 'finished', 'delayed_asr', 'delayed_concurrent_task', 'delayed_interval'.

'finished' -completed task

'delayed' - postponed delayed by try_again_pause

'delayed_asr' - delayed due to high number of failed calls (ASR)

'delayed_concurrent_task' - delayed due to the set limit on the task_scheduler concurrent_task_limit

'delayed_interval' - delayed due to task_scheduler interval

'executed' - the he task was has been started

By defaultDefault, not yet executed completed with the status: 'scheduled'

a_number

string

The number that will be called first

b_number

string

The number that will be called second

extension_id

integer

ID of the extension, due to which the call will be made

scheduler_id

integer

Queue ID

finish_result

string

Either it is success: 'success' or is failure: 'failed'

cdr

string

uuid of the call, before the call, this field is empty, then, based on the call result (status = ‘executed’), uuid can be used in the resource /client/{client_id}/call_history/{call_uuid}

try_count

integer

The maximum number of callback attempts

try_again_pause

string

Pause before the next call attempt (in seconds)

start_time_utc

integer

Start time of the start task by utc in the format YYYY-MM-DD HH: MM: SS

url_before

string

URL where the event will go before the task starts

url_before_again

string

URL where the event will go before trying to call again

url_after

string

URL where the event will go by the result of the task

url_success

string

URL where the event will go if the task is successful (successful connection of A and B numbers)

create_date_utc

string

Time of the task creation by utc in the format YYYY-MM-DD HH: MM: SS

id

integer

Task ID

name

string

Task name

finish_comment

string

Here the reason of the failure can be clarified

callback_params

object

A set of optional callback parameters. Currently available: extended_a_numbers, caller_id_name and caller_id_number.

extended_a_numbers - list of additional a_number numbers

...

Expand
titleClarify the exact task in task_scheduler

GET /client/{client_id}/task_scheduler/{scheduler_id}/task/{task_id}

URL Parameters

Name

Type

Description

scheduler_id

string

Mandatory

client_id

string

Mandatory

task_id

integer

Mandatory

 

Respond field

Name

Type

Description

Name

Type

Description

status

string

One of the 'scheduled', 'executed', 'delayed', 'finished', 'delayed_asr', 'delayed_concurrent_task', 'delayed_interval'.

'finished' -completed task

'delayed' - postponed delayed by try_again_pause

'delayed_asr' - delayed due to high number of failed calls (ASR)

'delayed_concurrent_task' - delayed due to the set limit on the task_scheduler concurrent_task_limit

'delayed_interval' - delayed due to task_scheduler interval

'executed' - the he task was has been started

By defaultDefault, not yet executed completed with the status: 'scheduled'

a_number

string

The number that will be called first

b_number

string

The number that will be called second

extension_id

integer

Extension ID, due to which the call will be made

scheduler_id

integer

Queue ID

finish_result

string

Either it is success: 'success' or is failure: 'failed'

cdr

string

uuid of the call, before the call, this field is empty, then, based on the call result (status = ‘executed’), uuid can be used in the resource /client/{client_id}/call_history/{call_uuid}

try_count

integer

The maximum number of callback attempts

try_again_pause

string

Pause before the next call attempt (in seconds)

start_time_utc

integer

Start time of the start task by utc in the format YYYY-MM-DD HH: MM: SS

url_before

string

URL where the event will go before the task starts

url_before_again

string

URL where the event will go before trying to call again

url_after

string

URL where the event will go by the result of the task

url_success

string

URL where the event will go if the task is successful (successful connection of A and B numbers)

create_date_utc

string

Time of the task creation by utc in the format YYYY-MM-DD HH: MM: SS

id

integer

Task ID

name

string

Task name

finish_comment

string

Here the reason of the failure can be clarified

callback_params

object

A set of optional callback parameters. Currently available: extended_a_numbers, caller_id_name and caller_id_number.

extended_a_numbers - list of additional a_number numbers

...