logo

The API url to perform agent actions: http(s)://api.dxi.eu/agent.php?token=... To access all DXI API interfaces, all requests need to have an access token which will authorize requests for a particular account for a fixed period of time. These requests are also restricted to the internet address that requested the token. The token API documentation can be read here. The Agent API has a number of available functions. The request arguments can all be passed as HTTP POST or GET variables: RESULT The response from the API can be formatted in either JSON or XML format. The default is JSON but this can be modified by the format argument. The API will output a number of optional values depending on the request made. However every request will return a success value, essentially denoting if the request failed or not. success: Did the request succeed. value: true or false (JSON) | 1 or 0 (XML) error: If the request failed, this field will contain a description of the fault. Example JSON return: {"success":true} {"success":false,"error":"Bad argument: xyz"} Example XML return: <result><success>1</success></result> <result><success>1</success><error>Bad argument: xyz</error></result> COMMON ARGUMENTS The following is required on all Agent API requests, with the exception of the disposition, callback and agent_dial commands. agent: The agent id to perform the command on. The following are arguments available on all API requests. format: xml or json - specify the output format. Defaults to json. action: see below - specify the command to perform.
AGENT ACTIONS
park
Place the active call on hold. agent.php?action=park Arguments: none
unpark
Retrieve the customer call-leg. agent.php?action=unpark Arguments: none
unpark_tpt
Retrieve the third party call-leg. agent.php?action=unpark_tpt Arguments: none
wrap
Place the agent into wrap without hanging up the active call. agent.php?action=wrap Arguments: subcode: string - set an optional wrap code for later reporting purposes. optional
hangup
Hangup the active customer call-leg and place the agent into wrap state. agent.php?action=hangup Arguments: subcode: string - set an optional wrap code for later reporting purposes. optional
hangupready
Hangup the active customer call-leg and place the agent into ready state to receive a new call. agent.php?action=hangupready Arguments: none
ready
Place the agent into ready state to receive a new call. agent.php?action=ready Arguments: none
logout
Log the agent out of the system and hangup their agent call-leg. agent.php?action=logout Arguments: data: string - the reason why the agent logged out e.g. break, training. optional Notes: this is stored in the agent action log and can be retrieved via the Database API.
reset
Perform a hard reset on the agent call-leg. Typically used if a softphone becomes "stuck". agent.php?action=reset Arguments: none
agent_dial
Make the DXI dialer ring the specified phone number to initiate the agent login process. agent.php?action=agent_dial Arguments: data: ddi - the number to call. callerid: ddi - the number to display on the outgoing call. optional
tpt_dial
Make a third party call, placing any active customer call-leg on hold. agent.php?action=tpt_dial Arguments: data: ddi - the number to call. qid: integer - the queue id to assign the call to. callerid: ddi - the number to display on the outgoing call. optional Returns: callid: integer - the DXI system id of the outgoing call.
manual_dial
Make a manual call, this will classes as a customer call-leg. agent.php?action=manual_dial Arguments: data: ddi - the number to call. qid: integer - the queue id to assign the call to. callerid: ddi - the number to display on the outgoing call. optional Returns: callid: integer - the DXI system id of the outgoing call.
transfer
Connect the customer call-leg and third party call-leg. The agent leaves the call and is placed into wrap. agent.php?action=transfer Arguments: data: string - if this argument is set to nowrap the agent remains in the 3-way call. optional
cold_transfer
Connect the customer call-leg directly to an outgoing third party call without the agent waiting for the call to connect first. The agent is placed into wrap. agent.php?action=cold_transfer Arguments: data: ddi - the number to call. callerid: ddi - the number to display on the outgoing call. optional Returns: callid: integer - the DXI system id of the outgoing call.
conference
Connect a new call to the agents conference bridge. This is classed as a third party call-leg. agent.php?action=conference Arguments: data: ddi - the number to call. qid: integer - the queue id to assign the call to. callerid: ddi - the number to display on the outgoing call. optional Returns: callid: integer - the DXI system id of the outgoing call.
hangup_tpt
Hangup all active third party call-legs. This does not include transferred calls. agent.php?action=hangup_tpt Arguments: none
listen
Allow the agent to listen in on the specified agents calls. agent.php?action=listen Arguments: data: integer - the agent id to listen to
play_audio
Play an audio file to the active call-leg. The agent is placed into wrap. agent.php?action=play_audio Arguments: data: integer - the audio file id to play
disposition
agent.php?action=disposition Arguments: callid: integer - the DXI system id of the call. data: integer - the outcomecode to set. Notes: if the outcomecode is a complete then the record is removed from the dialer.
callback
Update the callback time and other optional settings for a loaded record. agent.php?action=callback Arguments: urn: integer - the URN of the loaded record. qid: integer - the queue id the record is assigned to. data: date/time - the timestamp to set the callback for in "YYYY-MM-DD hh:mm:ss" format sametime: integer - set the record sametime field. optional status: integer - set the record status field. optional level: integer - set the record priority level field (see note). optional Notes: the priority level can by adjusted by an offset instead of an explicit value by prefixing the argument with either a + or - character.
pause
Pause any active call recording. agent.php?action=pause Arguments: none
unpause
Unpause any active call recording. agent.php?action=unpause Arguments: none