SIP MessagesCommunication using SIP (often called signaling) comprises of series of messages. Messages can be transported independently by the network. Usually they are transported in a separate UDP datagram each. Each message consist of "first line", message header, and message body. The first line identifies type of the message. There are two types of messages--requests and responses. Requests are usually used to initiate some action or inform recipient of the request of something. Replies are used to confirm that a request was received and processed and contain the status of the processing. A typical SIP request looks like this: INVITE sip:7170@iptel.org SIP/2.0The first line tells us that this is INVITE message which is used to establish a session. The URIi on the first line--sip:7170@iptel.org is called Reques-URI and contains URI of the next hop of the message. In this case it will be host and port 5060. From and To header fields identify initiator (caller) and recipient (callee) of the invitation (just like in SMTPi where they identify sender and recipient of a message). From header field contains a tag parameter which serves as a dialogi identifier and will be described in section dialogs. Call-ID header field is a dialog identifier and it's purpose is to identify messages belonging to the same call. Such messages have the same Call-ID identifier. CSeq is used to maintain order of requests. Because requests can be sent over an unreliable transport that can re-order messages, a sequence number must be present in the messages so that recipient can identify retransmissionsi and out of order requests. Contact header field contains IP address and port on which the sender is awaiting further requests sent by callee. Other header fields are not important and will be not described here. Message header is delimited from message body by an empty line. Message body of the INVITE request contains a description of the media type accepted by the sender and encoded in SDPi. |
Navigation |