Home | Tutorials | Resources | Books | Feedback | About us


VoIP

SIP
  Introduction
  A Brief History of SIP
  What it does & what it doesn't
  Components in SIP
  SIP Commands
  A typical example
  SIP request
  SIP response
  Types of Responses
  Relation among Call, Dialog, Transaction, Message
  SIP Registration
  Conclusion

RTP

SDP


 

Go to Previous Go to Next

Response Message Format of SIP

Here is what the SIP response of user2 will look like.

SIP/2.0 200 OK
Via: SIP/2.0/UDP site4.server2.com;branch=z9hG4bKnashds8;received=192.0.2.3
Via: SIP/2.0/UDP site3.server1.com;branch=z9hG4bK77ef4c2312983.1;received=192.0.2.2
Via: SIP/2.0/UDP pc33.server1.com;branch=z9hG4bK776asdhds;received=192.0.2.1
To: user2 <sip:user2@server2.com>;tag=a6c85cf
From: user1 <sip:user1@server1.com>;tag=1928301774
Call-ID: a84b4c76e66710@pc33.server1.com
CSeq: 314159 INVITE
Contact: <sip:user2@192.0.2.4>
Content-Type: application/sdp
Content-Length: 131

---- User2 Message Body Not Shown ----
Status Line

The first line in a response is called Status line.
SIP-Version SP Status-Code SP Reason-Phrase CRLF
[SP = single-space & CRLF=Carriage Return + Line Feed (i.e. the character inserted when you press the "Enter" or "Return" key of your computer)]
Here SIP version is 2, Status-Code is 200 and Reason Phrase is OK.

The header fields that follow the status line are similar to those in a request. I will just mention the differences

  • Via:
    There are more than one via field. This is because each element through which the INVITE request has passed has added its identity in the Via field. Three Via fields are added by softphone of user1, server1 the first proxy and server2 the second proxy. The response retraces the path of INVITE using the Via fields. On its way back, each element removes the corresponding Via field before forwarding it back to the caller.
  • To:
    Note that the To field now contains a tag. This tag is used to represent the callee in a dialog.
  • Contact:
    It contains the exact address of user2. So user1 doesn't need to use the proxy servers to find user2 in the future.

It is a 2xx response. However responses can be differnet depending on particular situations. Learn about the different types of SIP responses.

 

Go to Previous Go to Next


If you have any suggestion, correction, query just mail to koushik.banerjeeATgmail.com
© 2005-2018 K.Banerjee
Last updated: March 1st, 2018