Skip to content

Voz pregrabada: let the customer press 1 to repeat the message #88

Description

@psanders

Request

A customer asked for a way for the person receiving the call to hear the message again.
Today a pre-recorded call plays the script once and hangs up: if the customer misses the
amount or the callback number, the call is wasted and they have no way to recover it.

Proposed approach

Press 1 to repeat, with the digit fixed (not configurable) for a first version:

  1. The voice application gathers a single DTMF digit after playing the message.
  2. If the caller presses 1, the message plays again.
  3. Anything else, or a timeout, hangs up as it does today.

The invitation itself lives in the operator's script, not in the platform:

Hola {{firstName}}, su saldo pendiente es de {{outstandingBalance}} {{currency}}.
Para escuchar este mensaje de nuevo, presione 1.

Keeping the wording in the script is deliberate: QCobro is multilingual, so a
platform-generated prompt would need translating and would collide with whatever voice and
tone the operator has chosen. This way it needs no new strings, and the operator decides
whether to offer it at all.

Scope: pre-recorded voice only

This applies to voz pregrabada, which runs through our own voice application
(mods/apiserver/src/voice/voiceServer.ts — currently answer → say → hangup). Voz IA runs
inside Fonoster's autopilot, where the customer can simply ask the agent to repeat, so it
needs nothing here. No other channel is affected: SMS, WhatsApp and email are re-readable by
nature.

The building blocks exist: response.gather({ source: DTMF, maxDigits: 1, timeout }) returns
the pressed digit, so this is a contained change to a single handler.

Decisions to make

1. Always on, or opt-in per template? This is the main one. Gathering unconditionally
means every pre-recorded call now waits for a keypress before hanging up, including the
majority where the operator never mentioned the option and nobody will press anything. That
silent tail is added to every call's duration, and pre-recorded voice is billed per minute in
15-second increments — so a few seconds of waiting can push calls into another increment
across an entire campaign. Options:

  • Always on, short timeout (simplest; costs a silent tail on every call)
  • A flag on the pre-recorded template config, defaulting off (no cost unless the operator opts
    in, at the price of one more setting)
  • Infer it: only gather when the rendered script mentions the key (clever, but fragile and
    hard to explain)

2. How many repeats? An unbounded loop is a call that never ends, metered per minute. Needs
a cap: probably 2 or 3 replays, then hang up.

3. Does the keypress mean anything beyond replaying? It is a real engagement signal (the
customer was listening and acted), so it may be worth recording on the contact log rather than
discarding it.

4. Timeout length. Long enough for someone to react after the message ends, short enough
not to inflate every call.

Also needed

  • Document it in the voz pregrabada section of the agent-templates guide: what the caller can
    press, and that the operator has to say so in the script for it to be discoverable.
  • Call-duration effects: repeats extend answeredSeconds, which flows into usage metering and
    campaign pacing assumptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions