Click to Call API
Click-to-call allows you to create URLs that can be POSTed to with a phone number and create a phone call from the provided contact information to a destination you have pre-determined. On devices with phone capabilities, make it easy for users to directly connect with you by simply tapping a phone number, more commonly known as click to call. It converts your website's users into engaged customers by creating an easy way for your customers to contact your sales and support teams right on your website.
Parameters * compulsory field
| Field | Type | Description |
|---|---|---|
| user_id * | string |
A Valid and Active User Id Example user_id = “12345678” |
| token * | string |
API token Example token = “QeyN3LZ2eTwkojUkLLG9” |
| callFirst * | string |
Possible Values
Example callFirst = “customer” |
| customer * | number |
Number only Example customer = 98765XXXXX |
| agentType * | string |
Possible Values
Example agentType = “agent_number” |
| agent_number * | number |
Required (value according to agentType). Must be in number format. Example agent_number = 98765XXXXX |
| agent_id * | integer |
Required (value according to agentType). Must be in integer format. Example agent_id = 123 |
| group_id * | integer |
Required (value according to agentType). Must be in integer format. Example group_id = 123 |
Parameters Optional field
| Field | Type | Default | Description |
|---|---|---|---|
| customerRingTime | integer | 30 |
Value must be 0 or greater than 0. Value considered in seconds. Example customerRingTime = 20 |
| customerRetryCount | integer | 0 |
Number of retries on customer number Maximum allowed value : 3 Example customerRetryCount = 0 |
| customerCLI | string |
Can use Valid CLI of user. |
|
| agentRingTime | integer | 30 |
Value must be 0 or greater than 0. Value considered in seconds. Example agentRingTime = 30 |
| agentRetryCount | integer | 0 |
Number of retries on agent number Maximum allowed value : 3 |
| agentCLI | string |
Can use Valid CLI of user. |
|
| timeLimit | number | unlimited |
It is duration in seconds to limit the talk time between from and to Ring durations of from and to are not included in timeLimit Call will be disconnected if timeLimitHangup is true |
| timeLimitHangup | boolean | true |
If timeLimit is set to more than 0 and timeLimitHangup is true then call will be disconnected after the duration mentioned in timeLimit
|
| timeLimtAlert | integer |
This is duration in seconds If timeLimit is set then you can play announcements at some specific time to notify the customer and agent numbers. This announcement will be heard by both the numbers Announcement will be played when the talk time is longer than the time mentioned in timeLimtAlert. Multiple comma separated values can be passed. Example timeLimtAlert=120,300 |
|
| ringTone | string |
This is a valid id of announcement. You can find announcement Ids in your account under Manage->Announcement-> Id If passed, announcement will be heard by from number in loop while dialing to number If not passed, the original announcement (played by mobile operator) will be heard by from number. Example ringTone=1610448601_84.wav |
|
| sticky | string |
Based on the value in agentType. Sticky will work only if agentType has an agent_id or group_id as value. Possible Values
Example sticky = “yes” |
|
| stickyTimeType | string | Day |
Based on the value in sticky, It will work only if sticky has yes as value. Possible Values
Example stickyTimeType = “day” |
| stickyTimeValue | integer | 1 |
Based on the value in sticky, It will work only if sticky has yes as value. Example stickyTimeValue = 1 |
| stickyAgentBusy | string | retrySame |
Based on the value in sticky, It will work only if sticky has yes as value. Possible Values
Example stickyAgentBusy = “retrySame” |
| sticky_level | string |
Defines the level of sticky routing. Based on its value, other parameters are conditionally required. Possible Values
|
|
| sticky_cli | string |
Required if sticky_level is cli or cli_group. Must be a valid CLI number. |
|
| sticky_groupId | integer |
Required if sticky_level is group or cli_group. Must be a valid group ID. |
|
| queueTimeout | integer | 60 |
It will only work if agentType has group_id as value. Example queueTimeout = 0 |
| callFlow_id | integer |
It will only work if callFlow has a CTC module. Example callFlow_id = 123 |
|
| webLogin | string |
Can be used when agentType is an agent_id or a group_id. Possible Values
|
|
| callLogin | string |
Can be used when agentType is an agent_id or a group_id. Possible Values
|
|
| mode | string | Live |
This parameter is helpful at the time of API integration in your panel. Possible Values
|
Response
Success Case
{
"callid": "kn5skxr6161770885161627785",
"status": "success",
"code": "200"
}
Error Case
{
"message": "Call First empty or Invalid",
"status": "error",
"code": "1502"
}
Error Code
| Response Code | Description |
|---|---|
| 1501 |
Connection Issue |
| 1502 |
Call First empty or Invalid |
| 1503 |
Customer empty |
| 1504 |
agent_number/agent_id/group_id any one required |
| 1505 |
invalid mobile number in customer parameter |
| 1506 |
invalid mobile number in Agent Number parameter |
| 1507 |
Invalid agent or agent is not active in Agent id parameter |
| 1508 |
Multiple values not allowed in Customer |
| 1509 |
Multiple values not allowed in Agent Number |
| 1510 |
Multiple values not allowed in Agent Id |
| 1511 |
Multiple values not allowed in Group Id |
| 1512 |
DNC Number exists (Customer) |
| 1513 |
DNC Number exists (Agent Number) |
| 1514 |
Agent busy on call (Agent Id) |
| 1515 |
Agent is not available |
| 1516 |
Invalid Group Id in Group id parameter |
| 1517 |
Strategy invalid |
| 1518 |
Since Strategy=TO_ALL, so CallLogin filter will not work |
| 1519 |
CustomerRingTime value invalid |
| 1520 |
Negative value not allowed for CustomerRingTime |
| 1521 |
Crossed maximum limit of CustomerRingTime |
| 1522 |
AgentRingTime value invalid |
| 1523 |
Negative value not allowed for AgentRingTime |
| 1524 |
Crossed maximum limit of AgentRingTime |
| 1525 |
customerRetryCount value invalid |
| 1526 |
Negative value not allowed for customerRetryCount |
| 1527 |
Crossed maximum limit of customerRetryCount |
| 1528 |
agentRetryCount value invalid |
| 1529 |
Negative value not allowed for agentRetryCount |
| 1530 |
Crossed maximum limit of agentRetryCount |
| 1531 |
timeLimit empty |
| 1532 |
Negative value not allowed for timeLimit |
| 1533 |
timeLimit value invalid |
| 1534 |
ringTone invalid announcement id |
| 1535 |
Invalid CLI in customerCLI |
| 1536 |
invalid CLI in agentCLI |
| 1537 |
Sticky will only work on customer number and other end have agent id or group id |
| 1538 |
Invalid value of stickyTimeType |
| 1539 |
Invalid value of stickyTimeValue. It must be an integer |
| 1540 |
Sticky parameter must be set for stickyTimeType, stickyTimeValue and stickyAgentBusy |
| 1541 |
Invalid value of stickyAgentBusy |
| 1542 |
Invalid value of queueTimeout. It must be an integer |
| 1543 |
Invalid WebLogin value |
| 1544 |
WebLogin none of the agents have this state |
| 1545 |
CallLogin none of the agents have this state |
| 1546 |
DND number exists in Customer |
| 1547 |
DND number exists in Agent |
| 1548 |
Connection Error in DND Api |
| 1549 |
timeLimitAlert invalid |
| 1550 |
alertAudio invalid announcement id |
| 1551 |
timeLimitAlert must be less than from timeLimit |
| 1552 |
queueTimeout will only work if group exists |
| 1553 |
Value length exceed 50 characters |
| 1554 |
Invalid format |
| 1555 |
data not found |
| 1556 |
insufficient Channel |
| 1557 |
insufficient Channel. |
| 1558 |
Found invalid CTC ivr |
| 1559 |
CTC Module not found in ivr |
| 1560 |
Invalid Parameter found. |
| 1561 |
Same number exists in both side. |
| 1562 |
Invalid Sticky Level Value |
| 1563 |
Not found Required Value when you use Sticky Level |
| 1564 |
Invalid Sticky Group id |
| 1565 |
Invalid Sticky CLI |
| 1566 |
Call submission is out of calling window setting |
| 1567 |
Invalid DND Filter Value, valid:customer/agent/both |
var request = require("request");
var options = { method: 'POST',
url: 'https://v4-api.deepcall.com/api/v3/clickToCall/para',
qs:
{ user_id: 'USER_ID',
token: 'TOKEN',
callFirst: 'customer',
customer: 'CUSTOMER_NUMBER',
agentType: 'agent_number',
agent_number: 'AGENT_NUMBER' },
headers:
{ 'cache-control': 'no-cache' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
curl -X POST \
'https://v4-api.deepcall.com/api/v3/clickToCall/para?user_id=USER_ID&token=TOKEN&callFirst=customer&customer=CUSTOMER_NUMBER&agentType=agent_number&agent_number=AGENT_NUMBER' \
-H 'cache-control: no-cache'
var request = require("request");
var options = { method: 'POST',
url: 'https://v4-api.deepcall.com/api/v3/clickToCall/para',
qs:
{ user_id: 'USER_ID',
token: 'TOKEN',
callFirst: 'customer',
customer: 'CUSTOMER_NUMBER',
agentType: 'agent_number',
agent_number: 'AGENT_NUMBER' },
headers:
{ 'cache-control': 'no-cache' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});