RFC 6228 ASCII, PDF, HTML Session Initiation Protocol (SIP) Response Code for Indication of Terminated Dialog C. Holmberg May 2011 Errata Proposed Standard
RFC 6228 引入了一个新的 response code, 199 Early Dialog Terminated, 给 SIP forking proxy and UAS 用来通知上游 SIP UA, 主要就是 proxy 跟 UAC, 我终止了一个 early dialog,你那边也可以删掉它了。
协议地址:RFC 6228: Session Initiation Protocol (SIP) Response Code for Indication of Terminated Dialog
为什么要引进 199 Early Dialog Terminated?
在有些场景下,比如 SIP forking, proxy 会把 INVITE 转发给多个 UAS,并给 UAC 回复每个 UAS 发来的 1xx response,这导致 UAC 端会维护多个 early dialog.
随后一些 UAS 可能会拒绝并回复 4xx, 这时对应的这些 dialog 以后不会再用了,由于 Proxy 仍在等其他 UAS 的答复,没法给 UAC 回复,这就有点费资源了。
为了能在收到 4xx 后及时通知 UAC, 于是引入了 199 response code.
首先明确下 dialog 的概念。
ref. RFC 3261,
Dialog: A dialog is a peer-to-peer SIP relationship between two
UAs that persists for some time. A dialog is established by
SIP messages, such as a 2xx response to an INVITE request. A
dialog is identified by a call identifier, local tag, and a
remote tag. A dialog was formerly known as a call leg in RFC
2543.
A dialog is identified at each UA with a dialog ID, which consists of
a Call-ID value, a local tag and a remote tag.
Dialogs are created through the generation of non-failure responses
to requests with specific methods. Within this specification, only
2xx and 101-199 responses with a To tag, where the request was
INVITE, will establish a dialog. A dialog established by a non-final
response to a request is in the "early" state and it is called an
earl