Send High-Priority Voice Alerts
Reach out to your end users in an instant using Voice messaging. You can automate tasks like login alters, appointment reminders, payment confirmations, or basic customer service inquiries.
Convert text-to-speech using some of the available languages and voices or pre-record an audio file containing the message that you want to play to your customers.
This tutorial teaches you how to integrate Voice and notify your customers about an alert you have previously flagged as a call trigger. The tutorial showcases the text-to-speech feature.
Process Workflow

Prerequisites
- Infobip account (opens in a new tab). If you do not have one, you can create a free trial account (opens in a new tab).
- Infobip API key with the
voice:message:message:send
scope. Find out more about API keys and scopes. - Sender. Request a number or an alphanumeric sender through the Infobip account (opens in a new tab) or using Infobip Numbers API (opens in a new tab).
- Destination - a phone number to which the message will be sent.
Implementation steps
The implementation steps assume that your system is already set up for alert notification that will trigger the Voice API.
- Arrange alerting notifications thresholds or events that will trigger the call. These can be an unauthorized account access, money withdrawal, or other type of alert.
- Implement the send Voice message API call (opens in a new tab) towards Infobip once the agreed threshold has been reached or a specific event has happened.
curl -L 'https://{baseUrl}/tts/3/advanced' \
-H 'Authorization: {authorization}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"bulkId": "My-alerts",
"messages": [
{
"from": "41793026700",
"destinations": [
{
"to": "41793026727",
"messageId": "My-bank-alerts"
},
{
"to": "41793026731"
}
],
"text": "Hello, this is Your Bank notification. Your account has been accessed. If it wasn't you, contact our support or press 1 to be connected with our agent.",
"language": "en",
"voice": {
"name": "Joanna",
"gender": "female"
},
"maxDtmf": 1,
"dtmfTimeout": 10,
"callTimeout": 130,
"callTransfers": [
{
"equals": "1",
"transferTo": "41793026700",
"callTransferMaxDuration": 45,
"if": "dtmf"
}
]
}
]
}'
Key points:
- Use
callTransfers
to set up transferring options for the ongoing call to another recipient(s). - Use
maxDtmf
to set up a number of tries a user can enter the DTMf code before the call is dropped. - For the list of voices available for a specific language, use the Get Voices (opens in a new tab) call.
For more features, check out the Voice API reference (opens in a new tab).
Please keep in mind that Voice can only use numeric senders, and delivery of the entered sender depends on the CLI route being supported. What this means is that we are not sure that the voice connection we are using is able to deliver the caller ID as defined. Sometimes operators will manipulate the CallerID in some other value.