0

We are trying to build a SIP2RTSP gateway for one of our solutions, Where in one of SIP invite is converted to RTSP SETUP request to wowza media Server and then a PlayBack is played from the mediaServer to SipClient.

But when the setup request is sent the wowza is always binding to rtsp client address even though the destination is set in transport of SETUP request header. Here we want to tell the wowza rtsp server to bind to sip UA IP and not the rtsp client ip for the flow of RTP traffic.

RFC 2326 says

destination:
      The address to which a stream will be sent. The client may
      specify the multicast address with the destination parameter.
      To avoid becoming the unwitting perpetrator of a remote-
      controlled denial-of-service attack, a server SHOULD
      authenticate the client and SHOULD log such attempts before
      allowing the client to direct a media stream to an address not
      chosen by the server. This is particularly important if RTSP
      commands are issued via UDP, but implementations cannot rely
      on TCP as reliable means of client identification by itself. A
      server SHOULD not allow a client to direct media streams to an
      address that differs from the address commands are coming
      from.

here it also tells A server SHOULD not allow a client to direct media streams to an address that differs from the address commands are coming from.

What is the use of destination field and how we can direct the media streams other than the RTSP client?

Roman R.
  • 68,205
  • 6
  • 94
  • 158
Pradeep
  • 173
  • 2
  • 10

1 Answers1

0

The point is that client MAY request the stream to be sent at client-chosen location. Still server should be doing this carefully, and take decision whether to allow an address which is different from RTSP client address or not using security consideration such as authentication availability etc. Because sending stream blindly to any given address, esp. via UDP, is unsafe: a malicious client might easily bring server down.

All in all, destination is where to send stream to. Servers do not guarantee that streams will be sent to locations other than RTSP client's.

Roman R.
  • 68,205
  • 6
  • 94
  • 158
  • Thanks Roman! So to allow server to send the stream to client chosen location,then do you mean to say we should have an authentication mechanism to ensure the authenticity of client. is there no way to achieve the above behaviour other than having an rtp proxy is the rtsp client? – Pradeep Nov 26 '12 at 10:20
  • Since you are building RTSP server (SIP to RTSP proxy acting as server on RTSP end - that's what I am seeing in the Q) this note is the security consideration for you. So that you could build it in a safe way. From there you decide yourself what security considerations are appropriate. – Roman R. Nov 26 '12 at 10:29
  • sorry, i will put the flow, sipUA->sip2RTSP->Wowza's RTSPSERVER/MEDIAServer , now the sip2RTSP will issue SETUP request to RTSP/media server on behalf of sip UA on receive of SIP invite from sip UA, but we want the media stream(RTP traffic) to flow bypassing the si2RTSP directly to sipUA using RTSP. This was my question. . Kindly excuse if my earlier question was wrong. – Pradeep Nov 26 '12 at 10:38
  • OK, so you are RTSP client on the RTSP side. This does not change interpretation of RFC, however now you need to fit your code to Wowza implementation: you might expect that it won't send RTP data to arbitrary location, so you need to check how to please it, or otherwise you need to proxy/forward RTP traffic yourself. – Roman R. Nov 26 '12 at 11:19