Skip to main content

REST API (ACD)

Get List of ACDs

After logging into the PBX and getting the session Id (either admin or domain admin), you can use the following API to get the list of ACDs in a particular domain. This information is obtained from an extension account in the domain (given below in the example as user@mydomain) which has been set as "Queue manager" for the ACDs.

Method : GET

URL : https://PBXURL/rest/user/user@mydomain/wallboard

Return : List of ACDs

Example:

GET https://192.168.1.11/rest/user/45@example/wallboard

Returns:

[{display: "Marketing", name: "73"}, {display: "Sales", name: "80"}] JSON object break down: [

{
"display":"Marketing",

"name":"73"

},

{

"display":"Sales",

"name":"80"

}

]

Get Live Information about an ACD

After logging into the PBX and getting the session Id (either admin or domain admin), you can use the following API to get the the live information and status of an ACD in a particular domain. This information is obtained from an extension account in the domain (given below in the example as user@mydomain) which has been set as "Queue manager" for that ACD.

Method : GET

URL : https://PBXURL/rest/user/user@mydomain/wallboard/ACD-ACCOUNT

Return : ACD information as JSON

Example: GET https://192.168.1.11/rest/user/45@example/wallboard/73

Returns:

{acds: {…}, logged_agents: Array(3), agents: Array(3), current: Array(0), history: Array(3)} JSON object break down:

{    

"acds":{

"73":{

"redirect":{

"waiting":0,

"ringing":0,

"anonymous":0

},

"hangup":{

"waiting":0,

"ringing":1

},

"exit":{

"user":0,

"admin":0,

"application":0,

"other":0

},

"duration":{

"sum":{

"ivr":10,

"ring":5,

"talk":3,

"hold":0,

"idle":14

},

"average":{

"ivr":10,

"ring":5,

"talk":3,

"hold":0,

"idle":14

}

},

"calls":{

"count":2,

"completed":1

}

}

},

"logged_agents":[

40,

42,

43

],

"agents":[

{

"account":"40",

"name":"Jeff McCormick",

"dnd":false,

"jumpin":true,

"work":{

"begin":1553745600.0,

"end":1553832000.0,

"now":1553799628.136,

"segments":[
]

},

"calls":0,

"missed":0,

"duration":{

"talk":0,

"hold":0,

"idle":0

},

"average":{

"talk":0,

"hold":0,

"idle":0

}

},

{

"account":"43",

"name":"Penny Cooper",

"dnd":false,

"jumpin":true,

"work":{

"begin":1553745600.0,

"end":1553832000.0,

"now":1553799628.136,

"segments":[
]

},

"calls":1,

"missed":0,

"duration":{

"talk":3,

"hold":0,

"idle":14

},

"average":{

"talk":3,

"hold":0,

"idle":14

}

},

{

"account":"42",

"name":"Kyle Mason",

"dnd":false,

"jumpin":true,

"work":{

"begin":1553745600.0,

"end":1553832000.0,

"now":1553799628.136,

"segments":[
]

},

"calls":0,

"missed":0,

"duration":{

"talk":0,

"hold":0,

"idle":0

},

"average":{

"talk":0,

"hold":0,

"idle":0

}

}

],

"current":[
],

"history":[

{

"start":"1553799360.324",

"from":"\"Jeff McCormick\" <sip:40@localhost>",

"duration":0,

"agent":""

},

{

"start":"1553799384.779",

"from":"\"Jeff McCormick\" <sip:40@localhost>",

"duration":3,

"agent":"43"

}

]

}



The response gives:

  • the number of calls that were redirected from waiting, ringing or being anonymous states
  • the number of calls that were hung up in the waiting or ringing states
  • the number of calls that were exited because of interruption from admin or user like picked up the calls
  • total duration in seconds of all the calls with further break down of: ringing, talking and hold etc.
  • average duration in seconds per call with further break down of: ringing, talking and hold etc.
  • the total number of calls: count and completed
  • extension numbers of logged agents
  • then details of each agent are given in the agents array with extension number, name, dnd status etc. as well as work times and breaks (log off) given in segments array
  • the agent information also includes the calls received, missed and total and average duration for talk, hold etc.
  • current calls going on are given in the current array
  • the history of all the calls for ACD for the day is given in the history array with each calls start time, from, duration and agent who picked it up