mojolingo / sippy_cup

Create SIP load test scenarios the easy way
http://mojolingo.github.io/sippy_cup
MIT License
218 stars 78 forks source link

sippy_cup generates invalid sipp messages that cause sipp to crash #114

Open maizo9 opened 9 months ago

maizo9 commented 9 months ago

I noticed that the scenarios which received the 200 OK to hangup a call caused sippy_cup to exit abruptly. I verified sipp (I am using v3.7.2) crashes with a segmentation violation. I also noticed that Wireshark was reporting invalid SIP message headers for the ACK, BYE and 200 OK BYE messages. I compiled a very simple call start/answer scenarios using sippy_cup and decided to run sipp manually. Using this method I was also capable of reproducing the problem.

I am familiar with sipp so I noticed there is a [routes] element after the Content-Length header in the xml file generated by sippy_cup. I removed the [routes] element from the XML scenario files and sipp no longer terminated due a segmentation fault. I also verified that after making that change to the ACK messages, Wireshark no longer complained about invalid SIP message headers.

I check the template for every one of those messages in scenario.rb. and found them to have [routes] at the end of the SIP message header. All of these messages specify a Content-Length header of 0 which probably explains why sipp crashes while parsing the 200 OK BYE. Here are the exact lines in scenario.rb: