RTSP::respond

Description

Sends an RTSP response to the client. The return value of the RTSP::msg_source command must be client. When an iRule responds to an RTSP request, the RTSP filter performs no further processing on the request and will not send the RTSP request to the server.
A maximum of one response is allowed per RTSP request.

Syntax

RTSP::respond <status code> <status string> [<headers/body>]

RTSP::respond <status code> <status string> [<headers/body>]

  • The status code and status string are placed in the first line of the RTSP response. The status code must be a positive integer value. The headers argument is optional and must be a single string value which can contain multiple formatted headers. The header argument can also contain a body. The headers and body must conform to the RTSP header/body format defined in RFC2326 (the ‘’’rule* command does not validate the format). The RTSP CSeq header is automatically added by the RTSP filter.

Examples

rule xxx {
    when RTSP_REQUEST {
        RTSP::respond 401 Unauthorized "x-header\r\n\r\n  Hey, you need a password"
    }
}