Recording Dahdi Calls for Troubleshooting UCX Systems


Recording the speech path on a Dahdi channel is very valuable as a component of troubleshooting various scenarios that may impact UCX calls. Recording and downloading a voice path can be used to identify echo, verify the reception of Calling Line ID modem tones, and determine the duty cycle of disconnect signaling for setting disconnect parameters.

Recording an Dahdi Channel

UCX Dahdi channels can be recorded via the UCX Command Line Interface. You can use the dahdi_monitor command line utility to record DAHDI channels for analog or PRI interfaces. Note that Galaxy FXS16 cards do not use a Dahdi interface to connect to the UCX software, but have their own internal Dahdi interface that can also be recorded; the recording can be accessed through the web management system. Refer to FXS 16-port Card - System Menu for additional details.

You will want to create the recordings in a separate directory for easier access and cleanup after you are finished the process. E-MetroTel recommends creating a sub-directory within the var/tmp directory.

Step 1: Create a storage location

  1. Start an SSH session to your UCX server (e.g. use PuTTY) using the IP address of the UCX and port 22.
  2. Login as admin with the appropriate password
  3. To go to the var/tmp directory, enter cd /var/tmp at the command prompt
  4. Create a sub-directory by entering mkdir audio at the command prompt
  5. Navigate to that directory by typing cd audio at the command prompt

Step 2: Capturing the recording

Note: Recording files can be huge and can use up a large chunk of the available storage!  Watch your disk space usage and delete the recordings when you are finished.  You DO NOT want to run out of drive space.

  1. Ensure the UCX is configured to use the channel that you wish to record. This may require temporary configuration changes in the incoming or outgoing routes or possibly busying out some of the other channels.
  2. If you wish to record the entire call including the ringing and the incoming CallerID modem burst or dial tone and DTMF digits being sent, start the recording before making the call.
  3. The dahdi_monitor command typically uses any of the following parameters (you may use one or more of the recording types):
    channel_no The number of the channel to be recorded (Required)
    -r filename Records the audio stream of the channel on the incoming (Rx) side to the specified filename
    -t filename Records the audio stream of the channel on the outgoing (Tx) side to the specified filename
    -R filename Records the audio stream of the channel on the incoming (Rx) side before the echo canceler to the specified filename
    -T filename Records the audio stream of the channel on the outgoing (Tx) side before the echo canceler  to the specified filename
    -v Displays visual audio levels (Optional)
  4.  To record both the Rx and Tx sides of channel 1 with visualization enter the following command:
    dahdi_monitor 1 -r rec_chan_1_rx.raw -t rec_chan_1_tx.raw -v
  5. When the appropriate segment of the call has completed, end the recording process by pressing Ctrl-C
  6. This will result in files called rec_chan_1_rx and rec_chan_1_tx containing .raw audio data being saved in the /var/tmp/audio folder created in Step 1.

Note that if you are troubleshooting a call that traverse both UCX analog interfaces and IP or digital phones, you may wish to run a packet capture at the same time as you do the audio recording. Also note that if you are troubleshooting a call scenario between two Dahdi analog interfaces (i.e. an analog trunk connecting to an analog phone) you will need to open a second SSH session with the UCX and execute the dahdi_monitor command specifiying the port number of the second interface  and distinctive files names to compare both legs of the call.

Step 3: ​Retrieving the Recordings

In order to listen to or analyze the recordings in any way, you must download the output files from the UCX folder. To do this you may wish to use an application such as WinSCP.

  1. Login to the UCX IP address with the admin account and associated password on port 22
  2. In the UCX side of the WinSCP window, navigate to the /var/tmp/audio folder of the UCX. You should see the completed recording files.
  3. In the PC side of the WinSCP window, navigate to a folder on your PC where you wish to download the files
  4. Drag the files from the UCX window to the PC window to complete the process.
  5. You may wish at this time to delete the recording files from the UCX folder. Remember that once you are finished troubleshooting the audio issue you should delete the files from the system to avoid unnecessarily using disk space. 

Step 4: Analyzing the Recordings

To listen to and analyze the recording, you will need to import the files with the .raw audio format into another application such as Audacity.​

  1. Launch the Audacity application
  2. From the File Menu select Import and then Raw Data... and Select the file that you want to import
  3. Use the following setting for the dialog box that is displayed:
    - Encoding: Signed 16-bit PCM
    - Byte Order: Little-endian
    - Channels: 1 Channel (Mono)
    - Start offset: 0
    - Amount to import: 100
    - Sample rate: 8000
  4. Do this for both files and you will have a stereo representation of the call, with one channel on the left speaker and one channel on the right speaker.
  5. If you have recorded pre-echo canceler files of the same call you may wish to import them as well.
  6. This also give you a clear view of the amplitude of the audio on each channel
  7. Use the Zoom out function to display the entire recording in your window, or the Zoom in to see detail down to milliseconds
  8. When you are done reviewing the files, you may export them from Audacity as them as WAV files by clicking on each track individually, and selecting File / Export, Export as WAV from the Audacity menu
Page Tags: