Wowza Community

How to read request body of RTSPRequestMessage?

Hi Team ,

This is the request body i get when a rtsp session is created

INFO server comment - ANNOUNCE

RTSP/1.0

content-type: application/sdp

cseq: 2

content-length: 551

user-agent: BJN-Meeting (LIVE555 Streaming Media v2014.07.25)

---- body start ----

v=0

o=- 3656916218 3656916218 IN IP4 10.5.9.157

s=BJN Media Stream

i=meetingid:372382492

c=IN IP4 10.5.9.157

t=0 0

a=tool:Bluejeans

m=video 0 RTP/AVP 97

b=AS:1000

a=rtpmap:97 H264/90000

a=fmtp:97 packetization-mode=1; sprop-parameter-sets=Z0KAH+kAoAty,aM4G4g==; profile-level-id=42801F

a=control:streamid=0

a=tool:Bluejeans

m=audio 0 RTP/AVP 98

b=AS:32

a=rtpmap:98 mpeg4-generic/32000/1

a=fmtp:98 mode=AAC-hbr; sizelength=13; indexlength=3;indexdeltalength=3; constantDuration=1024; config=1288

a=control:streamid=1

---- body end ----

I am trying to capture rtsp session as i need the details from the request body

public void onAnnounce(RTPSession arg0, RTSPRequestMessage arg1,

RTSPResponseMessages arg2) {

LOGGER.info("onAnnounce request message " + arg1);

LOGGER.info("Request message " + arg1.getBodyAsString()); // this line is returning " v=0 " which is the first line of the request body

}

how to extract body object details

thanks :slight_smile:

Hello,

You also raised this question through support ticket #153734. Here is the answer for future reference.

You can use the IRTSPActionNotify interface to listen for RTSP stream events. Please take a look at the “How to use the IRTSPActionNotify interface to listen for RTSP stream events” forum article for a sample code on how you can do that.

Zoran