1. Teleboard | Support Center
  2. Solution home
  3. API Documentation
  4. REST API - POST Requests
Open navigation

POST/send/call

Function


The POST/send/call method allows you to use your Telebroad account to initiate a voice call. The call will be first placed to the source number (the caller) and once he accepts the call it will get connected to the destination number (the recipient).


Parameters


There are no parameters in the header. All parameters go in the body in JSON Raw format.


ParameterTypeOperation
snumberstringThe source (your) number where the call is initiated from. You can obtain this number using the GET/Profile method. You will use the PBX line number that is unique to each user. In the response it appears as the "callerIDint" field in the "phones" category (and is usually the same as the voicemail box number)
dnumber
stringDestination number. The recipient of the call. This can be either an external or internal number.
calleridsstringThe caller ID that will be displayed for the source number. Need to selected from the list of caller IDs available to the user in his account.
calleriddstringThe 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.
answer1BooleanA 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. 
answer2BooleanWith 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 PBX number 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 the lines of this:


{

    "error":{

        "code": 444,

        "message": "dnumber is required."

    }

}