見出し画像

SIP(Session Initiation Protocol) 既存ダイアログ内~

こんにちは、しゅん@SIP担当です。

ほわっと仕事をしてるので、厳密に理解できていない言葉を、
厳密に理解したいと思います。

今回は「(既存)ダイヤログリクエスト」とは?
日本語は私の試験も入った超約なので、あくまで参考程度に。(一日で終わらなかったので、別途更新します。

サマリ(2/19時点 RFC 3261 8.1章まで)

・ダイアログ内では、To-tag, From-atg, Call-IDが共通。
・ダイアログ内で、ルーチングは変わらない。メッセージの順序性は
 CSeqで担保。
 ・ダイアログ内の新規メソッド(セッション更新のre-INVITE等は CSeqを+1)
・INVITEでセッションが開始され、セッションには1つまたは複数のダイアログが含まれる。
 ★セッションとダイアログとトランザクションの違いは別途
・ダイアログの開始はINVITE or OPTIONS。INVITE or OPTIONSに対する2xx応答受信時に
 ダイアログが確立する。
・発側でINVITEにCall-IDとFrom tagを載せて、着側でTo tagを載せるてレスポンス返信し
 ダイアログ確立。

以下参考 RFC読み解き

https://tools.ietf.org/html/rfc3261
dialogで検索すると334 今日は 53まで(8.1章)


ダイアログ内で、To tag, From tag, Call-IDは共通

Call-ID contains a globally unique identifier for this call,
generated by the combination of a random string and the softphone's
host name or IP address. The combination of the To tag, From tag,
and Call-ID completely defines a peer-to-peer SIP relationship
between Alice and Bob and is referred to as a dialog.

ダイアログ中は、ダイアログ内の新規メソッドでCseq インクリメント(+1)

CSeq or Command Sequence contains an integer and a method name. The
CSeq number is incremented for each new request within a dialog and
is a traditional sequence number.

ダイアログ内で、From tag, To tagは変わらない。

This tag will be incorporated by both endpoints into the dialog and will be included in all future requests and responses in this call.

セッション中に、既存(exiting) ダイアログ=タグを変えずにCseq+1の
場合、re INVITEでメディア更新する。

During the session, either Alice or Bob may decide to change the
characteristics of the media session. This is accomplished by
sending a re-INVITE containing a new media description. This re-
INVITE references the existing dialog so that the other party knows
that it is to modify an existing session instead of establishing a
new session.


ダイアログの目的は、メッセージの順序と、routing情報の管理
RFC3261の範囲ではダイアログを始めるメソッドはINVITEのみ。

Certain other requests are sent within a dialog. A dialog is a
peer-to-peer SIP relationship between two user agents that persists
for some time. The dialog facilitates sequencing of messages and
proper routing of requests between the user agents. The INVITE
method is the only way defined in this specification to establish a
dialog. When a UAC sends a request that is within the context of a
dialog, it follows the common UAC rules as discussed in Section 8 but
also the rules for mid-dialog requests. Section 12 discusses dialogs
and presents the procedures for their construction and maintenance,
in addition to construction of requests within a dialog.


INVITEでセッションが開始され、セッションには1つまたは複数のダイアログが含まれる。

The most important method in SIP is the INVITE method, which is used
to establish a session between participants. A session is a
collection of participants, and streams of media between them, for
the purposes of communication. Section 13 discusses how sessions are
initiated, resulting in one or more SIP dialogs. Section 14
discusses how characteristics of that session are modified through
the use of an INVITE request within a dialog. Finally, section 15
discusses how a session is terminated.

dialog = Call Leg(昔RFC2543)

Call Leg: Another name for a dialog [31]; no longer used in this
specification.
   ★[31] RFC 2543用語


ダイアログは、一定期間続くP2PのSIPの関係。ダイアログの確立はINVITEに対する2xx応答等。ダイアログは、Call-ID, To-Tag, From-Tagで識別。

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.

ダイヤログ中に、対向のtag(接続先のユーザを変える等?)を変えることも可能

Target Refresh Request: A target refresh request sent within a
dialog is defined as a request that can modify the remote
target of the dialog.

ダイアログ内リクエストか、ダイアログ内リクエストかが大きな分かれ目

UAC and UAS procedures depend strongly on two factors. First, based
on whether the request or response is inside or outside of a dialog,
and second, based on the method of a request. Dialogs are discussed
thoroughly in Section 12; they represent a peer-to-peer relationship
between user agents and are established by specific SIP methods, such
as INVITE.

8章では、ダイアログ外リクエストを取り扱う。

In this section, we discuss the method-independent rules for UAC and
UAS behavior when processing requests that are outside of a dialog.
This includes, of course, the requests which themselves establish a
dialog.

ダイアログ外リクエストの例は、セッションを確立する(更新ではない)INVITEやOPTIONS(対向の能力 サポートするoption tagなどの確認)

Examples of requests sent outside of a dialog include an INVITE to
establish a session (Section 13) and an OPTIONS to query for
capabilities (Section 11).

ダイアログ外リクエストは、 To tagを設定してはいけない。MUST NOT 。
dialogが確立される時に、対向からTo-Tagを受信することでダイアログは確立。

A request outside of a dialog MUST NOT contain a To tag; the tag in
the To field of a request identifies the peer of the dialog. Since
no dialog is established, no tag is present.

----------↑ 2021/2/19作業分----------------------

この記事が参加している募集

最近の学び

頂いた投げ銭は新たなIoTデバイスの購入資金に使わせていただき、レビュー記事下記ます。