[asterisk-dev] [Code Review] External test for detecting RFC 2833 DTMF digits

Mark Michelson mmichelson at digium.com
Wed Mar 17 11:00:20 CDT 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/560/
-----------------------------------------------------------

(Updated 2010-03-17 11:00:20.673652)


Review request for Asterisk Developers.


Changes
-------

Two changes:

* Increased the pause between spawning Asterisk and running test calls from 1 to 3 seconds. I have not seen the previous 488 issue since.
* Added the option of receiving a 100 Trying response to the register.xml SIPp scenario. Some versions of Asterisk will send a 100 Trying prior to the 200 OK, and so we should not fail in such a scenario.

With the 488 problem fixed, I no longer encounter any errors and so if I get a ship it on this review, I will commit the test.


Summary
-------

The test does what the summary states. For details on the specific tests run, see the attached test-config.yaml file.

There are three test cases run. In each, SIPp is used to place a call to Asterisk, playback one or multiple pcap files and then send a BYE. The test.lua script is set to run a handler for each VarSet manager event that is received. In the handler, we compare the received DTMF digits to what we expected to receive and fail if there is a discrepancy.

The pcap files that I used for playing DTMF could not be attached, so I will include a brief description of them here:

dtmf_2833_*.pcap: These are the RFC2833 DTMF pcap files included in the distribution of SIPp. Strangely, they do not include a '0' DTMF digit.
dtmf_2833_*_noend.pcap: These are generated from the original DTMF pcap files by chopping off the end frames.
broken_dtmf.pcap: This is a series of digits that was collected from the reporter of Mantis issue 15811 who was having a problem with duplicate DTMF being detected. The quirk with the DTMF here is that there are out-of-order frames received.

Note that the second and third tests will not pass without the patch from review 558 applied.

EDIT: I forgot to thank Matt Nicholson in this review for writing the asttest framework that I used for writing this test. His example tests and sipp scenarios were a big help in getting this written.


Diffs (updated)
-----

  /asterisk/trunk/tests/rfc2833_dtmf_detect/configs/extensions.conf PRE-CREATION 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/configs/sip.conf PRE-CREATION 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/run-test PRE-CREATION 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml PRE-CREATION 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1_noend.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2_noend.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3_noend.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4_noend.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_5.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_6.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_7.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_8.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_9.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_pound.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_star.pcap UNKNOWN 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml PRE-CREATION 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_noend.xml PRE-CREATION 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/register.xml PRE-CREATION 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/test-config.yaml PRE-CREATION 
  /asterisk/trunk/tests/rfc2833_dtmf_detect/test.lua PRE-CREATION 

Diff: https://reviewboard.asterisk.org/r/560/diff


Testing
-------

I've run the tests and have made sure that DTMF is detected as expected. There are some times when I will run the tests that Asterisk will send a 488 in response to the initial INVITE. I have not yet concluded why it happens, though.

For the tests, I was using SIPp trunk. Initially, I did this because I was using features that were not present in earlier versions of SIPp. However, I later removed those options from the test but continued using SIPp trunk instead of a released version. I suspect that using SIPp 3.1 would suffice for this test, but I am not certain about that.


Thanks,

Mark




More information about the asterisk-dev mailing list