POST/send/call

Function


The POST/send/call method allows you to use your Telebroad account to initiate a voice phone call to a 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 extension number (also the voicemail box number) as it is unique to each user.
dnumber
stringDestination number. The recipient of the call.
calleridsstringThe caller ID for  the source number.
calleriddstringThe caller ID for  the destination number.
answer1Boolean 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 wil not wait for a call to be answered by the source, but instead will automatically chanel 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 pone number (actually internal PBX extension) 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."

    }

}

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.