CTRLK

Send High-Priority Voice Alerts

|

View as Markdown

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

Voice use case - Inform Customers About High-Priority Alerts - process workflow

Prerequisites

  1. Infobip account. If you do not have one, you can create a free trial account.
  2. Infobip API key with the voice:message:message:send scope. Find out more about API keys and scopes.
  3. Sender. Request a number or an alphanumeric sender through the Infobip account or using Infobip Numbers API.
  4. Destination - a phone number to which the message will be sent.

Implementation steps [#implementation-steps]

Note

The implementation steps assume that your system is already set up for alert notification that will trigger the Voice API.

  1. 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.
  2. Implement the send Voice message API call towards Infobip once the agreed threshold has been reached or a specific event has happened.
cURL
1curl -L 'https://{baseUrl}/tts/3/advanced' \
2-H 'Authorization: {authorization}' \
3-H 'Content-Type: application/json' \
4-H 'Accept: application/json' \
5-d '{
6 "bulkId": "My-alerts",
7 "messages": [
8 {
9 "from": "41793026700",
10 "destinations": [
11 {
12 "to": "41793026727",
13 "messageId": "My-bank-alerts"
14 },
15 {
16 "to": "41793026731"
17 }
18 ],
19 "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.",
20 "language": "en",
21 "voice": {
22 "name": "Joanna",
23 "gender": "female"
24 },
25 "maxDtmf": 1,
26 "dtmfTimeout": 10,
27 "callTimeout": 130,
28 "callTransfers": [
29 {
30 "equals": "1",
31 "transferTo": "41793026700",
32 "callTransferMaxDuration": 45,
33 "if": "dtmf"
34 }
35 ]
36 }
37 ]
38}'

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 call.

For more features, check out the Voice API reference.

IMPORTANT

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.