[Live-devel] Get IP address of redirected RTSP servers
Liu, Eric
liuri at amazon.com
Tue May 30 20:08:26 PDT 2023
> So, I have three possible solutions, in order:
> 1/ Can you modify your server to include the “source=“ parameter in the “SETUP” response (because it is choosing to send the stream from a different IP address)?
> 2/ If not, can you not do this redirection at all?
> 3/ If neither is the case, then unfortunately the only way I can see to get the IP source address of each RTP packet is to modify the LIVE555 library code. Specifically, you could modify the "MultiFramedRTPSource::networkReadHandler1()” function (at line 248 of “MultiFramedRTPSource.cpp”) to use “fromAddress”. But because you would be modifying the LIVE555 code, you’re on your own here.
I'll have to experiment with these, thank you! I'm inclined to agree with you that the specification should have been a "MUST" :)
Best,
Eric Liu
On 5/30/23, 7:13 PM, "live-devel on behalf of Ross Finlayson" <live-devel-bounces at us.live555.com <mailto:live-devel-bounces at us.live555.com> on behalf of finlayson at live555.com <mailto:finlayson at live555.com>> wrote:
> On May 30, 2023, at 6:13 PM, Liu, Eric via live-devel <live-devel at us.live555.com <mailto:live-devel at us.live555.com>> wrote:
>
> Since I don't see any "Source" or "source=" fields in any of the SETUP responses, would it be accurate to say that in this case the server is not replying with the "source=" parameter properly and we are not able to get the IP address through this method (with this server)?
Unfortunately, that’s correct. Looking at RFC 2326 (the specification for RTSP), in section 12.39, I see:
"source:
If the source address for the stream is different than can be
derived from the RTSP endpoint address (the server in playback
or the client in recording), the source MAY be specified."
So yes, the “source” parameter is optional, even if - as in your case - the RTP packets’ source address is different from that of the server. I would argue that this “MAY” in the specification should have been a “MUST”.
So, I have three possible solutions, in order:
1/ Can you modify your server to include the “source=“ parameter in the “SETUP” response (because it is choosing to send the stream from a different IP address)?
2/ If not, can you not do this redirection at all?
3/ If neither is the case, then unfortunately the only way I can see to get the IP source address of each RTP packet is to modify the LIVE555 library code. Specifically, you could modify the "MultiFramedRTPSource::networkReadHandler1()” function (at line 248 of “MultiFramedRTPSource.cpp”) to use “fromAddress”. But because you would be modifying the LIVE555 code, you’re on your own here.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/ <http://www.live555.com/>
_______________________________________________
live-devel mailing list
live-devel at lists.live555.com <mailto:live-devel at lists.live555.com>
http://lists.live555.com/mailman/listinfo/live-devel <http://lists.live555.com/mailman/listinfo/live-devel>
More information about the live-devel
mailing list