Outbound API

xCally Autodial 2.0: API documentation

 

BodyPart (1)

 

The xCally Autodial in object is installed on your X.Y.Z.T, port 10089.

The call structure can be described as follow:

http://X.Y.Z.T:10089/rest/<method>

In every Asterisk Channel, the autodial process valorizes the following variables:

AUTODIAL_ID_PROCESS: id of the process associated to the called contact
AUTODIAL_ID_CONTACT: id of the called contact
AUTODIAL_ID_SPOOLER: id of the spooler associated to the called contact
AUTODIAL_CALLED_NUMBER: the number of the called contact

For example, we define in the process the Asterisk context “FooTest” as follows:

[FooTest]
exten => _X.,1,NoOp(${AUTODIAL_ID_PROCESS})
exten => _X.,n,NoOp(${AUTODIAL_ID_CONTACT})
exten => _X.,n,NoOp(${AUTODIAL_ID_SPOOLER})
exten => _X.,n,NoOp(${AUTODIAL_CALLED_NUMBER})
exten => _X.,n,…

 

Available Rest Methods:

lock27Authentication.

The authentication is required as the security checks are enabled.

Authentication Management.

 

Authenticate:

The POST request paramethers are:

name: <string>, required, not null

secret: <string>, required, not null

The answer contains a hash value. This value has to be added in all the requests in order to pass the security check.

 

notebook37 List.

All contact lists management is included in List sub-path.

The methods available are: insert, list, update, delete, find. In order to find the call syntax, you just have to append /schema at the end of the call address.

List Management.

 

Add list:/list/insert

The POST request paramethers are:

name: <string>, required, not null

description: <string>, not required

ktm: <dictionary>, not required (free values)

 

List listing:/list/list

The POST request paramethers are:

page: <integer>, not required

size: <integer>, not required

(the maximum number of records returned is fixed to 100.  If you want to access additional  records, you have to specify the page parameter).

 

List update: /list/update

The POST request paramethers are:

id: <integer>, required, not null

name: <string>, not required

description: <string>, not required

ktm: <dictionary>, not required (free values)

 

Delete list: /list/delete

The POST request paramethers are:

id: <integer>, required, not null

 

List search: /list/find

The POST request paramethers are:

id: <integer>, not required

page: <integer>, not required

fulltext: <string>, not required

size: <integer>, not required

 

List count: /list/count

Schema for retrieving the number of lists

 

business133 (1) Contact.

All contacts management is included in Contact sub-path.

The methods available are: insert, list, update, delete, find. In order to find the call syntax, you just have to append /schema at the end of the call address.

Contacts management.

 

Add contact:/contact/insert

The POST request paramethers are:

phones: <array>, required, not null

account: <string>, not required (account code)

variables: <dictionary>, not required

description: <string>, not required

timezone: <string>, not required

id_list: <integer>, required, not null

ktm: <dictionary>, not required (free values)

 

Contacts list:/contact/list

The POST request paramethers are:

page: <integer>, not required

(the maximum number of records returned is fixed to 100.  If you want to access additional  records, you have to specify the page parameter).

id_list: <integer>, required, not null

size: <integer>, not required

 

Contact update: /contact/update

The POST request paramethers are:

id: <integer>, required, not null

phones: <array>, not required

account: <string>, not required (account code)

variables: <dictionary>, not required

description: <string>, not required

timezone: <string>, not required

id_list: <integer>, not required

ktm: <dictionary>, not required (free values)

 

Contact delete: /contact/delete

The POST request paramethers are:

id: <integer>, required, not null

 

Contact search: /contact/find

id: <integer>, not required

page: <integer>, not required

fulltext: <string>, not required

size: <integer>, not required

 

Contact count: /contact/count

Schema for retrieving the number of contacts

id_list: <integer>, required, not null

 

Group.

The methods available are: insertlistupdatedeletefind. In order to find the call syntax, you just have to append /schema at the end of the call address.

Groups Management.

 

Add group:/group/insert

The POST request paramethers are:

name: <string>, required, not null

description: <string>, not required

ktm: <dictionary>, not required (free values)

 

Groups listing:/group/list

The POST request paramethers are:

page: <integer>, not required

size: <integer>, not required

 

Group Update:/group/update

The POST request paramethers are:

id: <integer>, required, not null

name: <string>, not required

description: <string>, not required

ktm: <dictionary>, not required (free values)

 

Group Delete:/group/delete

The POST request paramethers are:

id: <integer>, required, not null

 

Group Search:/group/find

The POST request paramethers are:

id: <integer>, not required

page: <integer>, not required

fulltext: <string>, not required

size: <integer>, not required

 

Group count: /group/count

Schema for retrieving the number of groups

 

settings Process.

All process management is included in Process sub-path.

The methods available are: insert, list, update, delete, find. In order to find the call syntax, you just have to append /schema at the end of the call address.

Process management.

 

Add process:/process/insert

The POST request paramethers are:

id_list: <integer>, required, not null

description: <string>, not required

queue: <string>, required, not null

intervals: <array>, not required (time intervals (e.g. *|*|*|*, 8:30-20:00|MON-FRI|1-31|1-12))

timezone: <string>, not required (time zone interval (e.g. 8:30-20:00))

auto_timezone_management: <boolean>, not required (transforms the planned time in the contact timezone)

codecs: <string>, not required (sets the codecs to use for the call. For example ‘alaw, ulaw, h264’)

ignore_strings: <array>, not required (ignore string in called number)

drop_max_count: <integer>, not required

success_call_size: <integer>, not required  

max_retries: <integer>, not required

retry_time: <integer>, not required

drop_retry_time: <integer>, not required

amd_retry_time: <integer>, not required

failed_retry_time: <integer>, not required

planned_retry_time: <integer>, not required 

wait_time: <integer>, not required

prefix_code: <string>, not required

context: <string>, required

extension: <string>, not required

priority: <integer>, not required

context_for_other_calls: <string>, not required

extension_for_other_calls: <string>, not required

priority_for_other_calls: <integer>, not required

tech: <string>, not required (SIP, IAX, Local…)

device: <string>, not required 

auto_closed: <boolean>, not required

weight: <integer>, not required

check_duplicate: <string>, not required (ALWAYS, IFOPEN, NO)

check_blacklist: <boolean>, not required (check if the phone exists in blacklist)

channel_limit: <integer>, not required

callerid: <string>, not required

min_operator: <integer>, not required (minimum operator for activeted predictive mode)

time_slice: <integer>, not required (frame for channels analyze in minutes)

missed: <boolean>, not required (enable/disable check missed call)

status: <string>, not required (RUN, STOP)

fetch_sort: <string>, not required (ASC, DESC)

callerid: <string>, not required 

variables: <dictionary>, not required (Sets the variables to set on the originated call)

ktm: <dictionary>, not required (Free values)

 

Processes list:/process/list

The POST request paramethers are:

page: <integer>, not required

(the maximum number of records returned is fixed to 100.  If you want to access additional  records, you have to specify the page parameter).

size: <integer>, not required

 

Process update: /process/update

The POST request paramethers are:

id: <integer>, required, not null

description: <string>, not required

queue: <string>, not required

intervals: <array>, not required (time intervals (e.g. *|*|*|*, 8:30-20:00|MON-FRI|1-31|1-12))

timezone: <string>, not required (time zone interval (e.g. 8:30-20:00))

auto_timezone_management: <boolean>, not required (transforms the planned time in the contact timezone)

codecs: <string>, not required (sets the codecs to use for the call. For example ‘alaw, ulaw, h264’)

ignore_strings: <array>, not required (ignore string in called number)

drop_max_count: <integer>, not required

success_call_size: <integer>, not required

max_retries: <integer>, not required

retry_time: <integer>, not required

drop_retry_time: <integer>, not required

amd_retry_time: <integer>, not required

failed_retry_time: <integer>, not required

planned_retry_time: <integer>, not required 

wait_time: <integer>, not required

prefix_code: <string>, not required

context: <string>, required

extension: <string>, not required

priority: <integer>, not required

context_for_other_calls: <string>, not required

extension_for_other_calls: <string>, not required

priority_for_other_calls: <integer>, not required

tech: <string>, not required (SIP, IAX, Local…)

device: <string>, not required 

auto_closed: <boolean>, not required

weight: <integer>, not required

check_duplicate: <string>, not required (ALWAYS, IFOPEN, NO)

check_blacklist: <boolean>, not required (check if the phone exists in blacklist)

channel_limit: <integer>, not required

min_operator: <integer>, not required (minimum operator for activeted predictive mode)

time_slice: <integer>, not required (frame for channels analyze in minutes)

missed: <boolean>, not required (enable/disable check missed call)

status: <string>, not required (RUN, STOP)

fetch_sort: <string>, not required (ASC, DESC)

callerid: <string>, not required 

variables: <dictionary>, not required (Sets the variables to set on the originated call)

ktm: <dictionary>, not required (Free values)

 

Process delete: /process/delete

The POST request paramethers are:

id: <integer>, required, not null

 

Process search: /process/find

id: <integer>, not required

page: <integer>, not required

(the maximum number of records returned is fixed to 100.  If you want to access additional  records, you have to specify the page parameter).

fulltext: <string>, not required

size: <integer>, not required

 

Process count: /process/count

Schema for retrieving the number of processes

 

Spooler.

The methods available are: listdeletefind, summary. In order to find the call syntax, you just have to append /schema at the end of the call address.

Spooler Management.

 

Spoolers listing:/spooler/list

The POST request paramethers are:

page: <integer>, not required

id_process: <integer>, required, not null

size: <integer>, not required

 

Spooler Delete:/spooler/delete

The POST request paramethers are:

id: <integer>, required, not null

 

Spooler Search:/spooler/find

The POST request paramethers are:

id: <integer>, not required

page: <integer>, not required

fulltext: <string>, not required

size: <integer>, not required

 

Spooler Summary:/spooler/summary

The POST request paramethers are:

id_process: <integer>, required, not null

 

Spoolers Summary all:/spooler/summary/all 

GET request. Schema for retrieving all spooler aggregates information.

 

Spoolers count: /spooler/count

id_process: <integer>, required, not null

 

Spooler retrieve close: /spooler/retrieve/close

Schema for setting retrieve CLOSE in spooler record

id: <integer>, required, not null

 

Spooler retrieve open: /spooler/retrieve/open

Schema for setting retrieve OPEN in spooler record

id: <integer>, required, not null

 

Spooler retrieve blacklist: /spooler/retrieve/blacklist

Schema for setting retrieve BLACKLIST  in spooler record

id: <integer>, required, not null

 

Spooler retrieve planning: /spooler/retrieve/planning

Schema for setting retrieve PLANNING  in spooler record

id: <integer>, required, not null

date: <string>, required, not null (datetime YYY-MM-DD hh:mm (e.g. 2014-09-02 15:02))

 

Spooler retrieve planning peer: /spooler/retrieve/planning/peer

Schema for setting retrieve PLANNING AGENT  in spooler record

id: <integer>, required, not null

peer: <string>, required, not null

date: <string>, required, not null (datetime YYY-MM-DD hh:mm (e.g. 2014-09-02 15:02))

 

Blacklist.

The methods available are: insertlistupdatedeletefind. In order to find the call syntax, you just have to append /schema at the end of the call address.

Blacklist Management.

 

Add Blacklist phone:/blacklist/insert   

The POST request paramethers are:

phone: <string>, required, not null

description: <string>, not required

ktm: <dictionary>, not required (free values)

 

Blacklist phones listing:/blacklist/list

The POST request paramethers are:

page: <integer>, not required

size: <integer>, not required

 

Blacklist entity Update:/blacklist/update  

The POST request paramethers are:

id: <integer>, required, not null

phone: <string>, not required

description: <string>, not required

ktm: <dictionary>, not required (free values)

 

Blacklist entity Delete:/blacklist/delete

The POST request paramethers are:

id: <integer>, required, not null

 

Blacklist Search:/blacklist/find

The POST request paramethers are:

id: <integer>, not required

page: <integer>, not required

fulltext: <string>, not required

size: <integer>, not required

 

Blacklist count: /blacklist/count

Schema for retrieving the number of blacklist contacts

 

Log.

The methods available are: db, process, dispatcher. In order to find the call syntax, you just have to append /schema at the end of the call address.

Db log:/log/db

The POST request paramethers are:

level: <string>, required, not null 

 

Process log:/log/process

The POST request paramethers are:

level: <string>, required, not null 

 

Dispatcher log:/log/dispatcher

The POST request paramethers are:

level: <string>, required, not null 

 

Asterisk Manager.

The methods available are: statusupdate. In order to find the call syntax, you just have to append /schema at the end of the call address.

Asterisk Manager Connection Status:/asterisk/manager/status

The POST request paramethers are:

username: <string>, required, not null (asterisk manager username (see manager.conf))

secret: <string>, required, not null (asterisk manager secret (see manager.conf))

 

Asterisk Manager Connection Update:/asterisk/manager/update

The POST request paramethers are:

username: <string>, required, not null (asterisk manager username (see manager.conf))

secret: <string>, required, not null (asterisk manager secret (see manager.conf))

port: <integer>, not required (asterisk manager port (see manager.conf))

host: <string>, not required (the host where asterisk runs)

 

Channel.

The available method is list. In order to find the call syntax, you just have to append /schema at the end of the call address.

Active Channel listing:/channel/list

The POST request paramethers are:

id_process: <integer>, required, not null

 

Queue.

The available method is list. In order to find the call syntax, you just have to append /schema at the end of the call address.

Queue data listing:/queue/list

The POST request paramethers are:

name: <string>, required, not null

 

System.

The available method is properties. In order to find the call syntax, you just have to append /schema at the end of the call address.

System properties:/system/properties

It’s a GET request.