# Is it possible, RTSP custom response message?

**URL:** <https://community.wowza.com/t/is-it-possible-rtsp-custom-response-message/41857>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [February 24, 2014, 2:15pm UTC](https://community.wowza.com/t/is-it-possible-rtsp-custom-response-message/41857 "2014-02-24T14:15:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sh\_shin](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@sh\_shin](https://community.wowza.com/u/sh_shin)\
**Post date:** [February 24, 2014, 2:15pm UTC](https://community.wowza.com/t/is-it-possible-rtsp-custom-response-message/41857/1 "2014-02-24T14:15:26Z")

</div>

Hi,

I’m newbie Wowza module developer.

I face on problem in my project.

**I want to return some custom response message. when rtpSession rejected.** (like http response body)

But i can’t find method or can control handle in RTPSession object.

in describe this project

Client have to connect Wowza server like this : rtsp://[Wowza-IP]:1935/live/?ID=12345&PubPoint=mystream

but, if client use connect URL like this : rtsp://[Wowza-IP]:1935/live/?PubPoint=mystream

I want to control return custom response message like this.(if i can control more lower level)

```auto
RTSPBufferedWriter.write("RTSP/1.0 [COLOR="#FF0000"]400[/COLOR] OK" + CRLF);
RTSPBufferedWriter.write("Public: DESCRIBE, SETUP, PLAY, PTIONS" + CRLF);
RTSPBufferedWriter.write("CSeq: " + RTSPSeqNb + CRLF+ CRLF);
RTSPBufferedWriter.write("[COLOR="#FF0000"]Parameter ID - required[/COLOR]"+ CRLF);
RTSPBufferedWriter.flush();

```

The red font is custom return Code & message.

Is there are something way to resolve this issue?

Constraint

This project have to use RTSP protocol(we can’t change other protocol http, rtmp).

---

<div class="post-metadata">

**Author:** ![Matt\_Young](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/matt_young/32/389_2.png) [@Matt\_Young](https://community.wowza.com/u/Matt_Young)\
**Post date:** [February 24, 2014, 6:26am UTC](https://community.wowza.com/t/is-it-possible-rtsp-custom-response-message/41857/2 "2014-02-24T06:26:03Z")

</div>

You might try [redirecting](https://www.wowza.com/docs/how-to-redirect-an-http-or-rtsp-session-through-server-side-code) the session:

```auto
rtpSession.redirectSession([your-url])

```

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [March 6, 2014, 6:50pm UTC](https://community.wowza.com/t/is-it-possible-rtsp-custom-response-message/41857/3 "2014-03-06T18:50:00Z")

</div>

There is not a way to do this in Wowza with RTSP clients, like there is with RTMP clients.

Richard

---

<div class="post-metadata">

**Author:** ![sh\_shin](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@sh\_shin](https://community.wowza.com/u/sh_shin)\
**Post date:** [February 25, 2014, 10:16am UTC](https://community.wowza.com/t/is-it-possible-rtsp-custom-response-message/41857/4 "2014-02-25T10:16:12Z")

</div>

Thank you matt\_y.

But, you miss my point in my post.

I want to know how can i retrun custom response message. **when rtspsession reject**. not a redirection.
