Capture rtp host and port from sdp
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>
Hi!
Could you rebase this against master and fix so all tests succeed?
Thanks!
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.
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 ...
Or perhaps peer_media_ip, peer_media_port, by analogy with peer_tag_param?
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