The PCM capture procedure varies depending on which version of IOS you are running.
For IOS versions 15.1(4)M and OLDER, the steps are as follows:

  1. Enter configure terminal mode on the GW.
  2. Enter "voice hpi capture buffer 3000000" to configure the capture buffer.
  3. Enter "voice hpi capture destination flash:pcm.dat" to specify the destination file.

Note: If you will be making a large PCM capture or will leave it running for a long period of time it would be best to direct to a TFTP server. To do so, use this command:
"voice hpi capture destination tftp://a.b.c.d/pcm.dat"
Where a.b.c.d is the IP address of the TFTP server.
Once you have the above configured you are ready to capture the PCM stream from the router. To do so follow these steps:

  1. Start a test call and leave it connected.
  2. Enter "show call active voice brief" and determine what voice port the test call is using. "show voice call sum" will also show what ports are in use.
  3. Enter "test voice port 1/0/4 pcm-dump caplog 7" where 1/0/4 is the number of the voice port that has the test call connected.

Note: If you are capturing a call on a PRI you will need to specify the voice-port number and the b-channel the call is on. For example:
"test voice port 0/0/0:23.14 pcm-dump caplog 7"
Where the voice-port is 0/0/0:23 and the b-channel, as shown in "show call active voice brief", is 14.
Note: some versions of IOS require you to enter a duration command after "caplog 7". "duration 255" is sufficient. You can check the status of the capture using the following command:
sh voice hpi capture
This will show you the following output:
HPI Capture is on and is logging to URL flash:pcm.dat
11196 mesages sent to URL, 0 messages dropped
Message Buffer (total:inuse:free) 3048:0000:3048
Buffer Memory: 999744 bytes, Message size: 328 bytes
If the number of "messages sent to URL" is increasing at a steady state then the capture is working properly. If it is not, something is not working properly. Go back through the directions, confirm the voice-port number, and try the capture again.
When you are done capturing, do the following:

  1. test voice port 1/0/4 pcm-dump disable
  2. no voice hpi capture destination flash:pcm.dat
  3. no voice hpi capture buffer 3000000

Following that get the capture file from flash (or the tftp server) and run it through this tool.

For IOS versions 15.2(1)T and NEWER, the steps are as follows:

  1. Enter configure terminal mode on the GW.
  2. Enter "voice pcm capture buffer 200000" to configure the capture buffer.
  3. Enter "voice pcm capture destination flash:" to specify the destination file.

Note: If you will be making a large PCM capture or will leave it running for a long period of time it would be best to direct to a TFTP server. To do so, use this command:
"voice pcm capture destination tftp://a.b.c.d/"
Where a.b.c.d is the IP address of the TFTP server.
Once you have the above configured you are ready to capture the PCM stream from the router. To do so follow these steps:

  1. Start a test call and leave it connected.
  2. Enter "show call active voice brief" and determine what voice port the test call is using. "show voice call sum" will also show what ports are in use.
  3. Enter "test voice port 1/0/4 pcm cap fff" where 1/0/4 is the number of the voice port that has the test call connected.

Note: If you are capturing a call on a PRI you will need to specify the voice-port number and the b-channel the call is on. For example:
"test voice port 0/0/0:23.14 pcm cap fff"
Where the voice-port is 0/0/0:23 and the b-channel, as shown in "show call active voice brief", is 14. You can check the status of the capture using the following command:
sh voice pcm capture
This output on 15.2(1)T and IOS versions is very similar to the above example.
When you are done capturing, do the following:

  1. test voice port 1/0/4 pcm-dump disable
  2. voice pcm capture buffer 0
  3. no voice pcm capture destination

Note: The above procedure on 15.2 IOS will only capture the audio stream. In some situations it is also necessary to catch the IOS<->DSP messaging. This actually uses the legacy configuration:

  1. Enter configure terminal mode on the GW.
  2. Enter "voice hpi capture buffer 300000" to configure the capture buffer.
  3. Enter "voice hpi capture destination flash:hpi.dat" to specify the destination file.

Nothing is required to enable it once configured. The hpi.dat file should be run through the tool which will generate the hpi.log file.