Background
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 a 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.
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
- Start an SSH session to your UCX server (e.g. use PuTTY) using the IP address of the UCX and port 22.
- Login as admin with the appropriate password
- To go to the var/tmp directory, enter cd /var/tmp at the command prompt
- Create a sub-directory by entering mkdir audio at the command prompt
- 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.
- 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.
- 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.
- 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) - 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 - When the appropriate segment of the call has completed, end the recording process by pressing Ctrl-C
- 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 specifying 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.
- Login to the UCX IP address with the admin account and associated password on port 22
- 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.
- In the PC side of the WinSCP window, navigate to a folder on your PC where you wish to download the files
- Drag the files from the UCX window to the PC window to complete the process.
- 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.
- Launch the Audacity application
- From the File Menu select Import and then Raw Data… and Select the file that you want to import
- 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 - 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.
- If you have recorded pre-echo canceler files of the same call you may wish to import them as well.
- This also give you a clear view of the amplitude of the audio on each channel
- Use the Zoom out function to display the entire recording in your window, or the Zoom in to see detail down to milliseconds
- 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