Tech-
invite
3GPP
space
IETF
RFCs
SIP
↠
Examples
Grammars
Presence
⇾
SIP
SIP‑URI
SIP Headers
SIP P‑Headers
SDP
Generic URI
ABNF Notation
Messages
Response Codes
Basic Rules
Common Rules
ABNF for SIP Messages
see
ABNF in RFC 3261
SIP-message
=
Request
/
Response
Request
=
Request-Line
*(
message-header
)
CRLF
[
message-
body
]
; see an example
Here
Response
=
Status-Line
*(
message-header
)
CRLF
[
message-
body
]
; see an example
Here
Request-Line
=
Method
SP
Request-URI
SP
SIP-Version
CRLF
Status-Line
=
SIP-Version
SP
Status-Code
SP
Reason-Phrase
CRLF
Method
=
INVITEm
/
ACKm
/
OPTIONSm
/
BYEm
/
CANCELm
/
REGISTERm
/
INFOm
/
PRACKm
/
SUBSCRIBEm
/
NOTIFYm
/
UPDATEm
/
MESSAGEm
/
REFERm
/
PUBLISHm
/
extension-method
Request-URI
=
SIP‑URI
/
SIPS‑URI
/
absoluteURI
SIP-Version
=
"
SIP
" "
/
" 1*
DIGIT
"
.
" 1*
DIGIT
Reason-Phrase
=
*(
reserved
/
unreserved
/
escaped
/
UTF8‑NONASCII
/
UTF8‑CONT
/
SP
/
HTAB
)
message-header
=
( < see
Headers
and
P‑Headers
> /
extension‑header
)
CRLF
message-body
=
*
OCTET
extension-header
=
header‑name
HCOLON
header‑value
header-name
=
token
header-value
=
*(
TEXT‑UTF8char
/
UTF8‑CONT
/
LWS
)
extension-method
=
token
INVITEm
=
%x49.4E.56.
49.54.45
; INVITE in caps
;
RFC 3261 – Section 27.4
;
RFC 6026
–
Section 9
ACKm
=
%x41.43.4B
; ACK in caps
;
RFC 3261 – Section 27.4
OPTIONSm
=
%x4F.50.54.
49.4F.4E.53
; OPTIONS in caps
;
RFC 3261 – Section 27.4
BYEm
=
%x42.59.45
; BYE in caps
;
RFC 3261 – Section 27.4
CANCELm
=
%x43.41.4E.
43.45.4C
; CANCEL in caps
;
RFC 3261 – Section 27.4
REGISTERm
=
%x52.45.47.
49.53.54.45.52
; REGISTER in caps
;
RFC 3261 – Section 27.4
INFOm
=
%x49.4E.46.
4F
; INFO in caps
;
RFC 6086
–
Section 11.1
PRACKm
=
%x50.52.41.
43.4B
; PRACK in caps
;
RFC 3262
–
Section 6
SUBSCRIBEm
=
%x53.55.42.
53.43.52.
49.42.45
; SUBSCRIBE in caps
;
RFC 6665
–
Section 8.1.1
NOTIFYm
=
%x4E.4F.54.
49.46.59
; NOTIFY in caps
;
RFC 6665
–
Section 8.1.2
UPDATEm
=
%x55.50.44.
41.54.45
; UPDATE in caps
;
RFC 3311
–
Section 10
MESSAGEm
=
%x4D.45.53.
53.41.47.45
; MESSAGE in caps
;
RFC 3428
–
Section 12
REFERm
=
%x52.45.46.
45.52
; REFER in caps
;
RFC 3515
–
Section 7
PUBLISHm
=
%x50.55.42.
4C.49.53.48
; PUBLISH in caps
;
RFC 3903
–
Section 13.1
SIP Request example
INVITE sip:bob@
biloxi.example.com SIP/2.0
Via
: SIP/2.0/TCP client.
atlanta.
example.
com:5060
;branch=z9
hG4bK74bf9
Max-Forwards
: 70
From
: Alice <sip:
alice@atlanta.
example.com>
;tag=9fxced76sl
To
: Bob <sip:bob@
biloxi.example.
com>
Call-ID
: 384827
6298220188511@
atlanta.
example.com
CSeq
: 1 INVITE
Contact
: <sip:alice@
client.
atlanta.
example.
com;
transport=tcp>
Content-Type
: application/sdp
Content-Length
: 151
v=
0
o=
alice
2890844526
2890844526
IN IP4 client.
atlanta.
example.com
s=
-
c=
IN IP4
192.0.2.101
t=
0 0
m=
audio 49172 RTP/AVP 0
a=
rtpmap:0
PCMU/8000
SIP Response example
SIP/2.0 180 Ringing
Via
: SIP/2.0/TCP client.
atlanta.
example.
com:5060
;branch=z9hG4b
K74bf9
;received=192.
0.2.101
From
: Alice <sip:
alice@
atlanta.
example.
com>
;tag=9fxced76sl
To
: Bob <sip:bob@
biloxi.
example.
com>
;tag=8321234356
Call-ID
: 384827629
8220188511@
atlanta.
example.
com
CSeq
: 1 INVITE
Contact
: <sip:bob@
client.
biloxi.
example.
com;
transport=tcp>
Content-Length
: 0