callback API
Author Image

By: Aivis Olsteins

In News

2018-05-28

Voice Callback via API

API can be used in the applications like outbound call centers and callback

So far we have discussed simple Voice call API use case: sending a call to remote party and playing either prerecorded or text to speech message or a combination of both. Now we will discuss a more advanced option: setting up a two-leg call between two parties. This setup can be used for a range of applications, like:

  • call back systems,
  • outbound call centers

The idea behind this API is following:

  • an external application sends API request containing addresses (or numbers) of two remote users;
  • Depending on the request, the parties are called in sequence or simultaneously
  • When the calls are established, the calls are interconnected together, and the speech is passed both ways between sides.

 

As mentioned above, it can be used in call back applications and call centers.

In case of callback, the trigger can be any kind, either inbound call, or data packet, or SMS, as described in this post. It is not part of this API, and therefore not discussed here. What is important that it should be able to do proper authentication and produce RESTful API request to initiate a call back.

In case of outbound call center (contact center), the application which runs call center process (a dialer) produces API request to initiate many callback calls. The A-leg in this case is client (remote side), and B-side – an agent. It can be set up in a way that agent is called only when A-leg is connected or vice versa according to requirement.

Here is the example callback API call which connects caller with number 1000123 as A-leg and caller with number 1000125 as B-leg:

 

POST /voice/call/callback  
{
"leg_A": {
"to": "1000123",
  "from": "1000125"
},
"leg_B": {
"to": "1000125",
  "from": "1000123"
}
}

As you can see above, it is very simple example. You can use more attributes, as discussed here and here for each call leg to have them routed as required. Also you can set arbitrary caller ID. In the example above each leg receives other legs destination as caller ID, as it is used most frequently.

About Author
Author Image

With more than 25 years in the industry, Aivis Olsteins is founder of DataTechLabs, and has been involved in every aspect of the company through its development. He has large expertise in telecom networks, databases, large data processing and other advanced technical topics.

Get in Touch

If you have something to say, please use the contact form below to get in touch with us. We will get back to you as soon as possible.

Mail Us

DataTechLabs SIA, Muzikas str 12A
Jurmala, LV-2008, Latvia.

Call Us

+371 67 65 25 28
+ 1 202 499 1550

E-mail Us

info@datatechlabs.com
support@datatechlabs.com