Voice Callback via API
Back to Articles
Tutorial SIP API Callback Howto Call Centers

Voice Callback via API

May 28, 2018 2 min
Aivis Olsteins

Aivis Olsteins

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:

  1. call back systems,
  2. outbound call centers

The idea behind this API is following:

  1. an external application sends API request containing addresses (or numbers) of two remote users;
  2. Depending on the request, the parties are called in sequence or simultaneously
  3. 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.

Share this article

Aivis Olsteins

Aivis Olsteins

An experienced telecommunications professional with expertise in network architecture, cloud communications, and emerging technologies. Passionate about helping businesses leverage modern telecom solutions to drive growth and innovation.

Related Articles

Case Study: Global Communications Company

Case Study: Global Communications Company

A leading communications company used our cloud Voice platform to send 30 million OTP calls per month to their customers, resulting in cost reduction and incrased conversion

Read Article
Bridging The Delay Gap in Conversational AI: The Backpressure Analogy

Bridging The Delay Gap in Conversational AI: The Backpressure Analogy

Conversational AI struggles with the time gap between text generation and speech synthesis. A “backpressure” mechanism, akin to network data flow control, could slow text generation to match speech synthesis speed, improving user interaction.

Read Article
How Voice AI Agents Can Automate Outbound Calls and Unlock New Opportunities for Businesses: A Deeper Dive

How Voice AI Agents Can Automate Outbound Calls and Unlock New Opportunities for Businesses: A Deeper Dive

AI voice agents transform healthcare scheduling by reducing costs, administrative tasks, and no-shows. They offer 24/7 service, multilingual support, proactive reminders, and valuable insights, improving efficiency and patient experiences.

Read Article
How to Fix Your Context: Mitigating and Avoiding Context Failures in LLMs

How to Fix Your Context: Mitigating and Avoiding Context Failures in LLMs

Larger context windows in LLMs cause poisoning, distraction, confusion, and clash. Effective context management (RAG, pruning, quarantine, summarization, tool loadouts, offloading) remains essential for high-quality outputs.

Read Article

SUBSCRIBE TO OUR NEWSLETTER

Stay up to date with the latest news and updates from our telecom experts