Hi Everyone,
I am experiencing an issue with recording calls in Asterisk 22. Here’s the setup and the problem in detail:
Setup:
-
Using PJSIP endpoints.
-
Dialplan triggers ARI (Stasis app) for call handling.
-
MixMonitor is started in the dialplan to record calls, with recordings intended to be saved in a custom sounds directory.
-
I have Node.js handling TTS playback and trying to implement real-time STT on the call audio.
Problem:
-
Outbound audio (Asterisk → Client) works fine, and the client can hear the audio.
-
RTP packets are flowing in both directions according to Asterisk logs.
-
However, incoming audio from the client (Client → Asterisk) is not being converted into a usable recording file.
-
MixMonitor logs indicate the recording has started, but there is no log indicating that the recording ended, and no
.wavfile appears in the target directory after the call. -
Node.js server and ARI app are running, but attempts to capture the audio stream for STT also fail.
Additional Notes:
- I am using standard MixMonitor syntax in the dialplan:
exten => 5000,1,Answer()
same => n,MixMonitor(/path/to/custom/recordings/call-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}.wav,b)
same => n,Stasis(voicebot)
-
The call flow is unidirectional for recording purposes, but the RTP logs show bidirectional packets.
-
Attempts to pipe audio into Node.js for real-time STT have been unsuccessful.
What we are trying to achieve:
-
Save full audio of the call (both directions) reliably to a
.wavfile. -
Optionally, process the incoming audio in real-time for STT transcription.
Questions:
-
Are there known issues in Asterisk 22 where MixMonitor fails to finalize recordings if ARI/Stasis is involved?
-
Are there recommended dialplan changes or MixMonitor flags to ensure the recording completes and file is written?
-
Are there better approaches for capturing the inbound audio for both recording and real-time STT processing?
Any guidance or suggestions would be greatly appreciated!