Voicemail

Per-extension voicemail with transcription and email notifications

Every extension can have a voicemail box with custom greetings, PIN protection, automatic transcription (Deepgram Nova-2), and email notifications. Voicemail is auto-provisioned when an extension is created with voicemailEnabled: true.

Features

FeatureDescription
Custom GreetingsUpload audio or generate via TTS
PIN ProtectionOptional PIN to access voicemail
TranscriptionAutomatic speech-to-text via Deepgram Nova-2
Email NotificationsEmail with transcription when a new message arrives
AI EnrichmentSentiment analysis, action items, and summary via Claude
RetentionConfigurable retention period (default 90 days)

List Mailboxes

GET/v1/pbx/voicemail/mailboxes

List all voicemail mailboxes

Requires:pbx:voicemail:read
curl -X GET "https://api.do.dev/v1/pbx/voicemail/mailboxes" \
  -H "Authorization: Bearer do_live_your_key_here"
{
  "mailboxes": [
    {
      "id": "vm_101",
      "extensionNumber": "101",
      "extensionName": "Front Desk",
      "messageCount": 3,
      "newMessages": 1,
      "greetingType": "tts",
      "notifyEmail": "frontdesk@example.com"
    }
  ]
}

Voicemail Pipeline

When a voicemail is deposited:

  1. Record -- Caller records audio (PCM via FreeSWITCH)
  2. Convert -- PCM converted to WAV
  3. Store -- Uploaded to Convex storage
  4. Transcribe -- Deepgram Nova-2 speech-to-text
  5. Enrich -- AI extracts sentiment, action items, summary
  6. Notify -- Email sent with transcription and audio link

The entire pipeline completes in under 10 seconds.

Webhook Events

EventDescription
pbx.voicemail.receivedNew voicemail deposited, includes transcription
{
  "event": "pbx.voicemail.received",
  "data": {
    "mailboxId": "vm_101",
    "extensionNumber": "101",
    "callerNumber": "5551234567",
    "duration": 32,
    "transcription": "Hi, this is John. I'm calling about the proposal...",
    "sentiment": "positive",
    "audioUrl": "https://pbx.dev/storage/vm_abc123.wav"
  }
}