[要約] RFC 5626は、SIPにおいて、NATやファイアウォールの背後にある端末(UA)がサーバーからの着信リクエストを確実に受信し続けるための「クライアント起点接続(Outbound)」仕様を定義しています。複数のフローを維持し、キープアライブメッセージを定期的に送信することで、中継機器のセッション維持時間を延ばし、接続の信頼性を高めるための標準的な手法を規定しています。
Network Working Group C. Jennings, Ed.
Request for Comments: 5626 Cisco Systems
Updates: 3261, 3327 R. Mahy, Ed.
Category: Standards Track Unaffiliated
F. Audet, Ed.
Skype Labs
October 2009
Managing Client-Initiated Connections in the Session Initiation Protocol (SIP)
RFC 5626 - セッション開始プロトコル(SIP)におけるクライアント起点接続の管理
Abstract
概要
The Session Initiation Protocol (SIP) allows proxy servers to initiate TCP connections or to send asynchronous UDP datagrams to User Agents in order to deliver requests. However, in a large number of real deployments, many practical considerations, such as the existence of firewalls and Network Address Translators (NATs) or the use of TLS with server-provided certificates, prevent servers from connecting to User Agents in this way. This specification defines behaviors for User Agents, registrars, and proxy servers that allow requests to be delivered on existing connections established by the User Agent. It also defines keep-alive behaviors needed to keep NAT bindings open and specifies the usage of multiple connections from the User Agent to its registrar.
セッション開始プロトコル(SIP)では、プロキシサーバーがTCP接続を開始したり、要求を届けるためにユーザーエージェント(UA)へ非同期UDPデータグラムを送信したりできます。しかし実際の導入環境では、ファイアウォールやネットワークアドレス変換(NAT)の存在、サーバーが提供する証明書を使ったTLSなど、さまざまな事情により、サーバーからこの方法でUAへ接続できないことがよくあります。本仕様は、UA、レジストラ、プロキシサーバーの動作を定め、UAが確立した既存の接続を通じて要求を届けられるようにします。また、NATバインディングを維持するためのキープアライブ動作と、UAからレジストラへの複数接続の使用方法も定めます。
Status of This Memo
本文書の状態
This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.
この文書はインターネットコミュニティ向けにインターネット標準化トラックのプロトコルを規定し、改善のための議論と提案を求めます。このプロトコルの標準化状況については、「Internet Official Protocol Standards」(STD 1)の最新版を参照してください。本書は無制限に配布できます。
Copyright Notice
著作権表示
Copyright (c) 2009 IETF Trust and the persons identified as the document authors. All rights reserved.
Copyright (c) 2009 IETF Trustおよび本書の著者として記載された方々。すべての権利を保有します。
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the BSD License.
本書には、発行日時点で有効なBCP 78およびIETF文書に関するIETF Trustの法的規定(http://trustee.ietf.org/license-info)が適用されます。本書に関する権利と制限が記載されているため、これらの文書を注意深く確認してください。本書から抽出したコードコンポーネントには、Trustの法的規定のSection 4.eで説明されているSimplified BSD Licenseの文面を含める必要があります。また、BSD Licenseに記載のとおり、保証なしで提供します。
This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.
この文書には、2008年11月10日より前に公開された、または一般に利用可能になったIETF文書またはIETFコントリビューションの素材が含まれている場合があります。この素材の一部について著作権を管理する者は、IETF標準プロセスの外でその素材を変更することを許可する権利をIETFトラストに付与していない可能性があります。そのような素材の著作権を管理する者から適切なライセンスを取得しない限り、IETF標準プロセスの外でこの文書を変更することはできません。また、RFCとして発行するために書式を整える場合と英語以外の言語に翻訳する場合を除き、IETF標準プロセスの外でこの文書の派生物を作成することはできません。
Table of Contents
目次
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Conventions and Terminology . . . . . . . . . . . . . . . . . 5
2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 5
3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1. Summary of Mechanism . . . . . . . . . . . . . . . . . . . 6
3.2. Single Registrar and UA . . . . . . . . . . . . . . . . . 7
3.3. Multiple Connections from a User Agent . . . . . . . . . . 8
3.4. Edge Proxies . . . . . . . . . . . . . . . . . . . . . . . 10
3.5. Keep-Alive Technique . . . . . . . . . . . . . . . . . . . 11
3.5.1. CRLF Keep-Alive Technique . . . . . . . . . . . . . . 12
3.5.2. STUN Keep-Alive Technique . . . . . . . . . . . . . . 12
4. User Agent Procedures . . . . . . . . . . . . . . . . . . . . 13
4.1. Instance ID Creation . . . . . . . . . . . . . . . . . . . 13
4.2. Registrations . . . . . . . . . . . . . . . . . . . . . . 14
4.2.1. Initial Registrations . . . . . . . . . . . . . . . . 14
4.2.2. Subsequent REGISTER Requests . . . . . . . . . . . . . 16
4.2.3. Third-Party Registrations . . . . . . . . . . . . . . 17
4.3. Sending Non-REGISTER Requests . . . . . . . . . . . . . . 17
4.4. Keep-Alives and Detecting Flow Failure . . . . . . . . . . 18
4.4.1. Keep-Alive with CRLF . . . . . . . . . . . . . . . . . 19
4.4.2. Keep-Alive with STUN . . . . . . . . . . . . . . . . . 21
4.5. Flow Recovery . . . . . . . . . . . . . . . . . . . . . . 21
5. Edge Proxy Procedures . . . . . . . . . . . . . . . . . . . . 22
5.1. Processing Register Requests . . . . . . . . . . . . . . . 22
5.2. Generating Flow Tokens . . . . . . . . . . . . . . . . . . 23
5.3. Forwarding Non-REGISTER Requests . . . . . . . . . . . . . 23
5.3.1. Processing Incoming Requests . . . . . . . . . . . . . 24
5.3.2. Processing Outgoing Requests . . . . . . . . . . . . . 24
5.4. Edge Proxy Keep-Alive Handling . . . . . . . . . . . . . . 25
6. Registrar Procedures . . . . . . . . . . . . . . . . . . . . . 25
7. Authoritative Proxy Procedures: Forwarding Requests . . . . . 27
8. STUN Keep-Alive Processing . . . . . . . . . . . . . . . . . . 28
8.1. Use with SigComp . . . . . . . . . . . . . . . . . . . . . 29
9. Example Message Flow . . . . . . . . . . . . . . . . . . . . . 30
9.1. Subscription to Configuration Package . . . . . . . . . . 30
9.2. Registration . . . . . . . . . . . . . . . . . . . . . . . 32
9.3. Incoming Call and Proxy Crash . . . . . . . . . . . . . . 34
9.4. Re-Registration . . . . . . . . . . . . . . . . . . . . . 37
9.5. Outgoing Call . . . . . . . . . . . . . . . . . . . . . . 38
10. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 40
11.1. Flow-Timer Header Field . . . . . . . . . . . . . . . . . 40
11.2. "reg-id" Contact Header Field Parameter . . . . . . . . . 40
11.3. SIP/SIPS URI Parameters . . . . . . . . . . . . . . . . . 41
11.4. SIP Option Tag . . . . . . . . . . . . . . . . . . . . . . 41
11.5. 430 (Flow Failed) Response Code . . . . . . . . . . . . . 41
11.6. 439 (First Hop Lacks Outbound Support) Response Code . . . 42
11.7. Media Feature Tag . . . . . . . . . . . . . . . . . . . . 42
12. Security Considerations . . . . . . . . . . . . . . . . . . . 43
13. Operational Notes on Transports . . . . . . . . . . . . . . . 44
14. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 44
15. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 45
16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 45
16.1. Normative References . . . . . . . . . . . . . . . . . . . 45
16.2. Informative References . . . . . . . . . . . . . . . . . . 47
Appendix A. Default Flow Registration Backoff Times . . . . . . . 49
Appendix B. ABNF . . . . . . . . . . . . . . . . . . . . . . . . 49
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
1. はじめに .......................................................4
2. Conventions and Terminology . . . . . . . . . . . . . . . . . 5
2. 慣習と用語 .....................................................5
2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 5
2.1. 定義 .......................................................5
3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3. 概要 ...........................................................6
3.1. Summary of Mechanism . . . . . . . . . . . . . . . . . . . 6
3.1. メカニズムの概要 ...........................................6
3.2. Single Registrar and UA . . . . . . . . . . . . . . . . . 7
3.2. 単一のレジストラとUA .......................................7
3.3. Multiple Connections from a User Agent . . . . . . . . . . 8
3.3. ユーザーエージェントからの複数の接続 .......................8
3.4. Edge Proxies . . . . . . . . . . . . . . . . . . . . . . . 10
3.4. エッジプロキシ ............................................10
3.5. Keep-Alive Technique . . . . . . . . . . . . . . . . . . . 11
3.5. キープアライブ方式 ........................................11
3.5.1. CRLF Keep-Alive Technique . . . . . . . . . . . . . . 12
3.5.1. CRLFキープアライブ方式 ................................12
3.5.2. STUN Keep-Alive Technique . . . . . . . . . . . . . . 12
3.5.2. STUNキープアライブ方式 ................................12
4. User Agent Procedures . . . . . . . . . . . . . . . . . . . . 13
4. ユーザーエージェントの手順 ....................................13
4.1. Instance ID Creation . . . . . . . . . . . . . . . . . . . 13
4.1. Instance IDの生成 .........................................13
4.2. Registrations . . . . . . . . . . . . . . . . . . . . . . 14
4.2. 登録 ......................................................14
4.2.1. Initial Registrations . . . . . . . . . . . . . . . . 14
4.2.1. 初期登録 ..............................................14
4.2.2. Subsequent REGISTER Requests . . . . . . . . . . . . . 16
4.2.2. 後続のREGISTER要求 ....................................16
4.2.3. Third-Party Registrations . . . . . . . . . . . . . . 17
4.2.3. 第三者による登録 ......................................17
4.3. Sending Non-REGISTER Requests . . . . . . . . . . . . . . 17
4.3. REGISTER以外の要求送信 ....................................17
4.4. Keep-Alives and Detecting Flow Failure . . . . . . . . . . 18
4.4. キープアライブとFlow障害の検出 ............................18
4.4.1. Keep-Alive with CRLF . . . . . . . . . . . . . . . . . 19
4.4.1. CRLFキープアライブ ....................................19
4.4.2. Keep-Alive with STUN . . . . . . . . . . . . . . . . . 21
4.4.2. STUNキープアライブ ....................................21
4.5. Flow Recovery . . . . . . . . . . . . . . . . . . . . . . 21
4.5. フローの復旧 ..............................................21
5. Edge Proxy Procedures . . . . . . . . . . . . . . . . . . . . 22
5. エッジプロキシの手順 ..........................................22
5.1. Processing Register Requests . . . . . . . . . . . . . . . 22
5.1. REGISTER要求の処理 ........................................22
5.2. Generating Flow Tokens . . . . . . . . . . . . . . . . . . 23
5.2. フロートークンの生成 ......................................23
5.3. Forwarding Non-REGISTER Requests . . . . . . . . . . . . . 23
5.3. REGISTER以外の要求の転送 ..................................23
5.3.1. Processing Incoming Requests . . . . . . . . . . . . . 24
5.3.1. 着信要求の処理 ........................................24
5.3.2. Processing Outgoing Requests . . . . . . . . . . . . . 24
5.3.2. 発信要求の処理 ........................................24
5.4. Edge Proxy Keep-Alive Handling . . . . . . . . . . . . . . 25
5.4. エッジプロキシのキープアライブ処理 ........................25
6. Registrar Procedures . . . . . . . . . . . . . . . . . . . . . 25
6. レジストラの手順 ..............................................25
7. Authoritative Proxy Procedures: Forwarding Requests . . . . . 27
7. 権威プロキシの手順:要求の転送 ................................27
8. STUN Keep-Alive Processing . . . . . . . . . . . . . . . . . . 28
8. STUNキープアライブ処理 ........................................28
8.1. Use with SigComp . . . . . . . . . . . . . . . . . . . . . 29
8.1. SigCompとの併用 ...........................................29
9. Example Message Flow . . . . . . . . . . . . . . . . . . . . . 30
9. メッセージフローの例 ..........................................30
9.1. Subscription to Configuration Package . . . . . . . . . . 30
9.1. 構成パッケージの購読 ......................................30
9.2. Registration . . . . . . . . . . . . . . . . . . . . . . . 32
9.2. 登録 ......................................................32
9.3. Incoming Call and Proxy Crash . . . . . . . . . . . . . . 34
9.3. 着信とプロキシのクラッシュ ................................34
9.4. Re-Registration . . . . . . . . . . . . . . . . . . . . . 37
9.4. 再登録 ....................................................37
9.5. Outgoing Call . . . . . . . . . . . . . . . . . . . . . . 38
9.5. 発信 ......................................................38
10. Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
10. 文法 ..........................................................40
11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 40
11. IANAに関する考慮事項 ..........................................40
11.1. Flow-Timer Header Field . . . . . . . . . . . . . . . . . 40
11.1. Flow-Timerヘッダーフィールド ..............................40
11.2. "reg-id" Contact Header Field Parameter . . . . . . . . . 40
11.2. reg-id Contactヘッダーフィールドパラメーター ..............40
11.3. SIP/SIPS URI Parameters . . . . . . . . . . . . . . . . . 41
11.3. SIP/SIPS URIパラメーター ..................................41
11.4. SIP Option Tag . . . . . . . . . . . . . . . . . . . . . . 41
11.4. SIPオプションタグ .........................................41
11.5. 430 (Flow Failed) Response Code . . . . . . . . . . . . . 41
11.5. 430 (Flow Failed) 応答コード ..............................41
11.6. 439 (First Hop Lacks Outbound Support) Response Code . . . 42
11.6. 439 (First Hop Lacks Outbound Support) 応答コード .........42
11.7. Media Feature Tag . . . . . . . . . . . . . . . . . . . . 42
11.7. メディア機能タグ ..........................................42
12. Security Considerations . . . . . . . . . . . . . . . . . . . 43
12. セキュリティに関する考慮事項 ..................................43
13. Operational Notes on Transports . . . . . . . . . . . . . . . 44
13. トランスポートに関する運用上の注意 ............................44
14. Requirements . . . . . . . . . . . . . . . . . . . . . . . . . 44
14. 要件 ..........................................................44
15. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 45
15. 謝辞 ..........................................................45
16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 45
16. 参考文献 ......................................................45
16.1. Normative References . . . . . . . . . . . . . . . . . . . 45
16.1. 規範的参考文献 ............................................45
16.2. Informative References . . . . . . . . . . . . . . . . . . 47
16.2. 参考情報 ..................................................47
Appendix A. Default Flow Registration Backoff Times . . . . . . . 49
Appendix A. フロー再登録の既定バックオフ時間 .....................49
Appendix B. ABNF . . . . . . . . . . . . . . . . . . . . . . . . 49
Appendix B. ABNF .................................................49
There are many environments for SIP [RFC3261] deployments in which the User Agent (UA) can form a connection to a registrar or proxy but in which connections in the reverse direction to the UA are not possible. This can happen for several reasons, but the most likely is a NAT or a firewall in between the SIP UA and the proxy. Many such devices will only allow outgoing connections. This specification allows a SIP User Agent behind such a firewall or NAT to receive inbound traffic associated with registrations or dialogs that it initiates.
SIP [RFC3261]を導入した環境の多くでは、ユーザーエージェント(UA)からレジストラやプロキシへの接続は可能でも、逆方向にUAへ接続することはできません。理由はいくつかありますが、最も一般的なのはSIP UAとプロキシの間にNATやファイアウォールがあることです。このような装置の多くは、発信接続だけを許可します。本仕様により、ファイアウォールやNATの背後にいるSIP UAは、自ら開始した登録やダイアログに関連する着信トラフィックを受信できます。
Most IP phones and personal computers get their network configurations dynamically via a protocol such as the Dynamic Host Configuration Protocol (DHCP) [RFC2131]. These systems typically do not have a useful name in the Domain Name System (DNS) [RFC1035], and they almost never have a long-term, stable DNS name that is appropriate for use in the subjectAltName of a certificate, as required by [RFC3261]. However, these systems can still act as a Transport Layer Security (TLS) [RFC5246] client and form outbound connections to a proxy or registrar that authenticates with a server certificate. The server can authenticate the UA using a shared secret in a digest challenge (as defined in Section 22 of RFC 3261) over that TLS connection. This specification allows a SIP User Agent who has to initiate the TLS connection to receive inbound traffic associated with registrations or dialogs that it initiates.
ほとんどのIP電話やパーソナルコンピューターは、動的ホスト構成プロトコル(DHCP)[RFC2131]などを使ってネットワーク設定を動的に取得します。通常、こうしたシステムにはドメインネームシステム(DNS)[RFC1035]で使える名前がありません。また、RFC3261が証明書のsubjectAltNameに求める、長期間安定して使えるDNS名を持つこともほとんどありません。しかし、TLSクライアントとして動作し、サーバー証明書で認証するプロキシやレジストラへ発信接続することはできます。サーバーはそのTLS接続上でダイジェストチャレンジを行い、共有シークレットを使ってUAを認証できます(RFC 3261のセクション22を参照)。本仕様により、TLS接続を開始する必要があるSIP UAも、自ら開始した登録やダイアログに関連する着信トラフィックを受信できます。
The key idea of this specification is that when a UA sends a REGISTER request or a dialog-forming request, the proxy can later use this same network "flow" -- whether this is a bidirectional stream of UDP datagrams, a TCP connection, or an analogous concept in another transport protocol -- to forward any incoming requests that need to go to this UA in the context of the registration or dialog.
本仕様の要点は、UAがREGISTER要求またはダイアログを確立する要求を送信すると、プロキシは後で同じネットワーク「フロー」を使って、その登録またはダイアログに関連してUAへ届ける必要のある着信要求を転送できることです。フローとは、UDPデータグラムの双方向ストリーム、TCP接続、または別のトランスポートプロトコルにおける同等の概念を指します。
For a UA to receive incoming requests, the UA has to connect to a server. Since the server can't connect to the UA, the UA has to make sure that a flow is always active. This requires the UA to detect when a flow fails. Since such detection takes time and leaves a window of opportunity for missed incoming requests, this mechanism allows the UA to register over multiple flows at the same time. This specification also defines two keep-alive schemes. The keep-alive mechanism is used to keep NAT bindings fresh, and to allow the UA to detect when a flow has failed.
着信要求を受信するには、UAがサーバーへ接続する必要があります。サーバーからUAへ接続できないため、UAはフローを常時アクティブに保つ必要があります。そのためにはフロー障害を検出しなければなりませんが、検出には時間がかかり、その間に着信要求を取りこぼす可能性があります。本機構では複数のフローを同時に登録できるため、その可能性を抑えられます。本仕様は2種類のキープアライブ方式も定義します。キープアライブはNATバインディングを維持し、フロー障害を検出するために使います。
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
本書におけるキーワード「MUST」「MUST NOT」「REQUIRED」「SHALL」「SHALL NOT」「SHOULD」「SHOULD NOT」「RECOMMENDED」「MAY」および「OPTIONAL」は、[RFC2119]に記載された意味で解釈します。
Authoritative Proxy: A proxy that handles non-REGISTER requests for a specific Address-of-Record (AOR), performs the logical Location Server lookup described in [RFC3261], and forwards those requests to specific Contact URIs. (In [RFC3261], the role that is authoritative for REGISTER requests for a specific AOR is a Registration Server.)
Edge Proxy: An edge proxy is any proxy that is located topologically between the registering User Agent and the Authoritative Proxy. The "first" edge proxy refers to the first edge proxy encountered when a UA sends a request.
Edge Proxy(エッジプロキシ):登録を行うUAとAuthoritative Proxyのトポロジ上の間に位置するプロキシです。「最初の」Edge Proxyとは、UAが要求を送信するときに最初に経由するEdge Proxyを指します。
Flow: A Flow is a transport-layer association between two hosts that is represented by the network address and port number of both ends and by the transport protocol. For TCP, a flow is equivalent to a TCP connection. For UDP a flow is a bidirectional stream of datagrams between a single pair of IP addresses and ports of both peers. With TCP, a flow often has a one-to-one correspondence with a single file descriptor in the operating system.
Flow(フロー):ネットワーク層の両端アドレスとポート番号、およびトランスポートプロトコルで表される、2つのホスト間のトランスポート層の関連です。TCPでは、FlowはTCP接続と同じです。UDPでは、両ピアのIPアドレスとポートの1組の間を流れる双方向データグラムストリームです。TCPのFlowは、多くの場合、OS内の1つのファイル記述子に1対1で対応します。
Flow Token: An identifier that uniquely identifies a flow which can be included in a SIP URI (Uniform Resource Identifier [RFC3986]).
Flow Token(フロートークン):SIP URI(Uniform Resource Identifier、RFC 3986 [RFC3986])に含められる、Flowを一意に識別する値です。
reg-id: This refers to the value of a new header field parameter value for the Contact header field. When a UA registers multiple times, each for a different flow, each concurrent registration gets a unique reg-id value.
reg-id:Contactヘッダーフィールドに追加する新しいパラメーターの値です。UAが異なるFlowで複数回登録する場合、同時に有効な各登録には一意のreg-id値が割り当てられます。
instance-id: This specification uses the word instance-id to refer to the value of the "sip.instance" media feature tag which appears as a "+sip.instance" Contact header field parameter. This is a Uniform Resource Name (URN) that uniquely identifies this specific UA instance.
instance-id:本仕様では、Contactヘッダーフィールドパラメーター「+sip.instance」として現れるメディア機能タグ「sip.instance」の値をinstance-idと呼びます。これは特定のUAインスタンスを一意に識別するUniform Resource Name(URN)です。
"ob" Parameter: The "ob" parameter is a SIP URI parameter that has a different meaning depending on context. In a Path header field value, it is used by the first edge proxy to indicate that a flow token was added to the URI. In a Contact or Route header field value, it indicates that the UA would like other requests in the same dialog to be routed over the same flow.
「ob」パラメーター:「ob」は、文脈によって意味が異なるSIP URIパラメーターです。Pathヘッダーフィールド値では、最初のEdge ProxyがURIにFlow Tokenを追加したことを示します。ContactまたはRouteヘッダーフィールド値では、UAが同じダイアログ内の他の要求も同じFlow経由でルーティングするよう求めていることを示します。
outbound-proxy-set: A set of SIP URIs (Uniform Resource Identifiers) that represents each of the outbound proxies (often edge proxies) with which the UA will attempt to maintain a direct flow. The first URI in the set is often referred to as the primary outbound proxy and the second as the secondary outbound proxy. There is no difference between any of the URIs in this set, nor does the primary/secondary terminology imply that one is preferred over the other.
outbound-proxy-set:UAが直接Flowを維持しようとする各アウトバウンドプロキシ(多くの場合Edge Proxy)を示すSIP URIの集合です。集合の先頭のURIをプライマリアウトバウンドプロキシ、2番目をセカンダリアウトバウンドプロキシと呼ぶことがあります。この集合内のURIに優劣はなく、プライマリ/セカンダリという呼び方も、どちらかを優先することを意味しません。
The mechanisms defined in this document are useful in several scenarios discussed below, including the simple co-located registrar and proxy, a User Agent desiring multiple connections to a resource (for redundancy, for example), and a system that uses edge proxies.
本書で定義する仕組みは、以下で説明する複数の状況で役立ちます。たとえば、レジストラとプロキシが同じ場所にある単純な構成、冗長性などのためにリソースへの複数接続を望むUA、Edge Proxyを使うシステムです。
This entire section is non-normative.
このセクション全体は非規範的です。
Each UA has a unique instance-id that stays the same for this UA even if the UA reboots or is power cycled. Each UA can register multiple times over different flows for the same SIP Address of Record (AOR) to achieve high reliability. Each registration includes the instance-id for the UA and a reg-id label that is different for each flow. The registrar can use the instance-id to recognize that two different registrations both correspond to the same UA. The registrar can use the reg-id label to recognize whether a UA is creating a new flow or refreshing or replacing an old one, possibly after a reboot or a network failure.
各UAにはinstance-idがあり、再起動や電源の入れ直し後も同じ値を使います。信頼性を高めるため、UAは同じSIP Address-of-Record(AOR)に対して、異なるFlow上で複数回登録できます。各登録にはUAのinstance-idと、そのFlowごとに異なるreg-idラベルが含まれます。レジストラはinstance-idを使って複数の登録が同じUAに属することを識別できます。またreg-idを使って、新しいFlowの作成なのか、再起動やネットワーク障害後の既存Flowの更新または置き換えなのかを判別できます。
When a proxy goes to route a message to a UA for which it has a binding, it can use any one of the flows on which a successful registration has been completed. A failure to deliver a request on a particular flow can be tried again on an alternate flow. Proxies can determine which flows go to the same UA by comparing the instance-id. Proxies can tell that a flow replaces a previously abandoned flow by looking at the reg-id.
プロキシが登録情報を持つUAへメッセージをルーティングする場合、登録が正常に完了したFlowのいずれかを使用できます。特定のFlowで要求を届けられなければ、別のFlowで再試行できます。プロキシはinstance-idを比較して、どのFlowが同じUAに属するかを判断できます。また、reg-idを確認して、あるFlowが以前放棄されたFlowを置き換えるものかどうかを判別できます。
When sending a dialog-forming request, a UA can also ask its first edge proxy to route subsequent requests in that dialog over the same flow. This is necessary whether the UA has registered or not.
ダイアログを確立する要求を送信するとき、UAは最初のEdge Proxyに対し、そのダイアログ内の後続の要求を同じFlow経由でルーティングするよう求めることもできます。UAが登録済みかどうかにかかわらず、これは必要です。
UAs use a simple periodic message as a keep-alive mechanism to keep their flow to the proxy or registrar alive. For connection-oriented transports such as TCP this is based on carriage-return and line-feed sequences (CRLF), while for transports that are not connection oriented, this is accomplished by using a SIP-specific usage profile of STUN (Session Traversal Utilities for NAT) [RFC5389].
UAは、プロキシまたはレジストラへのFlowを維持するため、単純な周期メッセージをキープアライブとして使います。TCPなどのコネクション型トランスポートではCRLF(キャリッジリターンとラインフィード)のシーケンスを使います。コネクションレス型トランスポートでは、STUN(Session Traversal Utilities for NAT)[RFC5389]のSIP固有プロファイルを使います。
In the topology shown below, a single server is acting as both a registrar and proxy.
以下に示すトポロジでは、1台のサーバーがレジストラとプロキシを兼ねています。
+-----------+
| Registrar |
| Proxy |
+-----+-----+
|
|
+----+--+
| User |
| Agent |
+-------+
User Agents that form only a single flow continue to register normally but include the instance-id as described in Section 4.1. The UA also includes a "reg-id" Contact header field parameter that is used to allow the registrar to detect and avoid keeping invalid contacts when a UA reboots or reconnects after its old connection has failed for some reason.
Flowを1つだけ確立するUAは通常どおり登録しますが、セクション4.1で説明するinstance-idを含めます。またUAはContactヘッダーフィールドパラメーターreg-idも含めます。これにより、UAが再起動した場合や、何らかの理由で古い接続が失敗した後に再接続した場合、レジストラは無効になったContactを検出し、そのまま保持しないようにできます。
For clarity, here is an example. Bob's UA creates a new TCP flow to the registrar and sends the following REGISTER request.
説明のため、例を示します。BobのUAはレジストラへのTCP Flowを新たに確立し、次のREGISTER要求を送信します。
REGISTER sip:example.com SIP/2.0
Via: SIP/2.0/TCP 192.0.2.2;branch=z9hG4bK-bad0ce-11-1036
Max-Forwards: 70
From: Bob <sip:bob@example.com>;tag=d879h76
To: Bob <sip:bob@example.com>
Call-ID: 8921348ju72je840.204
CSeq: 1 REGISTER
Supported: path, outbound
Contact: <sip:line1@192.0.2.2;transport=tcp>; reg-id=1;
;+sip.instance="<urn:uuid:00000000-0000-1000-8000-000A95A0E128>"
Content-Length: 0
The registrar challenges this registration to authenticate Bob. When the registrar adds an entry for this contact under the AOR for Bob, the registrar also keeps track of the connection over which it received this registration.
レジストラはBobを認証するため、この登録にチャレンジを返します。BobのAORに対応するContactのエントリを追加するとき、レジストラは登録を受信した接続も記録します。
The registrar saves the instance-id ("urn:uuid:00000000-0000-1000-8000-000A95A0E128") and reg-id ("1") along with the rest of the Contact header field. If the instance-id and reg-id are the same as a previous registration for the same AOR, the registrar replaces the old Contact URI and flow information. This allows a UA that has rebooted to replace its previous registration for each flow with minimal impact on overall system load.
レジストラは、Contactヘッダーフィールドの他の情報とともにinstance-id("urn:uuid:00000000-0000-1000-8000-000A95A0E128")とreg-id("1")を保存します。同じAORへの以前の登録とinstance-idおよびreg-idが一致する場合、レジストラは以前のContact URIとFlow情報を置き換えます。これにより、再起動したUAはシステム全体の負荷をほとんど増やさずに、各Flowの以前の登録を更新できます。
When Alice sends a request to Bob, his authoritative proxy selects the target set. The proxy forwards the request to elements in the target set based on the proxy's policy. The proxy looks at the target set and uses the instance-id to understand if two targets both end up routing to the same UA. When the proxy goes to forward a request to a given target, it looks and finds the flows over which it received the registration. The proxy then forwards the request over an existing flow, instead of resolving the Contact URI using the procedures in [RFC3263] and trying to form a new flow to that contact.
AliceがBob宛ての要求を送ると、BobのAuthoritative Proxyが宛先集合を選び、プロキシのポリシーに従ってその要素へ要求を転送します。プロキシは宛先集合を調べ、instance-idを使って異なる宛先が同じUAに行き着くかどうかを判断します。選択した宛先へ要求を転送するときは、そのUAの登録を受信したFlowを確認します。その後、[RFC3263]の手順でContact URIを解決して宛先への新しいFlowを確立するのではなく、既存のFlowを通じて要求を転送します。
As described in the next section, if the proxy has multiple flows that all go to this UA, the proxy can choose any one of the registration bindings for this AOR that has the same instance-id as the selected UA.
次のセクションで説明するように、プロキシが同じUAにつながるFlowを複数持つ場合、選択したUAとinstance-idが同じ、このAORの登録Bindingのいずれかを選べます。
There are various ways to deploy SIP to build a reliable and scalable system. This section discusses one such design that is possible with the mechanisms in this specification. Other designs are also possible.
SIPを使って信頼性と拡張性の高いシステムを構築する方法はいくつかあります。このセクションでは、本仕様の仕組みを使って実現できる設計の一つを説明します。他の設計も可能です。
In the example system below, the logical outbound proxy/registrar for the domain is running on two hosts that share the appropriate state and can both provide registrar and outbound proxy functionality for the domain. The UA will form connections to two of the physical hosts that can perform the authoritative proxy/registrar function for the domain. Reliability is achieved by having the UA form two TCP connections to the domain.
以下の例では、ドメインの論理アウトバウンドプロキシ/レジストラが2台のホスト上で動作します。2台は必要な状態を共有し、どちらもそのドメインのレジストラ機能とアウトバウンドプロキシ機能を提供できます。UAは、そのドメインのAuthoritative Proxy/レジストラ機能を提供できる物理ホスト2台に接続します。UAがドメインに対してTCP接続を2つ確立することで信頼性を高めます。
+-------------------+
| Domain |
| Logical Proxy/Reg |
| |
|+-----+ +-----+|
||Host1| |Host2||
|+-----+ +-----+|
+---\------------/--+
\ /
\ /
\ /
\ /
+------+
| User |
| Agent|
+------+
The UA is configured with multiple outbound proxy registration URIs. These URIs are configured into the UA through whatever the normal mechanism is to configure the proxy address and AOR in the UA. If the AOR is alice@example.com, the outbound-proxy-set might look something like "sip:primary.example.com" and "sip: secondary.example.com". Note that each URI in the outbound-proxy-set could resolve to several different physical hosts. The administrative domain that created these URIs should ensure that the two URIs resolve to separate hosts. These URIs are handled according to normal SIP processing rules, so mechanisms like DNS SRV [RFC2782] can be used to do load-balancing across a proxy farm. The approach in this document does not prevent future extensions, such as the SIP UA configuration framework [CONFIG-FMWK], from adding other ways for a User Agent to discover its outbound-proxy-set.
UAには複数のアウトバウンドプロキシ登録URIを設定します。これらのURIは、UA内のプロキシアドレスやAORを設定する通常の方法で構成します。AORがalice@example.comの場合、outbound-proxy-setはたとえば「sip:primary.example.com」と「sip: secondary.example.com」になります。outbound-proxy-set内の各URIが複数の物理ホストに解決されることもあります。これらのURIを設定する管理ドメインは、2つのURIが別々のホストに解決されるようにします。URIは通常のSIP処理規則に従うため、DNS SRV [RFC2782]などでプロキシ群全体の負荷を分散できます。本方式は、SIP UA Configuration Framework [CONFIG-FMWK]などの将来の拡張が、UAにoutbound-proxy-setを知らせる別の方法を追加することを妨げません。
The domain also needs to ensure that a request for the UA sent to Host1 or Host2 is then sent across the appropriate flow to the UA. The domain might choose to use the Path header approach (as described in the next section) to store this internal routing information on Host1 or Host2.
またドメインは、Host1またはHost2宛てのUAへの要求を、適切なFlow経由でUAへ転送する必要があります。ドメインは、Pathヘッダー方式(次のセクションで説明)を使って、この内部ルーティング情報をHost1またはHost2に保存できます。
When a single server fails, all the UAs that have a flow through it will detect a flow failure and try to reconnect. This can cause large loads on the server. When large numbers of hosts reconnect nearly simultaneously, this is referred to as the avalanche restart problem, and is further discussed in Section 4.5. The multiple flows to many servers help reduce the load caused by the avalanche restart. If a UA has multiple flows, and one of the servers fails, the UA delays a recommended amount of time before trying to form a new connection to replace the flow to the server that failed. By spreading out the time used for all the UAs to reconnect to a server, the load on the server farm is reduced.
サーバーが1台停止すると、そのサーバー経由のFlowを持つすべてのUAがFlow障害を検出し、再接続を試みます。これによりサーバーに大きな負荷がかかる場合があります。多数のホストがほぼ同時に再接続する現象を「avalanche restart」問題と呼び、セクション4.5で詳しく説明します。多数のサーバーへの複数Flowを使うことで、この問題による負荷を軽減できます。複数Flowを持つUAでは、サーバーの1台が停止した場合、停止したサーバーへのFlowを置き換える新しい接続を試みる前に、推奨時間だけ待機します。すべてのUAが再接続する時刻を分散させることで、サーバーファームへの負荷を軽減します。
Scalability is achieved by using DNS SRV [RFC2782] to load-balance the primary connection across a set of machines that can service the primary connection, and also using DNS SRV to load-balance across a separate set of machines that can service the secondary connection. The deployment here requires that DNS is configured with one entry that resolves to all the primary hosts and another entry that resolves to all the secondary hosts. While this introduces additional DNS configuration, the approach works and requires no additional SIP extensions to [RFC3263].
Another motivation for maintaining multiple flows between the UA and its registrar is related to multihomed UAs. Such UAs can benefit from multiple connections from different interfaces to protect against the failure of an individual access link.
UAとレジストラの間で複数のFlowを維持するもう一つの理由は、マルチホームUAにあります。異なるインターフェースから複数の接続を確立すると、個々のアクセスリンクの障害に備えられます。
Some SIP deployments use edge proxies such that the UA sends the REGISTER to an edge proxy that then forwards the REGISTER to the registrar. There could be a NAT or firewall between the UA and the edge proxy.
一部のSIP導入環境では、UAがREGISTERをEdge Proxyへ送り、Edge Proxyがレジストラへ転送します。UAとEdge Proxyの間にNATやファイアウォールがある場合もあります。
+---------+
|Registrar|
|Proxy |
+---------+
/ \
/ \
/ \
+-----+ +-----+
|Edge1| |Edge2|
+-----+ +-----+
\ /
\ /
----------------------------NAT/FW
\ /
\ /
+------+
|User |
|Agent |
+------+
The edge proxy includes a Path header [RFC3327] so that when the proxy/registrar later forwards a request to this UA, the request is routed through the edge proxy.
Edge ProxyはPathヘッダー[RFC3327]を付けます。これにより、後でプロキシ/レジストラがこのUA宛てに要求を転送すると、その要求はEdge Proxy経由でルーティングされます。
These systems can use effectively the same mechanism as described in the previous sections but need to use the Path header. When the edge proxy receives a registration, it needs to create an identifier value that is unique to this flow (and not a subsequent flow with the same addresses) and put this identifier in the Path header URI. This identifier has two purposes. First, it allows the edge proxy to map future requests back to the correct flow. Second, because the identifier will only be returned if the user authenticates with the registrar successfully, it allows the edge proxy to indirectly check the user's authentication information via the registrar. The identifier is placed in the user portion of a loose route in the Path header. If the registration succeeds, the edge proxy needs to map future requests (that are routed to the identifier value from the Path header) to the associated flow.
このようなシステムでも、前のセクションで説明した仕組みをほぼそのまま使えますが、Pathヘッダーが必要です。Edge Proxyは登録を受信したとき、今回のFlowに固有の識別子(同じアドレスを持つ後続の別Flowとは異なる値)を生成し、その識別子をPathヘッダーURIに含めます。この識別子には2つの役割があります。第1に、Edge Proxyが後続要求を正しいFlowに対応付けられます。第2に、ユーザーがレジストラで認証に成功した場合にだけ識別子が返るため、Edge Proxyはレジストラを介してユーザーの認証情報を間接的に確認できます。この識別子はPathヘッダーのloose routeのuser部分に入れます。登録が成功したら、Edge ProxyはPathヘッダーの識別子宛てにルーティングされる後続要求を、対応するFlowに結び付けます。
The term edge proxy is often used to refer to deployments where the edge proxy is in the same administrative domain as the registrar. However, in this specification we use the term to refer to any proxy between the UA and the registrar. For example, the edge proxy may be inside an enterprise that requires its use, and the registrar could be from a service provider with no relationship to the enterprise. Regardless of whether they are in the same administrative domain, this specification requires that registrars and edge proxies support the Path header mechanism in [RFC3327].
Edge Proxyという用語は、Edge Proxyとレジストラが同じ管理ドメインにある導入環境を指すことがよくあります。しかし本仕様では、UAとレジストラの間にあるプロキシを指します。たとえば、Edge Proxyはその利用を必須とする企業内にあり、レジストラはその企業と関係のないサービスプロバイダーに属する場合があります。両者が同じ管理ドメインにあるかどうかにかかわらず、本仕様ではレジストラとEdge Proxyの両方に、[RFC3327]のPathヘッダー機構をサポートするよう求めます。
This document describes two keep-alive mechanisms: a CRLF keep-alive and a STUN keep-alive. Each of these mechanisms uses a client-to-server "ping" keep-alive and a corresponding server-to-client "pong" message. This ping-pong sequence allows the client, and optionally the server, to tell if its flow is still active and useful for SIP traffic. The server responds to pings by sending pongs. If the client does not receive a pong in response to its ping (allowing for retransmission for STUN as described in Section 4.4.2), it declares the flow dead and opens a new flow in its place.
本書ではCRLFキープアライブとSTUNキープアライブの2方式を説明します。どちらもクライアントからサーバーへの「ping」と、それに対応するサーバーからクライアントへの「pong」を使います。このping-pongにより、クライアントは(任意でサーバーも)Flowが引き続きアクティブでSIPトラフィックに使えるかを判断できます。サーバーはpingにpongで応答します。クライアントがpingへのpongを受信しなければ(STUNではセクション4.4.2に従って再送を考慮したうえで)、Flowが停止したと判断し、代わりの新しいFlowを確立します。
This document also suggests timer values for these client keep-alive mechanisms. These timer values were chosen to keep most NAT and firewall bindings open, to detect unresponsive servers within 2 minutes, and to mitigate against the avalanche restart problem. However, the client may choose different timer values to suit its needs, for example to optimize battery life. In some environments, the server can also keep track of the time since a ping was received over a flow to guess the likelihood that the flow is still useful for delivering SIP messages.
本書では、クライアント側のキープアライブ方式に使うタイマー値も推奨します。この値は、ほとんどのNATやファイアウォールのバインディングを維持し、応答しないサーバーを2分以内に検出し、「avalanche restart」問題を緩和できるよう選びました。ただしクライアントは、たとえばバッテリー寿命を優先するなど、必要に応じて別のタイマー値を選べます。環境によっては、サーバーもFlow上で最後にpingを受信してからの時間を記録し、そのFlowがSIPメッセージの配信に引き続き使える可能性を推定できます。
When the UA detects that a flow has failed or that the flow definition has changed, the UA needs to re-register and will use the back-off mechanism described in Section 4.5 to provide congestion relief when a large number of agents simultaneously reboot.
UAがFlowの障害またはFlow定義の変更を検出した場合、再登録が必要です。多数のUAが同時に再起動した際の輻輳を緩和するため、セクション4.5で説明するバックオフ機構を使います。
A keep-alive mechanism needs to keep NAT bindings refreshed; for connections, it also needs to detect failure of a connection; and for connectionless transports, it needs to detect flow failures including changes to the NAT public mapping. For connection-oriented transports such as TCP [RFC0793] and SCTP [RFC4960], this specification describes a keep-alive approach based on sending CRLFs. For connectionless transport, such as UDP [RFC0768], this specification describes using STUN [RFC5389] over the same flow as the SIP traffic to perform the keep-alive.
UAs and Proxies are also free to use native transport keep-alives; however, the application may not be able to set these timers on a per-connection basis, and the server certainly cannot make any assumption about what values are used. Use of native transport keep-alives is outside the scope of this document.
UAとプロキシは、トランスポート標準のキープアライブ機能を使ってもかまいません。ただし、アプリケーションから接続ごとにタイマーを設定できない場合があり、サーバーもどの値が使われるかを前提にできません。トランスポート標準のキープアライブ機能は本書の範囲外です。
This approach can only be used with connection-oriented transports such as TCP or SCTP. The client periodically sends a double-CRLF (the "ping") then waits to receive a single CRLF (the "pong"). If the client does not receive a "pong" within an appropriate amount of time, it considers the flow failed.
この方式はTCPやSCTPなど、コネクション型トランスポートでのみ使えます。クライアントは定期的に二重CRLF(「ping」)を送り、単一のCRLF(「pong」)を待ちます。適切な時間内に「pong」を受信できなければ、Flowに障害が起きたと判断します。
Note: Sending a CRLF over a connection-oriented transport is backwards compatible (because of requirements in Section 7.5 of [RFC3261]), but only implementations which support this specification will respond to a "ping" with a "pong".
注:コネクション型トランスポートでCRLFを送信することには後方互換性があります([RFC3261]のセクション7.5の要件によります)。ただし「ping」に「pong」で応答するのは、本仕様に対応した実装だけです。
This approach can only be used for connection-less transports, such as UDP.
この方式はUDPなどのコネクションレス型トランスポートでのみ使えます。
For connection-less transports, a flow definition could change because a NAT device in the network path reboots and the resulting public IP address or port mapping for the UA changes. To detect this, STUN requests are sent over the same flow that is being used for the SIP traffic. The proxy or registrar acts as a limited Session Traversal Utilities for NAT (STUN) [RFC5389] server on the SIP signaling port.
コネクションレス型トランスポートでは、経路上のNAT装置が再起動すると、UAに割り当てられた外部IPアドレスやポートマッピングが変わり、Flowの定義が変化することがあります。これを検出するため、SIPトラフィックに使っているFlow上でSTUN要求を送ります。プロキシまたはレジストラは、SIPシグナリングポートで限定的なSession Traversal Utilities for NAT(STUN)[RFC5389]サーバーとして動作します。
Note: The STUN mechanism is very robust and allows the detection of a changed IP address and port. Many other options were considered, but the SIP Working Group selected the STUN-based approach. Approaches using SIP requests were abandoned because many believed that good performance and full backwards compatibility using this method were mutually exclusive.
注:STUN方式は非常に堅牢で、IPアドレスやポートの変更を検出できます。他の方式も多数検討しましたが、SIP Working GroupはSTUN方式を選びました。この方法では高い性能と完全な後方互換性を両立できないと考える人が多かったため、SIP要求を使う方式は採用されませんでした。
Each UA MUST have an Instance Identifier Uniform Resource Name (URN) [RFC2141] that uniquely identifies the device. Usage of a URN provides a persistent and unique name for the UA instance. It also provides an easy way to guarantee uniqueness within the AOR. This URN MUST be persistent across power cycles of the device. The instance ID MUST NOT change as the device moves from one network to another.
各UAは、デバイスを一意に識別するInstance Identifier Uniform Resource Name(URN)[RFC2141]を持たなければなりません (MUST)。URNを使うと、UAインスタンスに永続的で一意な名前を付けられ、AOR内の一意性も容易に保証できます。このURNはデバイスの電源を切って入れ直しても維持しなければなりません (MUST)。デバイスが別のネットワークへ移動してもinstance-idを変更してはなりません (MUST NOT)。
A UA SHOULD create a Universally Unique Identifier (UUID) URN [RFC4122] as its instance-id. The UUID URN allows for non-centralized computation of a URN based on time, unique names (such as a MAC address), or a random number generator.
UAはinstance-idとしてUniversally Unique Identifier(UUID)のURN[RFC4122]を生成すべきです (SHOULD)。UUID URNは、時刻、一意な名前(MACアドレスなど)、または乱数生成器に基づいて、中央管理なしで生成できます。
Note: A device like a "soft phone", when first installed, can generate a UUID [RFC4122] and then save this in persistent storage for all future use. For a device such as a "hard phone", which will only ever have a single SIP UA present, the UUID can include the MAC address and be generated at any time because it is guaranteed that no other UUID is being generated at the same time on that physical device. This means the value of the time component of the UUID can be arbitrarily selected to be any time less than the time when the device was manufactured. A time of 0 (as shown in the example in Section 3.2) is perfectly legal as long as the device knows no other UUIDs were generated at this time on this device.
注:「ソフトフォン」のようなデバイスは、最初のインストール時にUUID[RFC4122]を生成し、以後の利用に備えて永続ストレージに保存できます。一方、SIP UAが1つだけ存在する「ハードフォン」のようなデバイスでは、UUIDにMACアドレスを含められます。また、同じ物理デバイス上で同時に別のUUIDが生成されないことが保証されるため、任意の時点で生成できます。その場合、UUIDの時刻要素には、製造時より前の任意の時刻を設定できます。セクション3.2の例のように0を設定しても、そのデバイスで同じ時刻に他のUUIDが生成されていないと分かっていれば問題ありません。
If a URN scheme other than UUID is used, the UA MUST only use URNs for which an RFC (from the IETF stream) defines how the specific URN needs to be constructed and used in the "+sip.instance" Contact header field parameter for outbound behavior.
UUID以外のURNスキームを使う場合、UAは、アウトバウンド動作でContactヘッダーフィールドパラメーター「+sip.instance」に特定のURNをどう構成して使うかを定めたIETFストリームのRFCが存在するURNだけを使わなければなりません (MUST)。
To convey its instance-id in both requests and responses, the UA includes a "sip.instance" media feature tag as a UA characteristic [RFC3840]. This media feature tag is encoded in the Contact header field as the "+sip.instance" Contact header field parameter. One case where a UA could prefer to omit the "sip.instance" media feature tag is when it is making an anonymous request or some other privacy concern requires that the UA not reveal its identity.
要求と応答の両方でinstance-idを伝えるため、UAはUAの特性として「sip.instance」メディア機能タグ[RFC3840]を含めます。このタグはContactヘッダーフィールドパラメーター「+sip.instance」にエンコードします。匿名要求を送信する場合や、プライバシー上の理由でUAの識別情報を明かせない場合などには、UAは「sip.instance」メディア機能タグを省略できます。
Note: [RFC3840] defines equality rules for callee capabilities parameters, and according to that specification, the "sip.instance" media feature tag will be compared by case-sensitive string comparison. This means that the URN will be encapsulated by angle brackets ("<" and ">") when it is placed within the quoted string value of the "+sip.instance" Contact header field parameter. The case-sensitive matching rules apply only to the generic usages defined in the callee capabilities [RFC3840] and the caller preferences [RFC3841] specifications. When the instance ID is used in this specification, it is "extracted" from the value in the "sip.instance" media feature tag. Thus, equality comparisons are performed using the rules for URN equality that are specific to the scheme in the URN. If the element performing the comparisons does not understand the URN scheme, it performs the comparisons using the lexical equality rules defined in [RFC2141]. Lexical equality could result in two URNs being considered unequal when they are actually equal. In this specific usage of URNs, the only element that provides the URN is the SIP UA instance identified by that URN. As a result, the UA instance has to provide lexically equivalent URNs in each registration it generates. This is likely to be normal behavior in any case; clients are not likely to modify the value of the instance ID so that it remains functionally equivalent to (yet lexicographically different from) previous registrations.
注:[RFC3840]は、着信側の機能パラメーターを比較する規則を定めており、同仕様では「sip.instance」メディア機能タグを大文字と小文字を区別して文字列比較します。そのため、URNを「+sip.instance」Contactヘッダーフィールドパラメーターの引用文字列値に入れる際は、山括弧("<"および">")で囲みます。この大文字小文字を区別する比較規則は、RFC 3840の着信側機能とRFC 3841の発信側設定で定義する一般的な用法にのみ適用されます。本仕様でinstance-idを使う場合は、「sip.instance」メディア機能タグの値からURNを取り出します。URNの等価性は、そのURNスキーム固有の規則で比較します。比較を行う要素がURNスキームを理解しない場合は、[RFC2141]の字句的等価性規則を使います。この規則では、実際には等しい2つのURNが等しくないと判定される可能性があります。この用途でURNを提供するのは、そのURNが識別するSIP UAインスタンスだけです。そのためUAインスタンスは、生成する各登録で字句的に等価なURNを提供する必要があります。これは通常の動作と考えられ、クライアントがinstance-idを変更し、機能的には等価でも字句的には異なる値にすることは想定されません。
At configuration time, UAs obtain one or more SIP URIs representing the default outbound-proxy-set. This specification assumes the set is determined via any of a number of configuration mechanisms, and future specifications can define additional mechanisms such as using DNS to discover this set. How the UA is configured is outside the scope of this specification. However, a UA MUST support sets with at least two outbound proxy URIs and SHOULD support sets with up to four URIs.
設定時に、UAはデフォルトのoutbound-proxy-setを表す1つ以上のSIP URIを取得します。本仕様では、複数ある設定方法のいずれかでこの集合が決まるものとします。将来の仕様で、DNSを使って集合を検出する方法などを追加できます。UAの設定方法は本仕様の範囲外です。ただしUAは、アウトバウンドプロキシURIを少なくとも2つ含む集合をサポートしなければならず (MUST)、最大4つのURIを含む集合もサポートすべきです (SHOULD)。
For each outbound proxy URI in the set, the User Agent Client (UAC) SHOULD send a REGISTER request using this URI as the default outbound proxy. (Alternatively, the UA could limit the number of flows formed to conserve battery power, for example). If the set has more than one URI, the UAC MUST send a REGISTER request to at least two of the default outbound proxies from the set. UAs that support this specification MUST include the outbound option tag in a Supported header field in a REGISTER request. Each of these REGISTER requests will use a unique Call-ID. Forming the route set for the request is outside the scope of this document, but typically results in sending the REGISTER such that the topmost Route header field contains a loose route to the outbound proxy URI.
UACは、集合内のアウトバウンドプロキシURIごとに、そのURIをデフォルトのアウトバウンドプロキシとしてREGISTER要求を送信すべきです (SHOULD)(たとえば、バッテリーを節約するためUAが確立するFlow数を制限してもかまいません)。集合にURIが複数ある場合、UACはその中の少なくとも2つのデフォルトアウトバウンドプロキシにREGISTER要求を送信しなければなりません (MUST)。本仕様に対応するUAは、REGISTER要求のSupportedヘッダーフィールドにoutboundオプションタグを含めなければなりません (MUST)。各REGISTER要求には異なるCall-IDを使います。要求のRouteセットを作る方法は本書の範囲外ですが、通常は最上位のRouteヘッダーフィールドにアウトバウンドプロキシURIへのloose routeが含まれるようにREGISTERを送信します。
REGISTER requests, other than those described in Section 4.2.3, MUST include an instance-id media feature tag as specified in Section 4.1.
4.2.3で説明するものを除き、REGISTER要求はすべて、セクション4.1で指定するinstance-idメディア機能タグを含めなければなりません (MUST)。
A UAC conforming to this specification MUST include in the Contact header field, a "reg-id" parameter that is distinct from other "reg-id" parameters used in other registrations that use the same "+sip.instance" Contact header field parameter and AOR. Each one of these registrations will form a new flow from the UA to the proxy. The sequence of reg-id values does not have to be sequential but MUST be exactly the same sequence of reg-id values each time the UA instance power cycles or reboots, so that the reg-id values will collide with the previously used reg-id values. This is so the registrar can replace the older registrations.
本仕様に準拠するUACは、Contactヘッダーフィールドにreg-idパラメーターを含めなければなりません (MUST)。同じ「+sip.instance」ContactヘッダーフィールドパラメーターとAORを使う他の登録では、それぞれ異なるreg-idを使います。登録ごとにUAからプロキシへの新しいFlowが確立されます。reg-idの値は連番でなくてもかまいませんが、UAインスタンスの電源再投入や再起動のたびに、まったく同じ並びで再利用しなければなりません (MUST)。こうすることで、以前使ったreg-idと衝突し、レジストラが古い登録を置き換えられます。
Note: The UAC can situationally decide whether to request outbound behavior by including or omitting the "reg-id" Contact header field parameter. For example, imagine the outbound-proxy-set contains two proxies in different domains, EP1 and EP2. If an outbound-style registration succeeded for a flow through EP1, the UA might decide to include 'outbound' in its Require header field when registering with EP2, in order to ensure consistency. Similarly, if the registration through EP1 did not support outbound, the UA might not register with EP2 at all.
注:UACはContactヘッダーフィールドのreg-idパラメーターを含めるか省略することで、状況に応じてoutbound動作を要求するか決められます。たとえばoutbound-proxy-setに異なるドメインのEP1とEP2が含まれているとします。EP1経由のFlowでoutbound方式の登録が成功した場合、UAは一貫性を保つため、EP2への登録時にRequireヘッダーフィールドへ「outbound」を含めることがあります。一方、EP1経由の登録でoutboundがサポートされなければ、UAはEP2に登録しない場合があります。
The UAC MUST support the Path header [RFC3327] mechanism, and indicate its support by including the 'path' option-tag in a Supported header field value in its REGISTER requests. Other than optionally examining the Path vector in the response, this is all that is required of the UAC to support Path.
UACはPathヘッダー[RFC3327]機構をサポートし、REGISTER要求のSupportedヘッダーフィールド値にpathオプションタグを含めて、その対応を示さなければなりません (MUST)。応答内のPathベクトルを任意で調べる以外に、PathをサポートするためUACに必要な処理はありません。
The UAC examines successful registration responses for the presence of an outbound option-tag in a Require header field value. Presence of this option-tag indicates that the registrar is compliant with this specification, and that any edge proxies which needed to participate are also compliant. If the registrar did not support outbound, the UA has potentially registered an un-routable contact. It is the responsibility of the UA to remove any inappropriate Contacts.
UACは登録成功応答を確認し、Requireヘッダーフィールド値にoutboundオプションタグがあるか調べます。このタグがあればレジストラが本仕様に準拠しており、参加が必要なEdge Proxyも準拠していることを示します。レジストラがoutboundをサポートしない場合、UAは到達不能なContactを登録してしまった可能性があります。不適切なContactを削除するのはUAの責任です。
If outbound registration succeeded, as indicated by the presence of the outbound option-tag in the Require header field of a successful registration response, the UA begins sending keep-alives as described in Section 4.4.
登録成功応答のRequireヘッダーフィールドにoutboundオプションタグがあり、outbound登録が成功したことを確認できた場合、UAはセクション4.4で説明するキープアライブの送信を開始します。
Note: The UA needs to honor 503 (Service Unavailable) responses to registrations as described in [RFC3261] and [RFC3263]. In particular, implementors should note that when receiving a 503 (Service Unavailable) response with a Retry-After header field, the UA is expected to wait the indicated amount of time and retry the registration. A Retry-After header field value of 0 is valid and indicates the UA is expected to retry the REGISTER request immediately. Implementations need to ensure that when retrying the REGISTER request, they revisit the DNS resolution results such that the UA can select an alternate host from the one chosen the previous time the URI was resolved.
If the registering UA receives a 439 (First Hop Lacks Outbound Support) response to a REGISTER request, it MAY re-attempt registration without using the outbound mechanism (subject to local policy at the client). If the client has one or more alternate outbound proxies available, it MAY re-attempt registration through such outbound proxies. See Section 11.6 for more information on the 439 response code.
登録中のUAがREGISTER要求に対して439(First Hop Lacks Outbound Support)応答を受信した場合、クライアント側のローカルポリシーに従い、outbound機構を使わずに登録を再試行してもかまいません (MAY)。代替アウトバウンドプロキシが1つ以上利用可能であれば、それらを介して登録を再試行してもかまいません (MAY)。439応答コードの詳細はセクション11.6を参照してください。
Registrations for refreshing a binding and for removing a binding use the same instance-id and reg-id values as the corresponding initial registration where the binding was added. Registrations that merely refresh an existing binding are sent over the same flow as the original registration where the binding was added.
Bindingの更新または削除を行う登録では、そのBindingを追加した初期登録と同じinstance-idおよびreg-idを使います。既存のBindingを更新するだけの登録は、元の登録と同じFlow上で送信します。
If a re-registration is rejected with a recoverable error response, for example by a 503 (Service Unavailable) containing a Retry-After header, the UAC SHOULD NOT tear down the corresponding flow if the flow uses a connection-oriented transport such as TCP. As long as "pongs" are received in response to "pings", the flow SHOULD be kept active until a non-recoverable error response is received. This prevents unnecessary closing and opening of connections.
再登録が回復可能なエラー応答(Retry-Afterヘッダー付きの503(Service Unavailable)など)で拒否された場合、FlowがTCPなどのコネクション型トランスポートを使っていれば、UACは対応するFlowを終了すべきではありません (SHOULD NOT)。pingへのpongを受信できている限り、回復不能なエラー応答を受信するまでFlowを維持すべきです (SHOULD)。これにより、接続を不必要に閉じて開き直すことを防ぎます。
In an initial registration or re-registration, a UA MUST NOT include a "reg-id" header field parameter in the Contact header field if the registering UA is not the same instance as the UA referred to by the target Contact header field. (This practice is occasionally used to install forwarding policy into registrars.)
初期登録または再登録では、登録するUAが対象のContactヘッダーフィールドで参照されるUAと同じインスタンスでない限り、Contactヘッダーフィールドにreg-idパラメーターを含めてはなりません (MUST NOT)。(この方法は、レジストラに転送ポリシーを設定する際に使われることがあります。)
A UAC also MUST NOT include an instance-id feature tag or "reg-id" Contact header field parameter in a request to un-register all Contacts (a single Contact header field value with the value of "*").
すべてのContactを登録解除する要求(Contactヘッダーフィールド値を1つだけ含み、その値が「*」である要求)には、UACはinstance-id機能タグまたはContactヘッダーフィールドパラメーターreg-idを含めてはなりません (MUST NOT)。
When a UAC is about to send a request, it first performs normal processing to select the next hop URI. The UA can use a variety of techniques to compute the route set and accordingly the next hop URI. Discussion of these techniques is outside the scope of this document. UAs that support this specification SHOULD include the outbound option tag in a Supported header field in a request that is not a REGISTER request.
UACは要求を送信する前に通常の処理を行い、次のホップURIを選択します。UAはさまざまな方法でRouteセットを計算し、それに基づいて次のホップURIを決められます。そうした方法の説明は本書の範囲外です。本仕様に対応するUAは、REGISTER以外の要求のSupportedヘッダーフィールドにoutboundオプションタグを含めるべきです (SHOULD)。
The UAC performs normal DNS resolution on the next hop URI (as described in [RFC3263]) to find a protocol, IP address, and port. For protocols that don't use TLS, if the UAC has an existing flow to this IP address, and port with the correct protocol, then the UAC MUST use the existing connection. For TLS protocols, there MUST also be a match between the host production in the next hop and one of the URIs contained in the subjectAltName in the peer certificate. If the UAC cannot use one of the existing flows, then it SHOULD form a new flow by sending a datagram or opening a new connection to the next hop, as appropriate for the transport protocol.
UACは次のホップURIについて通常のDNS解決を行い([RFC3263]を参照)、プロトコル、IPアドレス、ポートを特定します。TLSを使わないプロトコルでは、正しいプロトコルを使い、このIPアドレスとポートに向かう既存Flowがある場合、UACはその接続を使わなければなりません (MUST)。TLSを使う場合は、次のホップURIのホスト部分が、相手の証明書のsubjectAltNameに含まれるURIのいずれかと一致しなければなりません (MUST)。既存Flowを使えない場合、UACはトランスポートプロトコルに応じてデータグラムを送るか新しい接続を開き、新しいFlowを確立すべきです (SHOULD)。
Typically, a UAC using the procedures of this document and sending a dialog-forming request will want all subsequent requests in the dialog to arrive over the same flow. If the UAC is using a Globally Routable UA URI (GRUU) [RFC5627] that was instantiated using a Contact header field value that included an "ob" parameter, the UAC sends the request over the flow used for registration, and subsequent requests will arrive over that same flow. If the UAC is not using such a GRUU, then the UAC adds an "ob" parameter to its Contact header field value. This will cause all subsequent requests in the dialog to arrive over the flow instantiated by the dialog-forming request. This case is typical when the request is sent prior to registration, such as in the initial subscription dialog for the configuration framework [CONFIG-FMWK].
通常、本書の手順に従ってダイアログを確立する要求を送るUACは、そのダイアログ内の後続要求をすべて同じFlow経由で届けようとします。UACが、obパラメーターを含むContactヘッダーフィールド値を使って生成されたGlobally Routable UA URI(GRUU)[RFC5627]を使う場合、その要求を登録時のFlowで送信し、後続要求も同じFlowで届きます。そのようなGRUUを使わない場合、UACはContactヘッダーフィールド値にobパラメーターを追加します。これにより、ダイアログを確立する要求が作ったFlowを通じて、後続要求がすべて届きます。このケースは、たとえばConfiguration Framework [CONFIG-FMWK]の初期購読ダイアログのように、登録前に要求を送信する場合によくあります。
Note: If the UAC wants a UDP flow to work through NATs or firewalls, it still needs to put the 'rport' parameter [RFC3581] in its Via header field value, and send from the port it is prepared to receive on. More general information about NAT traversal in SIP is described in [NAT-SCEN].
注:UACがUDP FlowをNATやファイアウォール越しに使う場合も、Viaヘッダーフィールド値にrportパラメーター[RFC3581]を入れ、受信に使うポートから送信する必要があります。SIPにおけるNAT越しの通信については[NAT-SCEN]で詳しく説明しています。
Keep-alives are used for refreshing NAT/firewall bindings and detecting flow failure. Flows can fail for many reasons including the rebooting of NATs and the crashing of edge proxies.
キープアライブは、NATやファイアウォールのバインディングを維持し、Flow障害を検出するために使います。Flow障害は、NATの再起動やEdge Proxyのクラッシュなど、さまざまな理由で発生します。
As described in Section 4.2, a UA that registers will begin sending keep-alives after an appropriate registration response. A UA that does not register (for example, a PSTN gateway behind a firewall) can also send keep-alives under certain circumstances.
セクション4.2で説明するように、登録するUAは適切な登録応答を受け取った後、キープアライブの送信を開始します。登録しないUA(たとえばファイアウォールの背後にあるPSTNゲートウェイ)も、特定の状況ではキープアライブを送信できます。
Under specific circumstances, a UAC might be allowed to send STUN keep-alives even if the procedures in Section 4.2 were not completed, provided that there is an explicit indication that the target first-hop SIP node supports STUN keep-alives. For example, this applies to a non-registering UA or to a case where the UA registration succeeded, but the response did not include the outbound option-tag in the Require header field.
特定の状況では、セクション4.2の手順を完了していなくても、相手となる最初のホップのSIPノードがSTUNキープアライブに対応しているという明示的な通知があれば、UACはSTUNキープアライブを送信できます。たとえば、登録しないUAや、UAの登録は成功したものの応答のRequireヘッダーフィールドにoutboundオプションタグがなかった場合が該当します。
Note: A UA can "always" send a double CRLF (a "ping") over connection-oriented transports as this is already allowed by Section 7.5 of [RFC3261]. However a UA that did not register using outbound registration cannot expect a CRLF in response (a "pong") unless the UA has an explicit indication that CRLF keep-alives are supported as described in this section. Likewise, a UA that did not successfully register with outbound procedures needs explicit indication that the target first-hop SIP node supports STUN keep-alives before it can send any STUN messages.
注:コネクション型トランスポートでは、UAは「常に」二重CRLF(「ping」)を送信できます。[RFC3261]のセクション7.5ですでに許可されているためです。ただしoutbound登録を使わなかったUAは、本セクションで説明するCRLFキープアライブへの対応を明示的に通知されない限り、応答のCRLF(「pong」)を期待できません。同様に、outbound手順での登録に成功しなかったUAは、STUNメッセージを送信する前に、相手となる最初のホップのSIPノードがSTUNキープアライブに対応しているという明示的な通知を必要とします。
A configuration option indicating keep-alive support for a specific target is considered an explicit indication. If these conditions are satisfied, the UA sends its keep-alives according to the same guidelines as those used when UAs register; these guidelines are described below.
特定の相手に対するキープアライブ対応を示す設定項目があれば、明示的な通知とみなします。これらの条件を満たす場合、UAは登録するUAに適用するのと同じ指針に従ってキープアライブを送信します。指針は以下で説明します。
The UA needs to detect when a specific flow fails. The UA actively tries to detect failure by periodically sending keep-alive messages using one of the techniques described in Sections 4.4.1 or 4.4.2. If a flow with a registration has failed, the UA follows the procedures in Section 4.2 to form a new flow to replace the failed one.
UAは特定のFlowに障害が発生したことを検出する必要があります。セクション4.4.1または4.4.2のいずれかの方式でキープアライブを定期的に送り、障害を積極的に検出します。登録に使ったFlowに障害が発生した場合、UAはセクション4.2の手順に従って新しいFlowを確立し、置き換えます。
When a successful registration response contains the Flow-Timer header field, the value of this header field is the number of seconds the server is prepared to wait without seeing keep-alives before it could consider the corresponding flow dead. Note that the server would wait for an amount of time larger than the Flow-Timer in order to have a grace period to account for transport delay. The UA MUST send keep-alives at least as often as this number of seconds. If the UA uses the server-recommended keep-alive frequency it SHOULD send its keep-alives so that the interval between each keep-alive is randomly distributed between 80% and 100% of the server-provided time. For example, if the server suggests 120 seconds, the UA would send each keep-alive with a different frequency between 95 and 120 seconds.
登録成功応答にFlow-Timerヘッダーフィールドが含まれる場合、その値は、対応するFlowを停止したと判断するまで、サーバーがキープアライブを受信せずに待つ秒数です。トランスポート遅延を考慮する猶予期間を設けるため、サーバーはFlow-Timerより長く待つことに注意してください。UAはこの秒数を超える間隔を空けずにキープアライブを送信しなければなりません (MUST)。サーバーが推奨する頻度を使う場合、UAはキープアライブの間隔がサーバー指定時間の80~100%の範囲でランダムに分布するよう送信すべきです (SHOULD)。たとえばサーバーが120秒を指定した場合、UAは毎回異なる間隔(95~120秒)でキープアライブを送信します。
If no Flow-Timer header field was present in a register response for this flow, the UA can send keep-alives at its discretion. The sections below provide RECOMMENDED default values for these keep-alives.
このFlowの登録応答にFlow-Timerヘッダーフィールドがなければ、UAは任意のタイミングでキープアライブを送信できます。以下の節では、キープアライブのデフォルト値を推奨します (SHOULD)。
The client needs to perform normal [RFC3263] SIP DNS resolution on the URI from the outbound-proxy-set to pick a transport. Once a transport is selected, the UA selects the keep-alive approach that is recommended for that transport.
クライアントはoutbound-proxy-set内のURIに対し、[RFC3263]に従って通常のSIP DNS解決を行い、使用するトランスポートを選びます。トランスポートを選択した後、UAはそのトランスポートに推奨されるキープアライブ方式を選びます。
Section 4.4.1 describes a keep-alive mechanism for connection-oriented transports such as TCP or SCTP. Section 4.4.2 describes a keep-alive mechanism for connection-less transports such as UDP. Support for other transports such as DCCP [RFC4340] is for further study.
セクション4.4.1ではTCPやSCTPなどのコネクション型トランスポート向けのキープアライブ方式を、セクション4.4.2ではUDPなどのコネクションレス型トランスポート向けの方式を説明します。DCCP [RFC4340]など、他のトランスポートへの対応は今後の検討課題です。
This approach MUST only be used with connection oriented transports such as TCP or SCTP; it MUST NOT be used with connection-less transports such as UDP.
この方式はTCPやSCTPなどのコネクション型トランスポートでのみ使わなければなりません (MUST)。UDPなどのコネクションレス型トランスポートでは使ってはなりません (MUST NOT)。
A User Agent that forms flows checks if the configured URI to which the UA is connecting resolves to a connection-oriented transport (e.g., TCP and TLS over TCP).
Flowを確立するUAは、設定された接続先URIがコネクション型トランスポート(たとえばTCPやTCP上のTLS)に解決されるかを確認します。
For this mechanism, the client "ping" is a double-CRLF sequence, and the server "pong" is a single CRLF, as defined in the ABNF below:
この方式では、クライアントから送る「ping」は二重CRLF、サーバーから返す「pong」は単一CRLFです。形式は以下のABNFで定義します。
CRLF = CR LF double-CRLF = CR LF CR LF CR = %x0D LF = %x0A The "ping" and "pong" need to be sent between SIP messages and cannot be sent in the middle of a SIP message. If sending over TLS, the CRLFs are sent inside the TLS protected channel. If sending over a SigComp [RFC3320] compressed data stream, the CRLF keep-alives are sent inside the compressed stream. The double CRLF is considered a single SigComp message. The specific mechanism for representing these characters is an implementation-specific matter to be handled by the SigComp compressor at the sending end.
If a pong is not received within 10 seconds after sending a ping (or immediately after processing any incoming message being received when that 10 seconds expires), then the client MUST treat the flow as failed. Clients MUST support this CRLF keep-alive.
pingを送信してから10秒以内にpongを受信できなければ、クライアントはFlowに障害が起きたと判断しなければなりません (MUST)。ただし、10秒が経過した時点で受信メッセージを処理中の場合は、その処理の直後に判断します。クライアントはこのCRLFキープアライブに対応しなければなりません (MUST)。
Note: This value of 10-second timeout was selected to be long enough that it allows plenty of time for a server to send a response even if the server is temporarily busy with an administrative activity. At the same time, it was selected to be small enough that a UA registered to two redundant servers with unremarkable hardware uptime could still easily provide very high levels of overall reliability. Although some Internet protocols are designed for round-trip times over 10 seconds, SIP for real-time communications is not really usable in these type of environments as users often abandon calls before waiting much more than a few seconds.
注:10秒のタイムアウトは、サーバーが管理作業などで一時的に忙しくても応答を送る時間を十分に確保できる長さです。同時に、通常程度の稼働率のハードウェアを使う2台の冗長サーバーにUAが登録していれば、非常に高い全体信頼性を実現できるよう、十分短い値として選びました。一部のインターネットプロトコルはRTTが10秒を超える状況を想定していますが、リアルタイム通信向けのSIPはこのような環境では実用的ではありません。ユーザーは数秒以上待つと通話をあきらめることが多いためです。
When a Flow-Timer header field is not provided in the most recent success registration response, the proper selection of keep-alive frequency is primarily a trade-off between battery usage and availability. The UA MUST select a random number between a fixed or configurable upper bound and a lower bound, where the lower bound is 20% less then the upper bound. The fixed upper bound or the default configurable upper bound SHOULD be 120 seconds (95 seconds for the lower bound) where battery power is not a concern and 840 seconds (672 seconds for the lower bound) where battery power is a concern. The random number will be different for each keep-alive "ping".
最新の登録成功応答にFlow-Timerヘッダーフィールドがない場合、キープアライブの頻度は主にバッテリー消費と可用性の兼ね合いで決めます。UAは、固定または設定可能な上限と下限の間から乱数を選ばなければなりません (MUST)。下限は上限より20%低くします。バッテリー消費が問題にならない場合は120秒(下限95秒)、問題となる場合は840秒(下限672秒)とすべきです (SHOULD)。キープアライブの「ping」ごとに異なる乱数を使います。
Note on selection of time values: the 120-second upper bound was chosen based on the idea that for a good user experience, failures normally will be detected in this amount of time and a new connection will be set up. The 14-minute upper bound for battery-powered devices was selected based on NATs with TCP timeouts as low as 15 minutes. Operators that wish to change the relationship between load on servers and the expected time that a user might not receive inbound communications will probably adjust this time. The 95-second lower bound was chosen so that the jitter introduced will result in a relatively even load on the servers after 30 minutes.
時間値の選択について:120秒の上限は、ユーザー体験を損ねないよう、通常この時間内に障害を検出して新しい接続を確立できるという考えに基づいています。バッテリー駆動デバイスの14分という上限は、TCPタイムアウトが最短15分程度のNATを考慮して選びました。サーバー負荷と、ユーザーが着信通信を受けられない時間とのバランスを変えたい運用者は、この値を調整できます。95秒の下限は、ジッターを加えることで30分後にサーバー負荷が比較的均等になるよう選びました。
This approach MUST only be used with connection-less transports, such as UDP; it MUST NOT be used for connection-oriented transports such as TCP and SCTP.
この方式はUDPなどのコネクションレス型トランスポートでのみ使わなければなりません (MUST)。TCPやSCTPなどのコネクション型トランスポートでは使ってはなりません (MUST NOT)。
A User Agent that forms flows checks if the configured URI to which the UA is connecting resolves to use the UDP transport. The UA can periodically perform keep-alive checks by sending STUN [RFC5389] Binding Requests over the flow as described in Section 8. Clients MUST support STUN-based keep-alives.
フローを形成するユーザーエージェントは、接続先として構成されたURIを解決し、そのURIがUDPトランスポートを使用するかどうかを確認します。UAは、セクション8の説明に従い、フロー上でSTUN [RFC5389] Binding Requestを送信して定期的にキープアライブを確認できます。クライアントは、STUNベースのキープアライブをサポートしなければなりません (MUST)。
When a Flow-Timer header field is not included in a successful registration response, the time between each keep-alive request SHOULD be a random number between 24 and 29 seconds.
正常な登録応答にFlow-Timerヘッダーフィールドが含まれない場合、各キープアライブ要求の送信間隔は24秒から29秒までのランダムな値にすべきです (SHOULD)。
Note on selection of time values: the upper bound of 29 seconds was selected, as many NATs have UDP timeouts as low as 30 seconds. The 24-second lower bound was selected so that after 10 minutes the jitter introduced by different timers will make the keep-alive requests unsynchronized to evenly spread the load on the servers. Note that the short NAT timeouts with UDP have a negative impact on battery life.
時間値の選択について補足します。多くのNATではUDPのタイムアウトが最短30秒であるため、上限を29秒にしています。下限の24秒は、10分後にはタイマーごとのジッターによってキープアライブ要求の送信時刻が同期しなくなり、サーバーの負荷が均等に分散するように選ばれています。UDPの短いNATタイムアウトはバッテリー寿命に悪影響を与える点にも注意してください。
If a STUN Binding Error Response is received, or if no Binding Response is received after 7 retransmissions (16 times the STUN "RTO" timer -- where RTO is an estimate of round-trip time), the UA considers the flow failed. If the XOR-MAPPED-ADDRESS in the STUN Binding Response changes, the UA MUST treat this event as a failure on the flow.
STUN Binding Error Responseを受信した場合、または7回再送(STUNの「RTO」タイマーの16倍、RTOは往復時間の推定値)してもBinding Responseを受信しない場合、UAはフローが失敗したと判断します。STUN Binding ResponseのXOR-MAPPED-ADDRESSが変化した場合、UAはこの事象をフローの障害として扱わなければなりません (MUST)。
When a flow used for registration (through a particular URI in the outbound-proxy-set) fails, the UA needs to form a new flow to replace the old flow and replace any registrations that were previously sent over this flow. Each new registration MUST have the same reg-id value as the registration it replaces. This is done in much the same way as forming a brand new flow as described in Section 4.2; however, if there is a failure in forming this flow, the UA needs to wait a certain amount of time before retrying to form a flow to this particular next hop.
登録に使用しているフロー(outbound-proxy-set内の特定のURIを経由するもの)が失敗した場合、UAはそのフローに代わる新しいフローを確立し、そのフロー経由で以前に送信した登録も置き換える必要があります。置き換える登録ごとに、新しい登録は元の登録と同じreg-id値を持たなければなりません (MUST)。新しいフローはセクション4.2の手順とほぼ同じ方法で確立します。ただし、確立に失敗した場合、UAはその次ホップへのフローを再試行する前に一定時間待つ必要があります。
The amount of time to wait depends if the previous attempt at establishing a flow was successful. For the purposes of this section, a flow is considered successful if outbound registration succeeded, and if keep-alives are in use on this flow, at least one subsequent keep-alive response was received.
待機時間は、直前のフロー確立の試みが成功したかどうかによって異なります。このセクションでは、outbound登録が成功し、さらにそのフローでキープアライブを使用している場合は少なくとも1回の応答を受信したとき、そのフローは成功したものとみなします。
The number of seconds to wait is computed in the following way. If all of the flows to every URI in the outbound proxy set have failed, the base-time is set to a lower value (with a default of 30 seconds); otherwise, in the case where at least one of the flows has not failed, the base-time is set to a higher value (with a default of 90 seconds). The upper-bound wait time (W) is computed by taking two raised to the power of the number of consecutive registration failures for that URI, and multiplying this by the base-time, up to a configurable maximum time (with a default of 1800 seconds).
待機秒数は次のように計算します。outbound proxy set内のすべてのURIへのフローが失敗している場合、base-timeを低い値(既定値は30秒)に設定します。少なくとも1つのフローが失敗していない場合は、base-timeを高い値(既定値は90秒)に設定します。上限待機時間Wは、そのURIについて連続して発生した登録失敗の回数を指数として2を累乗し、base-timeを掛けて求めます。ただし、構成可能な最大時間(既定値は1800秒)を上限とします。
W = min (max-time, (base-time * (2 ^ consecutive-failures)))
These times MAY be configurable in the UA. The three times are:
これらの時間はUAで構成可能としてもかまいません (MAY)。時間値は次の3つです。
o max-time with a default of 1800 seconds
o max-time(既定値は1800秒)
o base-time (if all failed) with a default of 30 seconds
o base-time(すべてのフローが失敗した場合。既定値は30秒)
o base-time (if all have not failed) with a default of 90 seconds
o base-time(失敗していないフローがある場合。既定値は90秒)
For example, if the base-time is 30 seconds, and there were three failures, then the upper-bound wait time is min(1800, 30*(2^3)) or 240 seconds. The actual amount of time the UA waits before retrying registration (the retry delay time) is computed by selecting a uniform random time between 50 and 100% of the upper-bound wait time. The UA MUST wait for at least the value of the retry delay time before trying another registration to form a new flow for that URI (a 503 response to an earlier failed registration attempt with a Retry-After header field value may cause the UA to wait longer).
たとえば、base-timeが30秒で失敗が3回発生した場合、上限待機時間はmin(1800, 30*(2^3))、すなわち240秒です。登録を再試行する前にUAが待つ実際の時間(再試行遅延時間)は、上限待機時間の50%から100%までの一様分布から選びます。UAは、そのURIへの新しいフローを確立するために次の登録を試みる前に、少なくとも再試行遅延時間だけ待たなければなりません (MUST)(先行する登録の失敗に対する503応答にRetry-Afterヘッダーフィールドが含まれていれば、UAはさらに長く待つことがあります)。
To be explicitly clear on the boundary conditions: when the UA boots, it immediately tries to register. If this fails and no registration on other flows succeed, the first retry happens somewhere between 30 and 60 seconds after the failure of the first registration request. If the number of consecutive-failures is large enough that the maximum of 1800 seconds is reached, the UA will keep trying indefinitely with a random time of 15 to 30 minutes between each attempt.
境界条件を明確にします。UAは起動すると直ちに登録を試みます。登録に失敗し、他のフローでの登録も成功しなかった場合、最初の登録要求の失敗から30秒から60秒の間に最初の再試行を行います。連続失敗が十分な回数に達して上限の1800秒に達した場合、UAは各試行の間に15分から30分のランダムな時間を置いて、無期限に再試行します。
When an edge proxy receives a registration request with a "reg-id" header field parameter in the Contact header field, it needs to determine if it (the edge proxy) will have to be visited for any subsequent requests sent to the User Agent identified in the Contact header field, or not. If the edge proxy is the first hop, as indicated by the Via header field, it MUST insert its URI in a Path header field value as described in [RFC3327]. If it is not the first hop, it might still decide to add itself to the Path header based on local policy. In addition, if the edge proxy is the first SIP node after the UAC, the edge proxy either MUST store a "flow token" (containing information about the flow from the previous hop) in its Path URI or reject the request. The flow token MUST be an identifier that is unique to this network flow. The flow token MAY be placed in the userpart of the URI. In addition, the first node MUST include an "ob" URI parameter in its Path header field value. If the edge proxy is not the first SIP node after the UAC it MUST NOT place an "ob" URI parameter in a Path header field value. The edge proxy can determine if it is the first hop by examining the Via header field.
エッジプロキシが、Contactヘッダーフィールドにreg-idヘッダーパラメーターを含む登録要求を受信した場合、Contactヘッダーフィールドで識別されたユーザーエージェント宛ての後続要求がこのエッジプロキシを経由する必要があるかどうかを判断します。Viaヘッダーフィールドから自身が最初のホップだと分かる場合、エッジプロキシは[RFC3327]の説明に従って、自身のURIをPathヘッダーフィールド値に挿入しなければなりません (MUST)。最初のホップでない場合も、ローカルポリシーに基づいてPathヘッダーに自身を追加してかまいません。さらに、エッジプロキシがUAC直後の最初のSIPノードである場合、Path URIに「フロートークン」(直前のホップからのフロー情報を含む)を保存するか、要求を拒否しなければなりません (MUST)。フロートークンは、このネットワークフローを一意に識別するものでなければなりません (MUST)。フロートークンはURIのユーザー部に配置してもかまいません (MAY)。また、最初のノードはPathヘッダーフィールド値にob URIパラメーターを含めなければなりません (MUST)。エッジプロキシがUAC直後の最初のSIPノードでない場合、Pathヘッダーフィールド値にob URIパラメーターを含めてはなりません (MUST NOT)。エッジプロキシはViaヘッダーフィールドを調べて、自身が最初のホップかどうかを判断できます。
A trivial but impractical way to satisfy the flow token requirement in Section 5.1 involves storing a mapping between an incrementing counter and the connection information; however, this would require the edge proxy to keep an infeasible amount of state. It is unclear when this state could be removed, and the approach would have problems if the proxy crashed and lost the value of the counter. A stateless example is provided below. A proxy can use any algorithm it wants as long as the flow token is unique to a flow, the flow can be recovered from the token, and the token cannot be modified by attackers.
セクション5.1のフロートークン要件を満たす単純ですが実用的でない方法として、増加するカウンターと接続情報の対応付けを保存する方法があります。しかし、この方法ではエッジプロキシが現実的でない量の状態を保持する必要があります。また、その状態をいつ削除できるかが明確でなく、プロキシがクラッシュしてカウンター値を失うと問題が生じます。以下にステートレスな例を示します。プロキシは、フロートークンがフローごとに一意であり、トークンからフローを復元でき、攻撃者がトークンを改変できない限り、任意のアルゴリズムを使用できます。
Example Algorithm: When the proxy boots, it selects a 20-octet crypto random key called K that only the edge proxy knows. A byte array, called S, is formed that contains the following information about the flow the request was received on: an enumeration indicating the protocol, the local IP address and port, the remote IP address and port. The HMAC of S is computed using the key K and the HMAC-SHA1-80 algorithm, as defined in [RFC2104]. The concatenation of the HMAC and S are base64 encoded, as defined in [RFC4648], and used as the flow identifier. When using IPv4 addresses, this will result in a 32-octet identifier.
When an edge proxy receives a request, it applies normal routing procedures with the following additions. If the edge proxy receives a request where the edge proxy is the host in the topmost Route header field value, and the Route header field value contains a flow token, the proxy follows the procedures of this section. Otherwise the edge proxy skips the procedures in this section, removes itself from the Route header field, and continues processing the request.
エッジプロキシは要求を受信すると、次の追加手順を適用して通常のルーティング処理を行います。最上位のRouteヘッダーフィールド値のホストが自身であり、そのRouteヘッダーフィールド値にフロートークンが含まれる要求を受信した場合、このセクションの手順に従います。それ以外の場合、このセクションの手順を省略し、Routeヘッダーフィールドから自身を削除して、要求の処理を続けます。
The proxy decodes the flow token and compares the flow in the flow token with the source of the request to determine if this is an "incoming" or "outgoing" request.
プロキシはフロートークンを復号し、トークン内のフローと要求の送信元を比較して、要求が「着信」か「発信」かを判定します。
If the flow in the flow token identified by the topmost Route header field value matches the source IP address and port of the request, the request is an "outgoing" request; otherwise, it is an "incoming" request.
最上位のRouteヘッダーフィールド値で識別されるフロートークン内のフローが、要求の送信元IPアドレスおよびポートと一致する場合、その要求は「発信」です。一致しない場合は「着信」です。
If the Route header value contains an "ob" URI parameter, the Route header was probably copied from the Path header in a registration. If the Route header value contains an "ob" URI parameter, and the request is a new dialog-forming request, the proxy needs to adjust the route set to ensure that subsequent requests in the dialog can be delivered over a valid flow to the UA instance identified by the flow token.
Routeヘッダー値にob URIパラメーターが含まれる場合、そのRouteヘッダーは登録時のPathヘッダーからコピーされた可能性があります。Routeヘッダー値にob URIパラメーターが含まれ、要求が新しいダイアログを確立する要求である場合、プロキシはRoute setを調整し、ダイアログ内の後続要求がフロートークンで識別されるUAインスタンスへの有効なフローを通じて配信されるようにする必要があります。
Note: A simple approach to satisfy this requirement is for the proxy to add a Record-Route header field value that contains the flow-token, by copying the URI in the Route header minus the "ob" parameter.
注:この要件を満たす簡単な方法は、RouteヘッダーのURIからobパラメーターを除いたものをコピーし、フロートークンを含むRecord-Routeヘッダーフィールド値として追加することです。
Next, whether the Route header field contained an "ob" URI parameter or not, the proxy removes the Route header field value and forwards the request over the 'logical flow' identified by the flow token, that is known to deliver data to the specific target UA instance. If the flow token has been tampered with, the proxy SHOULD send a 403 (Forbidden) response. If the flow no longer exists, the proxy SHOULD send a 430 (Flow Failed) response to the request.
次に、Routeヘッダーフィールドにob URIパラメーターが含まれているかどうかにかかわらず、プロキシはRouteヘッダーフィールド値を削除し、フロートークンで識別される「論理フロー」を通じて要求を転送します。このフローは、対象のUAインスタンスにデータを届けるものです。フロートークンが改ざんされていた場合、プロキシは403 (Forbidden) 応答を送信すべきです (SHOULD)。フローがすでに存在しない場合、プロキシは要求に対して430 (Flow Failed) 応答を送信すべきです (SHOULD)。
Proxies that used the example algorithm described in Section 5.2 to form a flow token follow the procedures below to determine the correct flow. To decode the flow token, take the flow identifier in the user portion of the URI and base64 decode it, then verify the HMAC is correct by recomputing the HMAC and checking that it matches. If the HMAC is not correct, the request has been tampered with.
セクション5.2のアルゴリズム例を使ってフロートークンを作成したプロキシは、正しいフローを特定するため、次の手順に従います。フロートークンを復号するには、URIのユーザー部にあるフロー識別子をbase64デコードし、HMACを再計算して一致することを確認します。HMACが一致しない場合、要求は改ざんされています。
For mid-dialog requests to work with outbound UAs, the requests need to be forwarded over some valid flow to the appropriate UA instance. If the edge proxy receives an outgoing dialog-forming request, the edge proxy can use the presence of the "ob" URI parameter in the UAC's Contact URI (or topmost Route header field) to determine if the edge proxy needs to assist in mid-dialog request routing.
Outbound対応UAとのダイアログ内の要求を機能させるには、適切なUAインスタンスへの有効なフローを通じて要求を転送する必要があります。エッジプロキシが発信側のダイアログ確立要求を受信した場合、UACのContact URI(または最上位のRouteヘッダーフィールド)にob URIパラメーターがあるかどうかで、ダイアログ内の要求のルーティングを支援する必要があるか判断できます。
Implementation note: Specific procedures at the edge proxy to ensure that mid-dialog requests are routed over an existing flow are not part of this specification. However, an approach such as having the edge proxy add a Record-Route header with a flow token is one way to ensure that mid-dialog requests are routed over the correct flow.
実装上の注意:ダイアログ内の要求を既存のフロー経由でルーティングするためのエッジプロキシ固有の手順は、この仕様の対象外です。ただし、たとえばエッジプロキシがフロートークンを含むRecord-Routeヘッダーを追加すれば、ダイアログ内の要求を正しいフロー経由でルーティングできます。
All edge proxies compliant with this specification MUST implement support for STUN NAT keep-alives on their SIP UDP ports as described in Section 8.
この仕様に準拠するすべてのエッジプロキシは、セクション8の説明に従い、SIPのUDPポートでSTUN NATキープアライブをサポートしなければなりません (MUST)。
When a server receives a double CRLF sequence between SIP messages on a connection-oriented transport such as TCP or SCTP, it MUST immediately respond with a single CRLF over the same connection.
サーバーがTCPやSCTPなどのコネクション型トランスポート上で、SIPメッセージ間に二重CRLFシーケンスを受信した場合、同じ接続上ですぐに単一のCRLFを返さなければなりません (MUST)。
The last proxy to forward a successful registration response to a UA MAY include a Flow-Timer header field if the response contains the outbound option-tag in a Require header field value in the response. The reason a proxy would send a Flow-Timer is if it wishes to detect flow failures proactively and take appropriate action (e.g., log alarms, provide alternative treatment if incoming requests for the UA are received, etc.). The server MUST wait for an amount of time larger than the Flow-Timer in order to have a grace period to account for transport delay.
成功した登録応答をUAに転送する最後のプロキシは、その応答のRequireヘッダーフィールド値にoutboundオプションタグが含まれている場合、Flow-Timerヘッダーフィールドを含めてもかまいません (MAY)。プロキシがFlow-Timerを送るのは、フロー障害を事前に検出して適切な措置(警告の記録や、UA宛ての着信要求を受信した場合の代替処理など)を取りたい場合です。サーバーはトランスポート遅延を考慮する猶予時間を設けるため、Flow-Timerの値を超える時間だけ待たなければなりません (MUST)。
Registrars that implement this specification MUST support the Path header mechanism [RFC3327].
この仕様を実装するレジストラは、Pathヘッダーの仕組み [RFC3327] をサポートしなければなりません (MUST)。
When receiving a REGISTER request, the registrar MUST check from its Via header field if the registrar is the first hop or not. If the registrar is not the first hop, it MUST examine the Path header of the request. If the Path header field is missing or it exists but the first URI does not have an "ob" URI parameter, then outbound processing MUST NOT be applied to the registration. In this case, the following processing applies: if the REGISTER request contains the reg-id and the outbound option tag in a Supported header field, then the registrar MUST respond to the REGISTER request with a 439 (First Hop Lacks Outbound Support) response; otherwise, the registrar MUST ignore the "reg-id" parameter of the Contact header. See Section 11.6 for more information on the 439 response code.
REGISTER要求を受信したレジストラは、Viaヘッダーフィールドを調べて、自身が最初のホップかどうかを確認しなければなりません (MUST)。最初のホップでない場合、要求のPathヘッダーを調べなければなりません (MUST)。Pathヘッダーフィールドがない場合、または存在しても最初のURIにob URIパラメーターがない場合、その登録にOutbound処理を適用してはなりません (MUST NOT)。この場合、次のように処理します。REGISTER要求のSupportedヘッダーフィールドにreg-idとoutboundオプションタグの両方が含まれていれば、レジストラは439 (First Hop Lacks Outbound Support) 応答を返さなければなりません (MUST)。それ以外の場合、レジストラはContactヘッダーのreg-idパラメーターを無視しなければなりません (MUST)。439応答コードについてはセクション11.6を参照してください。
A Contact header field value with an instance-id media feature tag but no "reg-id" header field parameter is valid (this combination will result in the creation of a GRUU, as described in the GRUU specification [RFC5627]), but one with a reg-id but no instance-id is not valid. If the registrar processes a Contact header field value with a reg-id but no instance-id, it simply ignores the reg-id parameter.
instance-idメディア機能タグを含み、reg-idヘッダーパラメーターを含まないContactヘッダーフィールド値は有効です(この組み合わせにより、GRUU仕様 [RFC5627] の説明に従ってGRUUが作成されます)。一方、reg-idは含むもののinstance-idを含まない値は無効です。レジストラがinstance-idのないreg-id付きのContactヘッダーフィールド値を処理する場合、reg-idパラメーターを無視します。
A registration containing a "reg-id" header field parameter and a non-zero expiration is used to register a single UA instance over a single flow, and can also de-register any Contact header fields with zero expiration. Therefore, if the Contact header field contains more than one header field value with a non-zero expiration and any of these header field values contain a "reg-id" Contact header field parameter, the entire registration SHOULD be rejected with a 400 (Bad Request) response. The justification for recommending rejection versus making it mandatory is that the receiver is allowed by [RFC3261] to squelch (not respond to) excessively malformed or malicious messages.
reg-idヘッダーパラメーターを含み、有効期限がゼロ以外の登録は、単一のフローを介して1つのUAインスタンスを登録するために使用されます。また、有効期限がゼロのContactヘッダーフィールド値の登録解除にも使用できます。したがって、Contactヘッダーフィールドに有効期限がゼロ以外の値が複数含まれ、そのいずれかにreg-id Contactヘッダーパラメーターが含まれる場合、登録全体を400 (Bad Request) 応答で拒否すべきです (SHOULD)。拒否を必須ではなく推奨としているのは、[RFC3261] により、受信側は形式が著しく不正なメッセージや悪意のあるメッセージに応答せず黙殺することが認められているためです。
If the Contact header did not contain a "reg-id" Contact header field parameter or if that parameter was ignored (as described above), the registrar MUST NOT include the outbound option-tag in the Require header field of its response.
Contactヘッダーにreg-id Contactヘッダーフィールドパラメーターが含まれていない場合、または前述のとおりそのパラメーターを無視した場合、レジストラは応答のRequireヘッダーフィールドにoutboundオプションタグを含めてはなりません (MUST NOT)。
The registrar MUST be prepared to receive, simultaneously for the same AOR, some registrations that use instance-id and reg-id and some registrations that do not. The registrar MAY be configured with local policy to reject any registrations that do not include the instance-id and reg-id, or with Path header field values that do not contain the "ob" URI parameter. If the Contact header field does not contain a "+sip.instance" Contact header field parameter, the registrar processes the request using the Contact binding rules in [RFC3261].
レジストラは、同じAORについてinstance-idとreg-idを使う登録と使わない登録の両方を同時に受信できるようにしなければなりません (MUST)。レジストラはローカルポリシーにより、instance-idとreg-idを含まない登録や、ob URIパラメーターを含まないPathヘッダーフィールド値を持つ登録を拒否するよう構成してもかまいません (MAY)。Contactヘッダーフィールドに+sip.instance Contactヘッダーパラメーターが含まれない場合、レジストラは[RFC3261]のContactバインディング規則に従って要求を処理します。
When a "+sip.instance" Contact header field parameter and a "reg-id" Contact header field parameter are present in a Contact header field of a REGISTER request (after the Contact header validation as described above), the corresponding binding is between an AOR and the combination of the instance-id (from the "+sip.instance" Contact header parameter) and the value of "reg-id" Contact header field parameter parameter. The registrar MUST store in the binding the Contact URI, all the Contact header field parameters, and any Path header field values. (Even though the Contact URI is not used for binding comparisons, it is still needed by the authoritative proxy to form the target set.) Provided that the UAC had included an outbound option-tag (defined in Section 11.4) in a Supported header field value in the REGISTER request, the registrar MUST include the outbound option-tag in a Require header field value in its response to that REGISTER request.
上記のContactヘッダー検証後、REGISTER要求のContactヘッダーフィールドに+sip.instance Contactヘッダーパラメーターとreg-id Contactヘッダーパラメーターの両方がある場合、対応するバインディングはAORと、instance-id(+sip.instance Contactヘッダーパラメーターから得られる値)およびreg-idパラメーター値との組み合わせに対応します。レジストラはContact URI、すべてのContactヘッダーフィールドパラメーター、およびPathヘッダーフィールド値をバインディングに保存しなければなりません (MUST)。(Contact URIはバインディングの比較には使いませんが、権威プロキシがターゲットセットを作成するために必要です。)UACがREGISTER要求のSupportedヘッダーフィールド値にoutboundオプションタグ(セクション11.4で定義)を含めていた場合、レジストラはそのREGISTER要求への応答のRequireヘッダーフィールド値にoutboundオプションタグを含めなければなりません (MUST)。
If the UAC has a direct flow with the registrar, the registrar MUST store enough information to uniquely identify the network flow over which the request arrived. For common operating systems with TCP, this would typically be just the handle to the file descriptor where the handle would become invalid if the TCP session was closed. For common operating systems with UDP this would typically be the file descriptor for the local socket that received the request, the local interface, and the IP address and port number of the remote side that sent the request. The registrar MAY store this information by adding itself to the Path header field with an appropriate flow token.
UACとレジストラの間に直接フローがある場合、レジストラは要求が到着したネットワークフローを一意に識別するのに十分な情報を保存しなければなりません (MUST)。TCPを使う一般的なオペレーティングシステムでは、通常、TCPセッションが閉じると無効になるファイル記述子へのハンドルだけで足ります。UDPを使う場合は通常、要求を受信したローカルソケットのファイル記述子、ローカルインターフェイス、および要求送信元のリモートIPアドレスとポート番号を保存します。レジストラは適切なフロートークンを使い、自身をPathヘッダーフィールドに追加することで、この情報を保存してもかまいません (MAY)。
If the registrar receives a re-registration for a specific combination of AOR, and instance-id and reg-id values, the registrar MUST update any information that uniquely identifies the network flow over which the request arrived if that information has changed, and SHOULD update the time the binding was last updated.
レジストラがAOR、instance-id、reg-id値の特定の組み合わせについて再登録を受信した場合、要求の到着したネットワークフローを一意に識別する情報が変わっていれば、その情報を更新しなければなりません (MUST)。また、バインディングを最後に更新した時刻も更新すべきです (SHOULD)。
To be compliant with this specification, registrars that can receive SIP requests directly from a UAC without intervening edge proxies MUST implement the same keep-alive mechanisms as edge proxies (Section 5.4). Registrars with a direct flow with a UA MAY include a Flow-Timer header in a 2xx class registration response that includes the outbound option-tag in the Require header.
この仕様に準拠するため、エッジプロキシを介さずUACから直接SIP要求を受信できるレジストラは、エッジプロキシと同じキープアライブ機構(セクション5.4)を実装しなければなりません (MUST)。UAとの直接フローを持つレジストラは、Requireヘッダーにoutboundオプションタグを含む2xxクラスの登録応答にFlow-Timerヘッダーを含めてもかまいません (MAY)。
When a proxy uses the location service to look up a registration binding and then proxies a request to a particular contact, it selects a contact to use normally, with a few additional rules:
プロキシがロケーションサービスで登録バインディングを検索し、特定のContactに要求をプロキシする場合、通常の選択規則にいくつかの追加規則を加えてContactを選択します。
o The proxy MUST NOT populate the target set with more than one contact with the same AOR and instance-id at a time.
o プロキシは、同じAORとinstance-idを持つ複数のContactを同時にターゲットセットに含めてはなりません (MUST NOT)。
o If a request for a particular AOR and instance-id fails with a 430 (Flow Failed) response, the proxy SHOULD replace the failed branch with another target (if one is available) with the same AOR and instance-id, but a different reg-id.
o 特定のAORとinstance-idに対する要求が430 (Flow Failed) 応答で失敗した場合、同じAORとinstance-idを持ち、reg-idが異なる別のターゲットが利用可能であれば、プロキシは失敗した分岐をそのターゲットに置き換えるべきです (SHOULD)。
o If the proxy receives a final response from a branch other than a 408 (Request Timeout) or a 430 (Flow Failed) response, the proxy MUST NOT forward the same request to another target representing the same AOR and instance-id. The targeted instance has already provided its response.
o プロキシが408 (Request Timeout) または430 (Flow Failed) 以外の最終応答を分岐から受信した場合、同じAORとinstance-idを表す別のターゲットに同じ要求を転送してはなりません (MUST NOT)。対象のインスタンスはすでに応答しています。
The proxy uses the next-hop target of the message and the value of any stored Path header field vector in the registration binding to decide how to forward and populate the Route header in the request. If the proxy is co-located with the registrar and stored information about the flow to the UA that created the binding, then the proxy MUST send the request over the same 'logical flow' saved with the binding, since that flow is known to deliver data to the specific target UA instance's network flow that was saved with the binding.
プロキシは、メッセージの次ホップターゲットと、登録バインディングに保存されたPathヘッダーフィールドの並びを使って、要求の転送方法とRouteヘッダーの設定方法を決定します。プロキシがレジストラと同じ場所で稼働し、バインディングを作成したUAへのフロー情報を保存している場合、プロキシはバインディングとともに保存した同じ「論理フロー」で要求を送信しなければなりません (MUST)。このフローは、バインディングに保存された対象UAインスタンスのネットワークフローへデータを届けるものだからです。
Implementation note: Typically this means that for TCP, the request is sent on the same TCP socket that received the REGISTER request. For UDP, the request is sent from the same local IP address and port over which the registration was received, to the same IP address and port from which the REGISTER was received.
実装上の注意:通常、TCPではREGISTER要求を受信したものと同じTCPソケットで要求を送信します。UDPでは、登録を受信したものと同じローカルIPアドレスおよびポートから、REGISTER要求を受信したものと同じIPアドレスおよびポートへ要求を送信します。
If a proxy or registrar receives information from the network that indicates that no future messages will be delivered on a specific flow, then the proxy MUST invalidate all the bindings in the target set that use that flow (regardless of AOR). Examples of this are a TCP socket closing or receiving a destination unreachable ICMP error on a UDP flow. Similarly, if a proxy closes a file descriptor, it MUST invalidate all the bindings in the target set with flows that use that file descriptor.
プロキシまたはレジストラが、特定のフロー上で今後メッセージが配信されないことを示すネットワーク情報を受け取った場合、そのフローを使用するターゲットセット内のすべてのバインディングを、AORにかかわらず無効にしなければなりません (MUST)。例として、TCPソケットの切断や、UDPフローでの宛先到達不能を示すICMPエラーの受信があります。同様に、プロキシがファイル記述子を閉じる場合、そのファイル記述子を使用するフローを持つターゲットセット内のすべてのバインディングを無効にしなければなりません (MUST)。
This section describes changes to the SIP transport layer that allow SIP and STUN [RFC5389] Binding Requests to be mixed over the same flow. This constitutes a new STUN usage. The STUN messages are used to verify that connectivity is still available over a UDP flow, and to provide periodic keep-alives. These STUN keep-alives are always sent to the next SIP hop. STUN messages are not delivered end-to-end.
このセクションでは、同じフロー上でSIPとSTUN [RFC5389] Binding Requestを混在させられるようにする、SIPトランスポート層の変更について説明します。これは新しいSTUN利用方法です。STUNメッセージは、UDPフローの接続性が維持されていることの確認と、定期的なキープアライブに使います。これらのSTUNキープアライブは常に次のSIPホップに送信され、エンドツーエンドでは配信されません。
The only STUN messages required by this usage are Binding Requests, Binding Responses, and Binding Error Responses. The UAC sends Binding Requests over the same UDP flow that is used for sending SIP messages. These Binding Requests do not require any STUN attributes. The corresponding Binding Responses do not require any STUN attributes except the XOR-MAPPED-ADDRESS. The UAS, proxy, or registrar responds to a valid Binding Request with a Binding Response that MUST include the XOR-MAPPED-ADDRESS attribute.
この利用方法で必要なのは、STUN Binding Request、Binding Response、およびBinding Error Responseだけです。UACはSIPメッセージの送信に使うものと同じUDPフローでBinding Requestを送信します。Binding RequestにSTUN属性は不要です。対応するBinding Responseにも、XOR-MAPPED-ADDRESSを除いてSTUN属性は不要です。UAS、プロキシ、またはレジストラは、有効なBinding Requestに対してBinding Responseを返し、その応答にはXOR-MAPPED-ADDRESS属性を含めなければなりません (MUST)。
If a server compliant to this section receives SIP requests on a given interface and UDP port, it MUST also provide a limited version of a STUN server on the same interface and UDP port.
このセクションに準拠するサーバーが所定のインターフェイスとUDPポートでSIP要求を受信する場合、同じインターフェイスとUDPポートで限定版のSTUNサーバーも提供しなければなりません (MUST)。
Note: It is easy to distinguish STUN and SIP packets sent over UDP, because the first octet of a STUN Binding method has a value of 0 or 1, while the first octet of a SIP message is never a 0 or 1.
注:STUN Bindingメソッドの最初のオクテットは値が0または1ですが、SIPメッセージの最初のオクテットが0または1になることはありません。そのため、UDPで送信されるSTUNパケットとSIPパケットは容易に区別できます。
Because sending and receiving binary STUN data on the same ports used for SIP is a significant and non-backwards compatible change to RFC 3261, this section requires a number of checks before sending STUN messages to a SIP node. If a SIP node sends STUN requests (for example, due to incorrect configuration) despite these warnings, the node could be blacklisted for UDP traffic.
SIPで使用するポート上でバイナリのSTUNデータを送受信することは、RFC 3261に対する重大な後方互換性のない変更です。そのため、このセクションでは、SIPノードにSTUNメッセージを送信する前に複数の確認を求めています。これらの警告にかかわらずSIPノードがSTUN要求を送信すると(たとえば構成誤りが原因の場合)、そのノードはUDPトラフィックについてブラックリストに登録される可能性があります。
A SIP node MUST NOT send STUN requests over a flow unless it has an explicit indication that the target next-hop SIP server claims to support this specification. UACs MUST NOT use an ambiguous configuration option such as "Work through NATs?" or "Do keep-alives?" to imply next-hop STUN support. A UAC MAY use the presence of an "ob" URI parameter in the Path header in a registration response as an indication that its first edge proxy supports the keep-alives defined in this document.
SIPノードは、宛先の次ホップSIPサーバーがこの仕様をサポートすると明示的に示していない限り、フロー上でSTUN要求を送信してはなりません (MUST NOT)。UACは、「NAT越しに動作するか」「キープアライブを行うか」といった曖昧な構成オプションを、次ホップがSTUNをサポートすることの根拠にしてはなりません (MUST NOT)。UACは、登録応答のPathヘッダーにob URIパラメーターがあることを、この文書で定義するキープアライブを最初のエッジプロキシがサポートすることの指標として使用してもかまいません (MAY)。
Note: Typically, a SIP node first sends a SIP request and waits to receive a 2xx class response over a flow to a new target destination, before sending any STUN messages. When scheduled for the next NAT refresh, the SIP node sends a STUN request to the target.
注:通常、SIPノードはまずSIP要求を送信し、新しい宛先へのフローで2xxクラスの応答を受信するまで待ってからSTUNメッセージを送信します。次のNAT更新時刻になると、SIPノードは宛先にSTUN要求を送信します。
Once a flow is established, failure of a STUN request (including its retransmissions) is considered a failure of the underlying flow. For SIP over UDP flows, if the XOR-MAPPED-ADDRESS returned over the flow changes, this indicates that the underlying connectivity has changed, and is considered a flow failure.
フローが確立された後は、STUN要求(再送を含む)の失敗を、その基盤となるフローの障害とみなします。UDP上のSIPフローでXOR-MAPPED-ADDRESSが変化した場合、基盤となる接続性が変化したことを示すため、フロー障害とみなします。
The SIP keep-alive STUN usage requires no backwards compatibility with [RFC3489].
SIPキープアライブのSTUN利用方法では、[RFC3489]との後方互換性は必要ありません。
When STUN is used together with SigComp [RFC3320] compressed SIP messages over the same flow, the STUN messages are simply sent uncompressed, "outside" of SigComp. This is supported by multiplexing STUN messages with SigComp messages by checking the two topmost bits of the message. These bits are always one for SigComp, or zero for STUN.
同じフロー上でSigComp [RFC3320]による圧縮SIPメッセージとともにSTUNを使う場合、STUNメッセージはSigCompの「外側」で非圧縮のまま送信します。メッセージの最上位2ビットを確認することで、STUNメッセージとSigCompメッセージを多重化できます。SigCompではこれらのビットは常に1であり、STUNでは0です。
Note: All SigComp messages contain a prefix (the five most significant bits of the first byte are set to one) that does not occur in UTF-8 [RFC3629] encoded text messages, so for applications that use this encoding (or ASCII encoding) it is possible to multiplex uncompressed application messages and SigComp messages on the same UDP port. The most significant two bits of every STUN Binding method are both zeroes. This, combined with the magic cookie, aids in differentiating STUN packets from other protocols when STUN is multiplexed with other protocols on the same port.
注:すべてのSigCompメッセージには、最初のバイトの最上位5ビットが1に設定されたプレフィックスがあります。このプレフィックスはUTF-8 [RFC3629]でエンコードされたテキストメッセージには現れません。そのため、このエンコード(またはASCIIエンコード)を使うアプリケーションでは、非圧縮のアプリケーションメッセージとSigCompメッセージを同じUDPポートで多重化できます。すべてのSTUN Bindingメソッドでは最上位2ビットがともに0です。この特徴とマジッククッキーを組み合わせることで、STUNを同じポート上の他のプロトコルと多重化したときに、STUNパケットを他のプロトコルから識別しやすくなります。
Below is an example message flow illustrating most of the concepts discussed in this specification. In many cases, Via, Content-Length, and Max-Forwards headers are omitted for brevity and readability.
以下に、この仕様で説明した概念の多くを示すメッセージフローの例を示します。簡潔で読みやすくするため、多くの場合Via、Content-Length、Max-Forwardsヘッダーを省略しています。
In these examples, "EP1" and "EP2" are outbound proxies, and "Proxy" is the authoritativeProxy.
これらの例では、「EP1」と「EP2」はOutboundプロキシで、「Proxy」は権威プロキシです。
The section is subdivided into independent calls flows; however, they are structured in sequential order of a hypothetical sequence of call flows.
このセクションは独立した呼び出しフローに分かれていますが、仮想的な呼び出しフローの順序に沿って構成されています。
If the outbound proxy set is already configured on Bob's UA, then this subsection can be skipped. Otherwise, if the outbound proxy set is learned through the configuration package, Bob's UA sends a SUBSCRIBE request for the UA profile configuration package [CONFIG-FMWK]. This request is a poll (Expires is zero). After receiving the NOTIFY request, Bob's UA fetches the external configuration using HTTPS (not shown) and obtains a configuration file that contains the outbound-proxy-set "sip:ep1.example.com;lr" and "sip:ep2.example.com;lr".
BobのUAにoutbound-proxy-setがすでに設定されている場合、この小節は省略できます。設定フレームワーク経由でoutbound-proxy-setを取得する場合、BobのUAはUAプロファイル構成パッケージ [CONFIG-FMWK] を購読するSUBSCRIBE要求を送信します。この要求はポーリングであり、Expiresは0です。NOTIFY要求を受信すると、BobのUAはHTTPSを使って外部の構成を取得し(図示せず)、outbound-proxy-setとして「sip:ep1.example.com;lr」と「sip:ep2.example.com;lr」を含む構成ファイルを取得します。
[----example.com domain-------------------------]
Bob EP1 EP2 Proxy Config
| | | | |
1)|SUBSCRIBE->| | | |
2)| |---SUBSCRIBE Event: ua-profile ->|
3)| |<--200 OK -----------------------|
4)|<--200 OK--| | | |
5)| |<--NOTIFY------------------------|
6)|<--NOTIFY--| | | |
7)|---200 OK->| | | |
8)| |---200 OK ---------------------->|
| | | | |
In this example, the DNS server happens to be configured so that sip: example.com resolves to EP1 and EP2.
この例では、DNSサーバーはsip: example.comがEP1とEP2に解決されるよう構成されています。
Example Message #1:
メッセージ例1:
SUBSCRIBE sip:00000000-0000-1000-8000-AABBCCDDEEFF@example.com
SIP/2.0
Via: SIP/2.0/TCP 192.0.2.2;branch=z9hG4bKnlsdkdj2
Max-Forwards: 70
From: <anonymous@example.com>;tag=23324
To: <sip:00000000-0000-1000-8000-AABBCCDDEEFF@example.com>
Call-ID: nSz1TWN54x7My0GvpEBj
CSeq: 1 SUBSCRIBE
Event: ua-profile ;profile-type=device
;vendor="example.com";model="uPhone";version="1.1"
Expires: 0
Supported: path, outbound
Accept: message/external-body, application/x-uPhone-config
Contact: <sip:192.0.2.2;transport=tcp;ob>
;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
Content-Length: 0
In message #2, EP1 adds the following Record-Route header:
メッセージ2では、EP1が次のRecord-Routeヘッダーを追加します。
Record-Route:
<sip:GopIKSsn0oGLPXRdV9BAXpT3coNuiGKV@ep1.example.com;lr>
In message #5, the configuration server sends a NOTIFY with an external URL for Bob to fetch his configuration. The NOTIFY has a Subscription-State header that ends the subscription.
メッセージ5では、構成サーバーがBobの構成取得用の外部URLを含むNOTIFYを送信します。このNOTIFYには購読を終了させるSubscription-Stateヘッダーがあります。
Message #5
メッセージ5
NOTIFY sip:192.0.2.2;transport=tcp;ob SIP/2.0
Via: SIP/2.0/TCP 192.0.2.5;branch=z9hG4bKn81dd2
Max-Forwards: 70
To: <anonymous@example.com>;tag=23324
From: <sip:00000000-0000-1000-8000-AABBCCDDEEFF@example.com>;tag=0983
Call-ID: nSz1TWN54x7My0GvpEBj
CSeq: 1 NOTIFY
Route: <sip:GopIKSsn0oGLPXRdV9BAXpT3coNuiGKV@ep1.example.com;lr>
Subscription-State: terminated;reason=timeout
Event: ua-profile
Content-Type: message/external-body; access-type="URL"
;expiration="Thu, 01 Jan 2009 09:00:00 UTC"
;URL="http://example.com/uPhone.cfg"
;size=9999;hash=10AB568E91245681AC1B
Content-Length: 0
EP1 receives this NOTIFY request, strips off the Route header,
extracts the flow-token, calculates the correct flow, and forwards
the request (message #6) over that flow to Bob.
Bob's UA fetches the configuration file and learns the outbound proxy set.
BobのUAは構成ファイルを取得し、outbound-proxy-setを得ます。
Now that Bob's UA is configured with the outbound-proxy-set whether through configuration or using the configuration framework procedures of the previous section, Bob's UA sends REGISTER requests through each edge proxy in the set. Once the registrations succeed, Bob's UA begins sending CRLF keep-alives about every 2 minutes.
構成を直接設定した場合も、前のセクションの構成フレームワーク手順で取得した場合も、BobのUAにはoutbound-proxy-setが設定されています。BobのUAはセット内の各エッジプロキシを経由してREGISTER要求を送信します。登録が成功すると、BobのUAは約2分ごとにCRLFキープアライブを送信し始めます。
Bob EP1 EP2 Proxy Alice
| | | | |
9)|-REGISTER->| | | |
10)| |---REGISTER-->| |
11)| |<----200 OK---| |
12)|<-200 OK---| | | |
13)|----REGISTER---->| | |
14)| | |--REG-->| |
15)| | |<-200---| |
16)|<----200 OK------| | |
| | | | |
| about 120 seconds later... |
| | | | |
17)|--2CRLF--->| | | |
18)|<--CRLF----| | | |
19)|------2CRLF----->| | |
20)|<------CRLF------| | |
| | | | |
In message #9, Bob's UA sends its first registration through the first edge proxy in the outbound-proxy-set by including a loose route. The UA includes an instance-id and reg-id in its Contact header field value. Note the option-tags in the Supported header.
メッセージ9では、BobのUAはLoose Routingを使い、outbound-proxy-set内の最初のエッジプロキシを経由して最初の登録を送信します。UAはContactヘッダーフィールド値にinstance-idとreg-idを含めます。Supportedヘッダー内のオプションタグにも注目してください。
Message #9
メッセージ9
REGISTER sip:example.com SIP/2.0
Via: SIP/2.0/TCP 192.0.2.2;branch=z9hG4bKnashds7
Max-Forwards: 70
From: Bob <sip:bob@example.com>;tag=7F94778B653B
To: Bob <sip:bob@example.com>
Call-ID: 16CB75F21C70
CSeq: 1 REGISTER
Supported: path, outbound
Route: <sip:ep1.example.com;lr>
Contact: <sip:bob@192.0.2.2;transport=tcp>;reg-id=1
;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
Content-Length: 0
Message #10 is similar. EP1 removes the Route header field value, decrements Max-Forwards, and adds its Via header field value. Since EP1 is the first edge proxy, it adds a Path header with a flow token and includes the "ob" parameter.
メッセージ10も同様です。EP1はRouteヘッダーフィールド値を削除し、Max-Forwardsを1減らして、自身のViaヘッダーフィールド値を追加します。EP1は最初のエッジプロキシなので、フロートークンとobパラメーターを含むPathヘッダーを追加します。
Path: <sip:VskztcQ/S8p4WPbOnHbuyh5iJvJIW3ib@ep1.example.com;lr;ob>
Since the response to the REGISTER (message #11) contains the outbound option-tag in the Require header field, Bob's UA will know that the registrar used outbound binding rules. The response also contains the currently active Contacts, and the Path for the current registration.
REGISTERへの応答(メッセージ11)のRequireヘッダーフィールドにoutboundオプションタグが含まれるため、BobのUAはレジストラがOutboundのバインディング規則を適用したと分かります。応答には現在有効なContactと、今回の登録に対するPathも含まれます。
Message #11
メッセージ11
SIP/2.0 200 OK
Via: SIP/2.0/TCP 192.0.2.15;branch=z9hG4bKnuiqisi
Via: SIP/2.0/TCP 192.0.2.2;branch=z9hG4bKnashds7
From: Bob <sip:bob@example.com>;tag=7F94778B653B
To: Bob <sip:bob@example.com>;tag=6AF99445E44A
Call-ID: 16CB75F21C70
CSeq: 1 REGISTER
Supported: path, outbound
Require: outbound
Contact: <sip:bob@192.0.2.2;transport=tcp>;reg-id=1;expires=3600
;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
Path: <sip:VskztcQ/S8p4WPbOnHbuyh5iJvJIW3ib@ep1.example.com;lr;ob>
Content-Length: 0
The second registration through EP2 (message #13) is similar except that the Call-ID has changed, the reg-id is 2, and the Route header goes through EP2.
EP2を経由する2回目の登録(メッセージ13)も同様ですが、Call-IDが変わり、reg-idが2になり、RouteヘッダーがEP2を経由します。
Message #13
メッセージ13
REGISTER sip:example.com SIP/2.0
Via: SIP/2.0/TCP 192.0.2.2;branch=z9hG4bKnqr9bym
Max-Forwards: 70
From: Bob <sip:bob@example.com>;tag=755285EABDE2
To: Bob <sip:bob@example.com>
Call-ID: E05133BD26DD
CSeq: 1 REGISTER
Supported: path, outbound
Route: <sip:ep2.example.com;lr>
Contact: <sip:bob@192.0.2.2;transport=tcp>;reg-id=2
;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
Content-Length: 0
Likewise in message #14, EP2 adds a Path header with flow token and "ob" parameter.
同様に、メッセージ14でEP2は、フロートークンとobパラメーターを含むPathヘッダーを追加します。
Path: <sip:wazHDLdIMtUg6r0I/oRZ15zx3zHE1w1Z@ep2.example.com;lr;ob>
Message #16 tells Bob's UA that outbound registration was successful, and shows both Contacts. Note that only the Path corresponding to the current registration is returned.
メッセージ16は、Outbound登録が成功したことをBobのUAに伝え、両方のContactを示します。今回の登録に対応するPathだけが返される点に注意してください。
Message #16
メッセージ16
SIP/2.0 200 OK
Via: SIP/2.0/TCP 192.0.2.2;branch=z9hG4bKnqr9bym
From: Bob <sip:bob@example.com>;tag=755285EABDE2
To: Bob <sip:bob@example.com>;tag=49A9AD0B3F6A
Call-ID: E05133BD26DD
Supported: path, outbound
Require: outbound
CSeq: 1 REGISTER
Contact: <sip:bob@192.0.2.2;transport=tcp>;reg-id=1;expires=3600
;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
Contact: <sip:bob@192.0.2.2;transport=tcp>;reg-id=2;expires=3600
;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
Path: <sip:wazHDLdIMtUg6r0I/oRZ15zx3zHE1w1Z@ep2.example.com;lr;ob>
Content-Length: 0
In this example, after registration, EP1 crashes and reboots. Before Bob's UA notices that its flow to EP1 is no longer responding, Alice calls Bob. Bob's authoritative proxy first tries the flow to EP1, but EP1 no longer has a flow to Bob, so it responds with a 430 (Flow Failed) response. The proxy removes the stale registration and tries the next binding for the same instance.
この例では、登録後にEP1がクラッシュして再起動します。BobのUAがEP1へのフローから応答がなくなったことに気付く前に、AliceがBobに発信します。Bobの権威プロキシはまずEP1へのフローを試しますが、EP1はBobへのフローを保持していないため、430 (Flow Failed) 応答を返します。プロキシは古くなった登録を削除し、同じインスタンスの次のバインディングを試します。
Bob EP1 EP2 Proxy Alice
| | | | |
| CRASH X | | |
| Reboot | | |
| | | | |
21)| | | |<-INVITE-|
22)| |<---INVITE----| |
23)| |----430------>| |
24)| | |<-INVITE| |
25)|<---INVITE-------| | |
26)|----200 OK------>| | |
27)| | |200 OK->| |
28)| | | |-200 OK->|
29)| | |<----------ACK----|
30)|<---ACK----------| | |
| | | | |
31)| | |<----------BYE----|
32)|<---BYE----------| | |
33)|----200 OK------>| | |
34)| | |--------200 OK--->|
| | | | |
Message #21
メッセージ21
INVITE sip:bob@example.com SIP/2.0
To: Bob <sip:bob@example.com>
From: Alice <sip:alice@a.example>;tag=02935
Call-ID: klmvCxVWGp6MxJp2T2mb
CSeq: 1 INVITE
Bob's proxy rewrites the Request-URI to the Contact URI used in Bob's registration, and places the path for one of the registrations towards Bob's UA instance into a Route header field. This Route goes through EP1.
BobのプロキシはRequest-URIをBobの登録で使われたContact URIに書き換え、BobのUAインスタンス宛ての登録の1つから得たPathをRouteヘッダーフィールドに配置します。このRouteはEP1を経由します。
Message #22
メッセージ22
INVITE sip:bob@192.0.2.2;transport=tcp SIP/2.0 To: Bob <sip:bob@example.com> From: Alice <sip:alice@a.example>;tag=02935 Call-ID: klmvCxVWGp6MxJp2T2mb CSeq: 1 INVITE Route: <sip:VskztcQ/S8p4WPbOnHbuyh5iJvJIW3ib@ep1.example.com;lr;ob> Since EP1 just rebooted, it does not have the flow described in the flow token. It returns a 430 (Flow Failed) response.
INVITE sip:bob@192.0.2.2;transport=tcp SIP/2.0 To: Bob <sip:bob@example.com> From: Alice <sip:alice@a.example>;tag=02935 Call-ID: klmvCxVWGp6MxJp2T2mb CSeq: 1 INVITE Route: <sip:VskztcQ/S8p4WPbOnHbuyh5iJvJIW3ib@ep1.example.com;lr;ob> EP1は再起動したばかりなので、フロートークンに記載されたフローを保持していません。EP1は430 (Flow Failed) 応答を返します。
Message #23
SIP/2.0 430 Flow Failed
To: Bob <sip:bob@example.com>
From: Alice <sip:alice@a.example>;tag=02935
Call-ID: klmvCxVWGp6MxJp2T2mb
CSeq: 1 INVITE
The proxy deletes the binding for this path and tries to forward the INVITE again, this time with the path through EP2.
プロキシはこのPathのバインディングを削除し、今度はEP2を経由するPathを使ってINVITEを再び転送します。
Message #24
メッセージ24
INVITE sip:bob@192.0.2.2;transport=tcp SIP/2.0
To: Bob <sip:bob@example.com>
From: Alice <sip:alice@a.example>;tag=02935
Call-ID: klmvCxVWGp6MxJp2T2mb
CSeq: 1 INVITE
Route: <sip:wazHDLdIMtUg6r0I/oRZ15zx3zHE1w1Z@ep2.example.com;lr;ob>
In message #25, EP2 needs to add a Record-Route header field value, so that any subsequent in-dialog messages from Alice's UA arrive at Bob's UA. EP2 can determine it needs to Record-Route since the request is a dialog-forming request and the Route header contained a flow token and an "ob" parameter. This Record-Route information is passed back to Alice's UA in the responses (messages #26, 27, and 28).
メッセージ25では、EP2はAliceのUAから後続のダイアログ内要求がBobのUAに届くように、Record-Routeヘッダーフィールド値を追加する必要があります。要求がダイアログを確立する要求であり、Routeヘッダーにフロートークンとobパラメーターが含まれているため、EP2はRecord-Routeが必要だと判断できます。このRecord-Route情報は応答(メッセージ26、27、28)でAliceのUAに渡されます。
Message #25
メッセージ25
INVITE sip:bob@192.0.2.2;transport=tcp SIP/2.0
To: Bob <sip:bob@example.com>
From: Alice <sip:alice@a.example>;tag=02935
Call-ID: klmvCxVWGp6MxJp2T2mb
CSeq: 1 INVITE
Record-Route:
<sip:wazHDLdIMtUg6r0I/oRZ15zx3zHE1w1Z@ep2.example.com;lr>
Message #26
メッセージ26
SIP/2.0 200 OK
To: Bob <sip:bob@example.com>;tag=skduk2
From: Alice <sip:alice@a.example>;tag=02935
Call-ID: klmvCxVWGp6MxJp2T2mb
CSeq: 1 INVITE
Record-Route:
<sip:wazHDLdIMtUg6r0I/oRZ15zx3zHE1w1Z@ep2.example.com;lr>
At this point, both UAs have the correct route-set for the dialog. Any subsequent requests in this dialog will route correctly. For example, the ACK request in message #29 is sent from Alice's UA directly to EP2. The BYE request in message #31 uses the same route-set.
この時点で、両方のUAはダイアログに対する正しいRoute setを持っています。このダイアログ内の後続要求は正しくルーティングされます。たとえば、メッセージ29のACK要求はAliceのUAからEP2へ直接送信されます。メッセージ31のBYE要求も同じRoute setを使います。
Message #29
メッセージ29
ACK sip:bob@192.0.2.2;transport=tcp SIP/2.0
To: Bob <sip:bob@example.com>;tag=skduk2
From: Alice <sip:alice@a.example>;tag=02935
Call-ID: klmvCxVWGp6MxJp2T2mb
CSeq: 1 ACK
Route: <sip:wazHDLdIMtUg6r0I/oRZ15zx3zHE1w1Z@ep2.example.com;lr>
Message #31
メッセージ31
BYE sip:bob@192.0.2.2;transport=tcp SIP/2.0
To: Bob <sip:bob@example.com>;tag=skduk2
From: Alice <sip:alice@a.example>;tag=02935
Call-ID: klmvCxVWGp6MxJp2T2mb
CSeq: 2 BYE
Route: <sip:wazHDLdIMtUg6r0I/oRZ15zx3zHE1w1Z@ep2.example.com;lr>
Somewhat later, Bob's UA sends keep-alives to both its edge proxies, but it discovers that the flow with EP1 failed. Bob's UA re-registers through EP1 using the same reg-id and Call-ID it previously used.
しばらく後、BobのUAは両方のエッジプロキシにキープアライブを送信しますが、EP1とのフローが失敗したことを検出します。BobのUAは以前と同じreg-idとCall-IDを使ってEP1経由で再登録します。
Bob EP1 EP2 Proxy Alice
| | | | |
35)|------2CRLF----->| | |
36)|<------CRLF------| | |
37)|--2CRLF->X | | | |
| | | | |
38)|-REGISTER->| | | |
39)| |---REGISTER-->| |
40)| |<----200 OK---| |
41)|<-200 OK---| | | |
| | | | |
Message #38
メッセージ38
REGISTER sip:example.com SIP/2.0
From: Bob <sip:bob@example.com>;tag=7F94778B653B
To: Bob <sip:bob@example.com>
Call-ID: 16CB75F21C70
CSeq: 2 REGISTER
Supported: path, outbound
Route: <sip:ep1.example.com;lr>
Contact: <sip:bob@192.0.2.2;transport=tcp>;reg-id=1
;+sip.instance="<urn:uuid:00000000-0000-1000-8000-AABBCCDDEEFF>"
In message #39, EP1 inserts a Path header with a new flow token:
メッセージ39では、EP1が新しいフロートークンを含むPathヘッダーを挿入します。
Path: <sip:3yJEbr1GYZK9cPYk5Snocez6DzO7w+AX@ep1.example.com;lr;ob>
Finally, Bob makes an outgoing call to Alice. Bob's UA includes an "ob" parameter in its Contact URI in message #42. EP1 adds a Record-Route with a flow-token in message #43. The route-set is returned to Bob in the response (messages #45, 46, and 47), and either Bob or Alice can send in-dialog requests.
最後に、BobがAliceに発信します。メッセージ42でBobのUAはContact URIにobパラメーターを含めます。メッセージ43でEP1はフロートークンを含むRecord-Routeを追加します。応答(メッセージ45、46、47)でBobにRoute setが返され、BobとAliceのどちらもダイアログ内要求を送信できるようになります。
Bob EP1 EP2 Proxy Alice
| | | | |
42)|--INVITE-->| | | |
43)| |---INVITE---->| |
44)| | | |-INVITE->|
45)| | | |<--200---|
46)| |<----200 OK---| |
47)|<-200 OK---| | | |
48)|--ACK----->| | | |
49)| |-----ACK--------------->|
| | | | |
50)|-- BYE---->| | | |
51)| |-----------BYE--------->|
52)| |<----------200 OK-------|
53)|<--200 OK--| | | |
| | | | |
Message #42
メッセージ42
INVITE sip:alice@a.example SIP/2.0
From: Bob <sip:bob@example.com>;tag=ldw22z
To: Alice <sip:alice@a.example>
Call-ID: 95KGsk2V/Eis9LcpBYy3
CSeq: 1 INVITE
Route: <sip:ep1.example.com;lr>
Contact: <sip:bob@192.0.2.2;transport=tcp;ob>
In message #43, EP1 adds the following Record-Route header.
メッセージ43では、EP1が次のRecord-Routeヘッダーを追加します。
Record-Route:
<sip:3yJEbr1GYZK9cPYk5Snocez6DzO7w+AX@ep1.example.com;lr>
When EP1 receives the BYE (message #50) from Bob's UA, it can tell that the request is an "outgoing" request (since the source of the request matches the flow in the flow token) and simply deletes its Route header field value and forwards the request on to Alice's UA.
EP1がBobのUAからBYE(メッセージ50)を受信すると、要求の送信元がフロートークン内のフローと一致するため、「発信」要求だと判定できます。その後、Routeヘッダーフィールド値を削除し、要求をAliceのUAへ転送します。
Message #50
メッセージ50
BYE sip:alice@a.example SIP/2.0
From: Bob <sip:bob@example.com>;tag=ldw22z
To: Alice <sip:alice@a.example>;tag=plqus8
Call-ID: 95KGsk2V/Eis9LcpBYy3
CSeq: 2 BYE
Route: <sip:3yJEbr1GYZK9cPYk5Snocez6DzO7w+AX@ep1.example.com;lr>
Contact: <sip:bob@192.0.2.2;transport=tcp;ob>
Flow-Timer = "Flow-Timer" HCOLON 1*DIGIT
contact-params =/ c-p-reg / c-p-instance
c-p-reg = "reg-id" EQUAL 1*DIGIT ; 1 to (2^31 - 1)
c-p-instance = "+sip.instance" EQUAL
DQUOTE "<" instance-val ">" DQUOTE
instance-val = 1*uric ; defined in RFC 3261
The value of the reg-id MUST NOT be 0 and MUST be less than 2^31.
reg-idの値は0であってはならず (MUST NOT)、2^31未満でなければなりません (MUST)。
This specification defines a new SIP header field "Flow-Timer" whose syntax is defined in Section 10.
この仕様では、構文をセクション10で定義する新しいSIPヘッダーフィールドFlow-Timerを定義します。
Header Name compact Reference
----------------- ------- ---------
Flow-Timer [RFC5626]
This specification defines a new Contact header field parameter called reg-id in the "Header Field Parameters and Parameter Values" sub-registry as per the registry created by [RFC3968]. The syntax is defined in Section 10. The required information is:
この仕様では、[RFC3968]で作成されたレジストリに従い、「Header Field Parameters and Parameter Values」サブレジストリにreg-idという新しいContactヘッダーフィールドパラメーターを定義します。構文はセクション10で定義します。登録に必要な情報は次のとおりです。
Predefined
Header Field Parameter Name Values Reference
---------------------- --------------------- ---------- ---------
Contact reg-id No [RFC5626]
This specification augments the "SIP/SIPS URI Parameters" sub-registry as per the registry created by [RFC3969]. The required information is:
この仕様では、[RFC3969]で作成されたレジストリに従い、「SIP/SIPS URI Parameters」サブレジストリを拡張します。登録に必要な情報は次のとおりです。
Parameter Name Predefined Values Reference -------------- ----------------- --------- ob No [RFC5626]
This specification registers a new SIP option tag, as per the guidelines in Section 27.1 of [RFC3261].
この仕様では、[RFC3261]のセクション27.1の指針に従い、新しいSIPオプションタグを登録します。
Name: outbound
名前:outbound
Description: This option-tag is used to identify UAs and registrars that support extensions for Client-Initiated Connections. A UA places this option in a Supported header to communicate its support for this extension. A registrar places this option-tag in a Require header to indicate to the registering User Agent that the registrar used registrations using the binding rules defined in this extension.
説明:このオプションタグは、クライアント起点接続の拡張機能をサポートするUAとレジストラを識別します。UAはこのオプションタグをSupportedヘッダーに含め、拡張機能への対応を通知します。レジストラはこのオプションタグをRequireヘッダーに含め、拡張機能で定義されたバインディング規則を使って登録を処理したことを登録側のUAに通知します。
This document registers a new SIP response code (430 Flow Failed), as per the guidelines in Section 27.4 of [RFC3261]. This response code is used by an edge proxy to indicate to the Authoritative Proxy that a specific flow to a UA instance has failed. Other flows to the same instance could still succeed. The Authoritative Proxy SHOULD attempt to forward to another target (flow) with the same instance-id and AOR. Endpoints should never receive a 430 response. If an endpoint receives a 430 response, it should treat it as a 400 (Bad Request) per normal procedures, as in Section 8.1.3.2 of [RFC3261]. This response code is defined by the following information, which has been added to the method and response-code sub-registry under the SIP Parameters registry.
この文書では、[RFC3261]のセクション27.4の指針に従って、新しいSIP応答コード430 (Flow Failed) を登録します。この応答コードは、UAインスタンスへの特定のフローが失敗したことを、エッジプロキシから権威プロキシに通知するために使います。同じインスタンスへの別のフローは引き続き成功する可能性があります。権威プロキシは、同じinstance-idとAORを持つ別のターゲット(フロー)への転送を試みるべきです (SHOULD)。エンドポイントが430応答を受信することは想定されていません。エンドポイントが430応答を受信した場合は、[RFC3261]のセクション8.1.3.2にある通常の手順に従い、400 (Bad Request) として扱います。この応答コードは、SIP Parametersレジストリのmethodおよびresponse-codeサブレジストリに追加された次の情報で定義します。
Response Code Reference
------------------------------------------ ---------
Request Failure 4xx
430 Flow Failed [RFC5626]
This document registers a new SIP response code (439 First Hop Lacks Outbound Support), as per the guidelines in Section 27.4 of [RFC3261]. This response code is used by a registrar to indicate that it supports the 'outbound' feature described in this specification, but that the first outbound proxy that the user is attempting to register through does not. Note that this response code is only appropriate in the case that the registering User Agent advertises support for outbound processing by including the outbound option tag in a Supported header field. Proxies MUST NOT send a 439 response to any requests that do not contain a "reg-id" parameter and an outbound option tag in a Supported header field. This response code is defined by the following information, which has been added to the method and response-code sub-registry under the SIP Parameters registry.
この文書では、[RFC3261]のセクション27.4の指針に従って、新しいSIP応答コード439 (First Hop Lacks Outbound Support) を登録します。この応答コードは、レジストラがこの仕様で説明するoutbound機能をサポートしている一方、ユーザーが登録に使おうとしている最初のOutboundプロキシはサポートしていないことを通知するために使います。この応答コードが適切なのは、登録側のUAがSupportedヘッダーフィールドにoutboundオプションタグを含め、Outbound処理への対応を通知している場合に限ります。プロキシは、Supportedヘッダーフィールドにreg-idパラメーターとoutboundオプションタグの両方を含まない要求に対して、439応答を送信してはなりません (MUST NOT)。この応答コードは、SIP Parametersレジストリのmethodおよびresponse-codeサブレジストリに追加された次の情報で定義します。
Response Code Reference
------------------------------------------ ---------
Request Failure 4xx
439 First Hop Lacks Outbound Support [RFC&rfc.number;]
Media feature tag name: sip.instance
メディア機能タグ名:sip.instance
ASN.1 Identifier: 23
ASN.1識別子:23
Summary of the media feature indicated by this tag: This feature tag contains a string containing a URN that indicates a unique identifier associated with the UA instance registering the Contact.
このタグが示すメディア機能の概要:この機能タグは、Contactを登録するUAインスタンスに関連付けられた一意の識別子を示すURNを含む文字列です。
Values appropriate for use with this feature tag: String (equality relationship).
この機能タグに適した値:文字列(等価関係)。
The feature tag is intended primarily for use in the following applications, protocols, services, or negotiation mechanisms: This feature tag is most useful in a communications application, for describing the capabilities of a device, such as a phone or PDA.
この機能タグの主な用途となるアプリケーション、プロトコル、サービス、またはネゴシエーション機構:電話やPDAなどのデバイスの機能を記述する通信アプリケーションで、特に役立ちます。
Examples of typical use: Routing a call to a specific device.
典型的な使用例:特定のデバイスへの呼のルーティング。
Related standards or documents: RFC 5626
関連する標準または文書:RFC 5626
Security Considerations: This media feature tag can be used in ways which affect application behaviors. For example, the SIP caller preferences extension [RFC3841] allows for call routing decisions to be based on the values of these parameters. Therefore, if an attacker can modify the values of this tag, they might be able to affect the behavior of applications. As a result, applications that utilize this media feature tag SHOULD provide a means for ensuring its integrity. Similarly, this feature tag should only be trusted as valid when it comes from the user or User Agent described by the tag. As a result, protocols for conveying this feature tag SHOULD provide a mechanism for guaranteeing authenticity.
セキュリティに関する考慮事項:このメディア機能タグは、アプリケーションの動作に影響する形で使用されることがあります。たとえば、SIP発信者設定拡張 [RFC3841] では、このパラメーターの値に基づいて呼のルーティングを決定できます。したがって、攻撃者がこのタグの値を変更できると、アプリケーションの動作に影響する可能性があります。このため、このメディア機能タグを使うアプリケーションは、その完全性を確保する手段を備えるべきです (SHOULD)。同様に、このタグは、タグが記述するユーザーまたはUAから得られた場合に限って有効なものとして信頼すべきです。したがって、このタグを伝達するプロトコルは、真正性を保証する仕組みを備えるべきです (SHOULD)。
One of the key security concerns in this work is making sure that an attacker cannot hijack the sessions of a valid user and cause all calls destined to that user to be sent to the attacker. Note that the intent is not to prevent existing active attacks on SIP UDP and TCP traffic, but to ensure that no new attacks are added by introducing the outbound mechanism.
この取り組みの主要なセキュリティ上の懸念の1つは、攻撃者が正当なユーザーのセッションを乗っ取り、そのユーザー宛てのすべての呼を攻撃者に転送させるのを防ぐことです。ここでの目的は、SIPのUDPおよびTCPトラフィックに対する既存の能動的攻撃を防ぐことではなく、Outbound機構の導入によって新たな攻撃が加わらないようにすることです。
The simple case is when there are no edge proxies. In this case, the only time an entry can be added to the routing for a given AOR is when the registration succeeds. SIP already protects against attackers being able to successfully register, and this scheme relies on that security. Some implementers have considered the idea of just saving the instance-id without relating it to the AOR with which it registered. This idea will not work because an attacker's UA can impersonate a valid user's instance-id and hijack that user's calls.
エッジプロキシがない場合は単純です。この場合、特定のAORに対するルーティングにエントリーを追加できるのは、登録が成功したときだけです。SIPには攻撃者による登録成功を防ぐ仕組みがすでにあり、この方式はそのセキュリティに依存します。実装者の中には、instance-idを、その登録に使われたAORと関連付けずに保存する案を検討した人もいます。しかし、攻撃者のUAが正当なユーザーのinstance-idになりすまして、そのユーザー宛ての呼を乗っ取れるため、この方法は機能しません。
The more complex case involves one or more edge proxies. When a UA sends a REGISTER request through an edge proxy on to the registrar, the edge proxy inserts a Path header field value. If the registration is successfully authenticated, the registrar stores the value of the Path header field. Later, when the registrar forwards a request destined for the UA, it copies the stored value of the Path header field into the Route header field of the request and forwards the request to the edge proxy.
より複雑なのは、1つ以上のエッジプロキシがある場合です。UAがエッジプロキシ経由でレジストラにREGISTER要求を送信すると、エッジプロキシはPathヘッダーフィールド値を挿入します。登録が正常に認証されると、レジストラはPathヘッダーフィールド値を保存します。その後、レジストラはUA宛ての要求を転送する際、保存したPathヘッダーフィールド値を要求のRouteヘッダーフィールドにコピーし、エッジプロキシへ転送します。
The only time an edge proxy will route over a particular flow is when it has received a Route header that has the flow identifier information that it has created. An incoming request would have gotten this information from the registrar. The registrar will only save this information for a given AOR if the registration for the AOR has been successful; and the registration will only be successful if the UA can correctly authenticate. Even if an attacker has spoofed some bad information in the Path header sent to the registrar, the attacker will not be able to get the registrar to accept this information for an AOR that does not belong to the attacker. The registrar will not hand out this bad information to others, and others will not be misled into contacting the attacker.
エッジプロキシが特定のフロー経由でルーティングするのは、自身が作成したフロー識別情報を含むRouteヘッダーを受信した場合だけです。着信要求はこの情報をレジストラから取得しています。レジストラは、AORの登録が成功した場合に限り、そのAORについてこの情報を保存します。UAが正しく認証された場合に限って登録は成功します。攻撃者がレジストラに送信したPathヘッダーに不正な情報を偽装して含めても、攻撃者は自分に属さないAORについてレジストラにその情報を受け入れさせることはできません。レジストラがその不正な情報を他者に渡すことはなく、他者が攻撃者への接続に誘導されることもありません。
This document does not change the mandatory-to-implement security mechanisms in SIP. User Agents are already required to implement Digest authentication while support of TLS is recommended; proxy servers are already required to implement Digest and TLS.
この文書は、SIPで実装が必須とされるセキュリティ機構を変更しません。ユーザーエージェントにはDigest認証の実装がすでに求められており、TLSのサポートが推奨されています。プロキシサーバーにはDigestとTLSの実装がすでに求められています。
This entire section is non-normative.
このセクション全体は非規範的です。
[RFC3261] requires proxies, registrars, and User Agents to implement both TCP and UDP but deployments can chose which transport protocols they want to use. Deployments need to be careful in choosing what transports to use. Many SIP features and extensions, such as large presence notification bodies, result in SIP requests that can be too large to be reasonably transported over UDP. [RFC3261] states that when a request is too large for UDP, the device sending the request attempts to switch over to TCP. It is important to note that when using outbound, this will only work if the UA has formed both UDP and TCP outbound flows. This specification allows the UA to do so, but in most cases it will probably make more sense for the UA to form a TCP outbound connection only, rather than forming both UDP and TCP flows. One of the key reasons that many deployments choose not to use TCP has to do with the difficulty of building proxies that can maintain a very large number of active TCP connections. Many deployments today use SIP in such a way that the messages are small enough that they work over UDP but they can not take advantage of all the functionality SIP offers. Deployments that use only UDP outbound connections are going to fail with sufficiently large SIP messages.
[RFC3261]は、プロキシ、レジストラ、ユーザーエージェントにTCPとUDPの両方の実装を求めていますが、運用環境では使用するトランスポートプロトコルを選べます。どのトランスポートを使うかは慎重に選ぶ必要があります。大きなプレゼンス通知本文など、多くのSIP機能や拡張によって、UDPでは現実的に転送できない大きさのSIP要求が生じます。[RFC3261]によると、UDPで転送するには大きすぎる要求を送るデバイスは、TCPへの切り替えを試みます。Outboundを使う場合、UAがUDPとTCPの両方でOutboundフローを確立していなければ、この切り替えは機能しない点に注意してください。この仕様では両方のフローを確立できますが、多くの場合、UAはUDPとTCPの両方を確立するよりTCPのOutbound接続だけを確立する方が合理的でしょう。多くの運用環境がTCPを使わない主な理由の1つは、非常に多数のTCP接続を維持できるプロキシを構築する難しさです。現在、多くの運用環境では、UDPで扱える小さなメッセージだけを使う形でSIPを運用しているため、SIPが提供するすべての機能を活用できません。UDPのOutbound接続だけを使う運用環境では、十分に大きなSIPメッセージを処理できません。
This specification was developed to meet the following requirements:
この仕様は、次の要件を満たすために策定されました。
1. Must be able to detect that a UA supports these mechanisms.
1. UAがこれらの機構をサポートしていることを検出できること。
2. Support UAs behind NATs.
2. NATの背後にあるUAをサポートすること。
3. Support TLS to a UA without a stable DNS name or IP address.
3. 安定したDNS名またはIPアドレスを持たないUAとのTLSをサポートすること。
4. Detect failure of a connection and be able to correct for this.
4. 接続障害を検出し、回復できること。
5. Support many UAs simultaneously rebooting.
5. 多数のUAが同時に再起動する状況に対応すること。
6. Support a NAT rebooting or resetting.
6. NATが再起動またはリセットする状況に対応すること。
7. Minimize initial startup load on a proxy.
7. プロキシの起動直後の負荷を最小限に抑えること。
8. Support architectures with edge proxies.
8. エッジプロキシを含む構成をサポートすること。
Francois Audet acted as document shepherd for this document, tracking hundreds of comments and incorporating many grammatical fixes as well as prodding the editors to "get on with it". Jonathan Rosenberg, Erkki Koivusalo, and Byron Campen provided many comments and useful text. Dave Oran came up with the idea of using the most recent registration first in the proxy. Alan Hawrylyshen co-authored the document that formed the initial text of this specification. Additionally, many of the concepts here originated at a connection reuse meeting at IETF 60 that included the authors, Jon Peterson, Jonathan Rosenberg, Alan Hawrylyshen, and Paul Kyzivat. The TCP design team consisting of Chris Boulton, Scott Lawrence, Rajnish Jain, Vijay K. Gurbani, and Ganesh Jayadevan provided input and text. Nils Ohlmeier provided many fixes and initial implementation experience. In addition, thanks to the following folks for useful comments: Francois Audet, Flemming Andreasen, Mike Hammer, Dan Wing, Srivatsa Srinivasan, Dale Worely, Juha Heinanen, Eric Rescorla, Lyndsay Campbell, Christer Holmberg, Kevin Johns, Jeroen van Bemmel, Derek MacDonald, Dean Willis, and Robert Sparks.
Francois Audetは文書管理者として、数百件のコメントを追跡し、多くの文法上の修正を取り込み、編集者に作業を進めるよう促しました。Jonathan Rosenberg、Erkki Koivusalo、Byron Campenは、多くのコメントと有用な文章を提供しました。Dave Oranは、プロキシで最も新しい登録を最初に使う案を考案しました。Alan Hawrylyshenは、この仕様の初稿となった文書を共著しました。ここで扱う概念の多くは、著者に加え、Jon Peterson、Jonathan Rosenberg、Alan Hawrylyshen、Paul Kyzivatが参加したIETF 60の接続再利用会合で生まれました。Chris Boulton、Scott Lawrence、Rajnish Jain、Vijay K. Gurbani、Ganesh JayadevanからなるTCP設計チームは、意見と文章を提供しました。Nils Ohlmeierは多くの修正と初期実装の経験を提供しました。また、有益なコメントを寄せたFrancois Audet、Flemming Andreasen、Mike Hammer、Dan Wing、Srivatsa Srinivasan、Dale Worely、Juha Heinanen、Eric Rescorla、Lyndsay Campbell、Christer Holmberg、Kevin Johns、Jeroen van Bemmel、Derek MacDonald、Dean Willis、Robert Sparksにも感謝します。
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2141] Moats, R., "URN Syntax", RFC 2141, May 1997.
[RFC2141] Moats, R., "URN Syntax", RFC 2141, May 1997.
[RFC2506] Holtman, K., Mutz, A., and T. Hardie, "Media Feature Tag Registration Procedure", BCP 31, RFC 2506, March 1999.
[RFC2506] Holtman, K., Mutz, A., and T. Hardie, "Media Feature Tag Registration Procedure", BCP 31, RFC 2506, March 1999.
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002.
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002.
[RFC3263] Rosenberg, J. and H. Schulzrinne, "Session Initiation Protocol (SIP): Locating SIP Servers", RFC 3263, June 2002.
[RFC3263] Rosenberg, J. and H. Schulzrinne, "Session Initiation Protocol (SIP): Locating SIP Servers", RFC 3263, June 2002.
[RFC3327] Willis, D. and B. Hoeneisen, "Session Initiation Protocol (SIP) Extension Header Field for Registering Non-Adjacent Contacts", RFC 3327, December 2002.
[RFC3327] Willis, D. and B. Hoeneisen, "Session Initiation Protocol (SIP) Extension Header Field for Registering Non-Adjacent Contacts", RFC 3327, December 2002.
[RFC3581] Rosenberg, J. and H. Schulzrinne, "An Extension to the Session Initiation Protocol (SIP) for Symmetric Response Routing", RFC 3581, August 2003.
[RFC3581] Rosenberg, J. and H. Schulzrinne, "An Extension to the Session Initiation Protocol (SIP) for Symmetric Response Routing", RFC 3581, August 2003.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.
[RFC3840] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, "Indicating User Agent Capabilities in the Session Initiation Protocol (SIP)", RFC 3840, August 2004.
[RFC3840] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, "Indicating User Agent Capabilities in the Session Initiation Protocol (SIP)", RFC 3840, August 2004.
[RFC3841] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, "Caller Preferences for the Session Initiation Protocol (SIP)", RFC 3841, August 2004.
[RFC3841] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, "Caller Preferences for the Session Initiation Protocol (SIP)", RFC 3841, August 2004.
[RFC3968] Camarillo, G., "The Internet Assigned Number Authority (IANA) Header Field Parameter Registry for the Session Initiation Protocol (SIP)", BCP 98, RFC 3968, December 2004.
[RFC3968] Camarillo, G., "The Internet Assigned Number Authority (IANA) Header Field Parameter Registry for the Session Initiation Protocol (SIP)", BCP 98, RFC 3968, December 2004.
[RFC3969] Camarillo, G., "The Internet Assigned Number Authority (IANA) Uniform Resource Identifier (URI) Parameter Registry for the Session Initiation Protocol (SIP)", BCP 99, RFC 3969, December 2004.
[RFC3969] Camarillo, G., "The Internet Assigned Number Authority (IANA) Uniform Resource Identifier (URI) Parameter Registry for the Session Initiation Protocol (SIP)", BCP 99, RFC 3969, December 2004.
[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally Unique IDentifier (UUID) URN Namespace", RFC 4122, July 2005.
[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally Unique IDentifier (UUID) URN Namespace", RFC 4122, July 2005.
[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008.
[RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008.
[RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, "Session Traversal Utilities for NAT (STUN)", RFC 5389, October 2008.
[RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, "Session Traversal Utilities for NAT (STUN)", RFC 5389, October 2008.
[CONFIG-FMWK] Petrie, D. and S. Channabasappa, Ed., "A Framework for Session Initiation Protocol User Agent Profile Delivery", Work in Progress, February 2008.
[CONFIG-FMWK] Petrie, D. and S. Channabasappa, Ed., "A Framework for Session Initiation Protocol User Agent Profile Delivery", Work in Progress, February 2008.
[NAT-SCEN] Boulton, C., Rosenberg, J., Camarillo, G., and F. Audet, "Best Current Practices for NAT Traversal for Client-Server SIP", Work in Progress, September 2008.
[NAT-SCEN] Boulton, C., Rosenberg, J., Camarillo, G., and F. Audet, "Best Current Practices for NAT Traversal for Client-Server SIP", Work in Progress, September 2008.
[RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980.
[RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, August 1980.
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981.
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, RFC 793, September 1981.
[RFC1035] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, November 1987.
[RFC1035] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, November 1987.
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997.
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, February 1997.
[RFC2131] Droms, R., "Dynamic Host Configuration Protocol", RFC 2131, March 1997.
[RFC2131] Droms, R., "Dynamic Host Configuration Protocol", RFC 2131, March 1997.
[RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for specifying the location of services (DNS SRV)", RFC 2782, February 2000.
[RFC2782] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for specifying the location of services (DNS SRV)", RFC 2782, February 2000.
[RFC3320] Price, R., Bormann, C., Christoffersson, J., Hannu, H., Liu, Z., and J. Rosenberg, "Signaling Compression (SigComp)", RFC 3320, January 2003.
[RFC3320] Price, R., Bormann, C., Christoffersson, J., Hannu, H., Liu, Z., and J. Rosenberg, "Signaling Compression (SigComp)", RFC 3320, January 2003.
[RFC3489] Rosenberg, J., Weinberger, J., Huitema, C., and R. Mahy, "STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs)", RFC 3489, March 2003.
[RFC3489] Rosenberg, J., Weinberger, J., Huitema, C., and R. Mahy, "STUN - Simple Traversal of User Datagram Protocol (UDP) Through Network Address Translators (NATs)", RFC 3489, March 2003.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, January 2005.
[RFC4340] Kohler, E., Handley, M., and S. Floyd, "Datagram Congestion Control Protocol (DCCP)", RFC 4340, March 2006.
[RFC4340] Kohler, E., Handley, M., and S. Floyd, "Datagram Congestion Control Protocol (DCCP)", RFC 4340, March 2006.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, October 2006.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, October 2006.
[RFC4960] Stewart, R., "Stream Control Transmission Protocol", RFC 4960, September 2007.
[RFC4960] Stewart, R., "Stream Control Transmission Protocol", RFC 4960, September 2007.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, August 2008.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, August 2008.
[RFC5627] Rosenberg, J., "Obtaining and Using Globally Routable User Agent URIs (GRUUs) in the Session Initiation Protocol (SIP)", RFC 5627, October 2009.
[RFC5627] Rosenberg, J., "Obtaining and Using Globally Routable User Agent URIs (GRUUs) in the Session Initiation Protocol (SIP)", RFC 5627, October 2009.
The base-time used for the flow re-registration backoff times described in Section 4.5 are configurable. If the base-time-all-fail value is set to the default of 30 seconds and the base-time-not-failed value is set to the default of 90 seconds, the following table shows the resulting amount of time the UA will wait to retry registration.
セクション4.5で説明したフロー再登録のバックオフに使うbase-timeは構成可能です。base-time-all-failを既定値の30秒に、base-time-not-failedを既定値の90秒に設定した場合、次の表にUAが登録の再試行まで待つ時間を示します。
+-------------------+--------------------+---------------------+
| # of reg failures | all flows unusable | > 1 non-failed flow |
+-------------------+--------------------+---------------------+
| 0 | 0 s | 0 s |
| 1 | 30-60 s | 90-180 s |
| 2 | 1-2 min | 3-6 min |
| 3 | 2-4 min | 6-12 min |
| 4 | 4-8 min | 12-24 min |
| 5 | 8-16 min | 15-30 min |
| 6 or more | 15-30 min | 15-30 min |
+-------------------+--------------------+---------------------+
This appendix contains the ABNF defined earlier in this document.
この付録には、この文書の前半で定義したABNFを示します。
CRLF = CR LF
double-CRLF = CR LF CR LF
CR = %x0D
LF = %x0A
Flow-Timer = "Flow-Timer" HCOLON 1*DIGIT
contact-params =/ c-p-reg / c-p-instance
c-p-reg = "reg-id" EQUAL 1*DIGIT ; 1 to (2^31 - 1)
c-p-instance = "+sip.instance" EQUAL
DQUOTE "<" instance-val ">" DQUOTE
instance-val = 1*uric ; defined in RFC 3261
Authors' Addresses
著者の連絡先
Cullen Jennings (editor) Cisco Systems 170 West Tasman Drive Mailstop SJC-21/2 San Jose, CA 95134 USA
Cullen Jennings (editor) Cisco Systems 170 West Tasman Drive Mailstop SJC-21/2 San Jose, CA 95134 USA
Phone: +1 408 902-3341
EMail: fluffy@cisco.com
Rohan Mahy (editor) Unaffiliated
Rohan Mahy (editor) Unaffiliated
EMail: rohan@ekabal.com
Francois Audet (editor) Skype Labs
Francois Audet (editor) Skype Labs
EMail: francois.audet@skypelabs.com