# How to read request body of RTSPRequestMessage?

**URL:** https://community.wowza.com/t/how-to-read-request-body-of-rtsprequestmessage/45646
**Category:** Wowza Streaming Engine
**Created:** [November 19, 2015, 4:06pm UTC](https://community.wowza.com/t/how-to-read-request-body-of-rtsprequestmessage/45646 "2015-11-19T16:06:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Suhas\_reddy](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@Suhas\_reddy](https://community.wowza.com/u/Suhas_reddy)
#### Post date: [November 19, 2015, 4:06pm UTC](https://community.wowza.com/t/how-to-read-request-body-of-rtsprequestmessage/45646/1 "2015-11-19T16:06:20Z")

</div>

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 🙂

---

<div class="post-metadata">

### Author: ![Zoran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/zoran/32/385_2.png) [@Zoran](https://community.wowza.com/u/Zoran)
#### Post date: [January 7, 2016, 7:06pm UTC](https://community.wowza.com/t/how-to-read-request-body-of-rtsprequestmessage/45646/2 "2016-01-07T19:06:36Z")

</div>

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](https://www.wowza.com/docs/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
