February 22, 2011

Basic connections and identifiers of SIP protocol

1. Transaction

"A SIP transaction occurs between a client and a server and comprises all messages from the first request sent from the client to the server up to a final (non-1xx) response sent from the server to the client." (RFC3261)

In other words the SIP transaction includes a request and all responses on it.

The  SIP transaction is identified by a branch parameter in the top of  "Via" header field and "CSeq" header field value. These identifiers are showed in the picture below in cyan color.


2. Dialog

"A dialog is a peer-to-peer SIP relationship between two UAs that persists for some time." (RFC3261)

A dialog is identified by a call identifier in "Call-ID"header field, local tag and a remote tag in "To" and "From" header fields. The identifiers are depicted in green color.


3. Session

"A multimedia session is a set of multimedia senders and receivers and the data streams flowing from senders to receivers." (RFC2327)

The session is defined by the concatenation of the SDP user name, session id, network type, address type,  and address elements in the origin field "o=". The session identifiers are showed in yellow color.

One of the best illustrated SIP introductions - Tech-invite.

In the picture below you can see example of a SIP response message.

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.2.102:5060;branch=z9hG4bKSEC-a01a8c0-a01a8c0-1-oW11d3T02H
From: "Test 4100" <sip:4100@192.168.2.102>;tag=snl_951dhI11AG
To: <sip:49602150014101@192.168.2.70>;tag=4138389295
Call-ID: SEC11-a01a8c0-a01a8c0-1-D9KQeE4Yc8gu
CSeq: 1235 INVITE
Allow:  INVITE,ACK,CANCEL,BYE,REFER,NOTIFY,MESSAGE,UPDATE
Allow-Events: talk, hold
Contact: 49602150014101 <sip:49602150014101@192.168.2.70:5060;transport=udp>
Server: OpenStage_20_V2 R0.30.2      SIP  100120
Supported: replaces, timer
X-Siemens-Call-Type: ST-insecure
Content-Type: application/sdp
Content-Length: 265

v=0
o=MxSIP 0 814456601 IN IP4 192.168.2.70
s=SIP Call
c=IN IP4 192.168.2.70
t=0 0
m=audio 5062 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=silenceSupp:off - - - -
a=fmtp:101 0-15
a=ptime:20
a=sendrecv

No comments:

Post a Comment