Click-To-Call Admin
The Click to call API is used to connect the call, between two numbers. Using app secret and user id you can able to make a click to call API request. It connects the From number(User Number) first. Once the person at the From end picks up the call, then it will connect the To number provided by you. After getting the app secret and user id, make a POST request to the below base URL to initiate the click to call.
Base URL
Send your GET method request with valid query string, to the following base URL.
https://rest.telecmi.com/v2/webrtc/click2call?user_id=101_1111112&secret=2e0d75-d843-45-945-4171dd7a&to=919200000000&extra_params[name]={"click2call":"true"}&webrtc=true&followme=false&callerid=919800000000
Send your POST method request with valid parameters, to the following base URL.
https://rest.telecmi.com/v2/webrtc/click2call
Sample JSON Request
Below is the following sample JSON POST method request.
{
"user_id": "101_1111112",
"secret": "2e0d75-d843-45-945-4171dd7a",
"to": 919200000000,
"extra_params": {"crm": true},
"webrtc": true,
"followme": false,
"callerid": 919800000000
}
Required Parameters
These are the required POST method parameters with a description.
Parameter Name | Type | Description |
---|---|---|
*user_id | string | Your user id. |
*secret | string | Your app secret. |
*to | number | The number you need to call. |
extra_params | JSON object | The custom parameter of the request. |
webrtc | boolean | The default value is true. When the webrtc value is set to false, the softphone won't initiate the call. |
followme | boolean | The default value is false. The WebRTC value should be set to false when the followme value set to true. Through this, the call will be initiated to the mobile device. |
callerid | number | It defines the caller id of this call. By default, the user selected callerid will be displayed. |
Note
Sample Response
If the provided information is valid, your web server will get a sample response from the TeleCMI Platform as given below.
{
"code": 200,
"msg": "Call initiated",
"request_id": "s96C6XK1BUHX0oVZfOo5NhoJfZZJd0y1nmrNN6dhdkW"
}
Properties
This is the list of properties and their descriptions.
Property | Type | Description |
---|---|---|
msg | string | This is the message information for the request. |
request_id | string | A unique identification of this call was initiated through click2call. |
HTTP status codes
The TeleCMI API platform represents the following status code to identify the errors.
Status code | Status code | Description |
---|---|---|
200 | OK | There was a successful response to your request. |
407 | Error | invalid app secret. |
404 | Error | invalid user_id. |
400 | Error | user_id parameter missing , secret parameter missing , Enable webrtc or followme. |