Session
Initiation Protocol (SIP) is an Application-layer signaling protocol
for creating, modifying, and terminating sessions with one or more
participants.
Given the importance of SIP
in the Exchange Server 2010 unified messaging system, it is important to
understand the protocol in some detail. This assists in troubleshooting
integration problems between the Unified Messaging server and the
IP/VoIP gateway, which is a frequent source of problems.
SIP Terminology
SIP uses specific terminology to define the elements and devices in a SIP call. Table 1 lists the various SIP terms and definitions.
Table 1. SIP Terminology
Term | Description |
---|
Methods | SIP commands and messages. |
Result codes | Responses to SIP methods indicating success, failure, or other information. |
User Agent | Endpoint devices that can issue or respond to SIP protocol methods (such as the UM server or IP gateway). |
User Agent Client | Devices such as phones or PDAs. |
Server | An application that can accept or respond to SIP methods (for example a UM server). |
Gateway | A gateway that can convert SIP methods and result codes to another protocol (for example an IP gateway). |
Proxy server | A server that can make requests on behalf of other clients. |
SIP Methods
SIP uses a number of commands or methods within the protocol. Table 2 lists the methods that SIP uses.
Table 2. SIP Methods
Method | Description |
---|
REGISTER | Registers a user with a registrar. |
INVITE | Session setup request or media negotiation. Used also to hold and retrieve calls. |
CANCEL | Used to cancel an in-progress transaction. |
ACK | Acknowledgement for an INVITE transaction. |
BYE | Terminates a session. |
OPTIONS | Used for the remote device status and capabilities. |
INFO | Used for mid-call signaling information exchange. |
SUBSCRIBE | Request notification of call events. |
NOTIFY | Event notification after a subscription. |
REFER | Call transfer request. |
This table can be useful when doing a protocol trace of a SIP session to determine what the session is doing.
SIP Response Codes
SIP uses a number of response codes, both informational and error related. Table 3 lists the response codes that SIP uses.
Table 3. SIP Response Codes
Response Code | Description |
---|
100 | Trying |
180 | Ringing |
181 | Call is being forwarded |
182 | Call is being queued |
183 | Session progress |
200 | OK |
302 | Moved temporarily, forward call to a given contact |
305 | Use proxy: repeat same call setup using a given proxy |
400 | Bad Request |
401 | Unauthorized Request |
404 | Not Found |
408 | Request Timeout |
486 | Busy |
5xx | Server Failure |
6xx | Global Failure |
Basic Call Example
The SIP protocol is used
to set up calls between and then hands the communication over to the RTP
protocol. A basic call sequence for a SIP call setup and teardown in
unified messaging looks like the example in Table 4.
Table 4. Basic SIP Call Example
IP Gateway | Direction | UM Server |
---|
INVITE | ——> | |
| <—— | 180 Ringing |
| <—— | 200 OK |
ACK | ——> | |
RTP | <——> | RTP |
| <—— | BYE |
200 OK | ——> | |
Notice that after the
IP Gateway sends a SIP ACK method back to the Unified Messaging server,
the call is handed off to the RTP protocol. After the call is complete,
the Unified Messaging server sends a SIP BYE method to terminate the
communication.