Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call-ID and Branch tags in SIP protocol

Tags:

sip

I am developing a SIP client. I understand SIP requests and SIP responses but, in SIP messages, how are the call id and branch tags generated? RFC3261 does not specify this.

like image 202
lucky Avatar asked May 15 '12 23:05

lucky


People also ask

What is branch ID and ID in SIP?

Branch - ID and TagBranch IDs help proxies to match responses to forked requests. Without Branch IDs, a proxy server would not be able to understand the forked response. Branch-id will be available in Via header. Tags are used by the UAC to distinguish multiple final responses from different UAS.

What is a SIP call-ID?

The SIP Call-ID is a globally unique session identifier that you can use for several purposes, including call logging and billing correlation. The CSP SIP software reports Call-ID information for inbound calls. With this feature, the same capability is provided for outbound calls. API Messages.

What is the use of branch parameters in SIP?

The protocol name and protocol version in the header field MUST be SIP and 2.0, respectively. 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.

What is branch in via header in SIP?

The Via header identifies a call's path with the protocol name, protocol version, transport type, user agent client (UAC), the protocol port for the request and a branch parameter which serves as a unique identifier for each SIP transaction .


1 Answers

The Call-ID header value can be anything you want but does need to be unique in order to avoid requests getting classified as duplicates.

THe branch parameter on a Via header needs to start with the magic cookie value of z9hG4bK and must also be unique to avoid the request getting classified as a duplicate. For SIP Proxy's wanting to do loop detection there is also the guideline in the RFC in section 16.6 point 8 which details factors to take when constructing the branch parameter value.

like image 146
sipsorcery Avatar answered Nov 11 '22 21:11

sipsorcery