Reply with a JSON object containing the accion field plus the extra fields that apply to that action (any others are ignored):
| accion | What it does | Extra fields |
| `ia` | The caller talks to your AI assistant by voice (the same one you train for WhatsApp). This is also what happens if accion is missing or not recognised. | `texto` (optional): replaces the opening greeting. |
| `reproducir` | Reads the text out loud and hangs up. | `texto` (recommended; if missing we read «Thank you for your call.»). |
| `desviar` | Transfers the call to the given destination. | `destino` (required): a Spanish national number or any international number in +E164, ext:NNN (an extension of your PBX) or grupo:N (a ring group). Premium 90x/80x numbers are blocked; an invalid destination falls back to the AI assistant. |
| `ivr` | Offers an options menu (keypad and spoken keywords). | `plantilla`: the name of a menu saved in your panel; or `menu`: an inline menu object (format below). If neither is valid, it falls back to the AI assistant. |
| `buzon` | Announcement and voicemail (you get the audio by email). | `texto` (optional): announcement before the beep. |
| `buzon_inteligente` | Smart voicemail: asks the caller for their email by voice (transcribed, with «at/dot» normalised, and without making them confirm it: dictating an email over the phone is tiring and makes people hang up without leaving the message), asks you with the `buzon_email` event, then asks for the reason for the call —which is what really matters, together with their phone number—, transcribes it and, when saying goodbye, offers them the chance to repeat the email in case it was wrong. Everything is emailed to the account holder with the call audio attached, so the address can be checked if the transcription was not accurate. | `texto` (optional): opening announcement. |
| `colgar` | Hangs up the call. | `texto` (optional): goodbye message before hanging up. |
Optional common fields, valid with any action:
- idioma: TTS voice and language in the form xx-XX:n (n: 1 female, 2 male). E.g. es-ES:1, pt-PT:1, en-US:1.
- grabar: true/false, turns recording of this call on or off.
Response examples:
// Send a VIP customer straight to their account manager
{ "accion": "desviar", "destino": "+34600000001" }
// Send the call to ring group 2 (rings on several extensions)
{ "accion": "desviar", "destino": "grupo:2" }
// Custom greeting and AI assistant
{ "accion": "ia", "texto": "Hello Mr Garcia, you are through to the MyCompany assistant." }
// A menu saved in the panel
{ "accion": "ivr", "plantilla": "Main menu" }
// Read out a notice and hang up
{ "accion": "reproducir", "texto": "Your order 1234 ships today. Thank you for calling." }
// Voicemail with your own announcement and recording enabled
{ "accion": "buzon", "texto": "We cannot take your call right now, please leave a message.", "grabar": true }
Inline menu format (menu): the very same object produced by the visual editor in the panel. Keys: locucion (the text read out offering the options; it accepts the (MP3:file) and (PAUSA:seconds) markers), esMenuDTMF = 1, and one key per keypad digit holding the option: Accion (1 repeat · 2 notify a URL · 3 notify by email · 4 transfer to a phone · 6 hang up · 7 AI assistant · 8 transfer to an extension · 9 transfer to a ring group), Valor (the target of the action), Palabra (optional: the caller may SAY it instead of pressing the key), LocucionPrevia and LocucionFinal (optional, played before and after the action).
{
"accion": "ivr",
"menu": {
"locucion": "For sales, say sales or press 1. For support, press 2.",
"esMenuDTMF": 1,
"1": { "Accion": "9", "Valor": "grupo:1", "Palabra": "sales", "LocucionPrevia": "Putting you through to sales." },
"2": { "Accion": "8", "Valor": "ext:102" }
}
}