Augmented BNF (ABNF) for SIP -- RFC 3261 and subsequent SIP RFCs
|
|
This page documents the ABNF (Augmented Backus-Naur Form) definitions for SIP
text messages, defined in RFC 3261 - chapter 25,
and subsequent RFCs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Method | = |
INVITEm
/ ACKm
/ OPTIONSm
/ BYEm
/ CANCELm
/ REGISTERm
/ INFOm
/ PRACKm
/ SUBSCRIBEm
/ NOTIFYm
/ UPDATEm
/ MESSAGEm
/ REFERm
/ PUBLISHm
/ extension-method
|
|
| INVITEm |
= |
%x49.4E.56.49.54.45 |
; INVITE in caps
|
|
| ACKm |
= |
%x41.43.4B |
; ACK in caps
|
| OPTIONSm |
= |
%x4F.50.54.49.4F.4E.53 |
; OPTIONS in caps
|
| BYEm |
= |
%x42.59.45 |
; BYE in caps
|
| CANCELm |
= |
%x43.41.4E.43.45.4C |
; CANCEL in caps
|
| REGISTERm |
= |
%x52.45.47.49.53.54.45.52 |
; REGISTER in caps
|
| INFOm |
= |
%x49.4E.46.4F |
; INFO in caps
| [RFC2976]
|
| PRACKm |
= |
%x50.52.41.43.4B |
; PRACK in caps
| [RFC3262]
|
| SUBSCRIBEm |
= |
%x53.55.42.53.43.52.49.42.45 |
; SUBSCRIBE in caps
| [RFC3265]
|
| NOTIFYm |
= |
%x4E.4F.54.49.46.59 |
; NOTIFY in caps
| [RFC3265]
|
| UPDATEm |
= |
%x55.50.44.41.54.45 |
; UPDATE in caps
| [RFC3311]
|
| MESSAGEm |
= |
%x4D.45.53.53.41.47.45 |
; MESSAGE in caps
| [RFC3428]
|
| REFERm |
= |
%x52.45.46.45.52 |
; REFER in caps
| [RFC3515]
|
| PUBLISHm |
= |
%x50.55.42.4C.49.53.48 |
; PUBLISH in caps
| [RFC3903]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| userinfo | = |
( user
/ telephone-subscriber )
[ ":"
password ]
"@"
; examples:
;
sip:alice@atlanta.com
;
sip:alice:secretword@atlanta.com;transport=tcp
;
sip:+1-212-555-1212:1234@gateway.com;user=phone
|
| user | = |
1*( unreserved
/ escaped
/ user-unreserved )
|
| user-unreserved | = |
"&"
/ "="
/ "+"
/ "$"
/ ","
/ ";"
/ "?"
/ "/"
|
| password | = |
*( unreserved
/ escaped
/ "&"
/ "="
/ "+"
/ "$"
/ "," )
|
|
|
|
|
|
| hostport | = |
host
[ ":"
port ]
; examples:
;
sip:alice@atlanta.com
;
sip:alice:secretword@atlanta.com;transport=tcp
;
sip:+1-212-555-1212:1234@gateway.com;user=phone
;
sip:alice@192.0.2.4
|
| host | = |
hostname
/ IPv4address
/ IPv6reference
|
| hostname | = |
*( domainlabel
"."
) toplabel
[ "." ]
|
| domainlabel | = |
alphanum
/ alphanum *( alphanum
/ "-" ) alphanum
|
| toplabel | = |
ALPHA
/ ALPHA
*( alphanum
/ "-" ) alphanum
|
| IPv4address | = |
1*3DIGIT "."
1*3DIGIT "."
1*3DIGIT "."
1*3DIGIT
|
| IPv6reference | = |
"["
IPv6address "]"
|
| IPv6address | = |
hexpart
[ ":"
IPv4address ]
|
| hexpart | = |
hexseq
/ hexseq
"::" [
hexseq ]
/ "::" [
hexseq ]
|
| hexseq | = |
hex4
*( ":"
hex4 )
|
| hex4 | = |
1*4HEXDIG
|
| port | = |
1*DIGIT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| transport-param | = |
"transport="
( "udp"
/ "tcp"
/ "sctp"
/ "tls"
/ "tls-sctp"
/ other-transport )
; tls-sctp is defined in [RFC4168]
|
| other-transport | = |
token
|
|
|
|
|
|
| user-param | = |
"user="
( "phone"
/ "ip"
/ "dialstring"
/ other-user )
; dialstring is defined in [RFC4967]
|
| other-user | = |
token
|
| dialstring | = |
dialstring-digits
context
|
| dialstring-digits | = |
*dialstring-element
dialstring-digit
*dialstring-element
|
| dialstring-digit | = |
HEXDIG
/ "*"
/ "#"
|
| dialstring-element | = |
dialstring-digit
/ "P"
/ "X"
/ visual-separator
|
|
|
|
|
|
| method-param | = |
"method="
Method
|
|
|
|
|
|
| ttl-param | = |
"ttl="
ttl
; The ttl parameter determines the time-to-live value of the UDP
; multicast packet and MUST only be used if maddr is a multicast
; address and the transport protocol is UDP.
|
|
|
|
|
|
| maddr-param | = |
"maddr="
host
; multicast address
|
|
|
|
|
|
| lr-param | = |
"lr"
; loose routing
|
|
|
|
|
|
| compression-param | = |
"comp="
( "sigcomp"
/ other-compression )
; compression-param is defined in [RFC3486]
|
| other-compression | = |
token
|
|
|
|
|
|
| target-param | = |
"target"
EQUAL
pvalue
; target-param is defined in [RFC4458]
|
|
|
|
|
|
|
|
|
|
|
|
| other-param | = |
pname
[ "=" pvalue ]
|
| pname | = |
1*paramchar
|
| pvalue | = |
1*paramchar
|
| paramchar | = |
param-unreserved
/ unreserved
/ escaped
|
| param-unreserved | = |
"["
/ "]"
/ "/"
/ ":"
/ "&"
/ "+"
/ "$"
|
|
|
|
|
|
| headers | = |
"?"
header *(
"&"
header )
; examples:
;
sip:atlanta.com;method=REGISTER?to=alice%40atlanta.com
;
sips:alice@atlanta.com?subject=project%20x&priority=urgent
|
| header | = |
hname
[ "=" hvalue ]
|
| hname | = |
1*( hnv-unreserved
/ unreserved
/ escaped )
|
| hvalue | = |
*( hnv-unreserved
/ unreserved
/ escaped )
|
| hnv-unreserved | = |
"["
/ "]"
/ "/"
/ "?"
/ ":"
/ "+"
/ "$"
|
|
|
|
|
|
| absoluteURI | = |
scheme
":"
( hier-part
/ opaque-part )
|
| hier-part | = |
( net-path
/ abs-path )
[ "?"
query ]
|
| net-path | = |
"//"
authority
[ abs-path ]
|
| abs-path | = |
"/"
path-segments
|
| query | = |
*uric
|
| opaque-part | = |
uric-no-slash
*uric
|
| uric | = |
reserved
/ unreserved
/ escaped
|
| uric-no-slash | = |
unreserved
/ escaped
/ ";"
/ "?"
/ ":"
/ "@"
/ "&"
/ "="
/ "+"
/ "$"
/ ","
|
| path-segments | = |
segment
*( "/"
segment )
|
| segment | = |
*pchar
*( ";"
param )
|
| param | = |
*pchar
|
| pchar | = |
unreserved
/ escaped
/ ":"
/ "@"
/ "&"
/ "="
/ "+"
/ "$"
/ ","
|
| scheme | = |
ALPHA
*( ALPHA
/ DIGIT
/ "+"
/ "-"
/ "." )
|
| authority | = |
srvr
/ reg-name
|
| srvr | = |
[ [ userinfo
"@"
] hostport ]
|
| reg-name | = |
1*( unreserved
/ escaped
/ "$"
/ ","
/ ";"
/ ":"
/ "@"
/ "&"
/ "="
/ "+" )
|
|
|
|
|
|
|
|
| telephone-uri | = |
"tel:"
telephone-subscriber
; examples:
;
tel:+1-201-555-0123
;
tel:7042;phone-context=example.com
;
tel:863-1234;phone-context=+1-914-555
|
| telephone-subscriber | = |
global-number
/ local-number
|
| global-number | = |
global-number-digits
*par
|
| local-number | = |
local-number-digits
*par
context
*par
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| parameter | = |
";"
pname
[ "="
pvalue ]
|
| pname | = |
1*( alphanum
/ "-" )
|
| pvalue | = |
1*paramchar
|
| paramchar | = |
param-unreserved
/ unreserved
/ pct-encoded
|
| pct-encoded | = |
"%"
HEXDIG
HEXDIG
|
| param-unreserved | = |
"["
/ "]"
/ "/"
/ ":"
/ "&"
/ "+"
/ "$"
|
|
|
|
|
|
|
|
|
|
|
|
| isdn-subaddress | = |
";isub="
1*uric
|
|
|
|
|
|
| isub-encoding | = |
isub-encoding-tag
"="
isub-encoding-value
|
| isub-encoding-tag | = |
"isub-encoding"
|
| isub-encoding-value | = |
"nsap-ia5"
/ "nsap-bcd"
/ "nsap"
/ token
|
|
|
|
|
|
| rn | = |
";rn="
( global-rn
/ local-rn )
|
| cic | = |
";cic="
( global-cic
/ local-cic )
|
| npdi | = |
";npdi"
|
| global-rn | = |
global-hex-digits
|
| local-rn | = |
1*hex-phonedigit
rn-context
|
| rn-context | = |
";rn-context="
rn-descriptor
|
| rn-descriptor | = |
domainname
/ global-hex-digits
|
| global-hex-digits | = |
"+"
1*3(DIGIT)
*hex-phonedigit
|
| hex-phonedigit | = |
HEXDIG
/ visual-separator
|
| global-cic | = |
global-hex-digits
|
| local-cic | = |
1*hex-phonedigit
cic-context
|
| cic-context | = |
";cic-context="
rn-descriptor
|
|
|
|
|
|
| enum-dip-indicator | = |
";enumdi"
|
|
|
|
|
|
| trunk-group | = |
";tgrp="
trunk-group-label
|
| trunk-context | = |
";trunk-context="
descriptor
|
| trunk-group-label | = |
1*( unreserved
/ escaped /
trunk-group-unreserved )
|
| trunk-group-unreserved | = |
"/"
/ "&"
/ "+"
/ "$"
|
|
|
|
|
|
|
|
|
|
|
|
| global-number-digits | = |
"+"
*phonedigit
DIGIT
*phonedigit
|
| local-number-digits | = |
*phonedigit-hex
( HEXDIG
/ "*"
/ "#" )
*phonedigit-hex
|
| phonedigit | = |
DIGIT
/ [ visual-separator ]
|
| phonedigit-hex | = |
HEXDIG
/ "*"
/ "#"
/ [ visual-separator ]
|
| visual-separator | = |
"-"
/ "."
/ "("
/ ")"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note: All response codes below are defined by [RFC3261] unless
otherwise noted. |
|
|
|
|
|
|
|
| Informational | = |
|
"100"
| ; Trying |
| | / |
"180"
| ; Ringing |
| | / |
"181"
| ; Call Is Being Forwarded |
| | / |
"182"
| ; Queued |
| | / |
"183"
| ; Session Progress |
|
|
|
|
|
| Success | = |
|
"200"
| ; OK |
|
| | / |
"202"
| ; Accepted |
[RFC3265] |
|
|
|
|
|
| Redirection | = |
|
"300"
| ; Multiple Choices |
| | / |
"301"
| ; Moved Permanently |
| | / |
"302"
| ; Moved Temporarily |
| | / |
"305"
| ; Use Proxy |
| | / |
"380"
| ; Alternative Service |
|
|
|
|
|
| Client-Error | = |
|
"400"
| ; Bad Request |
|
| | / |
"401"
| ; Unauthorized |
| | / |
"402"
| ; Payment Required |
| | / |
"403"
| ; Forbidden |
| | / |
"404"
| ; Not Found |
| | / |
"405"
| ; Method Not Allowed |
| | / |
"406"
| ; Not Acceptable |
| | / |
"407"
| ; Proxy Authentication Required |
| | / |
"408"
| ; Request Timeout |
| | / |
"410"
| ; Gone |
| | / |
"412"
| ; Conditional Request Failed |
[RFC3903] |
| | / |
"413"
| ; Request Entity Too Large |
| | / |
"414"
| ; Request-URI Too Long |
| | / |
"415"
| ; Unsupported Media Type |
| | / |
"416"
| ; Unsupported URI Scheme |
| | / |
"417"
| ; Unknown Resource-Priority |
[RFC4412] |
| | / |
"420"
| ; Bad Extension |
| | / |
"421"
| ; Extension Required |
| | / |
"422"
| ; Session Interval Too Small |
[RFC4028] |
| | / |
"423"
| ; Interval Too Brief |
| | / |
"428"
| ; Use Identity Header |
[RFC4474] |
| | / |
"429"
| ; Provide Referrer Identity |
[RFC3892] |
| | / |
"433"
| ; Anonymity Disallowed |
[RFC5079] |
| | / |
"436"
| ; Bad Identity-Info |
[RFC4474] |
| | / |
"437"
| ; Unsupported Certificate |
[RFC4474] |
| | / |
"438"
| ; Invalid Identity Header |
[RFC4474] |
| | / |
"480"
| ; Temporarily Unavailable |
| | / |
"481"
| ; Call/Transaction Does Not Exist |
| | / |
"482"
| ; Loop Detected |
| | / |
"483"
| ; Too Many Hops |
| | / |
"484"
| ; Address Incomplete |
| | / |
"485"
| ; Ambiguous |
| | / |
"486"
| ; Busy Here |
| | / |
"487"
| ; Request Terminated |
| | / |
"488"
| ; Not Acceptable Here |
| | / |
"489"
| ; Bad Event |
[RFC3265] |
| | / |
"491"
| ; Request Pending |
| | / |
"493"
| ; Undecipherable |
| | / |
"494"
| ; Security Agreement Required |
[RFC3329] |
|
|
|
|
|
| Server-Error | = |
|
"500"
| ; Server Internal Error |
|
| | / |
"501"
| ; Not Implemented |
| | / |
"502"
| ; Bad Gateway |
| | / |
"503"
| ; Service Unavailable |
| | / |
"504"
| ; Server Time-out |
| | / |
"505"
| ; Version Not Supported |
| | / |
"513"
| ; Message Too Large |
| | / |
"580"
| ; Precondition Failure |
[RFC3312] |
|
|
|
|
|
| Global-Failure | = |
|
"600"
| ; Busy Everywhere |
| | / |
"603"
| ; Decline |
| | / |
"604"
| ; Does Not Exist Anywhere |
| | / |
"606"
| ; Not Acceptable |
|
|
|
|
|
|
|
|
|
|
|
|
US ASCII, ANSI X3.4-1986 (ISO 646 International Reference Version)
|
|
| | | |
| 0 | 00 | | NUL |
| 1 | 01 | | SOH |
| 2 | 02 | | STX |
| 3 | 03 | | ETX |
| 4 | 04 | | EOT |
| 5 | 05 | | ENQ |
| 6 | 06 | | ACQ |
| 7 | 07 | | BEL |
| 8 | 08 | | BS |
| 9 | 09 | | HT |
| 10 | 0A | | LF |
| 11 | 0B | | VT |
| 12 | 0C | | FF |
| 13 | 0D | | CR |
| 14 | 0E | | SO |
| 15 | 0F | | SI |
|
|
| | | |
| 16 | 10 | | DLE |
| 17 | 11 | | DC1 |
| 18 | 12 | | DC2 |
| 19 | 13 | | DC3 |
| 20 | 14 | | DC4 |
| 21 | 15 | | NAK |
| 22 | 16 | | SYN |
| 23 | 17 | | ETB |
| 24 | 18 | | CAN |
| 25 | 19 | | EM |
| 26 | 1A | | SUB |
| 27 | 1B | | ESC |
| 28 | 1C | | FS |
| 29 | 1D | | GS |
| 30 | 1E | | RS |
| 31 | 1F | | US |
|
|
| | | |
| 32 | 20 | | |
| 33 | 21 | | ! |
| 34 | 22 | | " |
| 35 | 23 | | # |
| 36 | 24 | | $ |
| 37 | 25 | | % |
| 38 | 26 | | & |
| 39 | 27 | | ' |
| 40 | 28 | | ( |
| 41 | 29 | | ) |
| 42 | 2A | | * |
| 43 | 2B | | + |
| 44 | 2C | | , |
| 45 | 2D | | - |
| 46 | 2E | | . |
| 47 | 2F | | / |
|
|
| | | |
| 48 | 30 | | 0 |
| 49 | 31 | | 1 |
| 50 | 32 | | 2 |
| 51 | 33 | | 3 |
| 52 | 34 | | 4 |
| 53 | 35 | | 5 |
| 54 | 36 | | 6 |
| 55 | 37 | | 7 |
| 56 | 38 | | 8 |
| 57 | 39 | | 9 |
| 58 | 3A | | : |
| 59 | 3B | | ; |
| 60 | 3C | | < |
| 61 | 3D | | = |
| 62 | 3E | | > |
| 63 | 3F | | ? |
|
|
| | | |
| 64 | 40 | | @ |
| 65 | 41 | | A |
| 66 | 42 | | B |
| 67 | 43 | | C |
| 68 | 44 | | D |
| 69 | 45 | | E |
| 70 | 46 | | F |
| 71 | 47 | | G |
| 72 | 48 | | H |
| 73 | 49 | | I |
| 74 | 4A | | J |
| 75 | 4B | | K |
| 76 | 4C | | L |
| 77 | 4D | | M |
| 78 | 4E | | N |
| 79 | 4F | | O |
|
|
| | | |
| 80 | 50 | | P |
| 81 | 51 | | Q |
| 82 | 52 | | R |
| 83 | 53 | | S |
| 84 | 54 | | T |
| 85 | 55 | | U |
| 86 | 56 | | V |
| 87 | 57 | | W |
| 88 | 58 | | X |
| 89 | 59 | | Y |
| 90 | 5A | | Z |
| 91 | 5B | | [ |
| 92 | 5C | | \ |
| 93 | 5D | | ] |
| 94 | 5E | | ^ |
| 95 | 5F | | _ |
|
|
| | | |
| 96 | 60 | | ` |
| 97 | 61 | | a |
| 98 | 62 | | b |
| 99 | 63 | | c |
| 100 | 64 | | d |
| 101 | 65 | | e |
| 102 | 66 | | f |
| 103 | 67 | | g |
| 104 | 68 | | h |
| 105 | 69 | | i |
| 106 | 6A | | j |
| 107 | 6B | | k |
| 108 | 6C | | l |
| 109 | 6D | | m |
| 110 | 6E | | n |
| 111 | 6F | | o |
|
|
| | | |
| 112 | 70 | | p |
| 113 | 71 | | q |
| 114 | 72 | | r |
| 115 | 73 | | s |
| 116 | 74 | | t |
| 117 | 75 | | u |
| 118 | 76 | | v |
| 119 | 77 | | w |
| 120 | 78 | | x |
| 121 | 79 | | y |
| 122 | 7A | | z |
| 123 | 7B | | { |
| 124 | 7C | | | |
| 125 | 7D | | } |
| 126 | 7E | | ~ |
| 127 | 7F | | RUB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| LHEX | = |
DIGIT / %x61-66
| ; lowercase a-f
|
|
|
|
|
|
|
|
| LWS | = |
[*WSP
CRLF]
1*WSP
| ; linear whitespace
|
| SWS | = |
[LWS]
| ; sep whitespace
|
|
|
|
|
|
|
|
|
|