Monday, November 17, 2014

Asterisk - recording confbridge

When you find a business case to record a conference in asterisk here are some tips I have found.

Don't set record_conference to yes in the conf file, instead set only the conferences you want to record in the dialplan.  This can be done with


but there are some caveats, as you can see I tried to name the file as a variable.wav, however the file will actually be named variable-timestamp.wav, which can cause issues if you don't expect it.  Sure there are ways to get the filename in the dialplan (MIXMONITOR_FILENAME I think), but our solution, which processes the files after the call is done was found on the internet and just runs this command in PHP
$cmd = 'mv /var/spool/asterisk/confbridge/'.$data['phone_call_id'].'-*.wav /var/spool/asterisk/confbridge/' . $data['phone_call_id'] . '.wav';

In Asterisk 11 we were able to start our conference with

which would still use our settings set above to record the conference, however in asterisk 13 which we just upgraded to this command now has to be

which uses the custom channel bridge variable setup by the CONFBRIDGE function

1 comment: