TryVox

Record

Record audio from the caller.

Record

The Record verb records audio from the caller and sends the recording URL to your server.

Example

{
  "voxml_version": "1.0",
  "instructions": [
    {
      "verb": "Say",
      "text": "Please leave a message after the beep."
    },
    {
      "verb": "Record",
      "action_url": "https://example.com/handle-recording",
      "max_length": 120,
      "finish_on_key": "#"
    }
  ]
}

Parameters

ParameterTypeRequiredDefaultDescription
action_urlstringyesURL to POST recording data to
max_lengthintegerno3600Maximum recording duration in seconds
timeoutintegerno5Seconds of silence to end recording
finish_on_keystringno1234567890*#Any key to finish recording
trimstringnotrim-silence"trim-silence" or "do-not-trim"
play_beepbooleannotruePlay beep before recording
transcribebooleannofalseTranscribe the recording
transcription_urlstringnoURL to POST transcription to

Basic Recording

{
  "verb": "Record",
  "action_url": "https://example.com/voicemail",
  "max_length": 180
}

Transcription

Enable automatic transcription:

{
  "verb": "Record",
  "action_url": "https://example.com/voicemail",
  "transcribe": true,
  "transcription_url": "https://example.com/transcription"
}

When transcribe is enabled, TryVox will:

  1. POST the recording URL to action_url immediately
  2. POST the transcription to transcription_url when ready (async)

Finishing Recording

Recording ends when:

  • max_length is reached
  • Silence exceeds timeout duration
  • Any key specified in finish_on_key is pressed
  • The caller hangs up

Disabling Keys

To disable finishing on key press:

{
  "verb": "Record",
  "action_url": "https://example.com/recording",
  "finish_on_key": ""
}

Silence Trimming

By default, silence at the beginning and end is trimmed:

{
  "verb": "Record",
  "action_url": "https://example.com/recording",
  "trim": "trim-silence"
}

To keep all audio including silence:

{
  "verb": "Record",
  "action_url": "https://example.com/recording",
  "trim": "do-not-trim"
}

Disabling Beep

{
  "verb": "Record",
  "action_url": "https://example.com/recording",
  "play_beep": false
}

Callback Payload

When recording completes, TryVox POSTs to action_url:

{
  "call_uuid": "abc-123",
  "account_id": "acc_xyz",
  "recording_url": "https://recordings.tryvox.ai/rec_xyz.mp3",
  "recording_duration": 45,
  "recording_size": 720000,
  "from": "+919876543210",
  "to": "+911234567890"
}

Transcription Callback

If transcribe is enabled, TryVox POSTs to transcription_url:

{
  "call_uuid": "abc-123",
  "recording_url": "https://recordings.tryvox.ai/rec_xyz.mp3",
  "transcription_text": "Hello, this is a test message.",
  "transcription_confidence": 0.98
}

Response to Callback

Your action_url should return new VoxML instructions:

{
  "voxml_version": "1.0",
  "instructions": [
    {
      "verb": "Say",
      "text": "Thank you for your message. Goodbye."
    },
    {
      "verb": "Hangup"
    }
  ]
}

Best Practices

  • Set reasonable max_length values (2-3 minutes for voicemail)
  • Use timeout to detect when caller stops speaking (3-5 seconds)
  • Enable transcribe for voicemail systems
  • Store recording URLs securely
  • Consider implementing recording retention policies

On this page