sipp icon indicating copy to clipboard operation
sipp copied to clipboard

Capture rtp host and port from sdp

Open Marc-i2x opened this issue 6 years ago • 5 comments

This allows the creation of RTP streams with ffmpeg instead of pcap replay. Snippet from UAC scenario:

  <!-- Play RTP stream through ffmpeg   -->
  <nop>
    <action>
      <exec command="ffmpeg -nostats -loglevel 0 -re -i ~/arbitrary.wav -ar 8000 -acodec pcm_mulaw -f rtp rtp://[last_media_ip]:[last_media_port] >>/dev/null" />
    </action>
  </nop>

Marc-i2x avatar Oct 25 '19 17:10 Marc-i2x

Hi!

Could you rebase this against master and fix so all tests succeed?

Thanks!

wdoekes avatar Oct 30 '19 09:10 wdoekes

Could you rebase this against master and fix so all tests succeed?

done. I also made find_in_sdp availability independent of compile flags as the PR will allow sending RTP without pcap support.

Marc-i2x avatar Oct 30 '19 10:10 Marc-i2x

Interesting idea. I'm a bit reluctant to allow overloading the last_HEADER for this purpose though, as media_ip is not a header (obviously).

It's already a jungle of small little hacks here and there.

How about you make it [lastsdp_media_ip] instead. Add the appropriate docs, so people will actually know the feature exists. And indent with 4 spaces (*). Thanks! :)

(*) See: https://github.com/SIPp/sipp/commit/7e62db1ca609ad786384eda3d381019b9ec93a31 and astyle --indent=spaces=4 --unpad-paren --pad-header --pad-comma --pad-oper ...

wdoekes avatar Nov 08 '19 08:11 wdoekes

Or perhaps peer_media_ip, peer_media_port, by analogy with peer_tag_param?

rkday avatar Nov 10 '19 17:11 rkday

Interesting idea. I'm a bit reluctant to allow overloading the last_HEADER for this purpose though, as media_ip is not a header (obviously).

It's already a jungle of small little hacks here and there.

How about you make it [lastsdp_media_ip] instead.

Could you guide me how to achieve this? Where would I have to add the respective code?

Add the appropriate docs, so people will actually know the feature exists.

Will do once I find some free time

And indent with 4 spaces (*). Thanks! :)

Will do

Marc-i2x avatar Jan 20 '20 10:01 Marc-i2x