Skip to content

RTPP (RTPproxy protocol) technical specification

Peter Lemenkov edited this page Apr 12, 2015 · 24 revisions

Augmented BNF for the RTPproxy Protocol

All of the mechanisms specified in this document are described in both prose and an augmented Backus-Naur Form (BNF) defined in RFC 5234. Appendix B.1 of RFC 5234 defines a set of core rules that are used by this specification, and not repeated here. Implementers need to be familiar with the notation and content of RFC 5234 in order to understand this specification. Certain basic rules are in uppercase, such as SP, CRLF, DIGIT, ALPHA, etc. Angle brackets are used within definitions to clarify the use of rule names.

The use of square brackets is redundant syntactically. It is used as a semantic hint that the specific parameter is optional to use.

Basic Types

The following rules are used throughout this specification to describe basic parsing constructs. The US-ASCII coded character set is defined by ANSI X3.4-1986.

ALPHA = %x41-5A / %x61-7A   ; A-Z / a-z
DIGIT = %x30-39 ; 0-9
DQUOTE = %x22 ; " (double quote)
HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
HTAB = %x09 ; horizontal tab
LF = %x0A ; linefeed
SP = %x20 ; space
TOKEN = 1*(ALPHA / DIGIT / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" )
VCHAR = %x21-7E ; visible (printing) characters
WORD = 1*(ALPHA / DIGIT / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" / "(" / ")" / "<" / ">" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "{" / "}" )

Protocol Description

CODECS = FIXME
COOKIE = 1*VCHAR ; one or more printable characters
CALLID = WORD [ "@" WORD ]
C_DELETE = "D" ["W"] SEP CALLID SEP FROM_TAG [ SEP TO_TAG ]
C_RECORD = "R" ["S"] SEP CALLID SEP FROM_TAG [ SEP TO_TAG ]
C_PLAY = "P" [ PLAYCOUNT ] SEP CALLID PNAME SEP CODECS SEP FROM_TAG [ SEP TO_TAG ]
C_NOPLAY = "S" SEP CALLID SEP FROM_TAG [ SEP TO_TAG ]
C_COPY = "C" [ COPY_PARAMS ] SEP CALLID SEP "-XXX-" SEP FROM_TAG [ SEP TO_TAG ]
C_UPDATE = "U" [ UPDATE_LOOKUP_PARAMS ] SEP CALLID REMOTE_IP SEP REMOTE_PORT SEP FROM_TAG [ SEP TO_TAG ]  [ SEP NOTIFY_SOCKET SEP NOTIFY_TAG ]
C_LOOKUP = "L" [ UPDATE_LOOKUP_PARAMS ] SEP CALLID REMOTE_IP SEP REMOTE_PORT SEP FROM_TAG [ SEP TO_TAG ]
C_INFO = "I" [ "B" ]
C_QUERY = "Q" SEP CALLID SEP FROM_TAG [ SEP TO_TAG ]
C_VER_FEATURE = "VF"
C_GET_VER = "V"
C_DELETE_ALL = "X"
C_GET_STATS = "G" [ "V" ] 1*(SEP STAT_NAME)
COMMAND = [COOKIE SEP] (C_DELETE / C_RECORD / C_PLAY / C_NOPLAY / C_COPY / C_UPDATE / C_LOOKUP / C_INFO / C_QUERY / C_VER_FEATURE / C_GET_VER / C_DELETE_ALL / C_GET_STATS ) [LF]
COPY_PARAMS = FIXME
FROM_TAG = TOKEN
IPV4 = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
IPV6 = HEXSEQ / HEXSEQ "::" [ HEXSEQ ] / "::" [ HEXSEQ ]
HEXSEQ = HEX4 *( ":" HEX4)
HEX4 =  1*4HEXDIG
PNAME = FIXME
PLAYCOUNT = 1 * DIGIT
REMOTE_IP = IPV4 / IPV6
REMOTE_PORT = 1*DIGIT
SEP = 1*WSP
TO_TAG = TOKEN
UPDATE_LOOKUP_PARAMS = FIXME
Clone this wiki locally