Skip to main content

Visual Voicemail (VVM)

OmniSEP provides a Visual Voicemail server implementing the OMTP VVM Specification v1.3 and GSMA TS.46. The VVM service enables smartphones to manage voicemail messages through an IMAP interface, with provisioning handled via SMS.

Architecture Overview

Provisioning Flow

VVM provisioning follows the OMTP specification state machine. When a device activates VVM, it sends an ACTIVATE SMS, receives credentials via STATUS SMS, then connects via IMAP.

Provisioning States

The VVM service tracks subscriber provisioning state per the OMTP specification:

StateCodeDescription
UnknownUInitial state, no provisioning attempted
NewNAccount created, awaiting first client connection
ReadyRFully provisioned and operational
ProvisionedPCredentials sent, awaiting client verification
BlockedBService deactivated or suspended

SMS Protocol

STATUS Message (Server to Client)

Sent after activation to provide IMAP credentials:

//VVM:STATUS:st=R;rc=0;srv=vvm.example.com;ipt=993;spt=587;u=505010000000001@ims.example.com;pw=SecretPass123;tui=*86;dn=+61400000000;lang=eng.1;g_len=60;vs_len=60;pw_len=4-15;pm=N;gm=N;vtc=A
FieldDescription
stProvisioning state (R=Ready, B=Blocked, N=New, P=Provisioned, U=Unknown)
rcReturn code (0=success)
srvIMAP server hostname
iptIMAP port
sptSMTP port (if applicable)
uUsername (IMSI-based)
pwPassword
tuiTUI access number
dnSMS destination number (for client replies)
langLanguage code
g_lenMaximum greeting length in seconds
vs_lenMaximum voice signature length in seconds
pw_lenPIN length range
pmPIN required (Y/N)
gmGreeting reset mode (G=greeting, V=voice signature, B=both, N=none)
vtcTranscription capability (A=automatic, D=on-demand, B=both, N=none)

SYNC Message (Server to Client)

Sent when mailbox content changes:

//VVM:SYNC:ev=NM;id=123;c=5;t=v;s=+61400123456;dt=15/01/2024 10:30 +0000;l=30
FieldDescription
evEvent type (NM=new message, MBU=mailbox update, GU=greeting update)
idMessage ID
cUnread message count
tMessage type (v=voice, o=video, f=fax, i=infotainment, e=ECC)
sSender number
dtDeposit timestamp
lMessage length in seconds

ACTIVATE Message (Client to Server)

Sent by device to enable VVM:

Activate:pv=11;ct=samsung.SM-A536E.13
FieldDescription
pvProtocol version
ctClient type (vendor.model.os_version)

DEACTIVATE Message (Client to Server)

Sent by device to disable VVM:

Deactivate:pv=11

IMAP Server

The VVM IMAP server implements a subset of IMAP4rev1 (RFC 3501) tailored for voicemail:

Supported Commands

CommandDescription
CAPABILITYList server capabilities
LOGINAuthenticate with username/password
LOGOUTEnd session
SELECTOpen mailbox (INBOX, Trash, Saved)
EXAMINEOpen mailbox read-only
LISTList available mailboxes
STATUSGet mailbox status (message counts)
FETCHRetrieve message content
UID FETCHRetrieve by UID
STOREUpdate message flags
UID STOREUpdate flags by UID
SEARCHSearch messages
UID SEARCHSearch by UID
COPYCopy messages between mailboxes
EXPUNGEPermanently delete flagged messages
CLOSEClose mailbox and expunge
GETQUOTAROOTGet storage quota
NOOPKeep-alive

Capabilities

IMAP4rev1 AUTH=PLAIN AUTH=LOGIN UIDPLUS MOVE QUOTA

Mailbox Structure

MailboxDescription
INBOXNew and read voicemail messages
TrashMessages marked for deletion
SavedArchived messages

Message Format

Voicemail messages are presented as RFC 5322 email with multipart MIME structure:

From: +61400123456 <voicemail@vvm.local>
To: 505010000000001@ims.example.com
Date: Sat, 25 Jan 2025 10:30:00 +0000
Subject: Voicemail from +61400123456
Message-ID: <123@vvm.omnisep>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_Part_0"
X-VVM-MsgType: voice
X-VVM-Duration: 30
X-VVM-Sender: +61400123456

------=_Part_0
Content-Type: text/plain; charset="UTF-8"

Voicemail from: +61400123456
Duration: 30 seconds

Transcription:
Hello, this is a test voicemail message.

------=_Part_0
Content-Type: audio/amr
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="voicemail.amr"

[Base64 encoded audio]
------=_Part_0--

Custom Headers

HeaderDescription
X-VVM-MsgTypeMessage type (voice, video, fax, infotainment, ecc)
X-VVM-DurationMessage duration in seconds
X-VVM-SenderOriginal caller number

Configuration

Enabling VVM

# config/config.exs
config :omni_sep, :vvm,
enabled: true,

# IMAP server settings
imap_port: 993,
imap_ssl: true,
imap_server: "vvm.example.com",
imap_cert: "priv/cert/server.crt",
imap_key: "priv/cert/server.key",

# TUI (Traditional User Interface) number
tui_number: "*86",

# SMS settings
sms_source_number: "+61400000000",
sms_gateway: "https://sms-gateway.example.com/api/send",

# PIN settings
min_pin_length: 4,
max_pin_length: 15,

# Subscriber limits
default_max_messages: 100,
default_storage_limit_kb: 50_000,
default_max_greeting_seconds: 60

Configuration Parameters

ParameterTypeRequiredDefaultDescription
enabledBooleanNofalseEnable VVM services
imap_portIntegerNo993IMAP server port
imap_sslBooleanNotrueEnable TLS for IMAP connections
imap_serverStringYes-IMAP server hostname (sent in STATUS SMS)
imap_certStringNopriv/cert/server.crtPath to TLS certificate
imap_keyStringNopriv/cert/server.keyPath to TLS private key
smtp_portIntegerNo587SMTP port (future use)
tui_numberStringNo*86TUI access number for legacy voicemail
sms_source_numberStringYes-Source number for VVM SMS messages
sms_gatewayStringNonilSMS gateway HTTP endpoint
min_pin_lengthIntegerNo4Minimum PIN length
max_pin_lengthIntegerNo15Maximum PIN length
default_max_messagesIntegerNo100Default message limit per subscriber
default_storage_limit_kbIntegerNo50000Default storage quota in KB
default_max_greeting_secondsIntegerNo60Maximum greeting duration

Development Configuration

For development, use plain IMAP (no TLS) for easier testing:

# config/dev.exs
config :omni_sep, :vvm,
enabled: true,
imap_port: 1430,
imap_ssl: false,
imap_server: "localhost",
tui_number: "*86",
sms_source_number: "+61400000000"

Production Configuration

# config/prod.exs
config :omni_sep, :vvm,
enabled: true,
imap_port: 993,
imap_ssl: true,
imap_server: "vvm.carrier.example.com",
imap_cert: "/etc/omnisep/certs/vvm.crt",
imap_key: "/etc/omnisep/certs/vvm.key",
tui_number: "*86",
sms_source_number: "+61400000001",
sms_gateway: "https://smsc.carrier.example.com/api/v1/send"

Metrics

IMAP Session Metrics

Metric: vvm_imap_sessions_total Type: Counter Description: Total number of VVM IMAP sessions Labels:

  • result - Session outcome: success, auth_failed, timeout

Metric: vvm_imap_active_sessions Type: Gauge Description: Number of currently active IMAP sessions

Metric: vvm_imap_commands_total Type: Counter Description: Total IMAP commands processed Labels:

  • command - IMAP command: LOGIN, SELECT, FETCH, etc.
  • result - Command result: ok, no, bad

Message Metrics

Metric: vvm_messages_total Type: Counter Description: Total VVM message operations Labels:

  • operation - Operation type: deposit, read, delete, move

Metric: vvm_messages_stored Type: Gauge Description: Total number of voicemail messages currently stored

Metric: vvm_message_duration_seconds Type: Histogram Description: Duration of voicemail messages in seconds Buckets: 5, 10, 15, 30, 60, 120, 180, 300

SMS Metrics

Metric: vvm_sms_total Type: Counter Description: Total VVM SMS messages Labels:

  • type - SMS type: status, sync, activate, deactivate
  • result - Delivery result: success, failed, no_gateway

Account Metrics

Metric: vvm_accounts_total Type: Counter Description: VVM account operations Labels:

  • operation - Operation: create, activate, deactivate, update
  • result - Result: success, error

Metric: vvm_accounts_active Type: Gauge Description: Number of active VVM accounts

Example Prometheus Queries

# IMAP session rate
rate(vvm_imap_sessions_total[5m])

# Authentication failure rate
sum(rate(vvm_imap_sessions_total{result="auth_failed"}[5m]))
/ sum(rate(vvm_imap_sessions_total[5m]))

# Average message duration
histogram_quantile(0.5, rate(vvm_message_duration_seconds_bucket[5m]))

# SMS delivery success rate
sum(rate(vvm_sms_total{result="success"}[5m]))
/ sum(rate(vvm_sms_total[5m]))

# Active sessions over time
vvm_imap_active_sessions

Greeting Management

VVM supports multiple greeting types per subscriber:

Greeting TypeDescription
normalStandard personal greeting
busyPlayed when subscriber is busy
extended_absenceVacation or out-of-office greeting
voice_signatureVoice signature for name announcement

Greetings are stored and retrieved via the storage API. The IMAP server includes greeting metadata in the account quota response.

Troubleshooting

Client Cannot Activate VVM

Symptoms: Device shows "Visual Voicemail unavailable" or activation fails

Possible causes:

  • SMS gateway not configured or unreachable
  • Source number not whitelisted at SMSC
  • VVM service disabled in configuration

Resolution:

  1. Verify sms_gateway is configured and reachable
  2. Check SMS gateway logs for delivery status
  3. Confirm enabled: true in VVM configuration
  4. Review metrics: vvm_sms_total{type="status"}

IMAP Authentication Failures

Symptoms: Client cannot connect after receiving STATUS SMS

Possible causes:

  • Username/password mismatch
  • TLS certificate issues
  • Firewall blocking IMAP port

Resolution:

  1. Verify credentials match between STATUS SMS and account storage
  2. Check TLS certificate validity and trust chain
  3. Confirm firewall allows traffic on configured IMAP port
  4. Test with telnet/openssl: openssl s_client -connect vvm.example.com:993

Messages Not Syncing

Symptoms: New voicemails not appearing on device

Possible causes:

  • SYNC SMS not being sent
  • IMAP session disconnected
  • Message deposit failing

Resolution:

  1. Check vvm_sms_total{type="sync"} metrics
  2. Verify SMS gateway connectivity
  3. Check vvm_messages_total{operation="deposit"} for deposit failures
  4. Review IMAP session metrics for disconnections

High Storage Usage

Symptoms: Subscribers hitting quota limits

Resolution:

  1. Review quota settings: default_storage_limit_kb, default_max_messages
  2. Check vvm_messages_stored gauge
  3. Consider implementing automatic message expiration
  4. Review greeting storage: get_greetings/1 returns audio sizes

References