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

implement a wav play into pcap #98

Open jinserk opened 6 years ago

jinserk commented 6 years ago

Please consider this code updated as:

nikolas-n commented 1 year ago

Hello @jinserk It has been a while, but was wondering if you can help with the following. I've updated ffi to the 1.15.5 version and getting this:

Compiling media to /sippy/scenaria/template.pcap...Traceback (most recent call last):
    15: from /usr/local/bin/sippy_cup:23:in `<main>'
    14: from /usr/local/bin/sippy_cup:23:in `load'
    13: from /Library/Ruby/Gems/2.6.0/gems/sippy_cup-0.7.2/bin/sippy_cup:64:in `<top (required)>'
    12: from /Library/Ruby/Gems/2.6.0/gems/sippy_cup-0.7.2/lib/sippy_cup/scenario.rb:940:in `compile!'
    11: from /Library/Ruby/Gems/2.6.0/gems/sippy_cup-0.7.2/lib/sippy_cup/scenario.rb:1041:in `compile_media'
    10: from /Library/Ruby/Gems/2.6.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:44:in `compile!'
     9: from /Library/Ruby/Gems/2.6.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:44:in `each'
     8: from /Library/Ruby/Gems/2.6.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:95:in `block in compile!'
     7: from /Library/Ruby/Gems/2.6.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:95:in `times'
     6: from /Library/Ruby/Gems/2.6.0/gems/sippy_cup-0.7.2/lib/sippy_cup/media.rb:109:in `block (2 levels) in compile!'
     5: from /Library/Ruby/Gems/2.6.0/gems/sippy_cup-0.7.2/lib/sippy_cup/g711.rb:28:in `encode'
     4: from /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/pointer.rb:134:in `write_array_of_type'
     3: from /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/pointer.rb:134:in `each_with_index'
     2: from /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/pointer.rb:134:in `each'
     1: from /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/pointer.rb:136:in `block in write_array_of_type'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/lib/ffi/pointer.rb:136:in `write_int16': wrong number of arguments (given 2, expected 1) (ArgumentError)

Do you happen to know how this could be fixed? Or what I could do to make it work? Maybe downgrade?

Sorry for asking this here, but I couldn't add an issue to your fork.