Asterisk MixMonitor / Recording push to database

Hello all,

I am recording all voice calls incoming & outgoing using MixMonitor from asterisk dialplan, I want to know one thing,
can we fire a custom python script to push the call recording(file name) to database ? and from where it can be played back using web interface or downloaded for reference,

Thanks in advance.


Your script could listen for the call hangup event. Another option is to monitor the directory where the sound files are collected; when a file is closed, you know the recording has completed. Your dialplan can attach useful information to the filename, like the number being called.

I am assuming I can use python script as well to achieve the same or it has to be any specific language interface supported by asterisk


The MixMonitor application[1] takes an argument for a post processing command after a recording is completed. It executes whatever you give it, in whatever language.

[1] MixMonitor - Asterisk Documentation

Thanks, But how do I pass recording file name as parameter ?
below is couple of lines from my asterisk dp

same => n,Set(FileName=${CALLERID(dnid)}_${UNIQUEID})
same => n,MixMonitor(${FileName}.wav,‘/var/lib/asterisk/agi-bin/’)



same => n,MixMonitor(${FileName}.wav,,/var/lib/asterisk/agi-bin/ ${FileName}.wav)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.