Wowza Community

Rtsp/sip

Hi - We are trying to analyse a SIP Video Mail server using Wowza as a media server. I am trying to understand how RTSP will work in this scenario -

  1. SIP A calls SIP B

  2. B does not answer

  3. SIP Proxy redirects request to Video Mail Server(VMS)

  4. VMS gets the SIP INVITE and issues 2 RTSP SETUP requests (1 for playing the greeting, 1 for recording)

  5. From the Media server response we get the ports on which the server will be listening.

  6. These are set in the answer SDP sent back to A

  7. when A send a ACK , the VMS issues the PLAY and also RECORD via RTSP to media server

My question is during step 5, when the ports are setup, let us assume Wowza sends back ports 1234(Audio) and 1236(Video) whereas the client has published ports 3456(audio) and 3458(Video)

When I issue the PLAY and RECORD to the wozwa server, PLAY of the recorded video message will be sent by Wozwa as RTP packet to ports 3456 and 3458 on the client ? and then the client can send RTP packets for recording to the server ?

Thanks,

Kanwar

For the PLAY request, during setup, the client tells server “send data to these listening ports”. Then the server tells client “ok, you send data to these listening ports”.

That happens again for a different set of ports for the second RTSP stream. (the PUBLISH/RECORD stream)

See section 10-4 of the RTSP specification.

You probably don’t need to Play and Record at the same time. My guess is the best way is to just have two RTSP connections. Because, according to 10.7 of the RTSP RFC you have to issue a new SETUP request after a TEARDOWN.

But maybe you can PAUSE and then SETUP to RECORD with the same stream parameters and Wowza set to a *record StreamType? Or, to reduce setup latency, maybe with two RTSP connections you can start the RECORD stream in the background, PAUSE it, wait till your greeting is finished, and then UNPAUSE the publishing RTSP stream. I don’t know. I have not played with any RTSP APIs that control it on that level.

Here’s a thread suggesting some different solutions for putting two different streams in one SDP. You could try it out and discuss your results here.

Ok. so there will be 2 sets of ports ? Port X on client and Port Y on server for PLAY. And then Port A on client and Port B on server for RECORD ? If yes, then how do i send the SDP for setting up PLAY and RECORD in the same SDP back to client ? Step 6 above.