🇪🇸 Español 🇬🇧 English 🇧🇷 Português

IVR node: Detect language

Automatically detect a caller's language from their phone number's country code and branch the IVR into Spanish, English, or Portuguese.

Jul 11, 2026

What it's for

Detects the caller's most likely language from their phone number's country code, stores it in a variable, and branches the flow into three outputs: es, en, pt. That lets you greet and route each caller in their own language without asking first.

How detection works

  • Portuguese: Brazil (55) and Portugal (351) numbers.
  • English: NANP/US-Canada (1), UK (44), Ireland (353), Australia (61), New Zealand (64).
  • Spanish: any other country code (Latam and Spain — Omnifox's core audience), and also the fallback when the number can't be read.

Configuration

  • Store in variable: the name of the variable that holds the detected language (defaults to detected_lang if left blank).

Outputs (edges)

es, en, pt — wire each one to that language's branch of the IVR (greeting, menu, AI agent), or straight into a node that routes further using ${detected_lang}.

Example

A +55 11 9XXXX number calls the main line. The Detect language node stores ${detected_lang} = "pt" and continues down the pt edge, which leads to a Play audio node with a Portuguese greeting and then a Route to AI node configured with a Portuguese-speaking agent.

Tips

  • Place it near the very start of the flow, before any greeting, so you never play audio in the wrong language.
  • Reuse the stored variable (e.g. ${detected_lang}) in a Route to AI node so the AI agent replies in the right language without separate configuration.

Troubleshooting

  • If a number shows the wrong language, remember detection goes by country code, not the caller's actual language — an Ecuadorian calling from a US number lands on the en branch.
  • If the number arrives without a recognizable (or empty) country code, the node defaults to Spanish.
Was this helpful?

Related articles