/weblog/describing-voip-session-initiation-protocol
Wednesday, June 18, 2008
At this time, Session Initiation Protocol (SIP) is probably the most commonly used VoIP signalling protocol. SIP is responsible for the set-up, tear-down, or to modify connections in which Real Time Protocol (RTP) can transfer the audio or video data. It is important to understand this distinction as SIP is not your voice communication; SIP is means for systems to understand how your devices (phones, servers, PBX') handle your communications.
SIP is a lightweight protocol and is similar in many ways to HTTP (Hyper-Text Transport Protocol). Like HTTP, SIP is completely text-based. This makes debugging easy and reduces the complexity of the protocol. To illustrate SIP's simplicity, let's use HTTP "conversation" as an example.
While browsing to this webpage, several things happened between your web browser and the Advantia web server. First, your computer performed a DNS (Domain Name Service) look-up of "advantia.ca". This returned the IP address of the Advantia Web server. With this IP address, your computer understood where to go on the internet to contact the Advantia Web server. Your browser then made a TCP connection on port 80 to the web server and once the connection was established, your browser sent a "GET" request for the "/weblog/how-sip-works" file. The server responded with a "200 OK" and sent the HTML to your browser.
However, let's assume for a moment that the file doesn't exist. In that case, the server would have sent to your browser a "404 Not Found" Message. Another situation may be that I decided to move the "/weblog/how-sip-works" to another location. In that case, the web server could have responded with a "301 Moved Permanently" and information about where your browser show look for the file's new location.
The 200, 404, and 301 are known as "status codes" in the HTTP world. This HTTP example is a very basic breakdown, but this is how SIP communication works. When you call someone via SIP, the commands sent are known as "SIP Methods". These SIP methods are similar to the HTTP "GET" command your browser sent to this web server. HTTP Status Codes and SIP Methods are both found in the header portion of the communication. The difference is that HTTP sends the data (html, text, image data, etc.) in the message body and then closes the TCP connection but moving digitized voice (or video) requires that a continuous stream of data. The information communicated by SIP endpoints describes how a second, transport protocol (RTP) is to be used to stream the conversation between humans.
Interested in learning how a SIP enabled telephone system can benefit your business? Please feel free to contact me anytime.
| INVITE | Invite a person to a call. |
| ACK | Acknowledgment. These are used in conjunction with INVITE messages. |
| BYE | Terminates a request. |
| CANCEL | Requests information about the remote server. |
| OPTIONS | For example, "what codecs do you support?" |
| REGISTER | This is typically used if your connection is DHCP or dynamic. |
| INFO | This gives information about the current call. It can also be used to transmit other information (Images, for example). |
| 100 | Trying |
| 180 | Ringing |
| 181 | Call is being forwarded |
| 182 | Queued |
| 183 | Session in progress |
| 200 | OK |
| 202 | Accepted: Used for referrals |
| 300 | Multiple choices |
| 301 | Moved permanently |
| 302 | Moved temporarily |
| 305 | Use proxy |
| 380 | Alternate service |
| 400 | Bad request |
| 401 | Unauthorized (used only by registrars) |
| 402 | Payment required (reserved for future use) |
| 403 | Forbidden |
| 404 | Not found (User not found) |
| 405 | Method not allowed |
| 406 | Not acceptable |
| 407 | Proxy authentication required |
| 408 | Request time-out (could not find the user in time) |
| 410 | Gone (the user existed once, but is not available here any more) |
| 413 | Request entity too large |
| 414 | Request-URI too long |
| 415 | Unsupported media type |
| 416 | Unsupported URI scheme |
| 420 | Bad extension (Bad SIP protocol extension used) |
| 421 | Extension required |
| 423 | Interval too brief |
| 480 | Temporarily unavailable |
| 481 | Call/transaction does not exist |
| 482 | Loop detected |
| 483 | Too many hops |
| 484 | Address incomplete |
| 485 | Ambiguous |
| 486 | Busy here |
| 487 | Request terminated |
| 488 | Not acceptable here |
| 491 | Request pending |
| 493 | Indecipherable (could not decrypt S/MIME body part) |
| 500 | Server internal error |
| 501 | Not implemented (The SIP request method is not implemented here) |
| 502 | Bad gateway |
| 503 | Service unavailable |
| 504 | Server time-out |
| 505 | Version not supported (Does not support this version of SIP) |
| 513 | Message too large |
| 600 | Busy everywhere |
| 603 | Decline |
| 604 | Does not exist anywhere |
| 606 | Not acceptable |