Transcribing Asterisk Voicemail using Sakura's AI Engine
server programming
Published: 2025-09-26

I used Asterisk’s ARI to record voicemail messages and transcribed them using Sakura’s AI Engine Whisper API.
The transcribed content is then notified to Slack.

Introduction

I utilized an existing Asterisk environment for this implementation.

Enabling ARI

Edit the Asterisk configuration file ari.conf to enable ARI.

  • ari.conf
    [general]
    enabled = yes
    
    [asterisk]
    type = user
    read_only = no
    password = asterisk
    password_format = plain
    

Enable Asterisk’s HTTP server as well.

  • http.conf
    [general]
    servername=Asterisk
    enabled=yes
    bindaddr=127.0.0.1
    bindport=8088
    

In this setup, we will configure the system to send incoming calls to voicemail at extension 999.

  • extensions.conf
    [default]
    exten => 999,1,Wait(1)
      same => n,Stasis(rusudenkun)
      same => n,Hangup()
    

Flow of Actions

  1. A call comes in to extension 999
  2. The ARI application rusudenkun starts
  3. A voice announcement plays
  4. Recording begins
  5. Once recording is finished, the recorded WAV file is transcribed using Sakura’s AI Engine Whisper API
  6. The transcription is notified to Slack

With that in mind, I casually implemented the ARI application in Go.

Testing the Call

I called the extension 999 and left a message on the voicemail.

root@asterisk:~# tail -f /var/log/rusudenkun.log
{"time":"2025-09-26T15:25:45.529096517+09:00","level":"INFO","msg":"StasisStart","channel":"1758867943.63"}
{"time":"2025-09-26T15:25:45.529204145+09:00","level":"INFO","msg":"Running app","channel":"1758867943.63"}
{"time":"2025-09-26T15:25:45.680639184+09:00","level":"INFO","msg":"playing announce","media":"sound:custom/rusuden"}
{"time":"2025-09-26T15:25:54.607939088+09:00","level":"INFO","msg":"announce finished"}
{"time":"2025-09-26T15:26:04.981533804+09:00","level":"INFO","msg":"completed recording"}
{"time":"2025-09-26T15:26:05.982012514+09:00","level":"INFO","msg":"recorded","path":"rusudenkun-1758867943.63.wav"}
{"time":"2025-09-26T15:26:06.69882038+09:00","level":"INFO","msg":"transcribed text","text":"This is a voicemail transcription test. This is a voicemail transcription test."}

The recorded WAV file is saved at /var/lib/asterisk/sounds/rusudenkun-<channel>.wav.
This audio file is transcribed using Sakura’s AI Engine Whisper API.

Slack Notification

The transcription was successful.

Summary

  • Successfully recorded voicemail messages using Asterisk’s ARI
  • Transcribed the recorded WAV files using Sakura’s AI Engine Whisper API
  • Notified the transcribed content to Slack

To be honest, not many phone calls come to my home appliances, so the free tier’s 50 requests are probably enough.