Articles in this support section discuss Telebroad's legacy APIs. To learn about the current version of Telebroad APIs, which offer additional authentication options and support for advanced features, please go to https://developers.telebroad.com/.
Function and Response Fields
The GET/calls/recent request returns a list of recent calls (or call flow legs) made between the user's line and a phone number.
The request returns the following fields:
- callid - a unique system ID for the call record.
- phone - the user's phone line that received or dialed the number.
- time - the start time of the call in Unix time.
- callid - an ID for the call or call leg, based on its start time, direction, and other values.
- status - indication of the status of the call (or call leg) in terms of connection between the caller and recipient. Possible responses include "answer", "noanswer" (by the recipient), "cancel" (by the caller), "congestion" (too much traffic preventing a connection), "busy" (the recipient is on another call), or "chanunavail" - the destination communication channel is unavailable or the requested peer is not registered.
- dir - direction of the call or call leg. A value of "in" for inbound call, "out" for outbound call, or "internal" for a segment that has been routed internally.
- type - a system designation for the current general type of the call leg being either "internal" or "external"
- stype - the type of source point, where the call or call leg originated from. This will always be either "external" or a blank string for an inbound call from an outside source. Otherwise it can be any of numerous points on the PBX - "ivr", "accessmenu, "queue", "extension", "access", etc.
- snumber - the phone number of the source point that initiated the call. This can be, depending on the direction of the call, either an internal extension/number, a full telephone number, or a temporary number assigned by the system to the point in case it doesn't have one (such as in the case of an IVR).
- sname - a name identified by the system for the source point of the call or call leg based on internal PBX information or caller ID. An empty string or the snumber may appear here if the system cannot obtain the relevant information or when the source is the IVR or a group.
- dtype - a definition for the type of destination point (where the call was routed to) for the call or call leg. Examples can be "ivr", "accessmenu, "queue", "phone", etc. The type will always be "external" for outbound calls.
- dnumber - the phone number of the destination point where the call was routed to for the call or call leg.
- ctype - a definition for the type of called point (where the source customer originally dialed) in the current call or call leg. It is assigned by the system based on the progression of the call in the call flow.
- cnumber - the phone number of the called point (where the source customer originally dialed) in the current call or call segment. It is assigned by the system based on the progression of the call in the call flow.
Note that for inbound and internal calls, the ctype and cnumber parameters will differ from dtype and dnumber only in the first leg or two. After that, they are usually identical. - duration - the total time, in seconds, for the call or call leg since it was initiated.
- talktime - the talk time, in seconds, for the call or call leg since it was answered.
Parameters
Parameter | Type | Operation |
phone | String | (optional) The user's phone line, if he has more than one line, that received or dialed the specific phone number. |
| number | String | The specific phone number. |
| start | Integer | (optional) The starting time for listing relevant records in Unix time. |
| limit | Integer | (optional) Specify a limit on the number of voicemails to be returned by the request (default is 10.). |
Example
To see three call records between the user and phone number 1-323-704-5050 use this syntax:
HTTPS method: GET
webserv.telebroad.com/api/teleconsole/rest/calls/recent?number=13237045050&limit=3
Response:
If the specified phone number is not found -
{
"error": null,
"result": []
}
Otherwise -
{
"error": null,
"result": [
{
"id": "858804070",
"phone": "1113840",
"time": "1591080107",
"callid": "1591080107.343707",
"status": "answer",
"dir": "in",
"type": "internal",
"stype": "",
"snumber": "13237045050",
"sname": "13237045050",
"dtype": "mailbox",
"dnumber": "1113838",
"ctype": "",
"cnumber": "1113838",
"code": "",
"duration": "241",
"talktime": "234"
},
{
"id": "858803990",
"phone": "1113840",
"time": "1591080017",
"callid": "1591080017.640612",
"status": "answer",
"dir": "out",
"type": "external",
"stype": "",
"snumber": "1113838",
"sname": "1113838",
"dtype": "external",
"dnumber": "13237045050",
"ctype": "",
"cnumber": "13237045050",
"code": "",
"duration": "41",
"talktime": "15"
},
{
"id": "858803987",
"phone": "1113852",
"time": "1591079910",
"callid": "1591079910.122500",
"status": "answer",
"dir": "out",
"type": "external",
"stype": "",
"snumber": "1113838",
"sname": "1113838",
"dtype": "external",
"dnumber": "13237045050",
"ctype": "",
"cnumber": "13237045050",
"code": "",
"duration": "58",
"talktime": "32"
},
]
}