core.abnf 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;
  3. ; RFC 5234 - ABNF CORE RULES
  4. ;
  5. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  6. OCTET= %x00-FF ; 8 bits of data
  7. CHAR= %x01-7F ; any 7-bit US-ASCII character, excluding NUL
  8. VCHAR= %x21-7E ; visible (printing) characters
  9. ALPHA= %x41-5A / %x61-7A ; A-Z / a-z
  10. DIGIT= %x30-39 ; 0-9
  11. CTL= %x00-1F / %x7F ; any US-ASCII control character: ; (octets 0 - 31) and DEL (127)
  12. HTAB= %x09 ; horizontal tab
  13. LF= %x0A ; linefeed
  14. CR= %x0D ; carriage return
  15. SP= %x20 ; space
  16. DQUOTE= %x22 ; " (Double Quote)
  17. BIT= "0" / "1"
  18. HEXDIG= DIGIT / "A" / "B" / "C" / "D" / "E" / "F"
  19. CRLF= CR LF ; Internet standard newline
  20. WSP= SP / HTAB ; white space
  21. LWSP= *(WSP / CRLF WSP) ; linear white space (past newline)
  22. ;---------------------------------------------------------------------------------------------------------
  23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  24. ;
  25. ; Most common definitions in Header Fields
  26. ;
  27. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  28. ;;;; accept-param
  29. accept-param = ("q" EQUAL qvalue ) / generic-param
  30. ;;;; addr-spec
  31. addr-spec = SIP-URI / SIPS-URI / absoluteURI
  32. ;;;; algorithm
  33. algorithm = "algorithm" EQUAL ( aka-namespace / algorithm-value )
  34. aka-namespace = aka-version "-" algorithm-value
  35. aka-version = "AKAv" 1*DIGIT
  36. algorithm-value = ( "MD5" / "MD5-sess" / token )
  37. ;;;; callid
  38. callid = word [ "@" word ]
  39. ;;;; delta-seconds
  40. delta-seconds = 1*DIGIT
  41. ;;;; generic-param
  42. generic-param = token [ EQUAL gen-value ]
  43. gen-value = token / host / quoted-string
  44. ;;;; name-addr
  45. name-addr = [ display-name ] LAQUOT addr-spec RAQUOT
  46. display-name = *(token LWS) / quoted-string
  47. ;;;; nonce
  48. nonce = "nonce" EQUAL ( aka-nonce / nonce-value )
  49. aka-nonce = LDQUOT aka-nonce-value RDQUOT
  50. aka-nonce-value = <base64 encoding of RAND, AUTN, and server specific data>
  51. nonce-value = quoted-string
  52. ;;;; not-defined ; This is my own ...
  53. not-defined = token
  54. ;;;; option-tag
  55. option-tag = token
  56. ;;;; qvalue
  57. qvalue = ("0" [ "." 0*3DIGIT ] ) / ( "1" [ "." 0*3("0") ] )
  58. ;;;; pname
  59. pname = 1*paramchar
  60. ;;;; pvalue
  61. pvalue = 1*paramchar
  62. ;---------------------------------------------------------------------------------------------------------
  63. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  64. ;
  65. ; URIs --> SIP / SIPS / TEL
  66. ;
  67. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  68. ;---------------------
  69. ; SIP-URI / SIPS-URI
  70. ;---------------------
  71. SIP-URI = "sip:" [ userinfo ] hostport uri-parameters [ headers ]
  72. SIPS-URI = "sips:" [ userinfo ] hostport uri-parameters [ headers ]
  73. ;---------------------
  74. ; URI -- userinfo
  75. ;---------------------
  76. userinfo = ( user / telephone-subscriber ) [ ":" password ] "@"
  77. user = 1*( unreserved / escaped / user-unreserved )
  78. user-unreserved = "&" / "=" / "+" / "$" / "," / ";" / "?" / "/"
  79. password = *( unreserved / escaped / "&" / "=" / "+" / "$" / "," )
  80. ;---------------------
  81. ; URI -- hostport
  82. ;---------------------
  83. hostport = host [ ":" port ]
  84. host = hostname / IPv4address / IPv6reference
  85. hostname = *( domainlabel "." ) toplabel [ "." ]
  86. domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum
  87. toplabel = ALPHA / ALPHA *( alphanum / "-" ) alphanum
  88. IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT
  89. IPv6reference = "[" IPv6address "]"
  90. IPv6address = hexpart [ ":" IPv4address ]
  91. hexpart = hexseq / hexseq "::" [ hexseq ] / "::" [ hexseq ]
  92. hexseq = hex4 *( ":" hex4 )
  93. hex4 = 1*4HEXDIG
  94. port = 1*DIGIT
  95. ;---------------------
  96. ; URI -- uri-parameters
  97. ;---------------------
  98. uri-parameters = *( ";" uri-parameter )
  99. uri-parameter = transport-param / user-param / method-param / ttl-param / maddr-param / lr-param / compression-param / target-param / cause-param / orig / gr-param / other-param
  100. ;;;; transport-param
  101. transport-param = "transport=" ( "udp" / "tcp" / "sctp" / "tls" / "tls-sctp" / other-transport )
  102. other-transport = token
  103. ;;;; user-param
  104. user-param = "user=" ( "phone" / "ip" / "dialstring" / other-user )
  105. other-user = token
  106. dialstring = dialstring-digits context
  107. dialstring-digits = *dialstring-element dialstring-digit *dialstring-element
  108. dialstring-digit = HEXDIG / "*" / "#"
  109. dialstring-element = dialstring-digit / "P" / "X" / visual-separator
  110. ;;;; method-param
  111. method-param = "method=" Method
  112. ;;;; ttl-param
  113. ttl-param = "ttl=" ttl
  114. ;;;; maddr-param
  115. maddr-param = "maddr=" host
  116. ;;;; lr-param
  117. lr-param = "lr"
  118. ;;;; compression-param
  119. compression-param = "comp=" ( "sigcomp" / other-compression )
  120. other-compression = token
  121. ;;;; target-param
  122. target-param = "target" EQUAL pvalue
  123. ;;;; cause-param
  124. cause-param = "cause" EQUAL Status-Code
  125. ;;;; orig
  126. orig = "orig"
  127. ;;;; gr-param
  128. gr-param = "gr" [ "=" pvalue ]
  129. ;;;; other-param
  130. other-param = pname [ "=" pvalue ]
  131. paramchar = param-unreserved / unreserved / escaped
  132. param-unreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$"
  133. ;---------------------
  134. ; URI -- headers
  135. ;---------------------
  136. headers = "?" header *( "&" header )
  137. header = hname [ "=" hvalue ]
  138. hname = 1*( hnv-unreserved / unreserved / escaped )
  139. hvalue = *( hnv-unreserved / unreserved / escaped )
  140. hnv-unreserved = "[" / "]" / "/" / "?" / ":" / "+" / "$"
  141. ;---------------------
  142. ; absoluteURI
  143. ;---------------------
  144. absoluteURI = scheme ":" ( hier-part / opaque-part )
  145. hier-part = ( net-path / abs-path ) [ "?" query ]
  146. net-path = "//" authority [ abs-path ]
  147. abs-path = "/" path-segments
  148. query = *uric
  149. opaque-part = uric-no-slash *uric
  150. uric = reserved / unreserved / escaped
  151. uric-no-slash = unreserved / escaped / ";" / "?" / ":" / "@" / "&" / "=" / "+" / "$" / ","
  152. path-segments = segment *( "/" segment )
  153. segment = *pchar *( ";" param )
  154. param = *pchar
  155. pchar = unreserved / escaped / ":" / "@" / "&" / "=" / "+" / "$" / ","
  156. scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
  157. authority = srvr / reg-name
  158. srvr = [ [ userinfo "@" ] hostport ]
  159. reg-name = 1*( unreserved / escaped / "$" / "," / ";" / ":" / "@" / "&" / "=" / "+" )
  160. ;---------------------
  161. ; telephone-URI
  162. ;---------------------
  163. telephone-uri = "tel:" telephone-subscriber
  164. telephone-subscriber = global-number / local-number
  165. global-number = global-number-digits *par
  166. local-number = local-number-digits *par context *par
  167. ;;;; par
  168. par = parameter / extension / isdn-subaddress / rn / cic / npdi / enum-dip-indicator / trunk-group / trunk-context
  169. ;;;; context
  170. context = ";phone-context=" descriptor
  171. ;;;; parameter
  172. parameter = ";" pname [ "=" pvalue ]
  173. paramchar = param-unreserved / unreserved / pct-encoded
  174. pct-encoded = "%" HEXDIG HEXDIG
  175. param-unreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$"
  176. ;;;; extension
  177. extension = ";ext=" 1*phonedigit
  178. ;;;; isdn-subaddress
  179. isdn-subaddress = ";isub=" 1*uric
  180. ;;;; isub-encoding
  181. isub-encoding = isub-encoding-tag "=" isub-encoding-value
  182. isub-encoding-tag = "isub-encoding"
  183. isub-encoding-value = "nsap-ia5" / "nsap-bcd" / "nsap" / token
  184. ;;;; Number Portability Parameters: rn, npdi, cic
  185. rn = ";rn=" ( global-rn / local-rn )
  186. cic = ";cic=" ( global-cic / local-cic )
  187. npdi = ";npdi"
  188. global-rn = not-defined
  189. ;;;; global-rn = global-hex-digits
  190. local-rn = 1*hex-phonedigit rn-context
  191. rn-context = ";rn-context=" rn-descriptor
  192. rn-descriptor = domainname / global-hex-digits
  193. global-hex-digits = "+" 1*3(DIGIT) *hex-phonedigit
  194. hex-phonedigit = HEXDIG / visual-separator
  195. global-cic = global-hex-digits
  196. local-cic = 1*hex-phonedigit cic-context
  197. cic-context = ";cic-context=" rn-descriptor
  198. ;;;; enum-dip-indicator
  199. enum-dip-indicator = ";enumdi"
  200. ;;;; trunk-group
  201. trunk-group = ";tgrp=" trunk-group-label
  202. trunk-context = ";trunk-context=" descriptor
  203. trunk-group-label = 1*( unreserved / escaped / trunk-group-unreserved )
  204. trunk-group-unreserved = "/" / "&" / "+" / "$"
  205. ;;;; descriptor
  206. descriptor = domainname / global-number-digits
  207. ;;;; global- & local-number-digits
  208. global-number-digits = "+" *phonedigit DIGIT *phonedigit
  209. local-number-digits = *phonedigit-hex ( HEXDIG / "*" / "#" ) *phonedigit-hex
  210. phonedigit = DIGIT / [ visual-separator ]
  211. phonedigit-hex = HEXDIG / "*" / "#" / [ visual-separator ]
  212. visual-separator = "-" / "." / "(" / ")"
  213. ;;;; domainname
  214. domainname = *( domainlabel "." ) toplabel [ "." ]
  215. domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum
  216. toplabel = ALPHA / ALPHA *( alphanum / "-" ) alphanum
  217. ;---------------------------------------------------------------------------------------------------------
  218. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  219. ;
  220. ; RFC 3261 - SIP ABNF
  221. ;
  222. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  223. ;;;; alphanum
  224. alphanum = ALPHA / DIGIT
  225. ;;;; LHEX
  226. LHEX = DIGIT / %x61-66 ; lowercase a-f
  227. ;;;; WS
  228. LWS = [*WSP CRLF] 1*WSP ; linear whitespace
  229. SWS = [LWS] ; sep whitespace
  230. ;;;; HCOLON
  231. HCOLON = *( SP / HTAB ) ":" SWS
  232. ;;;; separators
  233. separators = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "=" / "{" / "}" / SP / HTAB
  234. ;;;; SWS-based delimiters
  235. STAR = SWS "*" SWS ; asterisk
  236. SLASH = SWS "/" SWS ; slash
  237. EQUAL = SWS "=" SWS ; equal
  238. LPAREN = SWS "(" SWS ; left parenthesis
  239. RPAREN = SWS ")" SWS ; right parenthesis
  240. LAQUOT = SWS "<" ; left angle quote
  241. RAQUOT = ">" SWS ; right angle quote
  242. COMMA = SWS "," SWS ; comma
  243. SEMI = SWS ";" SWS ; semicolon
  244. COLON = SWS ":" SWS ; colon
  245. LDQUOT = SWS DQUOTE ; open double quotation mark
  246. RDQUOT = DQUOTE SWS ; close double quotation mark
  247. ;;;; token
  248. token = 1*( alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" )
  249. ;;;; quoted-string
  250. quoted-string = SWS DQUOTE *( qdtext / quoted-pair ) DQUOTE
  251. qdtext = LWS / %x21 / %x23-5B / %x5D-7E / UTF8-NONASCII
  252. quoted-pair = "\" ( %x00-09 / %x0B-0C / %x0E-7F )
  253. ;;;; comment
  254. comment = LPAREN *( ctext / quoted-pair / comment-comment ) RPAREN
  255. ctext = %x21-27 / %x2A-5B / %x5D-7E / UTF8-NONASCII / LWS
  256. comment-comment = not-defined
  257. ;;;; word
  258. word = 1*( alphanum / "-" / "." / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" / "(" / ")" / "<" / ">" / ":" / "\" / DQUOTE / "/" / "[" / "]" / "?" / "{" / "}" )
  259. ;;;; text
  260. TEXT-UTF8-TRIM = 1*TEXT-UTF8char *(*LWS TEXT-UTF8char)
  261. TEXT-UTF8char = %x21-7E / UTF8-NONASCII
  262. UTF8-NONASCII = %xC0-DF 1UTF8-CONT / %xE0-EF 2UTF8-CONT / %xF0-F7 3UTF8-CONT / %xF8-FB 4UTF8-CONT / %xFC-FD 5UTF8-CONT
  263. UTF8-CONT = %x80-BF
  264. ;;;; escaped
  265. escaped = "%" HEXDIG HEXDIG
  266. ;;;; mark
  267. mark = "-" / "_" / "." / "!" / "~" / "*" / "'" / "(" / ")"
  268. ;;;; reserved / unreserved
  269. reserved = ";" / "/" / "?" / ":" / "@" / "&" / "=" / "+" / "$" / ","
  270. unreserved = alphanum / mark
  271. ;---------------------
  272. ; SIP MESSAGE
  273. ;---------------------
  274. ;;;; SIP-message
  275. SIP-message = Request / Response
  276. ;;;; Request
  277. Request = Request-Line *( message-header ) CRLF [ message-body ]
  278. ;;;; Response
  279. Response = Status-Line *( message-header ) CRLF [ message-body ]
  280. ;;;; Request-Line
  281. Request-Line = Method SP Request-URI SP SIP-Version CRLF
  282. ;;;; Status-Line
  283. Status-Line = SIP-Version SP Status-Code SP Reason-Phrase CRLF
  284. ;;;; Method
  285. Method = INVITEm / ACKm / OPTIONSm / BYEm / CANCELm / REGISTERm / INFOm / PRACKm / SUBSCRIBEm / NOTIFYm / UPDATEm / MESSAGEm / REFERm / PUBLISHm / extension-method
  286. INVITEm = %x49.4E.56.49.54.45 ; INVITE in caps [RFC3261]
  287. ACKm = %x41.43.4B ; ACK in caps [RFC3261]
  288. OPTIONSm = %x4F.50.54.49.4F.4E.53 ; OPTIONS in caps [RFC3261]
  289. BYEm = %x42.59.45 ; BYE in caps [RFC3261]
  290. CANCELm = %x43.41.4E.43.45.4C ; CANCEL in caps [RFC3261]
  291. REGISTERm = %x52.45.47.49.53.54.45.52 ; REGISTER in caps [RFC3261]
  292. INFOm = %x49.4E.46.4F ; INFO in caps [RFC2976]
  293. PRACKm = %x50.52.41.43.4B ; PRACK in caps [RFC3262]
  294. SUBSCRIBEm = %x53.55.42.53.43.52.49.42.45 ; SUBSCRIBE in caps [RFC3265]
  295. NOTIFYm = %x4E.4F.54.49.46.59 ; NOTIFY in caps [RFC3265]
  296. UPDATEm = %x55.50.44.41.54.45 ; UPDATE in caps [RFC3311]
  297. MESSAGEm = %x4D.45.53.53.41.47.45 ; MESSAGE in caps [RFC3428]
  298. REFERm = %x52.45.46.45.52 ; REFER in caps [RFC3515]
  299. PUBLISHm = %x50.55.42.4C.49.53.48 ; PUBLISH in caps [RFC3903]
  300. extension-method = token
  301. ;;;; Request-URI
  302. Request-URI = SIP-URI / SIPS-URI / absoluteURI
  303. ;;;; SIP-Version
  304. SIP-Version = "SIP" "/" 1*DIGIT "." 1*DIGIT
  305. ;;;; message-header
  306. message-header = ( Accept / Accept-Contact / Accept-Encoding / Accept-Language / Accept-Resource-Priority / Alert-Info / Allow / Allow-Events / Authentication-Info / Authorization / Call-ID / Call-Info / Contact / Content-Disposition / Content-Encoding / Content-Language / Content-Length / Content-Type / CSeq / Date / Error-Info / Event / Expires / From / History-Info / Identity / Identity-Info / In-Reply-To / Join / Max-Forwards / MIME-Version / Min-Expires / Min-SE / Organization / Path / Priority / Privacy / Proxy-Authenticate / Proxy-Authorization / Proxy-Require / RAck / Reason / Record-Route / Refer-Sub / Refer-To / Referred-By / Reject-Contact / Replaces / Reply-To / Request-Disposition / Require / Resource-Priority / Retry-After / Route / RSeq / Security-Client / Security-Server / Security-Verify / Server / Service-Route / Session-Expires / SIP-ETag / SIP-If-Match / Subject / Subscription-State / Supported / Target-Dialog / Timestamp / To / Unsupported / User-Agent / Via / Warning / WWW-Authenticate / P-Access-Network-Info / P-Answer-State / P-Asserted-Identity / P-Associated-URI / P-Called-Party-ID / P-Charging-Function-Addresses / P-Charging-Vector / P-DCS-Billing-Info / P-DCS-LAES / P-DCS-OSPS / P-DCS-Redirect / P-DCS-Trace-Party-ID / P-Early-Media / P-Media-Authorization / P-Preferred-Identity / P-Profile-Key / P-User-Database / P-Visited-Network-ID / extension-header ) CRLF
  307. extension-header = header-name HCOLON header-value
  308. header-name = token
  309. header-value = *( TEXT-UTF8char / UTF8-CONT / LWS )
  310. ;;;; message-body
  311. message-body = *OCTET
  312. ;---------------------
  313. ; SIP Header Fields
  314. ;---------------------
  315. ;;;; Accept
  316. Accept = "Accept" HCOLON [ accept-range *(COMMA accept-range) ]
  317. accept-range = media-range *(SEMI accept-param)
  318. media-range = ( "*/*" / ( m-type SLASH "*" ) / ( m-type SLASH m-subtype ) ) *( SEMI m-parameter )
  319. ;;;; Accept-Contact / a
  320. Accept-Contact = ( "Accept-Contact" / "a" ) HCOLON ac-value *(COMMA ac-value)
  321. ac-value = "*" *(SEMI ac-params)
  322. ac-params = feature-param / req-param / explicit-param / generic-param
  323. req-param = "require"
  324. explicit-param = "explicit"
  325. ;;;; Accept-Encoding
  326. Accept-Encoding = "Accept-Encoding" HCOLON [ encoding *(COMMA encoding) ]
  327. encoding = codings *(SEMI accept-param)
  328. codings = content-coding / "*"
  329. ;;;; Accept-Language
  330. Accept-Language = "Accept-Language" HCOLON [ language *(COMMA language) ]
  331. language = language-range *(SEMI accept-param)
  332. language-range = ( ( 1*8ALPHA *( "-" 1*8ALPHA ) ) / "*" )
  333. ;;;; Accept-Resource-Priority
  334. Accept-Resource-Priority = "Accept-Resource-Priority" HCOLON [r-value *(COMMA r-value)]
  335. ;;;; Alert-Info
  336. Alert-Info = "Alert-Info" HCOLON alert-param *(COMMA alert-param)
  337. alert-param = LAQUOT absoluteURI RAQUOT *( SEMI generic-param )
  338. ;;;; Allow
  339. Allow = "Allow" HCOLON [Method *(COMMA Method)]
  340. ;;;; Allow-Events / u
  341. Allow-Events = ( "Allow-Events" / "u" ) HCOLON event-type *(COMMA event-type)
  342. ;;;; Answer-Mode
  343. Answer-Mode = "Answer-Mode" HCOLON answer-mode-value *(SEMI answer-mode-param)
  344. answer-mode-value = "Manual" / "Auto" / token
  345. answer-mode-param = "require" / generic-param
  346. ;;;; Authentication-Info
  347. Authentication-Info = "Authentication-Info" HCOLON ainfo *(COMMA ainfo)
  348. ainfo = nextnonce / message-qop / response-auth / cnonce / nonce-count
  349. nextnonce = "nextnonce" EQUAL nonce-value
  350. response-auth = "rspauth" EQUAL response-digest
  351. response-digest = LDQUOT *LHEX RDQUOT
  352. ;;;; Authorization
  353. Authorization = "Authorization" HCOLON credentials
  354. credentials = ("Digest" LWS digest-response) / other-response
  355. digest-response = dig-resp *(COMMA dig-resp)
  356. dig-resp = username / realm / nonce / digest-uri / dresponse / algorithm / cnonce / opaque / message-qop / nonce-count / auth-param / auts
  357. username = "username" EQUAL username-value
  358. username-value = quoted-string
  359. digest-uri = "uri" EQUAL LDQUOT digest-uri-value RDQUOT
  360. digest-uri-value = auth-request-uri ; equal to request-uri as specified by HTTP/1.1
  361. message-qop = "qop" EQUAL qop-value
  362. cnonce = "cnonce" EQUAL cnonce-value
  363. cnonce-value = nonce-value
  364. nonce-count = "nc" EQUAL nc-value
  365. nc-value = 8LHEX
  366. dresponse = "response" EQUAL request-digest
  367. request-digest = LDQUOT 32LHEX RDQUOT
  368. auth-request-uri = not-defined
  369. auth-param = auth-param-name EQUAL ( token / quoted-string )
  370. auth-param-name = token
  371. other-response = auth-scheme LWS auth-param *(COMMA auth-param)
  372. auth-scheme = token
  373. auts = "auts" EQUAL auts-param
  374. auts-param = LDQUOT auts-value RDQUOT
  375. auts-value = <base64 encoding of AUTS>
  376. ;;;; Call-ID / i
  377. Call-ID = ( "Call-ID" / "i" ) HCOLON callid
  378. ;;;; Call-Info
  379. Call-Info = "Call-Info" HCOLON info *(COMMA info)
  380. info = LAQUOT absoluteURI RAQUOT *( SEMI info-param )
  381. info-param = ( "purpose" EQUAL ( "icon" / "info" / "card" / "list-management" / token ) ) / generic-param
  382. ;;;; Contact / m
  383. Contact = ( "Contact" / "m" ) HCOLON ( STAR / (contact-param *(COMMA contact-param)))
  384. contact-param = (name-addr / addr-spec) *( SEMI contact-params)
  385. contact-params = c-p-q / c-p-expires / feature-param / temp-gruu / pub-gruu / c-p-instance / contact-extension
  386. c-p-q = "q" EQUAL qvalue
  387. c-p-expires = "expires" EQUAL delta-seconds
  388. feature-param = enc-feature-tag [ EQUAL LDQUOT (tag-value-list / string-value) RDQUOT ]
  389. enc-feature-tag = base-tags / other-tags
  390. base-tags = "audio" / "automata" / "class" / "duplex" / "data" / "control" / "mobility" / "description" / "events" / "priority" / "methods" / "schemes" / "application" / "video" / "language" / "type" / "isfocus" / "actor" / "text" / "extensions"
  391. other-tags = "+" ftag-name
  392. ftag-name = ALPHA *( ALPHA / DIGIT / "!" / "'" / "." / "-" / "%" )
  393. tag-value-list = tag-value *("," tag-value)
  394. tag-value = ["!"] (token-nobang / boolean / numeric)
  395. token-nobang = 1*( alphanum / "-" / "." / "%" / "*" / "_" / "+" / "`" / "'" / "~" )
  396. boolean = "TRUE" / "FALSE"
  397. numeric = "#" numeric-relation number
  398. numeric-relation = ">=" / "<=" / "=" / (number ":")
  399. number = [ "+" / "-" ] 1*DIGIT ["." 0*DIGIT]
  400. string-value = "<" *(qdtext-no-abkt / quoted-pair ) ">"
  401. qdtext-no-abkt = LWS / %x21 / %x23-3B / %x3D / %x3F-5B / %x5D-7E / UTF8-NONASCII
  402. temp-gruu = "temp-gruu" EQUAL LDQUOT *( qdtext / quoted-pair ) RDQUOT
  403. pub-gruu = "pub-gruu" EQUAL LDQUOT *( qdtext / quoted-pair ) RDQUOT
  404. c-p-instance = "+sip.instance" EQUAL LDQUOT "<" instance-val ">" RDQUOT
  405. instance-val = *uric
  406. contact-extension = generic-param
  407. ;;;; Content-Disposition
  408. Content-Disposition = "Content-Disposition" HCOLON disp-type *( SEMI disp-param )
  409. disp-type = "render" / "session" / "icon" / "alert" / "aib" / "early-session" / disp-extension-token
  410. disp-param = handling-param / generic-param
  411. handling-param = "handling" EQUAL ( "optional" / "required" / other-handling )
  412. other-handling = token
  413. disp-extension-token = token
  414. ;;;; Content-Encoding / e
  415. Content-Encoding = ( "Content-Encoding" / "e" ) HCOLON content-coding *(COMMA content-coding)
  416. content-coding = token
  417. ;;;; Content-Language
  418. Content-Language = "Content-Language" HCOLON language-tag *(COMMA language-tag)
  419. language-tag = primary-tag *( "-" subtag )
  420. primary-tag = 1*8ALPHA
  421. subtag = 1*8ALPHA
  422. ;;;; Content-Length / l
  423. Content-Length = ( "Content-Length" / "l" ) HCOLON 1*DIGIT
  424. ;;;; Content-Type / c
  425. Content-Type = ( "Content-Type" / "c" ) HCOLON media-type
  426. media-type = m-type SLASH m-subtype *( SEMI m-parameter)
  427. m-type = discrete-type / composite-type
  428. discrete-type = "text" / "image" / "audio" / "video" / "application" / extension-token
  429. composite-type = "message" / "multipart" / extension-token
  430. extension-token = ietf-token / x-token
  431. ietf-token = token
  432. x-token = "x-" token
  433. m-subtype = extension-token / iana-token
  434. iana-token = token
  435. m-parameter = m-attribute EQUAL m-value
  436. m-attribute = token
  437. m-value = token / quoted-string
  438. ;;;; CSeq
  439. CSeq = "CSeq" HCOLON 1*DIGIT LWS Method
  440. ;;;; Date
  441. Date = "Date" HCOLON SIP-date
  442. SIP-date = rfc1123-date
  443. rfc1123-date = wkday "," SP date1 SP time SP "GMT"
  444. date1 = 2DIGIT SP month SP 4DIGIT
  445. time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
  446. wkday = "Mon" / "Tue" / "Wed" / "Thu" / "Fri" / "Sat" / "Sun"
  447. month = "Jan" / "Feb" / "Mar" / "Apr" / "May" / "Jun" / "Jul" / "Aug" / "Sep" / "Oct" / "Nov" / "Dec"
  448. ;;;; Error-Info
  449. Error-Info = "Error-Info" HCOLON error-uri *(COMMA error-uri)
  450. error-uri = LAQUOT absoluteURI RAQUOT *( SEMI generic-param )
  451. ;;;; Event / o
  452. Event = ( "Event" / "o" ) HCOLON event-type *( SEMI event-param )
  453. event-type = event-package *( "." event-template )
  454. event-package = token-nodot
  455. event-template = token-nodot
  456. token-nodot = 1*( alphanum / "-" / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" )
  457. event-param = generic-param / ( "id" EQUAL token ) / call-ident / from-tag / to-tag / with-sessd
  458. call-ident = "call-id" EQUAL ( token / DQUOTE callid DQUOTE )
  459. with-sessd = "include-session-description"
  460. ;;;; Expires
  461. Expires = "Expires" HCOLON delta-seconds
  462. ;;;; From / f
  463. From = ( "From" / "f" ) HCOLON from-spec
  464. from-spec = ( name-addr / addr-spec ) *( SEMI from-param )
  465. from-param = tag-param / generic-param
  466. tag-param = "tag" EQUAL token
  467. ;;;; History-Info
  468. History-Info = "History-Info" HCOLON hi-entry *(COMMA hi-entry)
  469. hi-entry = hi-targeted-to-uri *( SEMI hi-param )
  470. hi-targeted-to-uri = name-addr
  471. hi-param = hi-index / hi-extension
  472. hi-index = "index" EQUAL 1*DIGIT *("." 1*DIGIT)
  473. hi-extension = generic-param
  474. ;;;; Identity / y
  475. Identity = "Identity" HCOLON signed-identity-digest
  476. signed-identity-digest = LDQUOT 32LHEX RDQUOT
  477. ;;;; Identity-Info / n
  478. Identity-Info = "Identity-Info" HCOLON ident-info *( SEMI ident-info-params )
  479. ident-info = LAQUOT absoluteURI RAQUOT
  480. ident-info-params = ident-info-alg / ident-info-extension
  481. ident-info-alg = "alg" EQUAL token
  482. ident-info-extension = generic-param
  483. ;;;; In-Reply-To
  484. In-Reply-To = "In-Reply-To" HCOLON callid *(COMMA callid)
  485. ;;;; Join
  486. Join = "Join" HCOLON callid *(SEMI join-param)
  487. join-param = join-to-tag / join-from-tag / generic-param
  488. join-to-tag = "to-tag" EQUAL token
  489. join-from-tag = "from-tag" EQUAL token
  490. ;;;; Max-Breadth
  491. Max-Breadth = "Max-Breadth" HCOLON 1*DIGIT
  492. ;;;; Max-Forwards
  493. Max-Forwards = "Max-Forwards" HCOLON 1*DIGIT
  494. ;;;; MIME-Version
  495. MIME-Version = "MIME-Version" HCOLON 1*DIGIT "." 1*DIGIT
  496. ;;;; Min-Expires
  497. Min-Expires = "Min-Expires" HCOLON delta-seconds
  498. ;;;; Min-SE
  499. Min-SE = "Min-SE" HCOLON delta-seconds *(SEMI generic-param)
  500. ;;;; Organization
  501. Organization = "Organization" HCOLON [TEXT-UTF8-TRIM]
  502. ;;;; P-Access-Network-Info
  503. P-Access-Network-Info = "P-Access-Network-Info" HCOLON access-net-spec
  504. access-net-spec = access-type *( SEMI access-info )
  505. access-type = "IEEE-802.11a" / "IEEE-802.11b" / "3GPP-GERAN" / "3GPP-UTRAN-FDD" / "3GPP-UTRAN-TDD" / "3GPP-CDMA2000" / token
  506. access-info = cgi-3gpp / utran-cell-id-3gpp / extension-access-info
  507. extension-access-info = gen-value
  508. cgi-3gpp = "cgi-3gpp" EQUAL (token / quoted-string)
  509. utran-cell-id-3gpp = "utran-cell-id-3gpp" EQUAL (token / quoted-string)
  510. ;;;; P-Answer-State
  511. P-Answer-State = "P-Answer-State" HCOLON answer-type *(SEMI generic-param)
  512. answer-type = "Confirmed" / "Unconfirmed" / token
  513. ;;; P-Asserted-Identity
  514. P-Asserted-Identity = PAssertedID
  515. PAssertedID = "P-Asserted-Identity" HCOLON PAssertedID-value *(COMMA PAssertedID-value)
  516. PAssertedID-value = name-addr / addr-spec
  517. ;;;; P-Associated-URI
  518. P-Associated-URI = "P-Associated-URI" HCOLON p-aso-uri-spec *(COMMA p-aso-uri-spec)
  519. p-aso-uri-spec = name-addr *( SEMI ai-param )
  520. ai-param = generic-param
  521. ;;;; P-Called-Party-ID
  522. P-Called-Party-ID = "P-Called-Party-ID" HCOLON called-pty-id-spec
  523. called-pty-id-spec = name-addr *( SEMI cpid-param )
  524. cpid-param = generic-param
  525. ;;;; P-Charging-Function-Addresses
  526. P-Charging-Function-Addresses = P-Charging-Addr
  527. P-Charging-Addr = "P-Charging-Function-Addresses" HCOLON charge-addr-params *( SEMI charge-addr-params )
  528. charge-addr-params = ccf / ecf / generic-param
  529. ccf = "ccf" EQUAL gen-value
  530. ecf = "ecf" EQUAL gen-value
  531. ;;;; P-Charging-Vector
  532. P-Charging-Vector = "P-Charging-Vector" HCOLON icid-value *( SEMI charge-params )
  533. charge-params = icid-gen-addr / orig-ioi / term-ioi / generic-param
  534. icid-value = "icid-value" EQUAL gen-value
  535. icid-gen-addr = "icid-generated-at" EQUAL host
  536. orig-ioi = "orig-ioi" EQUAL gen-value
  537. term-ioi = "term-ioi" EQUAL gen-value
  538. ;;;; P-DCS-Billing-Info
  539. P-DCS-Billing-Info = "P-DCS-Billing-Info" HCOLON Billing-Correlation-ID "/" FEID *( SEMI Billing-Info-param )
  540. Billing-Correlation-ID = 1*48(HEXDIG)
  541. FEID = 1*16(HEXDIG) "@" host
  542. Billing-Info-param = RKS-Group-ID-param / Charge-param / Calling-param / Called-param / Routing-param / Loc-Routing-param / JIP-param / generic-param
  543. RKS-Group-ID-param = "rksgroup" EQUAL RKS-Group-ID
  544. RKS-Group-ID = token
  545. Charge-param = "charge" EQUAL Acct-Charge-URI
  546. Acct-Charge-URI = LDQUOT addr-spec RDQUOT
  547. Calling-param = "calling" EQUAL Acct-Calling-URI
  548. Acct-Calling-URI = LDQUOT addr-spec RDQUOT
  549. Called-param = "called" EQUAL Acct-Called-URI
  550. Acct-Called-URI = LDQUOT addr-spec RDQUOT
  551. Routing-param = "routing" EQUAL Acct-Routing-URI
  552. Acct-Routing-URI = LDQUOT addr-spec RDQUOT
  553. Loc-Routing-param = "locroute" EQUAL Acct-Loc-Routing-URI
  554. Acct-Loc-Routing-URI = LDQUOT addr-spec RDQUOT
  555. JIP-param = "jip" EQUAL jip
  556. jip = LDQUOT 1*phonedigit-hex jip-context RDQUOT
  557. jip-context = ";jip-context=" jip-descriptor
  558. jip-descriptor = global-hex-digits
  559. global-hex-digits = "+" 1*3(phonedigit) *phonedigit-hex
  560. phonedigit = DIGIT / [ visual-separator ]
  561. phonedigit-hex = HEXDIG / "*" / "#" / [ visual-separator ]
  562. visual-separator = "-" / "." / "(" / ")"
  563. ;;;; P-DCS-LAES
  564. P-DCS-LAES = "P-DCS-LAES" HCOLON Laes-sig *( SEMI Laes-param )
  565. Laes-sig = hostport
  566. Laes-param = Laes-content / Laes-cccid / Laes-bcid / generic-param
  567. Laes-content = "content" EQUAL hostport
  568. Laes-cccid = "cccid" EQUAL 1*8(HEXDIG)
  569. Laes-bcid = "cccid" EQUAL 1*48(HEXDIG)
  570. ;;;; P-DCS-OSPS
  571. P-DCS-OSPS = "P-DCS-OSPS" HCOLON OSPS-Tag
  572. OSPS-Tag = "BLV" / "EI" / "RING" / token
  573. ;;;; P-DCS-Redirect
  574. P-DCS-Redirect = "P-DCS-Redirect" HCOLON Called-ID *(SEMI redir-params)
  575. Called-ID = LDQUOT addr-spec RDQUOT
  576. redir-params = redir-uri-param / redir-count-param / generic-param
  577. redir-uri-param = "redirector-uri" EQUAL Redirector
  578. Redirector = LDQUOT addr-spec RDQUOT
  579. redir-count-param = "count" EQUAL Redir-count
  580. Redir-count = 1*DIGIT
  581. ;;;; P-DCS-Trace-Party-ID
  582. P-DCS-Trace-Party-ID = "P-DCS-Trace-Party-ID" HCOLON name-addr *1(SEMI timestamp-param) *(SEMI trace-param)
  583. timestamp-param = "timestamp=" 1*DIGIT ["." 1*DIGIT]
  584. trace-param = generic-param
  585. ;;;; P-Early-Media
  586. P-Early-Media = "P-Early-Media" HCOLON [ em-param *(COMMA em-param) ]
  587. em-param = "sendrecv" / "sendonly" / "recvonly" / "inactive" / "gated" / "supported" / token
  588. ;;;; P-Media-Authorization
  589. P-Media-Authorization = "P-Media-Authorization" HCOLON P-Media-Authorization-Token *(COMMA P-Media-Authorization-Token)
  590. P-Media-Authorization-Token = 1*HEXDIG
  591. ;;;; P-Preferred-Identity
  592. P-Preferred-Identity = PPreferredID
  593. PPreferredID = "P-Preferred-Identity" HCOLON PPreferredID-value *(COMMA PPreferredID-value)
  594. PPreferredID-value = name-addr / addr-spec
  595. ;;;; P-Profile-Key
  596. P-Profile-Key = "P-Profile-Key" HCOLON (name-addr / addr-spec) *(SEMI generic-param)
  597. ;;;; P-Refused-URI-List
  598. P-Refused-URI-List = "P-Refused-URI-List" HCOLON uri-list-entry *(COMMA uri-list-entry)
  599. uri-list-entry = ( name-addr / addr-spec ) *(SEMI refused-param)
  600. refused-param = members-param / generic-param
  601. members-param = "members" EQUAL LDQUOT *( qdtext / quoted-pair ) RDQUOT
  602. ;;;; P-Served-User
  603. P-Served-User = "P-Served-User" HCOLON PServedUser-value *(served-user-param)
  604. served-user-param = sessioncase-param / registration-state-param / generic-param
  605. PServedUser-value = name-addr / addr-spec
  606. sessioncase-param = "sescase" EQUAL "orig" / "term"
  607. registration-state-param = "regstate" EQUAL "unreg" / "reg"
  608. ;;;; P-User-Database
  609. P-User-Database = "P-User-Database" HCOLON database *(SEMI generic-param)
  610. database = LAQUOT DiameterURI RAQUOT
  611. DiameterURI = not-defined
  612. ;;;; P-Visited-Network-ID
  613. P-Visited-Network-ID = "P-Visited-Network-ID" HCOLON vnetwork-spec *(COMMA vnetwork-spec)
  614. vnetwork-spec = (token / quoted-string) *( SEMI vnetwork-param )
  615. vnetwork-param = generic-param
  616. ;;;; Path
  617. Path = "Path" HCOLON path-value *(COMMA path-value)
  618. path-value = name-addr *( SEMI rr-param )
  619. ;;;; Permission-Missing
  620. Permission-Missing = "Permission-Missing" HCOLON per-miss-spec *(COMMA per-miss-spec)
  621. per-miss-spec = ( name-addr / addr-spec ) *( SEMI generic-param )
  622. ;;;; Priority
  623. Priority = "Priority" HCOLON priority-value
  624. priority-value = "emergency" / "urgent" / "normal" / "non-urgent" / other-priority
  625. other-priority = token
  626. ;;;; Privacy
  627. Privacy = Privacy-hdr
  628. Privacy-hdr = "Privacy" HCOLON priv-value *(";" priv-value)
  629. priv-value = "header" / "session" / "user" / "none" / "critical" / "id" / "history" / token
  630. ;;;; Priv-Answer-Mode
  631. Priv-Answer-Mode = "Priv-Answer-Mode" HCOLON answer-mode-value *(SEMI answer-mode-param)
  632. ;;;; Proxy-Authenticate
  633. Proxy-Authenticate = "Proxy-Authenticate" HCOLON challenge
  634. challenge = ("Digest" LWS digest-cln *(COMMA digest-cln)) / other-challenge
  635. other-challenge = auth-scheme / auth-param *(COMMA auth-param)
  636. digest-cln = realm / domain / nonce / opaque / stale / algorithm / qop-options / auth-param
  637. realm = "realm" EQUAL realm-value
  638. realm-value = quoted-string
  639. domain = "domain" EQUAL LDQUOT URI *( 1*SP URI ) RDQUOT
  640. URI = absoluteURI / abs-path
  641. opaque = "opaque" EQUAL quoted-string
  642. stale = "stale" EQUAL ( "true" / "false" )
  643. qop-options = "qop" EQUAL LDQUOT qop-value *("," qop-value) RDQUOT
  644. qop-value = "auth" / "auth-int" / token
  645. ;;;; Proxy-Authorization
  646. Proxy-Authorization = "Proxy-Authorization" HCOLON credentials
  647. ;;;; Proxy-Require
  648. Proxy-Require = "Proxy-Require" HCOLON option-tag *(COMMA option-tag)
  649. ;;;; RAck
  650. RAck = "RAck" HCOLON response-num LWS CSeq-num LWS Method
  651. response-num = 1*DIGIT
  652. CSeq-num = 1*DIGIT
  653. ;;;; Reason
  654. Reason = "Reason" HCOLON reason-value *(COMMA reason-value)
  655. reason-value = protocol *(SEMI reason-params)
  656. protocol = "SIP" / "Q.850" / "Preemption" / token
  657. reason-params = protocol-cause / reason-text / reason-extension
  658. protocol-cause = "cause" EQUAL "cause
  659. cause = 1*DIGIT
  660. reason-text = "text" EQUAL quoted-string
  661. reason-extension = generic-param
  662. protocol-cause = not-defined
  663. ;;;; Record-Route
  664. Record-Route = "Record-Route" HCOLON rec-route *(COMMA rec-route)
  665. rec-route = name-addr *( SEMI rr-param )
  666. rr-param = generic-param
  667. ;;;; Refer-Sub
  668. Refer-Sub = "Refer-Sub" HCOLON refer-sub-value *(SEMI exten)
  669. refer-sub-value = "true" / "false"
  670. exten = generic-param
  671. ;;;; Refer-To / r
  672. Refer-To = ( "Refer-To" / "r" ) HCOLON ( name-addr / addr-spec ) *(SEMI refer-param)
  673. refer-param = generic-param / feature-param
  674. ;;;; Referred-By / b
  675. Referred-By = ( "Referred-By" / "b" ) HCOLON referrer-uri *( SEMI (referredby-id-param / generic-param) )
  676. referrer-uri = ( name-addr / addr-spec )
  677. referredby-id-param = "cid" EQUAL sip-clean-msg-id
  678. sip-clean-msg-id = LDQUOT dot-atom "@" (dot-atom / host) RDQUOT
  679. dot-atom = atom *( "." atom )
  680. atom = 1*( alphanum / "-" / "!" / "%" / "*" / "_" / "+" / "'" / "`" / "~" )
  681. ;;;; Reject-Contact / j
  682. Reject-Contact = ( "Reject-Contact" / "j" ) HCOLON rc-value *(COMMA rc-value)
  683. rc-value = "*" *(SEMI rc-params)
  684. rc-params = feature-param / generic-param
  685. ;;;; Replaces
  686. Replaces = "Replaces" HCOLON callid *(SEMI replaces-param)
  687. replaces-param = to-tag / from-tag / early-flag / generic-param
  688. to-tag = "to-tag" EQUAL token
  689. from-tag = "from-tag" EQUAL token
  690. early-flag = "early-only"
  691. ;;;; Reply-To
  692. Reply-To = "Reply-To" HCOLON rplyto-spec
  693. rplyto-spec = ( name-addr / addr-spec ) *( SEMI rplyto-param )
  694. rplyto-param = generic-param
  695. ;;;; Request-Disposition / d
  696. Request-Disposition = ( "Request-Disposition" / "d" ) HCOLON directive *(COMMA directive)
  697. directive = proxy-directive / cancel-directive / fork-directive / recurse-directive / parallel-directive / queue-directive
  698. proxy-directive = "proxy" / "redirect"
  699. cancel-directive = "cancel" / "no-cancel"
  700. fork-directive = "fork" / "no-fork"
  701. recurse-directive = "recurse" / "no-recurse"
  702. parallel-directive = "parallel" / "sequential"
  703. queue-directive = "queue" / "no-queue"
  704. ;;;; Require
  705. Require = "Require" HCOLON option-tag *(COMMA option-tag)
  706. ;;;; Resource-Priority
  707. Resource-Priority = "Resource-Priority" HCOLON r-value *(COMMA r-value)
  708. r-value = namespace "." r-priority
  709. namespace = token-nodot
  710. r-priority = token-nodot
  711. token-nodot = 1*( alphanum / "-" / "!" / "%" / "*" / "_" / "+" / "`" / "'" / "~" )
  712. ;;;; Retry-After RFC 3261 Up
  713. Retry-After = "Retry-After" HCOLON delta-seconds [ comment ] *( SEMI retry-param )
  714. retry-param = ("duration" EQUAL delta-seconds) / generic-param
  715. ;;;; Route
  716. Route = "Route" HCOLON route-param *(COMMA route-param)
  717. route-param = name-addr *( SEMI rr-param )
  718. ;;;; RSeq
  719. RSeq = "RSeq" HCOLON response-num
  720. ;;;; Security-Client
  721. Security-Client = "Security-Client" HCOLON sec-mechanism *(COMMA sec-mechanism)
  722. sec-mechanism = mechanism-name *( SEMI mech-parameters )
  723. mechanism-name = ( "digest" / "tls" / "ipsec-ike" / "ipsec-man" / token )
  724. mech-parameters = ( preference / digest-algorithm / digest-qop / digest-verify / mech-extension )
  725. preference = "q" EQUAL qvalue
  726. digest-algorithm = "d-alg" EQUAL token
  727. digest-qop = "d-qop" EQUAL token
  728. digest-verify = "d-ver" EQUAL LDQUOT 32LHEX RDQUOT
  729. mech-extension = generic-param
  730. ;;;; Security-Server
  731. Security-Server = "Security-Server" HCOLON sec-mechanism *(COMMA sec-mechanism)
  732. ;;;; Security-Verify
  733. Security-Verify = "Security-Verify" HCOLON sec-mechanism *(COMMA sec-mechanism)
  734. ;;;; Server
  735. Server = "Server" HCOLON server-val *(LWS server-val)
  736. server-val = product / comment
  737. product = token [SLASH product-version]
  738. product-version = token
  739. ;;;; Service-Route
  740. Service-Route = "Service-Route" HCOLON sr-value *(COMMA sr-value)
  741. sr-value = name-addr *( SEMI rr-param )
  742. ;;;; Session-Expires / x
  743. Session-Expires = ( "Session-Expires" / "x" ) HCOLON delta-seconds *( SEMI (se-params )
  744. se-params = refresher-param / generic-param
  745. refresher-param = "refresher" EQUAL ("uas" / "uac")
  746. ;;;; SIP-ETag
  747. SIP-ETag = "SIP-ETag" HCOLON entity-tag
  748. entity-tag = token
  749. ;;;; SIP-If-Match
  750. SIP-If-Match = "SIP-If-Match" HCOLON entity-tag
  751. ;;;; Subject / s
  752. Subject = ( "Subject" / "s" ) HCOLON [TEXT-UTF8-TRIM]
  753. ;;;; Subscription-State
  754. Subscription-State = ( "Subscription-State" / "o" ) HCOLON substate-value *( SEMI subexp-params )
  755. substate-value = "active" / "pending" / "terminated" / extension-substate
  756. extension-substate = token
  757. subexp-params = ("reason" EQUAL event-reason-value) / ("expires" EQUAL delta-seconds) / ("retry-after" EQUAL delta-seconds) / generic-param
  758. event-reason-value = "deactivated" / "probation" / "rejected" / "timeout" / "giveup" / "noresource" / event-reason-extension
  759. event-reason-extension = token
  760. ;;;; Supported / k
  761. Supported = ( "Supported" / "k" ) HCOLON [option-tag *(COMMA option-tag)]
  762. ;;;; Target-Dialog
  763. Target-Dialog = "Target-Dialog" HCOLON callid *(SEMI td-param)
  764. td-param = remote-param / local-param / generic-param
  765. remote-param = "remote-tag" EQUAL token
  766. local-param = "local-tag" EQUAL token
  767. ;;;; Timestamp
  768. Timestamp = "Timestamp" HCOLON 1*(DIGIT) [ "." *(DIGIT) ] [ LWS delay ]
  769. delay = *(DIGIT) [ "." *(DIGIT) ]
  770. ;;;; To / t
  771. To = ( "To" / "t" ) HCOLON ( name-addr / addr-spec ) *( SEMI to-param )
  772. to-param = tag-param / generic-param
  773. ;;;; Trigger-Consent
  774. Trigger-Consent = "Trigger-Consent" HCOLON trigger-cons-spec *(COMMA trigger-cons-spec)
  775. trigger-cons-spec = ( SIP-URI / SIPS-URI ) *( SEMI trigger-param )
  776. trigger-param = target-uri / generic-param
  777. target-uri = "target-uri" EQUAL LDQUOT *( qdtext / quoted-pair ) RDQUOT
  778. ;;;; Unsupported
  779. Unsupported = "Unsupported" HCOLON option-tag *(COMMA option-tag)
  780. ;;;; User-Agent
  781. User-Agent = "User-Agent" HCOLON server-val *(LWS server-val)
  782. ;;;; Via / v
  783. Via = ( "Via" / "v" ) HCOLON via-parm *(COMMA via-parm)
  784. via-parm = sent-protocol LWS sent-by *( SEMI via-params )
  785. via-params = via-ttl / via-maddr / via-received / via-branch / via-compression / response-port / via-extension
  786. via-ttl = "ttl" EQUAL ttl
  787. via-maddr = "maddr" EQUAL host
  788. via-received = "received" EQUAL (IPv4address / IPv6address)
  789. via-branch = "branch" EQUAL token
  790. via-compression = "comp" EQUAL ("sigcomp" / other-compression)
  791. other-compression = token
  792. response-port = "rport" [EQUAL 1*DIGIT]
  793. via-extension = generic-param
  794. sent-protocol = protocol-name SLASH protocol-version SLASH transport
  795. protocol-name = "SIP" / token
  796. protocol-version = token
  797. transport = "UDP" / "TCP" / "TLS" / "SCTP" / "TLS-SCTP" / other-transport
  798. sent-by = host [ COLON port ]
  799. ttl = 1*3DIGIT
  800. ;;;; Warning
  801. Warning = "Warning" HCOLON warning-value *(COMMA warning-value)
  802. warning-value = warn-code SP warn-agent SP warn-text
  803. warn-code = 3DIGIT
  804. warn-agent = hostport / pseudonym
  805. warn-text = quoted-string
  806. pseudonym = token
  807. ;;;; WWW-Authenticate
  808. WWW-Authenticate = "WWW-Authenticate" HCOLON challenge
  809. ;---------------------
  810. ; Response Codes
  811. ;---------------------
  812. Status-Code = Informational / Success / Redirection / Client-Error / Server-Error / Global-Failure / extension-code
  813. extension-code = 3DIGIT
  814. Reason-Phrase = *( reserved / unreserved / escaped / UTF8-NONASCII / UTF8-CONT / SP / HTAB )
  815. ;;;; 1xx
  816. Informational = "100" / "180" / "181" / "182" / "183"
  817. ;;;; 2xx
  818. Success = "200" / "202"
  819. ;;;; 3xx
  820. Redirection = "250" / "301" / "302" / "305" / "380"
  821. ;;;; 4xx
  822. Client-Error = "400" / "401" / "402" / "403" / "404" / "405" / "406" / "407" / "408" / "410" / "412" / "413" / "414" / "415" / "416" / "417" / "420" / "421" / "422" / "423" / "428" / "429" / "433" / "436" / "440" / "437" / "438" / "470" / "480" / "481" / "482" / "483" / "484"/ "485"/ "486"/ "487" / "488"/ "489"/ "491"/ "493" / "494"
  823. ;;;; 5xx
  824. Server-Error = "500" / "501" / "502" / "503" / "504" / "505" / "513" / "580"
  825. ;;;; 6xx
  826. Global-Failure= "600" / "603" / "604" / "606"
  827. ;---------------------------------------------------------------------------------------------------------