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.

Leave a comment
About Author
Author Image
My name is Aivis Olsteins and I am owner of DataTechLabs. My experience in Telecoms started in early 1990's and I have worked in multiple technical positions in mobile, messaging and data networks. My expertise lies in telecom networks, database systems, distributed processing and large data analysis. These posts are my attempt to share my knowledge with everyone who might find it useful.

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 66 09 01
+ 1 202 499 1550

E-mail Us

info@datatechlabs.com
support@datatechlabs.com