# Send High-Priority Voice Alerts

Reach out to your end users in an instant using [Voice](https://www.infobip.com/docs/voice-and-video) 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](https://www.infobip.com/docs/voice-and-video/outbound-calls#text-to-speech-voice-over-broadcast) 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

1. [Infobip account](https://portal.infobip.com/login/?callback=https%3A%2F%2Fportal.infobip.com%2F). If you do not have one, you can create a [free trial account](https://www.infobip.com/signup).
2. Infobip API key with the `voice:message:message:send` scope. Find out more about [API keys and scopes](https://www.infobip.com/docs/essentials/api-essentials/api-authorization).
3. Sender. Request a number or an alphanumeric sender through the [Infobip account](https://portal.infobip.com/channels-and-numbers/channels/sms/overview) or using [Infobip Numbers API](https://www.infobip.com/docs/api/platform/numbers).
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](https://www.infobip.com/docs/api/channels/voice/voice-message/send-advanced-voice-tts) towards Infobip once the agreed threshold has been reached or a specific event has happened.

```bash
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 <apidocslink href="channels/voice">Get Voices</apidocslink> call.

For more features, check out the <apidocslink href="channels/voice">Voice API reference</apidocslink>.

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.