URL for sending API requests
http://[SERVER_ADDRESS]/api/[VERSION]/[ACTION]/[ID]/[FORMAT]?access_token=[ACCESS_TOKEN]&[OPTIONAL_PARAMS]

SERVER_ADDRESS - Hostname or IP address pbx

VERSION - version you want to use

ACTION - action / function

ID - ID record

FORMAT - return response in json or xml

ACCESS_TOKEN - Authentization access token. It can be in COOKIE. ACCESS_TOKEN = SHA1(login + password) for example SHA1(loginpassword)

OPTIONAL_PARAMS - Optional parameters


Webhooks


Incoming call on extension

Description:

Each incoming call, you can let it pass through optional context where we can change the behavior of the PBX or notify the CRM system.


Setup:

  • Manage PBX -> Custom context -> Systemový hook na Příchodu

  • Doplníme tento kód, kde VasCRMsystem.domain je adresa CRM systému, kterého se dotazujeme. Poslední parametr CRMAPI je jméno hash pole, které případně chceme naplnit.

    AGI(notify_crm_api.agi,"https://VasCRMsystem.domain:port/path/script?callid=${CALLERID(num)}&dnd=${FROM_DID}","CRMAPI")
  • Pokud při volání vrátíte platnou JSON strukturu, která bude například vypadat takto

    {"NAME":"Daktela s.r.o.", "ADDRESS":"Pod Krejcarkem 975"}
  • v rámci dialplanu můžete k vráceným hodnotám přistupovat jako hash pole

    • ${HASH(CRMAPI,NAME)} vrací hodnotu "Daktela s.r.o."
    • ${HASH(CRMAPI,ADDRESS)} vrací hodnotu "Pod Krejcarkem 975"
Ringing call on extension

Description:

Každé vyzvánění na lince můžeme nechat projít přes volitelný kontext, kde můžeme změnit chování ústředny nebo notifikovat CRM systém. Vhodné například při potřebě notifikovat CRM systém o tom, že na klapce začína zvonit hovor s číslem volajícího. Strategie vyzvánění ringall u fronty nemusí být vždy plně podporována.


Setup:

  • Rozklikneme Nastavení ústředny -> Volitelný context -> Systemový hook při zvonění na lince

  • Doplníme tento kód, kde VasCRMsystem.domain je adresa CRM systému, kterého se dotazujeme. Poslední parametr CRMAPI je jméno hash pole, které případně chceme naplnit.

    AGI(notify_crm_api.agi,"https://VasCRMsystem.domain:port/path/script?callerId=${CALLERID(num)}&calleeId=${FROM_DID}&line=${REAL_EXTEN}&idcall=${ID_CALL}&action=ringing","CRMAPI")
  • Pokud při volání vrátíte platnou JSON strukturu, která bude například vypadat takto

    {"NAME":"Daktela s.r.o.", "ADDRESS":"Pod Krejcarkem 975"}
  • v rámci dialplanu můžete k vráceným hodnotám přistupovat jako hash pole

    • ${HASH(CRMAPI,NAME)} - vrací hodnotu "Daktela s.r.o."
    • ${HASH(CRMAPI,ADDRESS)} - vrací hodnotu "Pod Krejcarkem 975"
Answered call on extension

Description:

Každé zodpovězení hovoru na lince můžeme nechat projít přes volitelný kontext, kde můžeme změnit chování ústředny nebo notifikovat CRM systém. Vhodné například při potřebě notifikovat CRM systém o tom, že na klapce došlo k zodpovězení hovor s číslem volajícího. Strategie vyzvánění ringall u fronty nemusí být vždy plně podporována.


Setup:

  • Rozklikneme Nastavení ústředny -> Volitelný context -> Systemový hook při zodpovězení hovoru

  • Doplníme tento kód, kde VasCRMsystem.domain je adresa CRM systému, kterého se dotazujeme. Poslední parametr CRMAPI je jméno hash pole, které případně chceme naplnit.

    AGI(notify_crm_api.agi,"https://VasCRMsystem.domain:port/path/script?callerId=${CALLERID(num)}&calleeId=${FROM_DID}&line=${REAL_EXTEN}&idcall=${ID_CALL}&action=answer","CRMAPI")

  • Pokud při volání vrátíte platnou JSON strukturu, která bude například vypadat takto

    {"NAME":"Daktela s.r.o.", "ADDRESS":"Pod Krejcarkem 975"}
  • V rámci dialplanu můžete k vráceným hodnotám přistupovat jako hash pole

    • ${HASH(CRMAPI,NAME)} - vrací hodnotu "Daktela s.r.o."
    • ${HASH(CRMAPI,ADDRESS)} - vrací hodnotu "Pod Krejcarkem 975"
Hangup call

Description:

Každé zavěšení hovoru můžeme nechat projít přes volitelný kontext, kde můžeme notifikovat CRM systém. Vhodné například při potřebě notifikovat CRM systém o tom, že na klapce došlo k ukončení hovoru s číslem volajícího. Strategie vyzvánění ringall u fronty nemusí být vždy plně podporována.


Setup:

  • Rozklikneme Nastavení ústředny -> Volitelný context -> Systemový hook při zavěšení hovoru

  • Doplníme tento kód, kde VasCRMsystem.domain je adresa CRM systému, kterého se dotazujeme. Poslední parametr CRMAPI je jméno hash pole, které případně chceme naplnit.

    AGI(notify_crm_api.agi,"https://VasCRMsystem.domain:port/path/script?callerId=${CALLERID(num)}&calleeId=${FROM_DID}&line=${REAL_EXTEN}&idcall=${ID_CALL}&action=hangup","CRMAPI")
  • Pokud při volání vrátíte platnou JSON strukturu, která bude například vypadat takto

    {"NAME":"Daktela s.r.o.", "ADDRESS":"Pod Krejcarkem 975"}
  • v rámci dialplanu můžete k vráceným hodnotám přistupovat jako hash pole

    • ${HASH(CRMAPI,NAME)} - vrací hodnotu "Daktela s.r.o."
    • ${HASH(CRMAPI,ADDRESS)} - vrací hodnotu "Pod Krejcarkem 975"

Queues


Create or update queue

Requirement version: 3.0

Action:

CreateQueue

Create new queue. If the number of queue exist, so the queue is updated.


Mandatory parameters:

number
Queue number
title
Queue name
direction
Direction - in, out

Optional parameters:

id
Queue ID
outboundcid
Outbound CallerID
description
Description
wrapuptime
Wrapup time
outbounder
Set boolen value, when queue is type of outbounder

Example:

Description:

Create new outbounder queue number 123456789 and name Support

Input:
https://MojeVU.daktela.com/api/3.1/CreateQueue/xml?access_token=1234567890123456789012345678901234567890&number=12345678&title=Support&direction=out&outbounder=true
Output:
{"status":1,"error":null,"result":null}
Get queues info

Requirement version: 3.0

Action:

GetQueues

Get queues info Return all queues if parameter id is not set.


Optional parameters:

id
Return informations for this ID queue

Example:

Description:

Return queue with queue ID 3

Input:
https://MojeVU.daktela.com/api/3.0/GetQueues/3/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"queue":"3","name":"1002","title":"Outbounder","description":"","direction":"out","outboundcid":"","wrapuptime":"0","outbounder":"1","form":"0","missed":null,"options":"{\"type\":\"outbounder\",\"wrapuptime\":\"\",\"lajdaktime\":\"\",\"qa_form\":\"\",\"missed\":\"\",\"maxwait\":\"\",\"maxlength\":\"\",\"threshold_time\":\"\",\"threshold_users\":\"\",\"threshold_calls\":\"\",\"callback_callstart\":\"http:\\\/\\\/\",\"callback_callanswer\":\"http:\\\/\\\/\",\"callback_callend\":\"http:\\\/\\\/\",\"outboundcid\":\"\",\"allowed_time\":\"10:00-18:00|mon-fri|*|*\"}","deleted":"0","user":"1","penalty":"0","login":"manual"}}
Sign in user to the queue

Requirement version: 3.0

Action:

LoginQueue

Sign in user to the queue number.


Mandatory parameters:

user
User login name
queue
Queue number

Optional parameters:

extension
Extension number where user sign in.
priority
With what priority should by logged into the inbound queue. Accepted integer 0 (high), 1, 2 (low). If not specified takes the priority set by the user to the queue in queues administration.

Example:

Description:

Sign in user michalhajek to queue number 5001

Input:
https://MojeVU.daktela.com/api/3.0/LoginQueue/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&queue=5001&priority=0
Output:
{"error":null,"status":1}
Sign out user from queue

Requirement version: 3.0

Action:

LogoutQueue

Sign out user from queue number


Mandatory parameters:

user
User login name
queue
Queue number

Example:

Description:

Sign out user michalhajek from queue number 5001

Input:
https://MojeVU.daktela.com/api/3.0/LogoutQueue/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&queue=5001
Output:
{"error":null,"status":1}
Description:

Sign out user michalhajek from queue number 5001, when user calling now. Result error.

Input:
https://MojeVU.daktela.com/api/3.0/LogoutQueue/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&queue=5000
Output:
{"error":"Nelze se odhlasit z fronty\/kampan\u011b, ve kter\u00e9 prob\u00edh\u00e1 hovor s \u010d\u00edslem 468008585","status":0}

Operators


Answer incoming call to CC

Requirement version: 3.7

Action:

Answer

Automatic remotely answer incoming call from CC queue ringing on a line. Operator's phone must supports auto answer function.


Mandatory parameters:

extension
Operator's extension (group) number, where is call incoming to (parameter user is not required than)
user
Agent's user name, where is call incoming to (parameter extension is not required than)

Example:

Description:

Answer ringing call by operator with login hajek

Input:
https://MojeVU.daktela.com/api/3.7/Answer/json?access_token=1234567890123456789012345678901234567890&user=hajek
Output:
{"status":1,"error":null,"result":{"calling_number":"226211245","calling_queue":"2000","calling_queue_name":"Support","id_call":"14555781215.224"}}
Playing a message to an ongoing call

Requirement version: 3.6

Action:

ControlPlayback

If the call is in progress, it is possible to play any message that is available on the PBX. This message will hear the internal extension (operator) and the other party (the customer).


Mandatory parameters:

extension
Extension number, which carries out an ongoing call (you do not have to fill out a required parameter user)
user
User login name who carries out an ongoing call (you do not have to fill out a required parameter extension)
command
What command to be executed
  • play - start play message
  • rewind - rewind played message
  • pause - pause playing message, for unpause call same command
  • forward - forward playing message
  • stop - stop playing message
  • status - check if message is still playing. Returned array have key playing with value depending on whether the message is still playing (true) or not (false).

Optional parameters:

recording
With command play, specify here name of message which you want to play. List of messages can by managed in module PBX Setup.
begintime
With command play, is possible specify from what time in miliseconds should be message start playing
skiptime
This parameter needs to be specified with commadn play. It mean how many miliseconds to be skipped when call command rewind or forward

Example:

Description:

The ongoing call at line 500 we want to play message, what will hear you and customer.

Input:
https://MyPBX.daktela.com/api/3.6/ControlPlayback/json?access_token=1234567890123456789012345678901234567890&command=play&extension=500&recording=Upozornujeme_ze_v_ramci_zkvalitneni_sluzeb_mohou_byt_hovory_monitorovany.wav
Output:
{"status":1,"error":null,"result":null}
Description:

Stop playing message from previous example

Input:
https://MyPBX.daktela.com/api/3.6/ControlPlayback/json?access_token=1234567890123456789012345678901234567890&command=pause&extension=500
Output:
{"status":1,"error":null,"result":null}
Create outgoing call center call

Requirement version: 3.1

Action:

CreateCall

Create ooutgoing call with request on call center


Mandatory parameters:

user
Agent's login name, who wants to create call
number
Number to dial

Optional parameters:

accountcode
Unique code which is bind to call
autoanswer
If phone supports automatic answer, you can use this. Default is false
waitingtime
How long (in seconds) have phone to ring on line / extension. Default is 30 seconds.
dialingtime
How long (in seconds) have phone to ring on client. Default is 120 seconds
idcall
ID call. This is deprecated.
agenttext
Text information showed to agent on phone's display while call is dialed
queue
Outgoing queue number, which is used to call. Agent must be logged in CC. If Číslo odchozí fronty, přes kterou chceme volat. Agent musí být přihlášen do CC. Pokud bude přihlášen do jiné odchozí fronty, hovor bude zaznamenán na frontu, která je v parametru.
ticket
Unique name ticket

Example:

Description:

Outgoing call from user michalhajek to public number 800123456 and auto answer enabled

Input:
https://MojeVU.daktela.com/api/3.1/CreateCall/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&number=800123456&autoanswer=yes
Output:
{"error":null,"status":1,"result":{"id_call":"123456789.1234SJ"}}}
Description:

Outgoing call from user michalhajek to public number 800123456 and auto answer enabled. But user is not logged to outgoing queue.

Input:
https://MojeVU.daktela.com/api/3.1/CreateCall/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&number=800123456&autoanswer=yes
Output:
{"error":"Agent nen\u00ed p\u0159ihl\u00e1\u0161en do odchoz\u00ed kampan\u011b\/fronty","status":0}
Create user

Requirement version: 4.0

Action:

CreateUser

Creates user


Mandatory parameters:

role
Unique role id
profile
Unique profile id
name
User's login
title
User's name
password
User's password

Optional parameters:

description
User's description
email
User's email

Example:

Description:

Create user with login 'operator1', name 'Pepa Novák', role 'role_52f22ad1ba23e', profile 'profile_530ca64179669' and password 'takneheslo'

Input:
https://MojeVU.daktela.com/api/4.0/CreateUser/json?access_token=12345678901234567890123456789012345678907&role=role_52f22ad1ba23e&profile=profile_530ca64179669&name=operator1&title=Pepa%20Novák&password=tajneheslo
Output:
{"status":1,"error":null,"result":{"user":4,"role":"role_52f22ad1ba23e","profile":"profile_530ca64179669","name":"operator2","title":"Pepa Nov\u00e1k","description":null,"password":"tajneheslo","email":null,"deleted":null}}
Delete user

Requirement version: 3.0

Action:

DeleteUser

Delete user ID


Mandatory parameters:

id
Delete this user ID

Example:

Description:

Delete user ID 2

Input:
http://api.server/api/3.0/DeleteUser/2/json?access_token=1234567890123456789012345678901234567890
Output:
{"error":null,"status":1}
Get user by token

Requirement version: 4.0

Action:

GetUser

Return user by token


Example:

Description:

Get user by access token 1234567890123456789012345678901234567890

Input:
https://MojeVU.daktela.com/api/4.0/GetUser/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":""}
Description:

Error state when access tokenu is wrong

Input:
https://MojeVU.daktela.com/api/4.0/GetUser/json?access_token=1234567890123456789012345678901234567890
Output:
{"error":"Uživatel neexistuje","status":0}
Get users info

Requirement version: 3.0

Action:

GetUsers

Get users info Return all users if parameter id is not set.


Optional parameters:

id
Return informations for this ID user
extension
Return informations for user which has extension number.

Example:

Description:

Return all users

Input:
http://api.server/api/3.0/GetUsers/xml?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"1":{"user":"1","role":"role_43h424k432","profile":"profile_hj34242342","name":"admin","title":"Administrator","description":"Administrator z\u00e1kazn\u00edka","password":"cordheslo","email":"jedna@jedna.cz","deleted":"0"},"3":{"user":"3","role":"role_43h424k432","profile":"profile_hj34242342","name":"hajekhu","title":"Hajek Hugo","description":"","password":"heslo","email":"","deleted":"0"}}}
Description:

Return user with user ID 2

Input:
https://MojeVU.daktela.com/api/3.0/GetUsers/3/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"user":"3","role":"role_43h424k432","profile":"profile_hj34242342","name":"hajekhu","title":"Hajek Hugo","description":"","password":"heslo","email":"","deleted":"0"}}
Hangup call

Requirement version: 3.0

Action:

Hangup

Hangup realtime call


Mandatory parameters:

user
User login name (only one mandatory param)
extension
Extension number where user sign in (only one mandatory param)
call
Unique ID of call (only one mandatory param)

Example:

Description:

Hangup realtime call at user michalhajek

Input:
https://MojeVU.daktela.com/api/3.1/Hangup/json?access_token=1234567890123456789012345678901234567890&user=michalhajek
Output:
{"error":null,"status":1}
Description:

Hangup realtime call at extension number 300

Input:
https://MojeVU.daktela.com/api/3.1/Hangup/json?access_token=1234567890123456789012345678901234567890&extension=300
Output:
{"error":null,"status":1}
Sign in user to the queue

Requirement version: 3.0

Action:

LoginQueue

Sign in user to the queue number.


Mandatory parameters:

user
User login name
queue
Queue number

Optional parameters:

extension
Extension number where user sign in.
priority
With what priority should by logged into the inbound queue. Accepted integer 0 (high), 1, 2 (low). If not specified takes the priority set by the user to the queue in queues administration.

Example:

Description:

Sign in user michalhajek to queue number 5001

Input:
https://MojeVU.daktela.com/api/3.0/LoginQueue/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&queue=5001&priority=0
Output:
{"error":null,"status":1}
Sign a user into the Call Centrum.

Requirement version: 3.4

Action:

Login

Pass a username and an extension number under which you want to sign the user. If the user has an automatic signing into a queue, then we process automatic signing into that queue. Otherwise it is necessary to call LoginQueue and sign the user into queues.


Mandatory parameters:

user
Agent username.

Optional parameters:

extension
Extension number under which the agent sitting. If the user has bounded that extension number with his account, it is unnecessary to pass that extension.

Example:

Description:

Sign in the michalhajek agent, which is sitting at the extension No. 100.

Input:
https://MojeVU.daktela.com/api/3.4/Login/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&extension=100
Output:
{"status":1,"error":null,"result":null}
Sign out user from queue

Requirement version: 3.0

Action:

LogoutQueue

Sign out user from queue number


Mandatory parameters:

user
User login name
queue
Queue number

Example:

Description:

Sign out user michalhajek from queue number 5001

Input:
https://MojeVU.daktela.com/api/3.0/LogoutQueue/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&queue=5001
Output:
{"error":null,"status":1}
Description:

Sign out user michalhajek from queue number 5001, when user calling now. Result error.

Input:
https://MojeVU.daktela.com/api/3.0/LogoutQueue/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&queue=5000
Output:
{"error":"Nelze se odhlasit z fronty\/kampan\u011b, ve kter\u00e9 prob\u00edh\u00e1 hovor s \u010d\u00edslem 468008585","status":0}
Sign a user out of the Call Centrum.

Requirement version: 3.4

Action:

Logout

Pass an agent's username you want to sign out of all queues at the Call Centrum. An extension at where the user is sitting will be freed.


Mandatory parameters:

user
An agent's username.

Example:

Description:

Sign michalhajek agent out of the Call Centrum.

Input:
https://MojeVU.daktela.com/api/3.4/Logout/json?access_token=1234567890123456789012345678901234567890&user=michalhajek
Output:
{"status":1,"error":null,"result":null}
Monitoring call center's call

Requirement version: 3.1

Action:

Monitoring

Online monitoring ongoing call with request on call centre


Mandatory parameters:

user
Operator's login name to listen
listener
Extension to listen
mode
Monitoring type spy - listener can't speak to anyone whisper - listener can speak only to exten and can listen the client whisperprivate - listener can speak only to exten but can't listen the client barge - listener can speak to and listen both sides interactive - listener can switch modes via DTMF - 4=spy (default), 5=whisper, 6=barge

Example:

Description:

Monitoring call, when listener can speak with extension, but client will not hear it

Input:
https://MojeVU.daktela.com/api/3.0/Monitoring/json?access_token=1234567890123456789012345678901234567890&user=hajekhu&listener=200&mode=spy
Output:
{"status":1,"error":null,"result":{"calling_direction":"out","calling_number":"468008585","calling_queue":"1006","calling_queue_name":"ObycOdchozi","ringing":"2","billsec":"177"}}
User pause off

Requirement version: 3.0

Action:

PauseOff

Unset user pause


Mandatory parameters:

user
User login name (we do not need to fill in a required parameter extension)
extension
Extension number where user sign in (we do not need to fill in a required parameter user)

Example:

Description:

Unset pause

Input:
https://MojeVU.daktela.com/api/3.0/PauseOff/json?access_token=1234567890123456789012345678901234567890&user=michalhajek
Output:
{"error":null,"status":1}
User pause on

Requirement version: 3.0

Action:

PauseOn

Set user pause on


Mandatory parameters:

user
User login name (we do not need to fill in a required parameter extension)
extension
Extension number where user sign in (we do not need to fill in a required parameter user)
pause
ID pause

Optional parameters:

force
If set to yes, skip checking user state ringing, speaking or on hold. Default is no.

Example:

Description:

Set user michalhajek to pause with ID number 7.

Input:
https://MojeVU.daktela.com/api/3.1/PauseOn/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&pause=7
Output:
{"error":null,"status":1}
Description:

Set user michalhajek to non exists pause with ID number 100.

Input:
https://MojeVU.daktela.com/api/3.1/PauseOn/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&pause=100
Output:
{"error":"Tato pauza nebyla nalezena","status":0}
Picks up a call from queue

Requirement version: 4.0

Action:

PickupFromQueue

Picks up a call from queue


Example:

Description:

Pickup call to user pavelmoravec

Input:
https://api.daktela.com/api/4.0/PickupFromQueue/json?access_token=1234567890123456789012345678901234567890&call_id=1404828279.15208&user=pavelmoravec
Output:
{"status":1,"error":null,"result":[]}
Transfer call

Requirement version: 3.0

Action:

Transfer

Transfer call with attended


Mandatory parameters:

user
User login name (we do not need to fill in a required parameter extension)
extension
Extension number where user sign in (we do not need to fill in a required parameter user)
number
Transfer call to remote phone number (just one of the parameter number, dst_queue, dst_user)
dst_queue
Transfer call to destination ID queue (just one of the parameter number, dst_queue, dst_user)
dst_user
Transfer call to destination ID user (just one of the parameter number, dst_queue, dst_user)

Optional parameters:

type
Type of transfer. Default is attended attended - Attended transfer is when a call is routed to a third party only if the third party answers the call. blind - Blind transfer is when a call is routed to a third party, the original call is ended, and no check is made to determine whether the transferred call is answered or if the number is busy.

Example:

Description:

Transfer call from user michalhajek to destination phone number 100.

Input:
https://MojeVU.daktela.com/api/3.1/Transfer/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&type=attended&number=800123456
Output:
{"error":null,"status":1}
Update user

Requirement version: 4.0

Action:

UpdateUser

Updates user


Mandatory parameters:

name
User's login

Optional parameters:

role
User's unique role
profile
Unique profile id
title
User's name
description
User's description
password
User's password
email
User's email

Example:

Description:

Updates user's password with login 'operator1' to 'silne.Heslo321'

Input:
https://MojeVU.daktela.com/api/4.0/UpdateUser/json?access_token=12345678901234567890123456789012345678907&name=operator1&password=silne.Heslo321
Output:
{"status":1,"error":null,"result":{"user":4,"role":"role_52f22ad1ba23e","profile":"profile_530ca64179669","name":"operator2","title":"Pepa Nov\u00e1k","description":null,"password":"#silneHeslo321","email":null,"deleted":null}}

Calls


Informations about call

Requirement version: 3.0

Action:

AboutCall

Get CDR fields - caller, callee, user, queue, ringing time, speaking time, direction, path to recording, DID, recording hash. For binary download recording use recording hash which impart action GetRecording


Mandatory parameters:

id_call
Unique ID call

Example:

Description:

Information about call with ID 1319030658.204

Input:
https://MojeVU.daktela.com/api/3.0/AboutCall/json?access_token=1234567890123456789012345678901234567890&id_call=1350478005.0
Output:
{"status":1,"error":null,"result":[{"calldate":"2011-10-19 15:24:46","clid":"200","src":"200","dst":"468008580","dcontext":"from-internal","channel":"SIP\/200-0000009f","dstchannel":"SIP\/pbx-000000a0","lastapp":"ResetCDR","lastdata":"w","duration":"32","billsec":"29","disposition":"ANSWERED","amaflags":"3","accountcode":"","uniqueid":"1319030686.213","userfield":"\/RECORDINGS\/2011\/10\/19\/OUT200-468008580-20111019-152447-1319030686.213.wav","real_exten":"200","direction":"out","from_did":null,"id_call":"1319030658.204","id_queue":"2","id_agent":"4","waiting_time":"3","ringing_time":"3","hold_time":"0","orig_pos":"1","position":"1","disposition_cause":"agent","disconnection_cause":"","recording_hash":"225fae9e2c0a2e830c7d0e9e80040f4245a6asv93gfdgxD1319030658.204"}]}
Answer incoming call to CC

Requirement version: 3.7

Action:

Answer

Automatic remotely answer incoming call from CC queue ringing on a line. Operator's phone must supports auto answer function.


Mandatory parameters:

extension
Operator's extension (group) number, where is call incoming to (parameter user is not required than)
user
Agent's user name, where is call incoming to (parameter extension is not required than)

Example:

Description:

Answer ringing call by operator with login hajek

Input:
https://MojeVU.daktela.com/api/3.7/Answer/json?access_token=1234567890123456789012345678901234567890&user=hajek
Output:
{"status":1,"error":null,"result":{"calling_number":"226211245","calling_queue":"2000","calling_queue_name":"Support","id_call":"14555781215.224"}}
Creates an outgoing call type Click to Call

Requirement version: 3.9

Action:

ClickToCall

Creates an outbound call to the customer number in the queue Click to Call. When the operator answers the call and will be connected to the customer.


Mandatory parameters:

queue
No. queue type Click to Call
number
Customer's telephone number, which is to be connected

Optional parameters:

agenttext
Text information, which will see the agent on your phone's display during the call connection.
waitingtime
How long in seconds the call in the incoming queue to wait until an operator is answered. If this setting does not take into account the value of the maximum waiting time in the queue definition. The default value is 7200 seconds.
idcall
ID whereby we can find the CDR information and pass

Example:

Description:

Create a call type Click to Call, where the customer number is 226211245 and queue (must be of type Click to Call) 2006. The operator see while ringing text Pepa Novak and number 226211245.

Input:
https://MyPBX.daktela.com/api/3.9/ClickToCall/json?access_token=1234567890123456789012345678901234567890&queue=2006&number=226211245&agenttext=Pepa%20Novak
Output:
{"status":1,"error":null,"result":{"id_call":"1358860092.8131WS"}}
Playing a message to an ongoing call

Requirement version: 3.6

Action:

ControlPlayback

If the call is in progress, it is possible to play any message that is available on the PBX. This message will hear the internal extension (operator) and the other party (the customer).


Mandatory parameters:

extension
Extension number, which carries out an ongoing call (you do not have to fill out a required parameter user)
user
User login name who carries out an ongoing call (you do not have to fill out a required parameter extension)
command
What command to be executed
  • play - start play message
  • rewind - rewind played message
  • pause - pause playing message, for unpause call same command
  • forward - forward playing message
  • stop - stop playing message
  • status - check if message is still playing. Returned array have key playing with value depending on whether the message is still playing (true) or not (false).

Optional parameters:

recording
With command play, specify here name of message which you want to play. List of messages can by managed in module PBX Setup.
begintime
With command play, is possible specify from what time in miliseconds should be message start playing
skiptime
This parameter needs to be specified with commadn play. It mean how many miliseconds to be skipped when call command rewind or forward

Example:

Description:

The ongoing call at line 500 we want to play message, what will hear you and customer.

Input:
https://MyPBX.daktela.com/api/3.6/ControlPlayback/json?access_token=1234567890123456789012345678901234567890&command=play&extension=500&recording=Upozornujeme_ze_v_ramci_zkvalitneni_sluzeb_mohou_byt_hovory_monitorovany.wav
Output:
{"status":1,"error":null,"result":null}
Description:

Stop playing message from previous example

Input:
https://MyPBX.daktela.com/api/3.6/ControlPlayback/json?access_token=1234567890123456789012345678901234567890&command=pause&extension=500
Output:
{"status":1,"error":null,"result":null}
Create outgoing call center call

Requirement version: 3.1

Action:

CreateCall

Create ooutgoing call with request on call center


Mandatory parameters:

user
Agent's login name, who wants to create call
number
Number to dial

Optional parameters:

accountcode
Unique code which is bind to call
autoanswer
If phone supports automatic answer, you can use this. Default is false
waitingtime
How long (in seconds) have phone to ring on line / extension. Default is 30 seconds.
dialingtime
How long (in seconds) have phone to ring on client. Default is 120 seconds
idcall
ID call. This is deprecated.
agenttext
Text information showed to agent on phone's display while call is dialed
queue
Outgoing queue number, which is used to call. Agent must be logged in CC. If Číslo odchozí fronty, přes kterou chceme volat. Agent musí být přihlášen do CC. Pokud bude přihlášen do jiné odchozí fronty, hovor bude zaznamenán na frontu, která je v parametru.
ticket
Unique name ticket

Example:

Description:

Outgoing call from user michalhajek to public number 800123456 and auto answer enabled

Input:
https://MojeVU.daktela.com/api/3.1/CreateCall/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&number=800123456&autoanswer=yes
Output:
{"error":null,"status":1,"result":{"id_call":"123456789.1234SJ"}}}
Description:

Outgoing call from user michalhajek to public number 800123456 and auto answer enabled. But user is not logged to outgoing queue.

Input:
https://MojeVU.daktela.com/api/3.1/CreateCall/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&number=800123456&autoanswer=yes
Output:
{"error":"Agent nen\u00ed p\u0159ihl\u00e1\u0161en do odchoz\u00ed kampan\u011b\/fronty","status":0}
Create outbound call

Requirement version: 3.0

Action:

CreateCall

Create outbound call ( non CC )


Mandatory parameters:

extension
Internal extension number ( caller )
number
Phone external number ( callee )

Optional parameters:

accountcode
Accountcode
autoanswer
Set boolen to enabled auto answer on caller extension. Disabled by default.
waitingtime
Max waiting time in seconds, when caller answered call. Default: 30 seconds
idcall
ID call. This is deprecated.
agenttext
Custom caller name. This information is showed on phone display.

Example:

Description:

Outbound call from caller number 300 to callee number 800123456

Input:
https://MojeVU.daktela.com/api/3.0/CreateCall/json?access_token=1234567890123456789012345678901234567890&extension=300&number=800123456
Output:
{"error":null,"status":1,"result":{"id_call":"123456789.1234SJ"}}
Description:

Outbound call from caller number 300 to callee number 800123456 with enabled function autoasnwer

Input:
https://MojeVU.daktela.com/api/3.0/CreateCall/json?access_token=1234567890123456789012345678901234567890&extension=300&number=800123456&autoanswer=yes
Output:
{"error":null,"status":1,"result":{"id_call":"123456789.1234SJ"}}
Create remote call

Requirement version: 3.8

Action:

CreateRemoteCall

Pass external phone number, where is call made to. After answer is call dialed to secondarynumber.


Mandatory parameters:

primarynumber
Pass external phone number, where is call made to.
secondarynumber
Phone number dialed after answer primary call

Optional parameters:

accountcode
unique code binded to call
directdid
If is set to true, call is made to number (secondarynumber), which is defined in Incoming redirect at module PBX settings. So we can to primarynumber play message or send call to IVR menu, etc. Default is this option off.
dialingtime
How long call rings till is hanguped
idcall
ID call with CDR and recording
recording
record call
variables
Array hash variables, which can be used in PBX's dialplan. Variables are accessible via function HASH(CRMAPI,foo). See 2. example.

Example:

Description:

On number 226211245 make call with number 468008585

Input:
https://MojeVU.daktela.com/api/3.8/CreateRemoteCall/json?access_token=1234567890123456789012345678901234567890&primarynumber=226211245&secondarynumber=468008585
Output:
{"status":1,"error":null,"result":{"id_call":"1346154802.5542WS"}}
Description:

Call number 226211245 and route call to incoming route on 9999. On this number 9999 we have assigned Announcement. Prefill variable myid to call, which can be used after Announcement is played.

Input:
https://MojeVU.daktela.com/api/3.8/CreateRemoteCall/json?access_token=1234567890123456789012345678901234567890&primarynumber=226211245&secondarynumber=9999&directdid=true&variables[myid]=1234567
Output:
{"status":1,"error":null,"result":{"id_call":"1346154802.5542WS"}}
List of all attempts in a call center

Requirement version: 4.1

Action:

GetAttempts

Listing call centers attempts. The maximum limit of returned calls is 1000, after exceeding returns an error.


Mandatory parameters:

datetime_from
From what time to look for calls. Time format YYYY-MM-DD HH:MM:SS
datetime_to
To what time to look for calls. Time format YYYY-MM-DD HH:MM:SS

Optional parameters:

queues
Array ID of queues
id_call
Unique number of the call
users
Array ID of users
skip
Row offset, default value: 0
take
Row count, default value: 100

Example:

Description:

Look up the attempts within the time range from 2015-08-14 00:00:00 to 2015-10-31 00:00:00 and ID queue 5 1

Input:
https://MyPBX.daktela.com/api/4.1/GetAttempts/json?access_token=1234567890123456789012345678901234567890&datetime_from=2015-08-14 00:00:00&datetime_to=2015-10-31 00:00:00&queues[]=1&skip=0&take=100
Output:
{"status":1,"error":null,"result":{"data":[{"id":111,"id_call":"1443007798.918","name":"ATTEMPT","start_time":"2015-09-23 13:30:25","end_time":"2015-09-23 13:30:45","duration":20,"id_agent":4,"id_queue":1,"data1":"","data2":"","data3":"","data4":""},{"id":110,"id_call":"1443007798.918","name":"ATTEMPT","start_time":"2015-09-23 13:29:59","end_time":"2015-09-23 13:30:19","duration":20,"id_agent":4,"id_queue":1,"data1":"","data2":"","data3":"","data4":""}],"total":"2"}}
Download voice recording

Requirement version: 3.0

Action:

GetRecording

Download voice recording with valid recording hash. Recording hash get action AboutCall.


Mandatory parameters:

recording_hash
This hash get from action AboutCall

Optional parameters:

octetstream
If set true, header Content-Type will set application/octet-stream. Default value false, header Content-Type will set audio/x-wav or audio/mpeg

Example:

Description:

Download recording with recording hash 225fae9e2c0a2e830c7d0e9e80040f4245a65d2e1319030658.204

Input:
https://MojeVU.daktela.com/api/3.0/GetRecording/json?recording_hash=225fae9e2c0a2e830c7d0e9e80040f4245a65d2e1319030658.204
Output:
Binary data
Hangup call

Requirement version: 3.0

Action:

Hangup

Hangup realtime call


Mandatory parameters:

user
User login name (only one mandatory param)
extension
Extension number where user sign in (only one mandatory param)
call
Unique ID of call (only one mandatory param)

Example:

Description:

Hangup realtime call at user michalhajek

Input:
https://MojeVU.daktela.com/api/3.1/Hangup/json?access_token=1234567890123456789012345678901234567890&user=michalhajek
Output:
{"error":null,"status":1}
Description:

Hangup realtime call at extension number 300

Input:
https://MojeVU.daktela.com/api/3.1/Hangup/json?access_token=1234567890123456789012345678901234567890&extension=300
Output:
{"error":null,"status":1}
Monitoring call

Requirement version: 3.0

Action:

Monitoring

Monitor realtime call without Call Centrum


Mandatory parameters:

exten
Extension number to monitoring
listener
Phone number or extension number, where we do spying
mode
Type of spying spy whisper whisperprivate barge interactive - switching throught keyboard 4=spy(default), 5=whisper, 6=barge

Example:

Description:

Spying realtime call on extension 100 with mode whisper.

Input:
https://MojeVU.daktela.com/api/3.0/Monitoring/json?access_token=1234567890123456789012345678901234567890&exten=100&listener=200&mode=whisper
Output:
{"error":null,"status":1}
Monitoring call center's call

Requirement version: 3.1

Action:

Monitoring

Online monitoring ongoing call with request on call centre


Mandatory parameters:

user
Operator's login name to listen
listener
Extension to listen
mode
Monitoring type spy - listener can't speak to anyone whisper - listener can speak only to exten and can listen the client whisperprivate - listener can speak only to exten but can't listen the client barge - listener can speak to and listen both sides interactive - listener can switch modes via DTMF - 4=spy (default), 5=whisper, 6=barge

Example:

Description:

Monitoring call, when listener can speak with extension, but client will not hear it

Input:
https://MojeVU.daktela.com/api/3.0/Monitoring/json?access_token=1234567890123456789012345678901234567890&user=hajekhu&listener=200&mode=spy
Output:
{"status":1,"error":null,"result":{"calling_direction":"out","calling_number":"468008585","calling_queue":"1006","calling_queue_name":"ObycOdchozi","ringing":"2","billsec":"177"}}
Picks up a call from queue

Requirement version: 4.0

Action:

PickupFromQueue

Picks up a call from queue


Example:

Description:

Pickup call to user pavelmoravec

Input:
https://api.daktela.com/api/4.0/PickupFromQueue/json?access_token=1234567890123456789012345678901234567890&call_id=1404828279.15208&user=pavelmoravec
Output:
{"status":1,"error":null,"result":[]}
Transfer call

Requirement version: 3.0

Action:

Transfer

Transfer call with attended


Mandatory parameters:

user
User login name (we do not need to fill in a required parameter extension)
extension
Extension number where user sign in (we do not need to fill in a required parameter user)
number
Transfer call to remote phone number (just one of the parameter number, dst_queue, dst_user)
dst_queue
Transfer call to destination ID queue (just one of the parameter number, dst_queue, dst_user)
dst_user
Transfer call to destination ID user (just one of the parameter number, dst_queue, dst_user)

Optional parameters:

type
Type of transfer. Default is attended attended - Attended transfer is when a call is routed to a third party only if the third party answers the call. blind - Blind transfer is when a call is routed to a third party, the original call is ended, and no check is made to determine whether the transferred call is answered or if the number is busy.

Example:

Description:

Transfer call from user michalhajek to destination phone number 100.

Input:
https://MojeVU.daktela.com/api/3.1/Transfer/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&type=attended&number=800123456
Output:
{"error":null,"status":1}

Extensions


Answer incoming call to CC

Requirement version: 3.7

Action:

Answer

Automatic remotely answer incoming call from CC queue ringing on a line. Operator's phone must supports auto answer function.


Mandatory parameters:

extension
Operator's extension (group) number, where is call incoming to (parameter user is not required than)
user
Agent's user name, where is call incoming to (parameter extension is not required than)

Example:

Description:

Answer ringing call by operator with login hajek

Input:
https://MojeVU.daktela.com/api/3.7/Answer/json?access_token=1234567890123456789012345678901234567890&user=hajek
Output:
{"status":1,"error":null,"result":{"calling_number":"226211245","calling_queue":"2000","calling_queue_name":"Support","id_call":"14555781215.224"}}
Playing a message to an ongoing call

Requirement version: 3.6

Action:

ControlPlayback

If the call is in progress, it is possible to play any message that is available on the PBX. This message will hear the internal extension (operator) and the other party (the customer).


Mandatory parameters:

extension
Extension number, which carries out an ongoing call (you do not have to fill out a required parameter user)
user
User login name who carries out an ongoing call (you do not have to fill out a required parameter extension)
command
What command to be executed
  • play - start play message
  • rewind - rewind played message
  • pause - pause playing message, for unpause call same command
  • forward - forward playing message
  • stop - stop playing message
  • status - check if message is still playing. Returned array have key playing with value depending on whether the message is still playing (true) or not (false).

Optional parameters:

recording
With command play, specify here name of message which you want to play. List of messages can by managed in module PBX Setup.
begintime
With command play, is possible specify from what time in miliseconds should be message start playing
skiptime
This parameter needs to be specified with commadn play. It mean how many miliseconds to be skipped when call command rewind or forward

Example:

Description:

The ongoing call at line 500 we want to play message, what will hear you and customer.

Input:
https://MyPBX.daktela.com/api/3.6/ControlPlayback/json?access_token=1234567890123456789012345678901234567890&command=play&extension=500&recording=Upozornujeme_ze_v_ramci_zkvalitneni_sluzeb_mohou_byt_hovory_monitorovany.wav
Output:
{"status":1,"error":null,"result":null}
Description:

Stop playing message from previous example

Input:
https://MyPBX.daktela.com/api/3.6/ControlPlayback/json?access_token=1234567890123456789012345678901234567890&command=pause&extension=500
Output:
{"status":1,"error":null,"result":null}
Create outbound call

Requirement version: 3.0

Action:

CreateCall

Create outbound call ( non CC )


Mandatory parameters:

extension
Internal extension number ( caller )
number
Phone external number ( callee )

Optional parameters:

accountcode
Accountcode
autoanswer
Set boolen to enabled auto answer on caller extension. Disabled by default.
waitingtime
Max waiting time in seconds, when caller answered call. Default: 30 seconds
idcall
ID call. This is deprecated.
agenttext
Custom caller name. This information is showed on phone display.

Example:

Description:

Outbound call from caller number 300 to callee number 800123456

Input:
https://MojeVU.daktela.com/api/3.0/CreateCall/json?access_token=1234567890123456789012345678901234567890&extension=300&number=800123456
Output:
{"error":null,"status":1,"result":{"id_call":"123456789.1234SJ"}}
Description:

Outbound call from caller number 300 to callee number 800123456 with enabled function autoasnwer

Input:
https://MojeVU.daktela.com/api/3.0/CreateCall/json?access_token=1234567890123456789012345678901234567890&extension=300&number=800123456&autoanswer=yes
Output:
{"error":null,"status":1,"result":{"id_call":"123456789.1234SJ"}}
Device States

Requirement version: 3.0

Action:

DeviceStates

Get device states States: AVAILABLE UNAVAILABLE ONHOLD INUSE RINGING


Example:

Description:

Get all device states

Input:
https://MojeVU.daktela.com/api/3.1/DeviceStates/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":[{"exten":"100","status":"AVAILABLE","ip":"172.22.254.254","port":"5064"},{"exten":"200","status":"AVAILABLE","ip":"212.24.153.186","port":"20652"},{"exten":"300","status":"AVAILABLE","ip":"212.24.153.186","port":"5063"},{"exten":"500","status":"UNAVAILABLE","ip":"-none-","port":"0"}]}
Return users related with the given extension.

Requirement version: 4.1

Action:

GetExtensionUsers

Return users related with the given extension.


Mandatory parameters:

extension
The extension name.

Example:

Description:

Get users related with the extension n. 100.

Input:
https://MojeVU.daktela.com/api/4.1/GetExtensionUsers/json?access_token=1234567890123456789012345678901234567890&extension=100
Output:
{"status":1,"error":null,"result":{"data":[{"user":"1","role":"1","profile":"1","name":"klatil","title":"Zvonimír Klátil","description":"","email":"","deleted":"0"}]}}
Hangup call

Requirement version: 3.0

Action:

Hangup

Hangup realtime call


Mandatory parameters:

user
User login name (only one mandatory param)
extension
Extension number where user sign in (only one mandatory param)
call
Unique ID of call (only one mandatory param)

Example:

Description:

Hangup realtime call at user michalhajek

Input:
https://MojeVU.daktela.com/api/3.1/Hangup/json?access_token=1234567890123456789012345678901234567890&user=michalhajek
Output:
{"error":null,"status":1}
Description:

Hangup realtime call at extension number 300

Input:
https://MojeVU.daktela.com/api/3.1/Hangup/json?access_token=1234567890123456789012345678901234567890&extension=300
Output:
{"error":null,"status":1}
Monitoring call

Requirement version: 3.0

Action:

Monitoring

Monitor realtime call without Call Centrum


Mandatory parameters:

exten
Extension number to monitoring
listener
Phone number or extension number, where we do spying
mode
Type of spying spy whisper whisperprivate barge interactive - switching throught keyboard 4=spy(default), 5=whisper, 6=barge

Example:

Description:

Spying realtime call on extension 100 with mode whisper.

Input:
https://MojeVU.daktela.com/api/3.0/Monitoring/json?access_token=1234567890123456789012345678901234567890&exten=100&listener=200&mode=whisper
Output:
{"error":null,"status":1}
Transfer call

Requirement version: 3.0

Action:

Transfer

Transfer call with attended


Mandatory parameters:

user
User login name (we do not need to fill in a required parameter extension)
extension
Extension number where user sign in (we do not need to fill in a required parameter user)
number
Transfer call to remote phone number (just one of the parameter number, dst_queue, dst_user)
dst_queue
Transfer call to destination ID queue (just one of the parameter number, dst_queue, dst_user)
dst_user
Transfer call to destination ID user (just one of the parameter number, dst_queue, dst_user)

Optional parameters:

type
Type of transfer. Default is attended attended - Attended transfer is when a call is routed to a third party only if the third party answers the call. blind - Blind transfer is when a call is routed to a third party, the original call is ended, and no check is made to determine whether the transferred call is answered or if the number is busy.

Example:

Description:

Transfer call from user michalhajek to destination phone number 100.

Input:
https://MojeVU.daktela.com/api/3.1/Transfer/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&type=attended&number=800123456
Output:
{"error":null,"status":1}

Pauses


Create or edit a pause.

Requirement version: 3.3

Action:

CreatePause

Create or edit a pause, which will be available for all operators in the Call Centrum's applications as the WebAgent, PhoneAgent, API.


Mandatory parameters:

title
Name of a pause.
type
Type of a pause - system pause Wrap(wrap), system pause Lajdák(lajdak) or non-system pause(normal).
paid
Whether the pause is paid(yes) or not(no). E.g. Wrap pause should be paid, but pause Lajdák not.

Optional parameters:

id
ID of a pause you got via GetPauses. If you pass the ID of the pause, you will do pause editing.
code
Special code of a pause.

Example:

Description:

Create new pause called Oběd - non-system pause (normal), which will be paid.

Input:
https://MojeVU.daktela.com/api/3.3/CreatePause/json?access_token=1234567890123456789012345678901234567890&name=Obed&type=normal&billable=no
Output:
{"status":1,"error":null,"result":null}
Description:

Change the name of the Oběd pause (with ID 9) to the new name called Svacina.

Input:
https://MojeVU.daktela.com/api/3.3/CreatePause/9/json?access_token=1234567890123456789012345678901234567890&name=Svacina&type=normal&billable=yes
Output:
{"status":1,"error":null,"result":null}
List of all pauses.

Requirement version: 3.3

Action:

GetPauses

List of all pauses including the deleted ones.


Example:

Description:

Get the list of all pauses.

Input:
https://MojeVU.daktela.com/api/3.3/GetPauses/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"3":{"pause":"3","name":"666","title":"Lajdak","type":"lajdak","paid":"0","deleted":"0"},"2":{"pause":"2","name":"20","title":"Wrap","type":"wrap","paid":"1","deleted":"0"},"4":{"pause":"4","name":"13","title":"Backoffice","type":null,"paid":"1","deleted":"0"},"6":{"pause":"6","name":"11","title":"Prestavka","type":null,"paid":"0","deleted":"0"},"7":{"pause":"7","name":"10","title":"Obed","type":"","paid":"0","deleted":"0"},"8":{"pause":"8","name":"667","title":"Email","type":"","paid":"1","deleted":"0"},"9":{"pause":"9","name":"668","title":"Obed22","type":"","paid":"0","deleted":"0"}}}
Get pauses

Requirement version: 3.0

Action:

GetPauses

Get all defined pauses


Optional parameters:

id
ID pause

Example:

Description:

Get all pauses

Input:
https://MojeVU.daktela.com/api/3.0/GetPauses/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"3":{"pcode_id":"3","pcode":"666","pcode_desc":"Lajdak","read_key":"","isBillable":"0","isPayable":"0","pauseType":"w","sys_dt_creazione":"0000-00-00 00:00:00","sys_user_creazione":"0","sys_dt_modifica":"0000-00-00 00:00:00","sys_user_modifica":"0","sys_optilock":"0"},"2":{"pcode_id":"2","pcode":"20","pcode_desc":"Wrap","read_key":"","isBillable":"1","isPayable":"0","pauseType":"w","sys_dt_creazione":"0000-00-00 00:00:00","sys_user_creazione":"0","sys_dt_modifica":"0000-00-00 00:00:00","sys_user_modifica":"0","sys_optilock":"0"},"4":{"pcode_id":"4","pcode":"13","pcode_desc":"Backoffice","read_key":"","isBillable":"1","isPayable":"0","pauseType":"-","sys_dt_creazione":"0000-00-00 00:00:00","sys_user_creazione":"0","sys_dt_modifica":"0000-00-00 00:00:00","sys_user_modifica":"0","sys_optilock":"0"},"5":{"pcode_id":"5","pcode":"12","pcode_desc":"Email","read_key":"","isBillable":"1","isPayable":"0","pauseType":"-","sys_dt_creazione":"0000-00-00 00:00:00","sys_user_creazione":"0","sys_dt_modifica":"0000-00-00 00:00:00","sys_user_modifica":"0","sys_optilock":"0"},"6":{"pcode_id":"6","pcode":"11","pcode_desc":"Prestavka","read_key":"","isBillable":"0","isPayable":"0","pauseType":"-","sys_dt_creazione":"0000-00-00 00:00:00","sys_user_creazione":"0","sys_dt_modifica":"0000-00-00 00:00:00","sys_user_modifica":"0","sys_optilock":"0"},"7":{"pcode_id":"7","pcode":"10","pcode_desc":"Obed","read_key":"","isBillable":"0","isPayable":"0","pauseType":"-","sys_dt_creazione":"0000-00-00 00:00:00","sys_user_creazione":"0","sys_dt_modifica":"0000-00-00 00:00:00","sys_user_modifica":"0","sys_optilock":"0"}}}
Description:

Get pause with ID 3

Input:
https://MojeVU.daktela.com/api/3.0/GetPauses/3/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"3":{"pcode_id":"3","pcode":"666","pcode_desc":"Lajdak","read_key":"","isBillable":"0","isPayable":"0","pauseType":"w","sys_dt_creazione":"0000-00-00 00:00:00","sys_user_creazione":"0","sys_dt_modifica":"0000-00-00 00:00:00","sys_user_modifica":"0","sys_optilock":"0"}}}
User pause off

Requirement version: 3.0

Action:

PauseOff

Unset user pause


Mandatory parameters:

user
User login name (we do not need to fill in a required parameter extension)
extension
Extension number where user sign in (we do not need to fill in a required parameter user)

Example:

Description:

Unset pause

Input:
https://MojeVU.daktela.com/api/3.0/PauseOff/json?access_token=1234567890123456789012345678901234567890&user=michalhajek
Output:
{"error":null,"status":1}
User pause on

Requirement version: 3.0

Action:

PauseOn

Set user pause on


Mandatory parameters:

user
User login name (we do not need to fill in a required parameter extension)
extension
Extension number where user sign in (we do not need to fill in a required parameter user)
pause
ID pause

Optional parameters:

force
If set to yes, skip checking user state ringing, speaking or on hold. Default is no.

Example:

Description:

Set user michalhajek to pause with ID number 7.

Input:
https://MojeVU.daktela.com/api/3.1/PauseOn/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&pause=7
Output:
{"error":null,"status":1}
Description:

Set user michalhajek to non exists pause with ID number 100.

Input:
https://MojeVU.daktela.com/api/3.1/PauseOn/json?access_token=1234567890123456789012345678901234567890&user=michalhajek&pause=100
Output:
{"error":"Tato pauza nebyla nalezena","status":0}

Statistics


Informations about call

Requirement version: 3.0

Action:

AboutCall

Get CDR fields - caller, callee, user, queue, ringing time, speaking time, direction, path to recording, DID, recording hash. For binary download recording use recording hash which impart action GetRecording


Mandatory parameters:

id_call
Unique ID call

Example:

Description:

Information about call with ID 1319030658.204

Input:
https://MojeVU.daktela.com/api/3.0/AboutCall/json?access_token=1234567890123456789012345678901234567890&id_call=1350478005.0
Output:
{"status":1,"error":null,"result":[{"calldate":"2011-10-19 15:24:46","clid":"200","src":"200","dst":"468008580","dcontext":"from-internal","channel":"SIP\/200-0000009f","dstchannel":"SIP\/pbx-000000a0","lastapp":"ResetCDR","lastdata":"w","duration":"32","billsec":"29","disposition":"ANSWERED","amaflags":"3","accountcode":"","uniqueid":"1319030686.213","userfield":"\/RECORDINGS\/2011\/10\/19\/OUT200-468008580-20111019-152447-1319030686.213.wav","real_exten":"200","direction":"out","from_did":null,"id_call":"1319030658.204","id_queue":"2","id_agent":"4","waiting_time":"3","ringing_time":"3","hold_time":"0","orig_pos":"1","position":"1","disposition_cause":"agent","disconnection_cause":"","recording_hash":"225fae9e2c0a2e830c7d0e9e80040f4245a6asv93gfdgxD1319030658.204"}]}
List of CDR with call price

Requirement version: 3.5

Action:

CDR

List of CDR (Call Detail Records) with function call billing. Price of call is dependend on price list, that is imported to module CDR


Mandatory parameters:

datetime_from
From whach time to look for calls. Time format YYYY-MM-DD HH:MM:SS
datetime_to
To whach time to look for calls. Time format YYYY-MM-DD HH:MM:SS

Optional parameters:

real_extens
Extension numbers, which were participated to calls. Optionally you can specify multiple extensions into the array;
accountcodes
On what account codes list calls. Optionally you can specify multiple account codes into the array;
direction
What call direction. Options are in, out, local
destinations
Despite what the destination list calls. You can enter multiple types of destinations in array. Information about destinations can be found in the module CDR.
disposition
For list only answered calls, set to ANSWERED.
src_channels
Through what incomming channels we want to list calls. Optionally you can specify multiple channels into the array.
dst_channels
Through what outgoing channels we want to list calls. Optionally you can specify multiple channels into the array.
min_price_call
Will be listed only calls that are more expensive than here specify. There is no specified currency, it depends on what currency is imported price list in module CDR. For example, 2.50
billing
Boolean value, when get price

Example:

Description:

List answered outgoing calls, which are made in March 2012 for the extensions 300, 500 and omit calls that are cheaper than 1.20. And all cals go through channel SIP/daktela and SIP/gsm

Input:
https://MyPBX.daktela.com/api/3.5/CDR/json?access_token=1234567890123456789012345678901234567890&datetime_from=2012-03-01%2000:00:00&datetime_to=2012-03-31%2023:59:59&direction=out&disposition=ANSWERED&min_price_call=1.20&real_extens[]=300&real_extens[]=500&dst_channels[]=SIP/proxy&dst_channels=SIP/gsm
Output:
{"status":1,"error":null,"result":[{"date":"2012-03-05 13:05:20","real_exten":"500","dst":"468008585","billsec":"321","duration":"328","disposition":"ANSWERED","accountcode":"","uniqueid":"1330949120.242","id_call":"1330949120.242","from_did":null,"direction":"out","price":"4.94999987","destination_type":"Pevna_Linka","destination_type_description":"Pevna_Linka","destination":"Ceska republika","destination_price":"0.9000"},{"date":"2012-03-05 13:10:57","real_exten":"500","dst":"468008585","billsec":"170","duration":"177","disposition":"ANSWERED","accountcode":"","uniqueid":"1330949457.244","id_call":"1330949457.244","from_did":null,"direction":"out","price":"2.69999993","destination_type":"Pevna_Linka","destination_type_description":"Pevna_Linka","destination":"Ceska republika","destination_price":"0.9000"},{"date":"2012-03-05 13:13:56","real_exten":"500","dst":"468008585","billsec":"2200","duration":"2206","disposition":"ANSWERED","accountcode":"","uniqueid":"1330949636.250","id_call":"1330949636.250","from_did":null,"direction":"out","price":"33.29999912","destination_type":"Pevna_Linka","destination_type_description":"Pevna_Linka","destination":"Ceska republika","destination_price":"0.9000"},{"date":"2012-03-05 13:51:08","real_exten":"500","dst":"468008585","billsec":"923","duration":"929","disposition":"ANSWERED","accountcode":"","uniqueid":"1330951868.260","id_call":"1330951868.260","from_did":null,"direction":"out","price":"13.94999963","destination_type":"Pevna_Linka","destination_type_description":"Pevna_Linka","destination":"Ceska republika","destination_price":"0.9000"},{"date":"2012-03-08 14:13:31","real_exten":"500","dst":"840101010","billsec":"4","duration":"8","disposition":"ANSWERED","accountcode":"","uniqueid":"1331212411.14","id_call":"1331212411.14","from_did":null,"direction":"out","price":"3.82999992","destination_type":"Specialni_Cisla","destination_type_description":"Specialni_Cisla","destination":"Bila linka ","destination_price":"1.9150"},{"date":"2012-03-13 16:57:13","real_exten":"300","dst":"603927227","billsec":"6","duration":"17","disposition":"ANSWERED","accountcode":"1002","uniqueid":"1331654233.196","id_call":"1331654233.586WS","from_did":null,"direction":"out","price":"2.25000000","destination_type":"Mobilni_Hovory","destination_type_description":"Mobilni_Hovory","destination":"Ceska republika - mobil T-mobile","destination_price":"4.5000"},{"date":"2012-03-26 10:51:29","real_exten":"500","dst":"491200163","billsec":"83","duration":"91","disposition":"ANSWERED","accountcode":"1002","uniqueid":"1332751889.0","id_call":"1332751889.9807WS","from_did":null,"direction":"out","price":"1.34999996","destination_type":"Pevna_Linka","destination_type_description":"Pevna_Linka","destination":"Ceska republika","destination_price":"0.9000"}]}
Download voice recording

Requirement version: 3.0

Action:

GetRecording

Download voice recording with valid recording hash. Recording hash get action AboutCall.


Mandatory parameters:

recording_hash
This hash get from action AboutCall

Optional parameters:

octetstream
If set true, header Content-Type will set application/octet-stream. Default value false, header Content-Type will set audio/x-wav or audio/mpeg

Example:

Description:

Download recording with recording hash 225fae9e2c0a2e830c7d0e9e80040f4245a65d2e1319030658.204

Input:
https://MojeVU.daktela.com/api/3.0/GetRecording/json?recording_hash=225fae9e2c0a2e830c7d0e9e80040f4245a65d2e1319030658.204
Output:
Binary data
Last call information for a phone number

Requirement version: 3.9

Action:

LastCallNumber

Returns information about the last call to the phone number, that is, information about the agent and queue in which the call took place.


Mandatory parameters:

phonenumber
Prone number

Optional parameters:

interval
How many seconds to look back into history (default is 1 day)
answered
Answering a call (true | false)
queues
Area ID queues
queues_number
Area number queues (example 2000)

Example:

Description:

Show what agent a queue in which last spoke with the number 226211245 for the last two days.

Input:
https://MyPBX.daktela.com/api/3.9/LastCallNumber/json?access_token=1234567890123456789012345678901234567890&phonenumber=226211245&queues_number[]=99990&queues_number[]=2000&answered=yes&interval=172800
Output:
{"status":1,"error":null,"result":{"call":"1354715424.94","call_time":"2012-12-05 14:50:24","direction":"out","queue":"2","user":"4","answered":true,"clid":"468008585","waiting_time":5,"ringing_time":5,"hold_time":0,"duration":6,"disposition":"user","orig_posision":1,"attempts":0,"queue_title":"Daktela Test OUT","queue_number":"99990","queue_direction":"out","user_title":"Hajek","user_login":"hajek"}}
Last Call Information for extension or user

Requirement version: 3.9

Action:

LastCall

Returns information about the current call or the last completed call


Mandatory parameters:

extension
Number extension (do not have to fill in a required parameter user)
user
Username agent (do not have to fill in a required parameter extension)

Example:

Description:

We want to get the phone number of the customer and the call ID with which she spoke last extension number 500, alternatively, the customer still talks

Input:
https://MyPBX.daktela.com/api/3.9/LastCall/json?access_token=1234567890123456789012345678901234567890&extension=500
Output:
{"status":1,"error":null,"result":{"exten":"500","user":null,"queue":null,"id_call":"1352986386.46","direction":"out","clid":"468008585","time":"2012-11-15 14:33:06","_is_realtime":false}}
Realtime presence of users in the queue Chat or Click-to-Call

Requirement version: 3.9

Action:

RTQueuePresence

Returns information whether the chats (Click-to-Call) queue online. If you are logged into that queue operators, it returns true. Suitable when you want to hide chat in front of customers (or Click-to-Call) form.


Mandatory parameters:

queue
Number queue

Example:

Description:

Availability queue number 2005.

Input:
https://MyPBX.daktela.com/api/3.9/RTQueuePresence/json?access_token=1234567890123456789012345678901234567890&queue=2005
Output:
{"status":1,"error":null,"result":{"count_users":1,"online_presence":true}}
Realtime stats of calls

Requirement version: 3.5

Action:

RTStatsCalls

Return current overview ongoing calls


Example:

Description:

Definition of each output value:

  • id - ID call
  • queue - ID queue, where is call ongoing
  • agent - ID agent, who is now speaking (call must be answered)
  • users - ID users, who are connected with call (in case ringall strategy in queue, here will be more than one users)
  • clid - Telephone number of customer
  • direction - Direction of call (in, out)
  • state - Current state of call (Waiting,Ringing,Speaking,On Hold, Transfered)
  • enter_time_absolute - Time when call enterent in to queue. Format: YYYY-MM-DD HH:MM:SS
  • enter_time_relative - How many seconds it takes the call, include waiting time, ringing time and speaking.
  • wait_time_absolute - Time when call start wait in queue (same as enter_time_absolute). Format: YYYY-MM-DD HH:MM:SS
  • wait_time_relative - How many seconds take to answer call
  • ring_time_absolute - Time when call start ringing to agent. Format: YYYY-MM-DD HH:MM:SS
  • ring_time_relative - How many seconds call was ringing
  • answer_time_absolute - Time when was call answered by agent. Format: YYYY-MM-DD HH:MM:SS
  • answer_time_relative - How many seconds is call speaking with agent
  • hold_time_absolute - Time when call was hold by agent. Format: YYYY-MM-DD HH:MM:SS
  • hold_time_relative - How many seconds is call held

Input:
https://MyPBX.daktela.com/api/3.5/RTStatsCalls/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"1332333840.98":{"id":"1332333840.98","queue":"6","agent":"3","users":["3"],"clid":"100","direction":"in","state":"Speaking","enter_time_absolute":"2012-03-21 13:44:02","enter_time_relative":"7","wait_time_absolute":"2012-03-21 13:44:02","wait_time_relative":"5","ring_time_absolute":"2012-03-21 13:44:04","ring_time_relative":"5","answer_time_absolute":"2012-03-21 13:44:07","answer_time_relative":"2","hold_time_absolute":null,"hold_time_relative":"0"}}}
Realtime stats of used pauses

Requirement version: 3.5

Action:

RTStatsPauses

Return current overview of used pauses by agents


Example:

Description:

Definition of each output value:

  • id - ID pause
  • users - ID agents, which have this pause set
  • count - Count of agents, which have this pause set

Input:
https://MyPBX.daktela.com/api/3.5/RTStatsPauses/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"4":{"id":"4","count":"1","users":["3"]}}}
Realtime stat of queues with aggregation

Requirement version: 3.5

Action:

RTStatsQueuesSummary

Return current overvirew about total count of agents, calls in each queue


Optional parameters:

users
ID of agents, who want to filter
queues
ID of queues, which want to filter

Example:

Description:

Definition of each output value:

  • users_total - Count of total logged agents in this queue
  • users_ready - Count of idle agents, who can answer calls in this queue
  • users_busy - Count of busy agents, who are now speaking in this queue
  • users_pause - Count of paused agents, who have set any pause in this queue
  • calls_count - Count of ongoing calls in this queue
  • calls_in - Count of total incomming calls
  • calls_out - Count of total outgoing calls
  • calls_wait - Count of calls, which are ringing in this queue
  • calls_time - Max. waiting time to answer of calls in this queue

Input:
https://MyPBX.daktela.com/api/3.5/RTStatsQueuesSummary/json?users[0]=3&users[1]=1&access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"users_total":1,"users_ready":0,"users_busy":0,"users_pause":1,"calls_count":0,"calls_in":0,"calls_out":0,"calls_wait":0,"calls_time":0}}
Realtime stat of queues

Requirement version: 3.5

Action:

RTStatsQueues

Return current overvirew about total count of agents, calls in each queue


Example:

Description:

Definition of each output value:

  • id - ID queue
  • users_total - Count of total logged agents in this queue
  • users_ready - Count of idle agents, who can answer calls in this queue
  • users_busy - Count of busy agents, who are now speaking in this queue
  • users_pause - Count of paused agents, who have set any pause in this queue
  • calls_count - Count of ongoing calls in this queue
  • calls_wait - Count of calls, which are ringing in this queue
  • calls_time - Max. waiting time to answer of calls in this queue

Input:
https://MyPBX.daktela.com/api/3.5/RTStatsQueues/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"4":{"id":"4","users_total":1,"users_ready":0,"users_busy":1,"users_pause":0,"calls_count":1,"calls_wait":0,"calls_time":null},"6":{"id":"6","users_total":1,"users_ready":0,"users_busy":1,"users_pause":0,"calls_count":0,"calls_wait":0,"calls_time":0}}}
Realtime stats of logged agents with queue filter

Requirement version: 3.5

Action:

RTStatsSessions

Return current overvirew of logged agents with option to filter agents by queue, which are loggend in


Optional parameters:

users
Array of users IDs
queues
Array of queues IDs

Example:

Description:

Definition of each output value:

  • id - ID agent
  • extension - Extension number
  • queues - IDs of queues, which are now agent logged
  • state - What state is now agent (Logged, Idle, Paused, Calling, Ringing, Speaking, On Hold)
  • pause - If is state Paused, here is ID of pause
  • state_time_absolute - Time when was last state changed. Format: YYYY-MM-DD HH:MM:SS
  • state_time_relative - How many seconds passed from last state change
  • login_time_absolute - Tiem when agent was logged. Format: YYYY-MM-DD HH:MM:SS
  • login_time_relative - How many seconds is agent logged

Input:
https://MyPBX.daktela.com/api/3.5/RTStatsSessions/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"3":{"id":"3","extension":"200","queues":["6"],"state":"Paused","pause":"4","state_time_absolute":"2012-03-21 14:08:06","state_time_relative":"940","login_time_absolute":"2012-03-21 10:21:21","login_time_relative":"14545"}}}
Realtime user status

Requirement version: 3.9

Action:

RTUserState

Returns the current status of the user who is logged in the Call Center, including the current call


Mandatory parameters:

user
Username agent (you do not have to fill out a required parameter extension)
extension
Extension number (you do not have to fill out a required parameter user)

Example:

Description:

The importance of the individual values ​​of the output:

  • agent_name - Username (login) operator
  • agent_title - Full name operator
  • id_agent - Operator ID
  • exten - Number of internal extension to which the operator is logged
  • logintime - Absolute time when the operator entered into call center
  • agent_state - current status of the operator
    • Logged - operator is logged into the call center, but is not logged into the queue
    • Idle - operator is idle, that is ready for the call
    • Paused - operator is on pause
    • Ringing - operator phone is ringing
    • Speaking - operator speaks
    • On Hold - operator held call (probably will transfer)
  • state_time - absolute time when the operator last changed status (Paused, Ringing, Speaking, Hold On)
  • id_pause - ID pause on what operator is
  • onpause - absolute time when the operator switched to break (the same value as in the case of state_time Paused)
  • calls - If the operator speaks, so calls are in this field written
    • id_call - ID call
    • direction - call direction (in - incoming, out - outgoing)
    • clid - Customer's telephone number to which the operator call (if the call direction "in" - the caller's number, "out" - The called number)
    • clid_name - Text name to CLID (optional)
    • id_queue - ID queue in which the call is in progress
    • oqueue - queue object in which the call is in progress (informative)
    • entered - absolute time when the customer entered the queue. For an outgoing call, this is the time when the operator started to dial the customer
    • ringed - absolute time when the call started ringing at the operator
    • answered - absolute time when the call was answered by an operator
    • call_state - current status of the call
      • Ringing - call rings at operator
      • Speaking - call is answered by an operator
      • On Hold - call is put on hold, the operator is preparing to transfer
    • onhold - absolutní čas, kdy se operátor dal na On Hold
  • callscript_opened - ID call scripts (form, record) that the operator is open

Input:
https://MyPBX.daktela.com/api/3.9/RTUserState/json?access_token=1234567890123456789012345678901234567890&user=demouser
Output:
{"status":1,"error":null,"result":{"agent_name":"demouser","agent_title":"Demo User","id_agent":"4","exten":"6666","logintime":"2013-01-22 11:22:49","agent_state":"Speaking","state_time":"2013-02-01 14:20:53","id_pause":null,"onpause":null,"callscript_opened":"66","calls":[{"id_call":"1359724851.1068","direction":"in","clid":"300","clid_name":null,"id_queue":"1","oqueue":{"queue":"2","name":"99990","title":"Daktela Test OUT","description":"Daktela Test OUT pro ucely testovani","outboundcid":"","type":"out","direction":"out","wrapuptime":"15","outbounder":"0","form":"0","missed":null,"options":{"prefix":"","members":"","outboundcid":"","recording_user":"","recording_join":"","music":"inherit","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"leastrecent","last_agent_hours":"","ringtime":"20","retrytime":"5","wrapuptime":"15","record":"1","weight":"0","autofill":"yes","lajdaktime":"","loadtime":"","savetime":"","position_repeat":"","position_time":"no","ivr_jump":"","ivr_repeat":"","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"","sort_time":"ASC","contact_timeout":"","contact_url":"http:\/\/","contact_open":"","qa_form":"","target":"terminate","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_signal":"","target_condition":"1","target_context":"-6","target_param":"","target_ivr_menu":"8","target_ringgroup":"600","target_queue":"1","target_custom":""},"deleted":"0","penalty":null,"login":null},"entered":"2013-02-01 14:20:52","ringed":"2013-02-01 14:20:53","answered":"2013-02-01 14:21:02","call_state":"Speaking","onhold":null}]}}
Realtime stav uživatele s informací o otevřeném formuláři a seznamu přihlášených front

Requirement version: 4.0

Action:

RTUserState

Vrací aktuální stav uživatele, který je přihlášen v Call Centru, včetně probíhajícího hovoru


Mandatory parameters:

user
Přihlašovací jméno agenta (nemusíme již vyplňovat povinný parametr extension)
extension
Číslo klapky (nemusíme již vyplňovat povinný parametr user)

Optional parameters:

hash
Hash naposledy vráceného výsledku. Pokud předáte hash, tak se vrátí nová data jen při změně stavu operátora nebo pokud se nezmění stav od posledního vraceného stavu do 60 sekund. Při volání této metody pamatujte na prodloužení doby u klientského programu (wget, curl, atd) vrácených dat alespoň na 70 sekund.

Example:

Description:

Význam jednotlivých hodnot z výstupu:

  • agent_name - Username (login) operator
  • agent_title - Full name operator
  • id_agent - Operator ID
  • exten - Number of internal extension to which the operator is logged
  • logintime - Absolute time when the operator entered into call center
  • agent_state - current status of the operator
    • Logged - operator is logged into the call center, but is not logged into the queue
    • Idle - operator is idle, that is ready for the call
    • Paused - operator is on pause
    • Ringing - operator phone is ringing
    • Speaking - operator speaks
    • On Hold - operator held call (probably will transfer)
  • state_time - absolute time when the operator last changed status (Paused, Ringing, Speaking, Hold On)
  • id_pause - ID pause on what operator is
  • onpause - absolute time when the operator switched to break (the same value as in the case of state_time Paused)
  • calls - If the operator speaks, so calls are in this field written
    • id_call - ID call
    • direction - call direction (in - incoming, out - outgoing)
    • clid - Customer's telephone number to which the operator call (if the call direction "in" - the caller's number, "out" - The called number)
    • clid_name - Text name to CLID (optional)
    • id_queue - ID queue in which the call is in progress
    • oqueue - queue object in which the call is in progress (informative)
    • entered - absolute time when the customer entered the queue. For an outgoing call, this is the time when the operator started to dial the customer
    • ringed - absolute time when the call started ringing at the operator
    • answered - absolute time when the call was answered by an operator
    • call_state - current status of the call
      • Ringing - call rings at operator
      • Speaking - call is answered by an operator
      • On Hold - call is put on hold, the operator is preparing to transfer
    • onhold - absolute time, when operator is on On Hold
  • callscript_opened - callscript ID (form, record), which is open by operator
  • login_oqueues - queues list, where operator can be logged in (with indication, if is logged)
    • queue - queue ID
    • name - unique queue number
    • title - queue name
    • direction - queue direction (in, out)
    • type - queue type(in, out, outbounder, ctc, dialer, chat, email)
      • in - incoming queue (can be more than one)
      • out - outgoing queue (only one from out, outbounder, dialer)
      • outbounder - outbounder campaign (only one from out, outbounder, dialer)
      • dialer - predictive dialing (only one from out, outbounder, dialer)
      • ctc - Click to Contact (can be more than one)
      • chat - chat queue (can be more than one)
      • email - email queue (can be more than one)
    • rt_logged - indication if operator is actually logged in
  • hash - hash of this returned result. This hash you can pass in next RTUserState call, when returns data only if there are changes in result. Minimum time limit to call is 70 seconds (it saves HTTP requests on server).

Input:
https://MojeVU.daktela.com/api/3.9/RTUserState/json?access_token=1234567890123456789012345678901234567890&user=demouser
Output:
{"status":1,"error":null,"result":{"agent_name":"hajek","agent_title":"Hajek 1","id_agent":"4","exten":"1001","logintime":"2013-12-03 13:43:13","agent_state":"Paused","state_time":"2013-12-10 16:12:55","id_pause":"2","onpause":"2013-12-10 16:12:55","calls":[],"callscript_opened":null,"login_oqueues":[{"queue":"1","name":"2000","title":"test","description":"","outboundcid":"","type":"in","direction":"in","wrapuptime":"30","outbounder":"0","form":"0","missed":"5","options":{"prefix":"","members":"","outboundcid":"","recording_user":"","recording_join":"","music":"default_ericsonanton","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"ringall","last_agent_hours":"0,544","ringtime":"10","retrytime":"","wrapuptime":"30","autoanswer":"1","ringinuse":"yes","weight":"0","autofill":"yes","lajdaktime":"","loadtime":"","savetime":"","position_annoucement":"no","position_repeat":"","position_time":"no","ivr_jump":"","ivr_repeat":"","ivr_immediately":"no","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"5","sort_time":"ASC","contact_timeout":"","contact_url":"http:\/\/","contact_open":"","contact_window":"","qa_form":"","target":"terminate","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_voicemail":"10","target_signal":"","target_condition":"1","target_context":"6","target_param":"","target_ivr_menu":"8","target_ringgroup":"600","target_queue":"1","target_custom":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"2","name":"99990","title":"Daktela Test OUT","description":"Daktela Test OUT pro ucely testovani","outboundcid":"","type":"out","direction":"out","wrapuptime":"15","outbounder":"0","form":"0","missed":null,"options":{"prefix":"","members":"","outboundcid":"","recording_user":"","recording_join":"","music":"inherit","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"leastrecent","last_agent_hours":"","ringtime":"20","retrytime":"5","wrapuptime":"15","record":"1","weight":"0","autofill":"yes","lajdaktime":"","loadtime":"","savetime":"","position_repeat":"","position_time":"no","ivr_jump":"","ivr_repeat":"","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"","sort_time":"ASC","contact_timeout":"","contact_url":"http:\/\/","contact_open":"","qa_form":"","target":"terminate","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_signal":"","target_condition":"1","target_context":"-6","target_param":"","target_ivr_menu":"8","target_ringgroup":"600","target_queue":"1","target_custom":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":true},{"queue":"5","name":"2001","title":"Outbounder","description":"","outboundcid":"","type":"outbounder","direction":"out","wrapuptime":"0","outbounder":"1","form":"0","missed":null,"options":{"prefix":"","members":"","outboundcid":"","recording_user":"","recording_join":"","music":"inherit","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"leastrecent","last_agent_hours":"","ringtime":"20","retrytime":"5","wrapuptime":"","weight":"0","lajdaktime":"","loadtime":"","savetime":"","position_repeat":"","position_time":"no","ivr_jump":"","ivr_repeat":"","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"","sort_time":"DESC","contact_timeout":"","contact_url":"http:\/\/","contact_open":"","qa_form":"","waittime":"20","sleeptime":"5","welcome_message":"","strategy":"","priority":"60","allowed_time":"10:00-18:00|mon-fri|*|*","target":"terminate","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_signal":"","target_condition":"1","target_context":"-6","target_param":"","target_queue":"1","target_custom":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"6","name":"2002","title":"CTC","description":"","outboundcid":"","type":"ctc","direction":"in","wrapuptime":"10","outbounder":"0","form":"0","missed":null,"options":{"lang":"cs_CZ","prefix":"","members":"","allow_numbers":"(00420)?[234567][0-9]{8}\r\n(00420)?910[0-9]{6}","outboundcid":"","recording_user":"","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"leastrecent","last_agent_hours":"","ringtime":"20","retrytime":"5","wrapuptime":"10","weight":"0","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"","record":"1"},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"7","name":"2003","title":"DomluvZapasySquash","description":"","outboundcid":"603927227","type":"dialer","direction":"out","wrapuptime":"0","outbounder":"1","form":"0","missed":null,"options":{"power":"on","outboundcid":"603927227","record":"1","max_ringtime":"30","max_attempts":"1","delaytime":"1800","music":"none","maxwait":"","prediction":"0","status_busy":"22","status_reject":"23","status_hangup":"24","break":"0"},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"8","name":"2004","title":"PredictiveDialer","description":"","outboundcid":"","type":"dialer","direction":"out","wrapuptime":"0","outbounder":"1","form":"0","missed":null,"options":{"power":"on","prediction_type":"user","prediction_percent":"0","prediction_number":"1","prediction_break":"2","outboundcid":"","recording_join":"","max_ringtime":"30","max_attempts":"1","delaytime":"1800","music":"inherit","maxwait":"","target":"terminate","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_signal":"","target_condition":"1","target_context":"-6","target_param":"","target_ivr_menu":"8","target_queue":"1","target_custom":"","status_busy":"22","status_reject":"23","status_hangup":"24","savetime":"15","record":"1"},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"9","name":"2005","title":"Prichozi s Formularem","description":"","outboundcid":"","type":"in","direction":"in","wrapuptime":"0","outbounder":"0","form":"1","missed":null,"options":{"prefix":"","members":"","outboundcid":"","recording_user":"","recording_join":"","music":"inherit","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"leastrecent","last_agent_hours":"","ringtime":"20","retrytime":"5","wrapuptime":"","weight":"10","lajdaktime":"","loadtime":"","savetime":"","position_repeat":"","position_time":"no","ivr_jump":"","ivr_repeat":"","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"","sort_time":"ASC","contact_timeout":"","contact_url":"http:\/\/","contact_open":"","form":"1","qa_form":"","waittime":"20","sleeptime":"5","welcome_message":"","strategy":"","priority":"60","allowed_time":"10:00-18:00|mon-fri|*|*","target":"terminate","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_signal":"","target_condition":"1","target_context":"-6","target_param":"","target_queue":"1","target_custom":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"10","name":"2006","title":"Click2Call","description":"","outboundcid":"","type":"ctc","direction":"in","wrapuptime":"0","outbounder":"0","form":"0","missed":null,"options":{"lang":"cs_CZ","prefix":"","members":"","allow_numbers":"(00420)?[234567][0-9]{8}\r\n(00420)?910[0-9]{6}","outboundcid":"","recording_user":"","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"leastrecent","last_agent_hours":"","ringtime":"20","retrytime":"5","wrapuptime":"","weight":"0","threshold_time":"","threshold_users":"","threshold_calls":"","missed":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"15","name":"2008","title":"Dotazovatel","description":"","outboundcid":"603927227","type":"interviewer","direction":"out","wrapuptime":"0","outbounder":"1","form":"0","missed":null,"options":{"power":"on","allowed_time":"00:00-23:59|mon-fri|*|*","outboundcid":"603927227","max_ringtime":"30","max_attempts":"2","delaytime":"120","maxwait":"30","status_busy":"22","status_reject":"23","status_hangup":"24","target_terminate":"hangup","target":"ivr_menu","target_announcement":"2","target_extension":"500","target_signal":"","target_condition":"1","target_context":"-6","target_param":"","target_queue":"1","target_custom":"","max_threads":"4","status_answer":"9","target_ivr_menu":"8","call_timeout":"","record":"1","target_voicemail":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"16","name":"2022","title":"Outbounder_clone","description":"","outboundcid":"","type":"outbounder","direction":"out","wrapuptime":"0","outbounder":"1","form":"0","missed":null,"options":{"prefix":"","members":"","outboundcid":"","recording_user":"","recording_join":"","music":"inherit","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"leastrecent","last_agent_hours":"","ringtime":"20","retrytime":"5","wrapuptime":"","weight":"0","lajdaktime":"","loadtime":"","savetime":"","position_repeat":"","position_time":"no","ivr_jump":"","ivr_repeat":"","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"","sort_time":"DESC","contact_timeout":"","contact_url":"http:\/\/","contact_open":"","qa_form":"","target":"terminate","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_signal":"","target_condition":"1","target_context":"-6","target_param":"","target_ivr_menu":"8","target_queue":"1","target_custom":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"17","name":"2225","title":"Outbounder_clone2","description":"","outboundcid":"","type":"outbounder","direction":"out","wrapuptime":"0","outbounder":"1","form":"0","missed":null,"options":{"prefix":"","members":"","outboundcid":"","recording_user":"","recording_join":"","music":"inherit","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"leastrecent","last_agent_hours":"","ringtime":"20","retrytime":"5","wrapuptime":"","weight":"0","lajdaktime":"","loadtime":"","savetime":"","position_repeat":"","position_time":"no","ivr_jump":"","ivr_repeat":"","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"","sort_time":"DESC","contact_timeout":"","contact_url":"http:\/\/","contact_open":"","qa_form":"","target":"terminate","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_signal":"","target_condition":"1","target_context":"-6","target_param":"","target_ivr_menu":"8","target_queue":"1","target_custom":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"18","name":"2009","title":"Sem prepojim","description":"","outboundcid":"","type":"in","direction":"in","wrapuptime":"0","outbounder":"0","form":"0","missed":null,"options":{"prefix":"","members":"","outboundcid":"","recording_user":"","recording_join":"","music":"default","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"rrmemory","last_agent_hours":"","ringtime":"20","retrytime":"5","wrapuptime":"","weight":"0","lajdaktime":"","loadtime":"","savetime":"","position_repeat":"","position_time":"no","ivr_jump":"","ivr_repeat":"","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"","sort_time":"ASC","contact_timeout":"","contact_url":"http:\/\/","contact_open":"","qa_form":"","target":"terminate","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_signal":"","target_condition":"1","target_context":"-6","target_param":"","target_ivr_menu":"8","target_queue":"1","target_custom":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":false}],"hash":"ea8c9c6ec59a0c6d5ba4711d63105cb049dbd279"}}
Realtime state users

Requirement version: 4.1

Action:

RTUsersState

Return array users with realtime state


Example:

Description:

Význam jednotlivých hodnot z výstupu:

  • agent_name - Username (login) operator
  • agent_title - Full name operator
  • id_agent - Operator ID
  • exten - Number of internal extension to which the operator is logged
  • logintime - Absolute time when the operator entered into call center
  • agent_state - current status of the operator
    • Logged - operator is logged into the call center, but is not logged into the queue
    • Idle - operator is idle, that is ready for the call
    • Paused - operator is on pause
    • Ringing - operator phone is ringing
    • Speaking - operator speaks
    • On Hold - operator held call (probably will transfer)
  • state_time - absolute time when the operator last changed status (Paused, Ringing, Speaking, Hold On)
  • id_pause - ID pause on what operator is
  • onpause - absolute time when the operator switched to break (the same value as in the case of state_time Paused)
  • calls - If the operator speaks, so calls are in this field written
    • id_call - ID call
    • direction - call direction (in - incoming, out - outgoing)
    • clid - Customer's telephone number to which the operator call (if the call direction "in" - the caller's number, "out" - The called number)
    • clid_name - Text name to CLID (optional)
    • id_queue - ID queue in which the call is in progress
    • oqueue - queue object in which the call is in progress (informative)
    • entered - absolute time when the customer entered the queue. For an outgoing call, this is the time when the operator started to dial the customer
    • ringed - absolute time when the call started ringing at the operator
    • answered - absolute time when the call was answered by an operator
    • call_state - current status of the call
      • Ringing - call rings at operator
      • Speaking - call is answered by an operator
      • On Hold - call is put on hold, the operator is preparing to transfer
    • onhold - absolute time, when operator is on On Hold
  • callscript_opened - callscript ID (form, record), which is open by operator
  • login_oqueues - queues list, where operator can be logged in (with indication, if is logged)
    • queue - queue ID
    • name - unique queue number
    • title - queue name
    • direction - queue direction (in, out)
    • type - queue type(in, out, outbounder, ctc, dialer, chat, email)
      • in - incoming queue (can be more than one)
      • out - outgoing queue (only one from out, outbounder, dialer)
      • outbounder - outbounder campaign (only one from out, outbounder, dialer)
      • dialer - predictive dialing (only one from out, outbounder, dialer)
      • ctc - Click to Contact (can be more than one)
      • chat - chat queue (can be more than one)
      • email - email queue (can be more than one)
    • rt_logged - indication if operator is actually logged in

Input:
https://MojeVU.daktela.com/api/4.1/RTUsersState/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"1":{"agent_name":"admin","agent_title":"Administrator","id_agent":"1","exten":"500","logintime":"2016-09-26 14:40:28","agent_state":"Idle","state_time":"2016-09-26 15:37:09","id_pause":null,"onpause":null,"calls":[],"callscript_opened":null,"login_oqueues":[{"queue":"1","name":"2000","title":"test","description":"","type":"in","direction":"in","options":{"prefix":"","members":"","outboundcid":"","recording_user":"","recording_join":"","music":"inherit","maxwait":"","maxlength":"16","call_timeout":"","ring_strategy":"leastrecent","last_agent_hours":"0","ringtime":"20","retrytime":"5","wrapuptime":"","weight":"0","lajdaktime":"","loadtime":"","savetime":"","position_annoucement":"no","position_repeat":"","position_time":"no","ivr_jump":"","ivr_repeat":"","ivr_immediately":"","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"","sort_time":"ASC","contact_timeout":"","contact_url":"http:\/\/","contact_open":"","contact_window":"yes","form":"","qa_form":"","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_voicemail":"","target_signal":"","target_condition":"1","target_context":"-6","target_param":"","target_language":"","target_ivr_menu":"","target_ringgroup":"","target_queue":"1","target":"custom","target_custom":"","crm_ticket_category":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"3","name":"2001","title":"PRICHOZI","description":"","type":"in","direction":"in","options":{"prefix":"","members":"","outboundcid":"","recording_user":"","recording_join":"","music":"inherit","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"leastrecent","last_agent_hours":"","ringtime":"20","retrytime":"5","wrapuptime":"15","record":"1","weight":"0","lajdaktime":"","loadtime":"","savetime":"","position_annoucement":"","position_repeat":"","position_time":"no","ivr_jump":"","ivr_repeat":"","ivr_immediately":"","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"","missed_time_back":"","sort_time":"ASC","contact_timeout":"","contact_url":"https:\/\/","contact_open":"","contact_window":"","form":"","qa_form":"","target":"terminate","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_voicemail":"","target_signal":"","target_condition":"1","target_context":"-7","target_param":"","target_language":"","target_ivr_menu":"","target_ringgroup":"","target_queue":"1","target_custom":"","crm_ticket_category":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":false},{"queue":"4","name":"2002","title":"ODCHOZI","description":"","type":"out","direction":"out","options":{"prefix":"","members":"","outboundcid":"226219568","recording_user":"","recording_join":"","music":"inherit","maxwait":"","maxlength":"","call_timeout":"","ring_strategy":"leastrecent","last_agent_hours":"","ringtime":"20","retrytime":"5","wrapuptime":"","weight":"0","lajdaktime":"","loadtime":"","savetime":"","position_annoucement":"","position_repeat":"","position_time":"no","ivr_jump":"","ivr_repeat":"","ivr_immediately":"","threshold_time":"","threshold_users":"","threshold_calls":"","missed":"","missed_time_back":"","sort_time":"ASC","contact_timeout":"","contact_url":"https:\/\/","contact_open":"","contact_window":"","form":"","qa_form":"","target":"terminate","target_terminate":"hangup","target_announcement":"2","target_extension":"500","target_voicemail":"","target_signal":"","target_condition":"1","target_context":"-7","target_param":"","target_language":"","target_ivr_menu":"","target_ringgroup":"","target_queue":"1","target_custom":"","crm_ticket_category":""},"deleted":"0","penalty":"0","login":"manual","rt_logged":true}]}}}
Stats calls repeated

Requirement version: 3.9

Action:

StatsCallsRepeated

Returns the same number of calls that are repeated at a specified interval


Mandatory parameters:

datetime_from
From what time to look for calls. Time format YYYY-MM-DD HH:MM:SS
datetime_to
To what time to look for calls. Time format YYYY-MM-DD HH:MM:SS

Optional parameters:

queues
Area ID queues
phonenumber
Phone number
count
Show only telephone numbers, where the number of repeated calls larger (in the excerpt call_total)

Example:

Description:

List the number of repeated calls for a number 226211245 in the time range 2012-10-01 00:00:00 - 2012-10-30 23:59:59

Input:
https://MyPBX.daktela.com/api/3.9/StatsCallsRepeated/json?access_token=1234567890123456789012345678901234567890&datetime_from=2012-10-01 00:00:00&datetime_to=2012-10-30 23:59:59&phonenumber=226211245
Output:
{"status":1,"error":null,"result":[{"clid":"226211245","call_total":45,"call_answered":9,"call_unanswered":36,"waiting_avg":39,"duration_avg":45}]}
List of all calls in a call center

Requirement version: 4.1

Action:

StatsCalls

Listing call centers calls. The maximum limit of returned calls is 1000, after exceeding returns an error.


Mandatory parameters:

datetime_from
From what time to look for calls. Time format YYYY-MM-DD HH:MM:SS
datetime_to
To what time to look for calls. Time format YYYY-MM-DD HH:MM:SS

Optional parameters:

phonenumber
Phone number
queues
Array ID of queues
did
DID number (incoming number to which calls)
callstatus
ID of calling state
answered
Answered call (true | false)
id_call
Unique number of the call
users
Array ID of users
skip
Row offset, default value: 0
take
Row count, default value: 100

Example:

Description:

Look up the calls answered within the time range from 2014-08-14 00:00:00 to 2014-08-31 00:00:00 and ID queue 2

Input:
https://MojeVU.daktela.com/api/4.1/StatsCalls/json?access_token=1234567890123456789012345678901234567890&datetime_from=2014-08-14 00:00:00&datetime_to=2014-08-31 00:00:00&answered=true&queues[]=2&skip=0&take=100
Output:
{"status":1,"error":null,"result":{"data":[{"call":"3718","name":"1408101684.96894WS","call_time":"2014-08-15 13:21:27","direction":"out","answered":"1","queue":"2","user":"4","clid":"468008585","contact":"3","did":"","waiting_time":"4","ringing_time":"4","hold_time":"0","duration":"12","orig_pos":"1","position":"1","disposition_cause":"agent","disconnection_cause":"","pressed_key":null,"score":null,"note":"","attempts":"0","qa_user_id":null},{"call":"3717","name":"1408101613.60440WS","call_time":"2014-08-15 13:20:16","direction":"out","answered":"1","queue":"2","user":"4","clid":"468008585","contact":"3","did":"","waiting_time":"3","ringing_time":"3","hold_time":"0","duration":"6","orig_pos":"1","position":"1","disposition_cause":"agent","disconnection_cause":"","pressed_key":null,"score":null,"note":"","attempts":"0","qa_user_id":null},{"call":"3712","name":"1408009470.20542WS","call_time":"2014-08-14 11:44:33","direction":"out","answered":"1","queue":"2","user":"4","clid":"468008585","contact":"3","did":"","waiting_time":"4","ringing_time":"4","hold_time":"0","duration":"6","orig_pos":"1","position":"1","disposition_cause":"agent","disconnection_cause":"","pressed_key":null,"score":null,"note":"","attempts":"0","qa_user_id":null},{"call":"3711","name":"1408009401.37480WS","call_time":"2014-08-14 11:43:24","direction":"out","answered":"1","queue":"2","user":"4","clid":"468008585","contact":"3","did":"","waiting_time":"4","ringing_time":"4","hold_time":"0","duration":"13","orig_pos":"1","position":"1","disposition_cause":"agent","disconnection_cause":"","pressed_key":null,"score":null,"note":"","attempts":"0","qa_user_id":null},{"call":"3708","name":"1408008186.36","call_time":"2014-08-14 11:23:08","direction":"out","answered":"1","queue":"2","user":"4","clid":"603927227","contact":null,"did":"","waiting_time":"20","ringing_time":"20","hold_time":"0","duration":"13","orig_pos":"1","position":"1","disposition_cause":"caller","disconnection_cause":"","pressed_key":null,"score":null,"note":"","attempts":"0","qa_user_id":null}],"total":"5"}}
Tracing call actions, pauses, queues and logins to callcenter

Requirement version: 3.5

Action:

StatsTrace

Chronologicky vypíše pro daného operátora požadovanou akci, jako je například doba, kdy se uživatel přihlásil nebo odhlásil do Call Centra, fronty, pauzy a také hovory, které na operátora šly


Mandatory parameters:

datetime_from
From whach time to look for actions. Time format YYYY-MM-DD HH:MM:SS
datetime_to
To whach time to look for actions. Time format YYYY-MM-DD HH:MM:SS
user
Login name of user, that want to trace

Optional parameters:

trace
What action want to list. If not specified, all actions will liested (all)
  • all - all actions
  • call - starts and ends of calls, included ringings
  • pause - logins and logouts from pauses
  • queue - logins and logouts from queues
  • login - logins and logouts from call center

Example:

Description:

Listing all actions for the user with login name hajek and timeframe 18.5.2012 - 30.5.2012 The importance of the individual values of the output:

  • time - Date and time when action occured. Time format YYYY-MM-DD HH:MM:SS
  • duration - how many seconds took this action, it is filled only in ending action
  • action_name - name of action (call, pause, queue, login, ring_out, ring_in)
  • action_start - every action musi mit begind and end, so if is set to 1 mean it's begin of action and 0 mean end of action
  • action_title - text description of begin and end action
  • event_id - for every action_name there is meaning:
    • call - Extension or group, where call was answered
    • pause - Pause ID
    • queue - Queue ID
    • ring_in - Incomming call ID
    • ring_out - Extension or group, where outhoing call ringing
    • login - none
  • event_title - for every action_name where is meaning:
    • call - The telephone number which was called
    • pause - Name of pause
    • queue - Name of queue
    • ring_in - Extension or group, where incomming call ringing
    • ring_out - The telephone number which was called
    • login - none
  • time_unixtime - Date and time when action occured, but in UNIX or POSIX time format, mean seconds count from 1.1. 1970.

Input:
http://MyPBX.daktela.com/api/3.5/StatsTrace/json?access_token=1234567890123456789012345678901234567890&datetime_from=2012-05-18%2000:00:00&datetime_to=2012-05-30%2000:00:00&user=hajek&trace=all
Output:
{"status":1,"error":null,"result":[{"time":"2012-05-18 12:33:23","duration":0,"action_name":"login","action_start":"1","action_title":"P\u0159ihl\u00e1\u0161en\u00ed na \u00fast\u0159ednu","event_id":"","event_title":""},{"time":"2012-05-18 12:33:28","duration":0,"action_name":"queue","action_start":"1","action_title":"P\u0159ihl\u00e1\u0161en\u00ed do fronty","event_id":"4","event_title":"Odchozi bez F"},{"time":"2012-05-18 12:34:03","duration":0,"action_name":"ring_out","action_start":"1","action_title":"Za\u010d\u00e1tek vyzv\u00e1n\u011bn\u00ed - Odchod","event_id":"718","event_title":"468008585"},{"time":"2012-05-18 12:34:09","duration":6,"action_name":"ring_out","action_start":"0","action_title":"Konec vyzv\u00e1n\u011bn\u00ed - Odchod","event_id":"718","event_title":"468008585"},{"time":"2012-05-18 12:34:09","duration":0,"action_name":"call","action_start":"1","action_title":"Za\u010d\u00e1tek hovoru","event_id":"718","event_title":"468008585"},{"time":"2012-05-18 12:34:58","duration":49,"action_name":"call","action_start":"0","action_title":"Konec hovoru","event_id":"718","event_title":"468008585"},{"time":"2012-05-18 12:35:08","duration":0,"action_name":"ring_out","action_start":"1","action_title":"Za\u010d\u00e1tek vyzv\u00e1n\u011bn\u00ed - Odchod","event_id":"720","event_title":"468008585"},{"time":"2012-05-18 12:35:13","duration":5,"action_name":"ring_out","action_start":"0","action_title":"Konec vyzv\u00e1n\u011bn\u00ed - Odchod","event_id":"720","event_title":"468008585"},{"time":"2012-05-18 12:35:13","duration":0,"action_name":"call","action_start":"1","action_title":"Za\u010d\u00e1tek hovoru","event_id":"720","event_title":"468008585"},{"time":"2012-05-18 12:35:31","duration":0,"action_name":"ring_out","action_start":"1","action_title":"Za\u010d\u00e1tek vyzv\u00e1n\u011bn\u00ed - Odchod","event_id":"719","event_title":"603927227"},{"time":"2012-05-18 12:35:40","duration":9,"action_name":"ring_out","action_start":"0","action_title":"Konec vyzv\u00e1n\u011bn\u00ed - Odchod","event_id":"719","event_title":"603927227"},{"time":"2012-05-18 12:35:40","duration":0,"action_name":"call","action_start":"1","action_title":"Za\u010d\u00e1tek hovoru","event_id":"719","event_title":"603927227"},{"time":"2012-05-18 12:36:03","duration":23,"action_name":"call","action_start":"0","action_title":"Konec hovoru","event_id":"719","event_title":"603927227"},{"time":"2012-05-18 12:36:03","duration":0,"action_name":"pause","action_start":"1","action_title":"Za\u010d\u00e1tek pauzy","event_id":"2","event_title":"Wrap"},{"time":"2012-05-18 12:36:14","duration":11,"action_name":"pause","action_start":"0","action_title":"Konec pauzy","event_id":"2","event_title":"Wrap"},{"time":"2012-05-18 12:36:31","duration":78,"action_name":"call","action_start":"0","action_title":"Konec hovoru","event_id":"720","event_title":"468008585"}]}
Stats user's logins on pauses

Requirement version: 4.1

Action:

StatsUsersPauses

Chronological lists of user's logins on pauses


Mandatory parameters:

datetime_from
From what time to look for logins on pauses. Time format YYYY-MM-DD HH:MM:SS
datetime_to
To what time to look for logins on pauses. Time format YYYY-MM-DD HH:MM:SS

Optional parameters:

users
array ID users
pauses
array ID of pauses.
skip
Row offset, default value: 0
take
Row count, default value: 100

Example:

Description:

Chronological lists of login users with ID 1 in the time range 2012-08-01 00:00:00 - 2014-10-30 23:59:59

Input:
https://MyPBX.daktela.com/api/4.1/StatsUsersPauses/json?access_token=1234567890123456789012345678901234567890&datetime_from=2012-08-01 00:00:00&datetime_to=2014-10-30 23:59:59&users[]=1&skip=0&take=100
Output:
{"status":1,"error":null,"result":{"data":[{"id":"1052","user":"1","start_time":"2014-08-05 13:21:33","end_time":"2014-08-05 13:21:43","duration":10,"pause":2},{"id":"1053","user":"1","start_time":"2014-08-05 13:50:51","end_time":"2014-08-05 13:50:56","duration":5,"pause":2},{"id":"1055","user":"1","start_time":"2014-08-05 14:00:18","end_time":"2014-08-05 14:00:28","duration":10,"pause":2}],"total":"135"}}
Stats user's logins to queues

Requirement version: 4.1

Action:

StatsUsersQueues

Chronological lists of user's logins in a queues


Mandatory parameters:

datetime_from
From what time to look for logins to queues. Time format YYYY-MM-DD HH:MM:SS
datetime_to
To what time to look for logins to queues. Time format YYYY-MM-DD HH:MM:SS

Optional parameters:

users
array ID users
skip
Row offset, default value: 0
take
Row count, default value: 100

Example:

Description:

Chronological lists of login users with ID 1 in the time range 2012-08-01 00:00:00 - 2012-10-30 23:59:59

Input:
https://MyPBX.daktela.com/api/4.1/StatsUsersQueues/json?access_token=1234567890123456789012345678901234567890&datetime_from=2012-08-01 00:00:00&datetime_to=2012-10-30 23:59:59&users[]=1&skip=0&take=100
Output:
{"status":1,"error":null,"result":{"data":[{"user":"1","start_time":"2014-08-14 13:35:07","end_time":"2014-09-09 14:55:20","duration":2251213,"queue":5},{"user":"1","start_time":"2014-08-21 14:03:39","end_time":"2014-09-09 14:55:21","duration":1644702,"queue":3},{"user":"1","start_time":"2014-09-02 14:37:57","end_time":"2014-09-09 14:55:22","duration":605845,"queue":4}],"total":10}}
Stats users sessions

Requirement version: 4.1

Action:

StatsUsersSessions

Chronological lists of login users in a call center


Mandatory parameters:

datetime_from
From what time to look for calls. Time format YYYY-MM-DD HH:MM:SS
datetime_to
To what time to look for calls. Time format YYYY-MM-DD HH:MM:SS

Optional parameters:

users
array ID users
skip
Row offset, default value: 0
take
Row count, default value: 100

Example:

Description:

Chronological lists of login users with ID 3 in the time range 2012-10-01 00:00:00 - 2014-10-30 23:59:59

Input:
https://MyPBX.daktela.com/api/4.1/StatsUsersSessions/json?datetime_from=2012-01-01%2000:00:00&datetime_to=2014-10-30%2023:59:59&users[]=3&skip=0&take=3
Output:
{"status":1,"error":null,"result":{"data":[{"id":"1","user":"3","start_time":"2013-01-08 10:51:04","end_time":"2013-01-08 10:51:42","duration":38},{"id":"5","user":"3","start_time":"2013-01-30 12:13:28","end_time":"2013-01-30 12:14:06","duration":38},{"id":"9","user":"3","start_time":"2013-02-03 10:00:40","end_time":"2013-02-03 10:01:19","duration":39}],"total":"7"}}

SMS


Get options for the hosted SMS gateway

Requirement version: 3.1

Action:

GetSMSSettings

You get a URL and email callbacks when incoming and outgoing SMS messages, times when you can send SMS messages and the number of messages sent per time period.


Example:

Description:

Get parameters

Input:
http://api.daktela.com/api/3.1/GetSMSSettings/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"settings":{"billing_id":"674","enabled_sms":"CONNECT","outgoing_price":"0.000","incoming_callback":null,"outgoing_callback":null,"incoming_email":null,"outgoing_email":null,"email_notification_allow":"in,out,confirmed","sending_rate_limit":"0","sending_rate_time":"0","allowed_hour_begin":"0","allowed_hour_end":"0","sending_rate_limit_admin":"1000","sending_rate_time_admin":"86400","lang":"cs_CZ","connect_sender":null},"sim":[]}}
Returns all SMS, with search option

Requirement version: 3.1

Action:

GetSMS

If search parameters is omitted, returns all SMS ordered by date (from oldest to newest). You can search by MSISDN, text in message, gateway number, slo number, port number. If result contains "error", then in code_error is hex error code, see list of all error states for details


Optional parameters:

id
ID specific SMS message
direction
Only incoming (in) or outgoing (out) messages.
keyword
Search via MSISDN or text in messages.
accountcode
Optional message identification at outgoing message. You may pass the array, if you need more accoutcodes.
email
Optional field email, if was set along outgoing message.
gw
Only messages sent via this gateway
slot
Only messages sent via this slot
port
Only messages sent via this port
datetime_from
Start date and time in format YYYY-MM-DD HH:MM:SS
datetime_to
End date and time in format YYYY-MM-DD HH:MM:SS

Important: Please note that Daktela retention period for SMS messages is set to 6 months. SMS messages older then 6 months will be deleted automatically.


Example:

Description:

Get all SMS with text 'ahoj'

Input:
https://api.daktela.com/api/3.1/GetSMS/json?access_token=1234567890123456789012345678901234567890&keyword=ahoj
Output:
{"status":1,"error":null,"result":[{"id":"7180","billing_id":"259","direction":"out","datetime":"2011-10-11 01:07:01","datetime_processed":"2011-10-10 23:07:26","number":"603927227","attempts":"0","count_sms":"1","from_client":"","message":"Ahoj toto je jen na ukazku","result":"error","confirmation_enable":"1","confirmed":"0","price":"0.000","gw_number":"1","slot_number":"1","port_number":"2","accountcode":null,"email":null},{"id":"7178","billing_id":"259","direction":"out","datetime":"2011-10-10 17:25:19","datetime_processed":"2011-10-10 15:27:03","number":"603927227","attempts":"0","count_sms":"1","from_client":"","message":"Ahoj,jak se mas?","result":"ok","confirmation_enable":"1","confirmed":"1","price":"3.500","gw_number":"1","slot_number":"1","port_number":"1","accountcode":null,"email":null}]}
Cancel sending group SMS

Requirement version: 3.1

Action:

RemoveGroupSMS

Cancels sending all group SMS in waiting state. Returns count of cancelled SMS messages.


Mandatory parameters:

id
ID group SMS message (group_id)

Example:

Description:

Cancel group SMS messages with ID 1234

Input:
https://api.daktela.com/api/3.1/RemoveGroupSMS/1234/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"count_removed":2}}
Send Group SMS

Requirement version: 3.1

Action:

SendGroupSMS

Send group SMS via hosting gateway. Max limit is 20.000 messages. If you own more SIM cards, they're used cyclic.


Mandatory parameters:

number
Array with MSISDNs to send SMS. Max limit is 20.000 messages.
message
Array with SMS message. One SMS is limited to 160 characters, if more characters is specified, message will be split into more SMS. Maximum length is 1377 characters (utf8 603). Max limit is 20.000 messages.

Optional parameters:

confirmation
Message delivery report. You need to have set URL callback or email address, where notification is send.
unicode
SMS message is in unicode. Maximum length of one SMS is shortned to 70 characters. If is not unicode set, message is automatically converted to ASCII characters.
email
Email where delivery notification is send to.
accountcode
Optional message ID, which is send in URL callback.
priority
Priority. Range is 0 (low) to 20 (high). Default is 10.
datetime_scheduled
Scheduled date and time for your message. Format YYYY-MM-DD HH:MM:SS

Example:

Description:

We want to send group SMS to 123456789 whith text 'Ahoj' and simultaneously to 987654321 with text 'Cau' without delivery report. count_sms is set to count of sent messages.

Input:
https://api.daktela.com/api/3.1/SendGroupSMS/json?number[0]=123456789&message[0]=Ahoj1&number[1]=987654321&message[1]=Ahoj2&access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"2445":{"count_sms":0,"id":2445,"group_id":2445},"2446":{"count_sms":1,"id":2446,"group_id":2445},"2447":{"count_sms":1,"id":2447,"group_id":2445}}}
Send SMS message

Requirement version: 3.1

Action:

SendSMS

Send SMS via hosting gateway. If you own more SIM cards, they're used cyclic.


Mandatory parameters:

number
MSISDN
message
SMS message. One SMS is limited to 160 characters, if more characters is specified, message will be split into more SMS. Maximum length is 1377 (utf8 603) characters.

Optional parameters:

confirmation
Message delivery report. You need to have set URL callback or email address, where notification is send.
unicode
SMS message is in unicode. Maximum length of one SMS is shortned to 70 characters. If is not unicode set, message is automatically converted to ASCII characters.
email
Email where delivery notification is send to.
accountcode
Optional message ID, which is send in URL callback.
gw
Gateway number which is used to send sms, if there are more SIM cards. For use you need specify gw, slot and port.
slot
Slot number which is used to send sms, if there are more SIM cards. For use you need specify gw, slot and port.
port
Port number which is used to send sms, if there are more SIM cards. For use you need specify gw, slot and port.
priority
Priority. Range is 0 (low) to 20 (high). Default is 10.
datetime_scheduled
Scheduled date and time for your message. Format YYYY-MM-DD HH:MM:SS

Example:

Description:

Send SMS to 123456789 without delivery report. count_sms is set to number of sent messages.

Input:
https://api.daktela.com/api/3.1/SendSMS/json?number=123456789&message=Ahoj&access_token=1234567890123456789012345678901234567890
Output:
{"error":null,"status":1,"result":{"count_sms":"1", "id":"2222"}}
Description:

Send SMS with delivery report (you have to set url callback or email) and accountcode.

Input:
https://api.daktela.com/api/3.1/SendSMS/json?number=123456789&message=Ahoj&access_token=1234567890123456789012345678901234567890&confirmation=yes&accountcode=ID12345
Output:
{"error":null,"status":1,"result":{"count_sms":"1", "id":"2222"}}
Optional settings for hosting SMS gateway.

Requirement version: 3.1

Action:

SetSMSSettings

You can set incoming or outgoing URL callback, which is called when SMS is sent or received. You can also specify email, where is message send to. URL can contain credentials for Basic Authorizaci (htaccess). For exmaple http://login:password@pbx.in:8080/path


Optional parameters:

incoming_callback
URL to notify all incoming SMS messages.
outgoing_callback
URL to notify all outgoing SMS messages, including DLR
incoming_email
Email to notify all incoming SMS messages.
outgoing_email
Email to notify all outgoing SMS messages, including DLR
sending_rate_limit
Send message limit. You need also specify sending_rate_time. Restriction is applied only for messages sent individualy (via function SendSMS). Set to 0 for disable.
sending_rate_time
Limit time in seconds. You need also specify sending_rate_limit. . Restriction is applied only for messages sent individualy (via function SendSMS). Set to 0 for disable.
allowed_hour_begin
First hour, when messages can be send. Messages out of this interval will be saved on the server and send when the interval is on time. Set to 0 for disable.
allowed_hour_end
Last hour, when messages can be send. Messages out of this interval will be saved on the server and send when the interval is on time. Set to 0 for disable.

Example:

Description:

Set incoming URL callbacku to http://callback.daktela.com/CRM/sms

Input:
https://api.daktela.com/api/3.1/SetSMSSettings/json?access_token=1234567890123456789012345678901234567890&incoming_callback=http://MojeVU.daktela.com/CRM/sms
Output:
{"error":null,"status":1}
Description:

Set incoming URL callbacku to http://callback.daktela.com/CRM/sms, with user named parameters (rest of them will be added to the end of url)

Input:
https://api.daktela.com/api/3.1/SetSMSSettings/json?access_token=1234567890123456789012345678901234567890&incoming_callback=http://MojeVU.daktela.com/CRM/sms?own_number=$number&own_text=$message&own_id=$id&own_direction=$direction
Output:
{"error":null,"status":1}
Description:

Limit sending time to 8:00am-4:59pm

Input:
https://api.daktela.com/api/3.1/SetSMSSettings/json?access_token=1234567890123456789012345678901234567890&allowed_hour_begin=8&allowed_hour_end=16
Output:
{"error":null,"status":1}
Info about sent group SMS messages

Requirement version: 3.1

Action:

StatusGroupSMS

Returns sent/wating/error message counts


Optional parameters:

id
ID specific group SMS message (group_id)
waiting
Set true when you need information only about waiting messages

Example:

Description:

Get information about group messages count in waiting status Returned values are:

  • group_id - ID group SMS
  • accountcode - Optional identicator, if been set on send
  • datetime_processed - Date last sent/processed SMS message
  • datetime - Date when request was created
  • count_total - Total count SMS messages
  • count_ok - Count of send SMS messages
  • count_waiting - Count of waiting SMS messages
  • count_error - Count of error SMS messages

Input:
https://api.daktela.com/api/3.1/StatusGroupSMS/json?access_token=1234567890123456789012345678901234567890&waiting=true
Output:
{"status":1,"error":null,"result":{"11213":{"group_id":"11213","accountcode":"1","datetime_processed":"2012-04-14 02:43:39","datetime":"2012-04-14 02:43:33","count_total":"3","count_ok":"1","count_waiting":"2","count_error":"0"}}}
Total count of SMS to send

Requirement version: 3.1

Action:

StatusSMS

Returns total count of SMS to send and last sent SMS date


Example:

Description:

Returned values are:

  • count_waiting - number of messages in waiting state
  • last_datetime_processed - date and time last successfully sent message (without confirmed delivery request)

Input:
https://api.daktela.com/api/3.1/StatusSMS/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"count_waiting":"3963","last_datetime_processed":"2013-08-06 16:35:26"}}

SMSConnect


Returns all SMS, with search option

Requirement version: 4.1

Action:

GetSMSConnect

If search parameters is omitted, returns all SMS ordered by date (from oldest to newest).
Result of messages

  • NEW - message wait for sent
  • SENT - message sent
  • DELIVERED - message delivered. Date and time update attribute datetime_delivered. (parameter confirmation must be set)
  • NOTDELIVERED - message not delivered. Number maybe not exist or ban. Date and time update attribute datetime_notdelivered. (parameter confirmation must be set)
  • EXPIRED - message sent to exist number, but expired on SMS center. Date and time update attribute datetime_notdelivered. (parameter confirmation must be set)
  • ERROR - internal error
  • FORBIDDEN - block message (wrong SMS campaign)


Optional parameters:

id
ID specific SMS message
direction
Only incoming (in) or outgoing (out) messages.
keyword
Search via MSISDN or text in messages.
datetime_from
Start date and time in format YYYY-MM-DD HH:MM:SS
datetime_to
End date and time in format YYYY-MM-DD HH:MM:SS
accountcode
Optional message identification at outgoing message. You may pass the array, if you need more accoutcodes.

Important: Please note that Daktela retention period for SMS messages is set to 6 months. SMS messages older then 6 months will be deleted automatically.


Example:

Description:

Get all SMS with text 'ahoj'

Input:
https://api.daktela.com/api/4.1/GetSMSConnect/json?access_token=1234567890123456789012345678901234567890&keyword=ahoj
Output:
{"status":1,"error":null,"result":{"16":{"id":"16","message_id":"013000000009689Bulk_000000bc","billing_id":"987","direction":"OUT","result":"SENT","datetime":"2014-09-01 15:00:40","datetime_sent":"2014-09-01 15:00:41","datetime_delivered":null,"datetime_billed":null,"sender":null,"recipient":"00420123456789","price":"0.590","message":"Ahoj","sms_encoding":"UTF8","count_sms":"1","request_dlr":"0","attempts":"0","group_id":null}}}
Get options for the hosted SMS gateway

Requirement version: 3.1

Action:

GetSMSSettings

You get a URL and email callbacks when incoming and outgoing SMS messages, times when you can send SMS messages and the number of messages sent per time period.


Example:

Description:

Get parameters

Input:
http://api.daktela.com/api/3.1/GetSMSSettings/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"settings":{"billing_id":"674","enabled_sms":"CONNECT","outgoing_price":"0.000","incoming_callback":null,"outgoing_callback":null,"incoming_email":null,"outgoing_email":null,"email_notification_allow":"in,out,confirmed","sending_rate_limit":"0","sending_rate_time":"0","allowed_hour_begin":"0","allowed_hour_end":"0","sending_rate_limit_admin":"1000","sending_rate_time_admin":"86400","lang":"cs_CZ","connect_sender":null},"sim":[]}}
Send Group SMS

Requirement version: 3.1

Action:

SendGroupSMSConnect

Send group SMS via hosting gateway. Max limit is 20.000 messages.


Mandatory parameters:

number
Array with MSISDNs to send SMS. Max limit is 20.000 messages.
message
Array with SMS message. One SMS is limited to 160 characters, if more characters is specified, message will be split into more SMS. Maximum length is 1377 (utf8 603) characters . Max limit is 20.000 messages.

Optional parameters:

confirmation
Message delivery report. You need to have set URL callback or email address, where notification is send.
accountcode
Optional message ID, which is send in URL callback.
priority
Priority. Range is 0 (low) to 20 (high). Default is 10.
datetime_scheduled
Scheduled date and time for your message. Format YYYY-MM-DD HH:MM:SS
sender
Outbound identification. This identification must be allowed. Default is Info.

Example:

Description:

We want to send group SMS to 123456789 whith text 'Ahoj' and simultaneously to 987654321 with text 'Cau' without delivery report. count_sms is set to count of sent messages.

Input:
https://api.daktela.com/api/3.1/SendGroupSMS/json?number[0]=123456789&message[0]=Ahoj1&number[1]=987654321&message[1]=Ahoj2&access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"2445":{"count_sms":0,"id":2445,"group_id":2445},"2446":{"count_sms":1,"id":2446,"group_id":2445},"2447":{"count_sms":1,"id":2447,"group_id":2445}}}
Sends SMS message

Requirement version: 4.1

Action:

SendSMSConnect

Sends SMS message


Mandatory parameters:

number
Recipient's number, in format +420xxx
message
SMS message. One SMS is limited to 160 characters, if more characters is specified, message will be split into more SMS. Maximum length is 1377 (utf8 603) characters.

Optional parameters:

confirmation
Message delivery report. You need to have set URL callback or email address, where notification is send.
priority
Priority. Range is 0 (low) to 20 (high). Default is 10.
accountcode
Optional message ID, which is send in URL callback.
datetime_scheduled
Scheduled date and time for your message. Format YYYY-MM-DD HH:MM:SS
sender
Outbound identification. This identification must be allowed. Default is Info.
unicode
SMS message is in unicode. Maximum length of one SMS is shortned to 70 characters. If is not unicode set, message is automatically converted to ASCII characters.

Example:

Description:

Send SMS to 123456789 without delivery report. count_sms is set to number of sent messages.

Input:
https://api.daktela.com/api/4.1/SendSMSConnect/json?number=%2B420123456789&message=Ahoj&access_token=1234567890123456789012345678901234567890
Output:
{"error":null,"status":1,"result":{"id":"2222"}}
Optional settings for hosting SMS gateway.

Requirement version: 3.1

Action:

SetSMSSettings

You can set incoming or outgoing URL callback, which is called when SMS is sent or received. You can also specify email, where is message send to. URL can contain credentials for Basic Authorizaci (htaccess). For exmaple http://login:password@pbx.in:8080/path


Optional parameters:

incoming_callback
URL to notify all incoming SMS messages.
outgoing_callback
URL to notify all outgoing SMS messages, including DLR
incoming_email
Email to notify all incoming SMS messages.
outgoing_email
Email to notify all outgoing SMS messages, including DLR
sending_rate_limit
Send message limit. You need also specify sending_rate_time. Restriction is applied only for messages sent individualy (via function SendSMS). Set to 0 for disable.
sending_rate_time
Limit time in seconds. You need also specify sending_rate_limit. . Restriction is applied only for messages sent individualy (via function SendSMS). Set to 0 for disable.
allowed_hour_begin
First hour, when messages can be send. Messages out of this interval will be saved on the server and send when the interval is on time. Set to 0 for disable.
allowed_hour_end
Last hour, when messages can be send. Messages out of this interval will be saved on the server and send when the interval is on time. Set to 0 for disable.

Example:

Description:

Set incoming URL callbacku to http://callback.daktela.com/CRM/sms

Input:
https://api.daktela.com/api/3.1/SetSMSSettings/json?access_token=1234567890123456789012345678901234567890&incoming_callback=http://MojeVU.daktela.com/CRM/sms
Output:
{"error":null,"status":1}
Description:

Set incoming URL callbacku to http://callback.daktela.com/CRM/sms, with user named parameters (rest of them will be added to the end of url)

Input:
https://api.daktela.com/api/3.1/SetSMSSettings/json?access_token=1234567890123456789012345678901234567890&incoming_callback=http://MojeVU.daktela.com/CRM/sms?own_number=$number&own_text=$message&own_id=$id&own_direction=$direction
Output:
{"error":null,"status":1}
Description:

Limit sending time to 8:00am-4:59pm

Input:
https://api.daktela.com/api/3.1/SetSMSSettings/json?access_token=1234567890123456789012345678901234567890&allowed_hour_begin=8&allowed_hour_end=16
Output:
{"error":null,"status":1}
Total count of SMS to send

Requirement version: 4.1

Action:

StatusSMSConnect

Returns total count of SMS to send


Example:

Description:

Returned values are:

  • count_waiting - number of messages in waiting state

Input:
https://api.daktela.com/api/4.1/StatusSMSConnect/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"count_waiting":"3963"}}

Forms


Call script close

Requirement version: 4.0

Action:

CallScriptClose

Saves and closes open call script by operator, including logout from WRAP pause.


Mandatory parameters:

record
item ID (call_id is not mandatory then)
call_id
Unique call id, which is bind to open item (record is not mandatory then)

Optional parameters:

status
Unique status name, which is set to. State must be set for first call entry.
number
Set phone number
nextcall
Set date and time to next call, in format YYYY-MM-DD HH:MM:SS
user
Set operator's login name. Suitable when another operator have to work on this item. Keep blank to release current operator.
fields
Array optional form's inputs to set. Array key is unique input's name.
pause
Unique pause name, which is se to from WRAP after form is saved. If not specified, user will be logged off from WRAP pause.

Example:

Description:

Operator wit login 'novak' we have open call script with unique call id 1367484976.46040WS. We want this call script to close as done with unique status 'objednavka'. After save call script logs out operator from pause.

Input:
https://MojeVU.daktela.com/api/4.0/CallScriptClose/json?access_token=1234567890123456789012345678901234567890&call_id=1367484976.46040WS&status=objednavka
Output:
{"status":1,"error":null,"result":{"record":{"record":67,"user":"1","queue":"5","name":"record_5266716a6fa61","title":"226211245","number":"226211245","nextcall":null,"status":"4","action":5,"call_id":"1367484976.46040WS","edited":"2013-11-29 17:11:52","created":"2013-10-22 14:36:58","deleted":"0","changes":{"fields":false,"record_snapshots":false}},"cc":{"result":true,"error":null}}}
Description:

operator with login name 'novak' we have open call script with unique call id 1367484976.46041WS. Close this call script with replan to 2013-12-01 18:00:00 with unique state name 'zavolat_pozdeji_rozmysli'. In form is input with unique name 'field_poznamka', set it to 'Nabidku slysel'. After save call script switch on pause with unique status 'obed'.

Input:
https://MojeVU.daktela.com/api/4.0/CallScriptClose/json?access_token=1234567890123456789012345678901234567890&call_id=1367484976.4601WS&status=zavolat_pozdeji_rozmysli&nextcall=2013-12-01 18:00:00&pause=obed&fields[field_poznamka]=Nabidku slysel
Output:
{"status":1,"error":null,"result":{"record":{"record":68,"user":"1","queue":"5","name":"record_5266716a6fa61","title":"226211245","number":"226211245","nextcall":null,"status":"4","action":6,"call_id":"1367484976.46041WS","edited":"2013-11-29 19:11:52","created":"2013-10-22 15:36:58","deleted":"0","changes":{"fields":false,"record_snapshots":false}},"cc":{"result":true,"error":null}}}
Description:

Returned values are:

  • record - information (object) about call script after close (only informatory)
  • cc - information about call centre operator's status during pause switch after saving call script.
    • result - pause switch was successful (or logout from pause)
    • error - text information, why switch wasn't successful

Input:
https://MojeVU.daktela.com/api/4.0/CallScriptClose/json?access_token=1234567890123456789012345678901234567890&call_id=1367484976.46040WS&status=objednavka&pause=pause_20&
Output:
{"status":1,"error":null,"result":{"record":{"record":66,"user":"1","queue":"5","name":"record_5266716a6fa61","title":"226211245","number":"226211245","nextcall":null,"status":"4","action":5,"call_id":"1111","edited":"2013-11-29 18:45:40","created":"2013-10-22 14:36:58","deleted":"0","changes":{"fields":false,"record_snapshots":false}},"cc":{"result":false,"error":"Agent nen\u00ed p\u0159ihl\u00e1\u0161en do \u017e\u00e1dn\u00e9 z front, tedy nen\u00ed mo\u017en\u00e9 ho d\u00e1t na pauzu"}}}
Information about open call script

Requirement version: 4.0

Action:

CallScriptOpened

Returns information about open call script. Open forms protects release from pause or logout from call centre, so these forms have to be closed.


Mandatory parameters:

user
Operator's login name

Example:

Description:

Information about open call script

Input:
https://MojeVU.daktela.com/api/4.0/CallScriptOpened/json?access_token=1234567890123456789012345678901234567890&user=daktelatester
Output:
{"status":1,"error":null,"result":{"record":{"record":"62","user":"3","queue":"3","name":"record_5284b0d39f93d","title":"Hovor 468008589","number":"468008589","nextcall":null,"status":"8","action":"4","call_id":"1385987312.20","edited":"2013-12-02 13:28:32","created":"2013-11-14 12:15:31","deleted":"0","changes":{"fields":false,"record_snapshots":false}},"fields":{"2":{"field":"2","type":"text","name":"field_5283f87c364f0","title":"P\u0159\u00edjmen\u00ed","description":"","multiple":"0","fieldset":null,"pattern":"","col":null,"deleted":"0","required":null,"position":null,"free":null,"object":{"field":null,"error":null},"options":null,"value":["Evropa 58"],"time":"2013-11-20 17:09:56","user":"3","version":"1"}}}}
Description:

No opened forms

Input:
https://MojeVU.daktela.com/api/4.0/CallScriptOpened/json?access_token=1234567890123456789012345678901234567890&user=daktelatester
Output:
{"status":1,"error":null,"result":{"record":null}}
Copy a record from the one campaign to the other.

Requirement version: 3.3

Action:

CopyRecords

By the searched criteria it will filter records from the one campaign and copy them to the other campaign.


Mandatory parameters:

id
ID of the record you want to copy (you don't have to pass the mandatory parameter src_queue).
src_queue
A number of the queue you want to search for the items (you don't have to pass the mandatory parameter id).
dst_queue
A number of the queue into which you want to copy the searched items.

Optional parameters:

search_datetime_modify_from
From which date and time to filter the last record's change in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
search_datetime_modify_to
To which date and time to filter the last record's change in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
search_datetime_nextcall_from
From which date and time to filter the scheduled calls in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
search_datetime_nextcall_to
To which date and time to filter the scheduled calls in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
search_datetime_created_from
From which date and time to filter the creation of record in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
search_datetime_created_to
To which date and time to filter the creation of record in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
update_action
Pass to determine in which action should be the newly copied records. If not specified, the unchanged action from the original campaign will be used.
  • 0 - free
  • 5 - form is saved and done
  • 6 - form is scheduled for later (update_datetime_nextcall should be passed)
update_callstatus
Pass to determine in which ID of state of the call should be the newly copied records. If not specified, the unchanged ID of state from the original campaign will be used. Leave this parameter empty to free the state.
update_agent
Pass to determine whom ID of user should assign the newly copied records. If not specified, the unchanged ID of user from the original campaign will be used. Leave this parameter empty to free the user.
update_datetime_nextcall
Pass to determine to which date and time to schedule a calls.
update_datetime_modify
Pass to determine if should change the date of the last modification in the target campaign during the copying. The allowed values are as folows: yes / no

Example:

Description:

Copy the record with ID 9 (we don't have to know in which campaign it is) to the campaign No. 2009. All system items like callstatus, agent, actions with numbers will NOT be changed.

Input:
http://MojeVU.daktela.com/api/3.3/CopyRecords/json?access_token=1234567890123456789012345678901234567890&id=9&dst_queue=2003
Output:
{"status":1,"error":null,"result":null}
Description:

Input:
http://MojeVU.daktela.com/api/3.3/CopyRecords/json?access_token=1234567890123456789012345678901234567890&src_queue=2003&dst_queue=2009&search_datetime_modify_from=2013-01-11%2000:00:00&search_datetime_modify_to=2013-01-16%2023:59:59&update_agent=&update_action=0
Output:
{"status":1,"error":null,"result":null}
Import one record into the outbounder campaign.

Requirement version: 4.1

Action:

CreateRecord

Import a data of one record into the outbounder campaign. Remember, when the structure of that campaign has been changed, e.g. adding or other dislocation of the data items, it is necessary to adjust the call of this API.


Mandatory parameters:

queue
A queue's ID or a campaign into which you want to import a record.
phonenumber
A phone number you want to import.

Optional parameters:

fields
An array of values of optional items you want to import. A key in the array is an ID of the optional item. If there are no specified all items in the form, then the missing ones are replaced with an empty string.
user
Pass if you want to assign an imported contact to the specific user ID. Contacts imported by this way will be called only by that user.
nextcall
Pass if you want to specify the date since the imported contacts should be called. The format is as folows: YYYY-MM-DD HH:MM:SS

Example:

Description:

Import a contact with the following phone number 226211245 with the item of the form called Name (it has an ID 3)

Input:
http://MyPBX.daktela.com/api/4.1/CreateRecord/json?access_token=1234567890123456789012345678901234567890&queue=2003&fields[3]=Tohle%20je%20importovano%20pres%20API&phonenumber=226211245
Output:
{"status":1,"error":null,"result":{"count":1,"record":{"record":47,"user":null,"queue":"1","name":"record_53e8cf5a6ee77","title":"226211245","number":"226211245","nextcall":null,"status":null,"action":0,"call_id":null,"edited":null,"created":"2014-08-11 16:12:42","deleted":0,"changes":{"fields":false,"record_snapshots":false}}}}
Delete record.

Requirement version: 4.1

Action:

DeleteRecord

Deletes a record.


Mandatory parameters:

record
Record's ID

Example:

Description:

Deletes a record.

Input:
https://MyPBX.daktela.com/api/4.1/DeleteRecord/json?access_token=1234567890123456789012345678901234567890&record=64
Output:
{"status":1,"error":null,"result":1}
Export form data

Requirement version: 3.8

Action:

ExportData

Exports form data from campaign by search fields.


Mandatory parameters:

queue
Queue number where export is made

Optional parameters:

datetime_modify_from
Entry's last change is from this date and time. Format: YYYY-MM-DD HH:MM:SS (If not specified, export all)
datetime_modify_to
Entry's last change is up to this date and time. Format: YYYY-MM-DD HH:MM:SS (If not specified, export all)
datetime_nextcall_from
Entry's next call is from this date and time. Format: YYYY-MM-DD HH:MM:SS (If not specified, export all)
datetime_nextcall_to
Entry's next call is up to this date and time. Format: YYYY-MM-DD HH:MM:SS (If not specified, export all)
datetime_created_from
Entry's create is from this date and time. Format: YYYY-MM-DD HH:MM:SS (If not specified, export all)
datetime_created_to
Entry's create is up to this date and time. Format: YYYY-MM-DD HH:MM:SS (If not specified, export all)
actions
Array od actions (If not specified, export all)
  • 0 - empty
  • 1,2,3 - form loaded by operator
  • 4 - form before save
  • 5 - form is saved and done
  • 6 - form is on hold
callstatuses
Array of ID calling states (If not specified, export all)
agents
Array if ID agents (If not specified, export all)
phonenumber
Phone number, which is in form's phone number (If not specified, export all)

Example:

Description:

Export form data from campaign number 2003, for agent with ID 1 or ID 2

Input:
https://MojeVU.daktela.com/api/3.8/ExportData/json?access_token=1234567890123456789012345678901234567890&queue=2003&agents[]=1&agents[]=2
Output:
{"status":1,"error":null,"result":[{"sysdata_number":{"label":"Tel.\u010d\u00edslo","value":"226211245","id":"sysdata_number"},"sysdata_date":{"label":"Datum","value":"28.08.2012 16:20:17","id":"sysdata_date"},"sysdata_date_nextcall":{"label":"Datum p\u0159\u00ed\u0161t\u00edho vol\u00e1n\u00ed","value":"28.08.2012 16:20:11","id":"sysdata_date_nextcall"},"sysdata_date_create":{"label":"Datum vytvo\u0159en\u00ed","value":"27.08.2012 11:13:52","id":"sysdata_date_create"},"sysdata_callstatus":{"label":"Stav hovoru","value":null,"id":"sysdata_callstatus"},"sysdata_action":{"label":"Akce s \u010d\u00edsly","value":"odlo\u017een\u00e1 na pozd\u011bji","id":"sysdata_action"},"sysdata_action_number":{"label":"Akce s \u010d\u00edsly \u010d\u00edslo","value":"6","id":"sysdata_action_number"},"sysdata_asterisk_uniqueid":{"label":"Unik\u00e1tn\u00ed \u010d\u00edslo hovoru","value":null,"id":"sysdata_asterisk_uniqueid"},"sysdata_asterisk_recording":{"label":"Nahr\u00e1vka hovoru","value":null,"id":"sysdata_asterisk_recording"},"sysdata_agent_id":{"label":"Agent ID","value":"1","id":"sysdata_agent_id"},"sysdata_agent_login":{"label":"Agent login","value":"admin","id":"sysdata_agent_login"},"sysdata_agent_name":{"label":"Jm\u00e9no agenta","value":"Administrator","id":"sysdata_agent_name"},"sysdata_id":{"label":"ID","value":"318","id":"sysdata_id"},"data_1":{"label":"Jm\u00e9no","value":"Michal","id":"data_1"},"data_4":{"label":"Adresa","value":"Nemcice","id":"data_4"},"data_5":{"label":"PS\u010c","value":"12345","id":"data_5"}}]}
Record's call counts

Requirement version: 4.1

Action:

GetRecordAttempts

Get record's answered and unanswered calls count


Mandatory parameters:

record
record's ID

Example:

Description:

Get record's answered and unanswered calls count

Input:
https://MyPBX.daktela.com/api/4.1/GetRecordAttempts/json?access_token=1234567890123456789012345678901234567890&record=5
Output:
{"status":1,"error":null,"result":{"count_answered":"3","count_unanswered":"1","last_datetime":"2014-04-17 13:45:13"}}
Get record's snapshots.

Requirement version: 4.1

Action:

GetRecordSnapshots

Get record's snapshots.


Mandatory parameters:

record
record's ID

Example:

Description:

Gets record's snapshots.

Input:
https://MyPBX.daktela.com/api/4.1/GetRecordSnapshots/json?access_token=1234567890123456789012345678901234567890&record=51
Output:
{"status":1,"error":null,"result":{"data":[{"record_snapshot":"173","record":"51","user":null,"queue":"1","name":"record_53ea24732cd62","title":"800123456","number":"800123456","nextcall":null,"status":null,"action":"0","call_id":"","created":"2014-08-12 16:28:03","created_by":null,"fields":{"1":["42"]}}],"total":1}}
Get records.

Requirement version: 4.1

Action:

GetRecords

Gets records.


Optional parameters:

q
Fulltext whisperer.
filter
Filter.
sort
Sort.
skip
Offset.
take
Limit.

Example:

Description:

Gets records.

Input:
https://MyPBX.daktela.com/api/4.1/GetRecords/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"data":[{"record":"52","user":null,"queue":"1","name":"record_53eb81ff2bf56","title":"800123456","number":"800123456","nextcall":null,"status":null,"action":"0","call_id":"","edited":null,"created":"2014-08-13 17:19:27","deleted":"0","fields":{"1":["42"],"17":[]}},{"record":"53","user":null,"queue":"1","name":"record_53eb820b62d3f","title":"800123456","number":"800123456","nextcall":null,"status":null,"action":"0","call_id":"","edited":null,"created":"2014-08-13 17:19:39","deleted":"0","fields":{"1":["42"],"17":[]}},{"record":"54","user":null,"queue":"1","name":"record_53eb820c775ce","title":"800123456","number":"800123456","nextcall":null,"status":null,"action":"0","call_id":"","edited":null,"created":"2014-08-13 17:19:40","deleted":"0","fields":{"1":["42"],"17":[]}}],"total":"3"}}
Get all statuses

Requirement version: 3.8

Action:

GetStatuses

Return all defined statuses


Optional parameters:

id
Get info only for this status ID. (If not specified, export all)
queue
Get info only for this queue name

Example:

Description:

We want all statuses

Input:
https://MojeVU.daktela.com/api/3.8/GetStatuses/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":{"4":{"code":"nechce_nabidku","id":"4","description":"Nechce slyset nabidku","deleted":"0"},"5":{"code":"nebere","id":"5","description":"Nebere","deleted":"0"},"7":{"code":"nevolat","id":"7","description":"Nema zajem s nami hovorit","deleted":"0"},"8":{"code":"nezajem","id":"8","description":"Nema zajem","deleted":"0"},"9":{"code":"objednavka","id":"9","description":"Objednavka","deleted":"0"},"12":{"code":"nema_cas","id":"12","description":"Volat pozdeji - nema cas","deleted":"0"},"14":{"code":"rozmysli_se","id":"14","description":"Volat pozdeji - rozmysli se","deleted":"0"},"15":{"code":"neopravnena_osoba","id":"15","description":"Volat pozdeji - neopravnena osoba","deleted":"0"},"16":{"code":"prevolavka","id":"16","description":"Prevolavka","deleted":"0"}}}
Move a record from the one campaign to the other.

Requirement version: 3.3

Action:

MoveRecords

By the searched criteria it will filter records from the one campaign and move them to the other campaign. Moved records will be deleted from the original campaign.


Mandatory parameters:

id
ID of the record you want to move (you don't have to pass the mandatory parameter src_queue).
src_queue
A number of the queue you want to search for the items (you don't have to pass the mandatory parameter id).
dst_queue
A number of the queue into which you want to move the searched items.

Optional parameters:

search_datetime_modify_from
From which date and time to filter the last record's change in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
search_datetime_modify_to
To which date and time to filter the last record's change in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
search_datetime_nextcall_from
From which date and time to filter the scheduled calls in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
search_datetime_nextcall_to
To which date and time to filter the scheduled calls in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
search_datetime_created_from
From which date and time to filter the creation of record in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
search_datetime_created_to
To which date and time to filter the creation of record in the src_queue campaign. The format is as folows: YYYY-MM-DD HH:MM:SS
update_action
Pass to determine in which action should be the newly moved records. If not specified, the unchanged action from the original campaign will be used.
  • 0 - free
  • 5 - form is saved and done
  • 6 - form is scheduled for later (update_datetime_nextcall should be passed)
update_callstatus
Pass to determine in which ID of state of the call should be the newly moved records. If not specified, the unchanged ID of state from the original campaign will be used. Leave this parameter empty to free the state.
update_agent
Pass to determine whom ID of user should assign the newly moved records. If not specified, the unchanged ID of user from the original campaign will be used. Leave this parameter empty to free the user.
update_datetime_nextcall
Pass to determine to which date and time to schedule a calls.

Example:

Description:

Move the record with ID 9 (we don't have to know in which campaign it is) to the campaign No. 2009. All system items like callstatus, agent, actions with numbers will NOT be changed.

Input:
http://MojeVU.daktela.com/api/3.3/MoveRecords/json?access_token=1234567890123456789012345678901234567890&id=9&dst_queue=2003
Output:
{"status":1,"error":null,"result":null}
Description:

Input:
http://MojeVU.daktela.com/api/3.3/MoveRecords/json?access_token=1234567890123456789012345678901234567890&src_queue=2003&dst_queue=2009&search_datetime_modify_from=2013-01-11%2000:00:00&search_datetime_modify_to=2013-01-16%2023:59:59&update_agent=&update_action=0
Output:
{"status":1,"error":null,"result":null}
Search in contacts imported to Call Centre

Requirement version: 3.2

Action:

SimpleSearchContact

Returns all contacts (with form structure), which corresponds to search filter.


Mandatory parameters:

phonenumber
MSISDN to search

Optional parameters:

queues
array campaign numbers where search is executed

Example:

Description:

Get contacts from number 226211245 and restrict search to queue number 1002 and 1000

Input:
https://MojeVU.daktela.com/api/3.2/SimpleSearchContact/json?phonenumber=226211245&queues[]=1002&queues[]=1000&access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":[{"id_list":"3","name_campaign":"Outbounder","id_code_possibili":"3","number_campaign":"1002","array_struct":{"id_field":["1","6","2","7"],"type_field":["text","text","text","selectbox"],"label_field":["Jm\u00e9no","Email","P\u0159\u00edjmen\u00ed","Vyber"],"default_value_field":["","","","[\"ANO\",\"NE\"]"],"ro_field":[false,false,false,false],"order_field":["1","2","3","4"],"value_data":["Michal","noreply@daktela.com","Hajek","ANO"]},"sysdata_struct":{"id":"3","number":"2262112455","date":"2012-03-20 16:12:51","date_nextcall":null,"callstatus":"7","action":"5","asterisk_uniqueid":"1329393906.6650WS","agent_id":"3"},"status_error":null}]}
Update record.

Requirement version: 4.1

Action:

UpdateRecord

Updates a record based on the input parameters.


Mandatory parameters:

record
Record's ID

Optional parameters:

queue
Queue's ID.
phonenumber
A phone number you want to update.
fields
An array of values of optional items you want to update. A key in the array is an ID of the optional item. If there are no specified all items in the form, then the missing ones are replaced with an empty string.
user
Pass if you want to assign contact to the specific record. Leave this parameter empty to free the user.
status
Statuses ID. Leave this parameter empty to free the status.
action
if you want update action. Values: 0 - Free, 5 - Done, 6 - Action for nextcall
nextcall
Pass if you want to specify the date since the imported contacts should be called. The format is as folows: YYYY-MM-DD HH:MM:SS

Example:

Description:

Update record with id 64 where queue will be changed to 1, phone number to 226211246 and optional item 3 to value 42

Input:
http://MyPBX.daktela.com/api/4.1/UpdateRecord/json?access_token=1234567890123456789012345678901234567890&record=64&queue=1&phonenumber=226211246&fields[3]=42
Output:
{"status":1,"error":null,"result":{"count":1,"record":{"record":64,"user":null,"queue":"1","name":"record_53eca5880656f","title":"226211245","number":"226211246","nextcall":"2014-08-08 19:30:30","status":null,"action":"UpdateRecord","call_id":"","edited":"2014-08-14 14:05:00","created":"2014-08-14 14:03:20","deleted":"0","fields":{"3":["42"],"17":[]}}}}

Events


Create new event

Requirement version: 3.8

Action:

CreateEvent

Create new event, which can be used at module Notification centre to bind to another activity


Mandatory parameters:

event
Event name, must start with prefix Custom_

Optional parameters:

params
Array of parameters, which can be used in conditions and running actions at Notification centre module. Key in array is variable name.
time
Date and time when this event will be run. (Format is same as is used in function strtotime)

Example:

Description:

We have defined event in Notification Centre called Custom_SendSMS, which sends SMS, if is defined variables number and message.

Input:
https://MojeVU.daktela.com/api/3.8/CreateEvent/json?access_token=1234567890123456789012345678901234567890&event=Custom_SendSMS&params[number]=226211245&params[message]=Ahoj&params[foo][bar]=examplevalue
Output:
{"status":1,"error":null,"result":[{"number":"226211245","message":"Ahoj","foo":{"bar":"examplevalue"}}]}

Activities


Activity close

Requirement version: 4.0

Action:

ActivityClose

Closes activity to defined state


Mandatory parameters:

activity
Unique activity's name
status
Unique state's name

Example:

Description:

Close activity with name activity_123 to state 'objednavka'

Input:
https://MojeVU.daktela.com/api/4.0/ActivityClose/json?access_token=1234567890123456789012345678901234567890&activity=activity_123&status=objednavka
Output:
{"status":1,"error":null,"result":""}
Description:

Error state on wrong state name

Input:
https://MojeVU.daktela.com/api/4.0/ActivityClose/json?access_token=1234567890123456789012345678901234567890&activity=activity_123&status=nevolat
Output:
{"error":"Stav neexistuje","status":0}
Activity state change

Requirement version: 4.0

Action:

ActivityUpdate

Changes activity's to defined state


Mandatory parameters:

activities
Unique activity's name
status
Unique state name

Example:

Description:

To activities activity_100, activity_200 change state to 'objednavka'

Input:
https://MojeVU.daktela.com/api/4.0/TicketUpdate/json?access_token=1234567890123456789012345678901234567890&activities[]=activity_100&activities[]=activity_200&status=objednavka
Output:
{"status":1,"error":null,"result":""}

Autodialer


Check number in autodialer

Requirement version: 4.0

Action:

CheckNumber

Checks number in autodialer and returns status


Example:

Description:

Check number 777888999

Input:
https://api.daktela.com/api/4.0/CheckNumber/json?access_token=1234567890123456789012345678901234567890&number=777888999
Output:
{"status":1,"error":null,"result":{"number":"777888999","time":"2014-02-11 16:10:47","status":"1"}}
Return statuses for checking numbers

Requirement version: 4.0

Action:

GetStatuses

TODO Return statuses for checking numbers


Example:

Description:

Return statuses for checking numbers

Input:
https://api.daktela.com/api/4.0/GetStatuses/json?access_token=1234567890123456789012345678901234567890
Output:
{"status":1,"error":null,"result":[{"status":"1","name":"Volany ucastnik je docasne nedostupny","code":"2"},{"status":"2","name":"Schranka","code":"2"},{"status":"3","name":"Nedostupny","code":"2"}]}

Emails


Create email

Requirement version: 4.1

Action:

EmailCreate

Creates email


Mandatory parameters:

queue
Queue number
subject
Subject
from
Sender
body
Body (HTML/plaintext)

Optional parameters:

user
User's login
name
Unikátní identifikátor emailu

Example:

Description:

Create email with subject 'Muj predmet', from 'osoba@firma.cz' and body 'Dlouhy text emailu'

Input:
https://MojeVU.daktela.com/api/4.1/EmailCreate/json?access_token=1234567890123456789012345678901234567890&queue=2000&subject=Muj%20predmet&from=osoba@email.cz&body=Dlouhy%20text%20emailu
Output:
{"status":1,"error":null,"result":{"email":{"email":15,"queue":"10","user":null,"contact":null,"name":"email_530f2641060a1","title":"Muj predmet","address":"osoba@email.cz","direction":"in","wait_time":null,"duration":null,"answered":null,"text":"

Dlouhy text emailu<\/p>","options":null,"time":"2014-02-27 12:49:21"},"activity":{"activity":244,"ticket":5,"name":"ticket_530f264109f1c","title":"Muj predmet","action":null,"type":"EMAIL","item":15,"queue":"10","user":null,"contact":null,"status":null,"priority":"20","options":null,"time":"2014-02-27 12:49:21","time_wait":null,"time_open":null,"time_close":null}}}

Description:

Error state when queue type is wrong

Input:
https://MyPBX.daktela.com/api/4.1/EmailCreate/json?access_token=1234567890123456789012345678901234567890&queue=6666&subject=Muj%20predmet&from=osoba@email.cz&body=Dlouhy%20text%20emailu
Output:
{"error":"Zadana fronta neni typu email","status":0}