OBS: API er desværre ikke noget vi kan supportere på.
Parameters:
reqtype - Request type
tenant - Sometime optional if the Admin API key is used, otherwise provide the tenant code
key - Use the Admin API key or the Tenant API key
format - Optional, can be json or plain
callback - Optional, for cross domain script, the function to use as callback (requires format json)
Request type (reqtype):
COUNTPEERS - Return the number of peers on each node and the total
- Additional parameters:
tenant - optional if using the Admin API key,
returns only peers from the selected tenant
COUNTCHANNELS - Return the number of channels (total or on each node)
- Additional parameters:
nodename - optional, if you want only that node counted
tenant - optional if using the Admin API key,
returns only channels from the selected tenant
PEERS - Show the peers registered on all nodes of the network
- Additional parameters:
tenant - optional if using the Admin API key,
returns only peers from the selected tenant
BLFS - Get the BLF status, peers and flows
tenant - the tenant to report
FLOWS - Show the flow status
tenant - the tenant to report
CHANNELS - Show the channels for the selected tenant
Additional parameters:
tenant - optional, show channels for the tenant
PHONEBOOK - Manage phone books:
Additional parameters:
tenant - select the tenant
phonebook - select the phone book by name
subreqtype - select the sub request type:
query - perform a query
field - name of the field
value - value to search for (use % for partial searches)
add - add a record
values - a json encoded associative array with name of the fields and values
delete - delete a record
peid - peid value returned by search
INFO - Get info about system
Additional parameters:
info - type of info:
queues (list of queues)
queue (info about the queue based on id)
agents (info about the agents in all or selected queue)
agentsdelay (info about the agents delay in answering in all or selected queue)
outdialed (info about the calls dialed out by extensions)
call (info about the call originated with the api using the returned id or unique id)
recording (get the recording for the call, you can use the unique id or the originated id)
voicemail (get the voicemail message for the call, you can use the id of the voicemail_messages table)
voicemailtranscript (get the voicemail message transcript for the call, you can use the id of the voicemail_messages table)
dids (list of dids)
extensions (list of extensions, including state)
config (get info about configured tenant)
cdrs (get the list of calls, you can use wildcard % for the tenant code and use format csv)
queuelogs (get the list of calls processed by queue)
balance (get the credit available)
id - optional, id of object requested
queue - optional, id of queue requested for agents info or queue logs
start - optional, start date/time of the cdrs or queue logs returned
end - optional, end date/time of the cdrs or queue logs returned
AGENT - Manipulate queue agent status
Additional parameters:
tenant - name of the tenant
extension - agent sip username
queue - queue id
action - action to perform (pause, unpause)
pausereason - optional, pause reason to set
ATXTRANSFER - Attend transfer a channel
Additional parameters:
tenant - optional, tenant for the channel to transfer
channel - channel to transfer
dest - number to transfer the channel to
CAMPAIGN - Manage call campaign
Additional parameters:
campaign - id for campaign, you need to get it on the URL for the editing campaign
tenant - optional, tenant for the campaign
action - action can be start, stop, pause, resume. Start and stop can affect only on-demand campaign
DIAL - Dial a number and connect to another number
Additional parameters:
tenant - tenant where to place the call
source|?exten - first number to dial - use ACCOUNT to use the number associated with the account chosen
dest|phone - number to connect
var - variables to set, will be prefixed tenant code
account - account name to simulate the call from - use SOURCE to use the account associated with the source number choosen
dialtimeout - dial timeout in seconds
timeout - max duration for the call in seconds
sourceclid - use this clid for dialing source number
destclid - use this clid for dialing dest number
recording - set the recording for the call, use: yes, no, yeschange or nochange)
HANGUP - Hangup a channel
Additional parameters:
tenant - optional, tenant for the channel to hangup
channel - channel to hangup
MEDIAFILE - Manage media files
Additional parameters:
action - Available actions
getaudio - Download the audio
tenant - tenant to get audio from
objectid - media id
QUEUERESET - Reset statistics for a queue
Additional parameters:
tenant - optional, tenant for the queue
queueid - queue id to reset
REBOOT - Reboot one or multiple peers
Additional parameters:
peer - peername to reboot or ALL for all peers
tenant - optional, tenant for the peer to reboot
RESPONSEPATH - Get info from response path object
tenant - tenant for the response path to query
id - response path id
filter - optional available filters
queue - Apply filter on queue id
answer - Apply filter on answer extension
uniqueid - Apply filter on unique id
filterdata - optional, the value to filter on
action - Available actions
list - List all available responses
getlast - Get the details from the latest one
SETFLOW - Set Flow status or variable
Additional parameters:
number - flow number
state - optional state (INUSE, NOT_INUSE, UNAVAILABLE, RINGING)
value - optional value
tenant - optional, tenant for the flow to set
TRANSFER - Transfer a channel
Additional parameters:
tenant - optional, tenant for the channel to transfer
channel - channel to transfer
extrachannel - extra channel to transfer (optional)
dest - number to transfer the channel to
UNREGISTER - Unregister one or multiple peers
Additional parameters:
peer - peername to unregister or ALL for all peers
tenant - optional, tenant for the peer to unregister
VOICEMAIL - Get info about voicemails
tenant - optional, tenant for the voicemails
mailbox - optional, show info about a specific mailbox
msgid - optional, message id
action - Available actions
list - List available voicemails
messages - List messages for mailbox specified
message - Get the message binary for msgid specified
delete - Delete the message for msgid specified
COUNTCALLS - Count the number of calls running
BALANCE - Alter tenant balance
Additional parameters:
tenant - tenant to change the balance
amount - sum to add to balance, use a negative sum to subtract
description - description
MANAGEDB - Manage data in database
Additional parameters:
object - object name to manage ('tenant', 'custom', 'customtypes', 'phone', 'mediafile', 'huntlist' are currently the only options)
action - action to perform ('list' 'get', 'add' or 'update')
for mediafile object type, you can use also 'updatebinary' and 'getbinary'
for huntlist object type, you can use only 'getextensions' and 'setextensions'
objectid - object id to update
jsondata - jsondata for action - check manual for more info
CHECKAUTH - Check authentication, return info about the privileges for the user
- username - username
- password - password