2

100.0.0.100:5059 でリッスンしている SIP クライアントがあるとします。

10.0.0.101:5060 から UDP パケットを受信し、内部に特定のヘッダーを持つ INVITE が含まれています。例えば:

  • Contact: <sip:100.0.0.102:5060>
  • Record-Route: <sip:100.0.0.103:5060>(そのようなヘッダーの最初)
  • Route: <sip:100.0.0.104:5060>
  • Via: <sip:100.0.0.105:5060>(そのようなヘッダーの最初のもの)

「ACK」、「Trying」、「Dialog Establishment」、「BYE」などをどこに送信する必要がありますか? 100.0.0.何?

(背景:SIPで見られるすべてのアドレスをそれ自体に変換する「単一のTCP接続でSIP全体」ラッパーを書き込もうとしていますが、「リクエストタイムアウト」、「ループが検出されました」、「凍結されたリレー」エラーが発生し、会話が15秒しか持続しません...おそらくラッパーが何か間違ったことをしているからです...ヘッダーとアプリケーション/ sdpに非常に多くの紛らわしいIPアドレスがあるのはなぜですか?..)。

4

1 に答える 1

0

RFC 3261 セクション 18.2.2で、何をすべきかが説明されています。アルゴリズムの 3 番目のステップが適用されます。

  o  Otherwise (for unreliable unicast transports), if the top Via
     has a "received" parameter, the response MUST be sent to the
     address in the "received" parameter, using the port indicated
     in the "sent-by" value, or using port 5060 if none is specified
     explicitly.  If this fails, for example, elicits an ICMP "port
     unreachable" response, the procedures of Section 5 of [4]
     SHOULD be used to determine where to send the response.
  o  Otherwise, if it is not receiver-tagged, the response MUST be
     sent to the address indicated by the "sent-by" value, using the
     procedures in Section 5 of [4].

ここで[4]参照する場所。

TCP 経由でリクエストを受信するのは、より単純なケースです。可能であれば、開いている接続経由でリクエストを送信します。receivedそれ以外の場合は、最上位のパラメーターのIP アドレス (Via存在する場合) またはそのヘッダーのsent-byトークン (存在しない場合) への TCP 接続を開きます。その試みが失敗した場合は、上記の RFC 3263 のアルゴリズムにフォールバックする必要があります。

于 2012-12-10T10:36:24.000 に答える