How do I record calls using dahdi_monitor?

The dahdi_monitor utility can be used to take recordings at the driver level of DAHDI channels, and to visually monitor volume levels on a channel.  
 

Note: When using dahdi_monitor, the first parameter is always the channel number, as seen by DAHDI, you will need to check the DAHDI configuration file in order to find out the channel number of the specific  card that you want to troubleshoot.  Also for more information about the application options, please run  dahdi_monitor without any options. 

Visual Monitoring

To visually monitor a channel, run the following command: dahdi_monitor X -v  (Where 'X' is the channel number of your choosing.)

Recording

You have many options when recording audio using dahdi_monitor. You can split the audio into separate files for TX and RX to better distinguish which side of the communication is having an issue, or mix TX and RX into the same file. You can also get the audio before it is sent through echo-cancellation as well as after it has come through echo-cancellation.

For troubleshooting we normally split TX and RX into separate files, but collecting the audio prior to echo-cancellation depends on the situation.

 

Currently, as of DAHDI 2.2.1 and all previous versions of DAHDI and Zaptel, you can not get audio prior to echo-cancellation when using a VPM hardware echo-cancellation module. If a hardware echo-cancellation module is installed and in-use, all audio captured through dahdi_monitor will be post echo-cancellation. There have been signs that with the VPMADT032 this may change in the future, however the capability is not yet present.

 

dahdi_monitor normally records audio to a 'raw' audio format. For this reason, we often use the extension '.raw' when naming files for recording audio. However, newer versions of dahdi_monitor (2.2.1?) also support saving audio to wave format. To enable this, you simple change the extension of specified file names to '.wav' instead of raw.

 

When taking recordings it is important to name each file to give an indication of what is recorded in that file. Engineering has specified a standard for naming these files to make them readily understandable. The generic format is as follows:

 

<echocan type>-<version of echocan>-<PRE or POST echocan>-<TX or RX>-<echocan ON or OFF (hardware only)>.wav
 

Example:

vpm-tx-on.wav

vpm-rx-off.wav

hpec-pre-tx.wav

hpec-post-rx.wav

 

Example Usage: 

Only post echo-cancellation

  • dahdi_monitor 7 -m -r vpm-rx-on.wav -t vpm-tx-on.wav

 

Pre and post echo-cancellation

  • dahdi_monitor 7 -m -r hpec-v10.04.001-post-rx.wav -t hpec-post-tx.wav -R hpec--pre-rx.wav -T hpec-v10.04.001-pre-tx.wav

 

Only pre echo-cancellation with visualization

  • dahdi_monitor 7 -m -v -R hpec-pre-rx.wav -T hpec-pre-tx.wav

 

When you have finished recording, simply hit Ctrl + c to kill the program and stop recording.

 

Return to Documentation Home I Return to Sangoma Support