본문 바로가기

Protocol/SIP

branch

8.1.1.7. 에 묘사되어 있다.

branch 는 client, server 들에 의해서 이용된다.

예외적인 부분이 있는데 CANCEL 이나 ACK non-2xx 응답에 일때 그렇다.

기본적으로 "z9hG4bK" 로 항상 시작한다. (매직쿠키값)

branch는 서버들이 request 를 받을 때 ID의 생성이 결정되며
글로벌하게 유니크 하다.

항상 동일한 branch ID 유지
Via, To tag, From Tag, Call-ID, CSeq, Request-URI 이용
Record-Route나 Route field을 수정하였으면 재전송시에도 동일값을 추가


The Via header field value MUST
contain a branch parameter. This parameter is used to identify the
transaction created by that request. This parameter is used by both
the client and the server.

The branch parameter value MUST be unique across space and time for
all requests sent by the UA. The exceptions to this rule are CANCEL
and ACK for non-2xx responses. As discussed below, a CANCEL request
will have the same value of the branch parameter as the request it
cancels. As discussed in Section 17.1.1.3, an ACK for a non-2xx
response will also have the same branch ID as the INVITE whose
response it acknowledges.

The uniqueness property of the branch ID parameter, to facilitate
its use as a transaction ID, was not part of RFC 2543.

The branch ID inserted by an element compliant with this
specification MUST always begin with the characters "z9hG4bK". These
7 characters are used as a magic cookie (7 is deemed sufficient to
ensure that an older RFC 2543 implementation would not pick such a
value), so that servers receiving the request can determine that the
branch ID was constructed in the fashion described by this

specification (that is, globally unique). Beyond this requirement,
the precise format of the branch token is implementation-defined.

'Protocol > SIP' 카테고리의 다른 글

INVITE server transaction  (0) 2013.09.25
Non-INVITE transaction  (0) 2013.09.25
INVITE Client Transaction  (0) 2013.09.25
strict routing  (0) 2013.09.25
Example (strict router 가 있는 경우)  (0) 2013.09.25