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/.
The specific current version of the POST/send/call API is covered here.
The POST/send/call request allows you to use your Telebroad account to initiate a voice call. The call is first placed to the source number (the caller) and once they accepts it the call is connected to the destination number (the recipient).
Parameters
All parameters go in the request body in JSON Raw format.
| Parameter | Type | Operation |
| snumber | string | The source (your) number where the call is initiated from. You can obtain this number using the GET/Profile method. You will use the line number that is unique to each user. In the response to this request it appears as the callerIDint field in the "phones" category. |
| dnumber | string | Destination number. The recipient of the call. This can be either an external or internal number. |
| callerids | string | The caller ID that will be displayed for the source number as selected from the list of caller IDs available to the user. |
| calleridd | string | The caller ID that will be displayed for the destination number. Need to selected from the list of caller IDs available to the user in his account. |
| answer1 | Boolean | A value of 1 will activate auto-answer for the call. The way this method works is that it first dials the source number. After the source picks up it will dial the destination. With auto-answer, the system will not wait for a call to be answered by the source, but instead will automatically channel it to the speakers of the source and immediately proceed to call the destination number. |
| answer2 | Boolean | With a value of 1 in this field, the system will first call the destination number before connecting the call to the source number. |
Example
To make a phone call from internal line 1734840 using caller ID 1-646-777-5533 to phone number 1-726-703-4435 and having auto-answer enabled (sending the call to the speakers of the source), use this syntax:
HTTP method: POST
Header
webserv.telebroad.com/api/teleconsole/rest/send/call
Body
{"snumber":"1734840", "dnumber":"17267034435", "callerids":"16467775533","answer1":"1"}
Response:
If the call went out to the recipient successfully:
{
"error": null,
"result":{
"success": 1,
"callerid_external": "",
"dnumber": "17267034445",
"callednumber": "17267034435",
"callid": "16467775533.76366969",
"uniqueid": "16467775533.15931282"
}
}
If there was a problem with the call you, will get a message along these lines:
{
"error":{
"code": 444,
"message": "dnumber is required."
}
}