SIP

The SIP (Session Initiation Protocol) is a text-based protocol, similar to the HTTP and SMTP, designed for initiating, maintaining and terminating of interactive communication sessions between users. Such sessions include voice, video, chat, interactive games, and virtual reality. The SIP defines and uses the following components: • • • • • • UAC (User agent client) – client in the terminal that initiates SIP signalling UAS (User agent server) – server in the terminal that responds to the SIP signalling from the UAC UA (User Agent) – SIP network terminal (SIP telephones, or gateway to other networks), contains UAC and UAS Proxy server – receives connection requests from the UA and transfers them to another proxy server if the particular station is not in its administration Redirect server – receives connection requests and sends them back to the requester including destination data instead of sending them to the calling party Location Server – receives registration requests from the UA and updates the terminal database with them.

All server sections (Proxy, Redirect, Location) are typically available on a single physical machine called proxy server, which is responsible for client database maintenance, connection establishing, maintenance and termination, and call directing. Basic messages sent in the SIP environment • • • • • • INVITE – connection establishing request ACK – acknowledgement of INVITE by the final message receiver BYE – connection termination CANCEL – termination of non-established connection REGISTER – UA registration in SIP proxy OPTIONS – inquiry of server options

Answers to SIP messages are in the digital format like in the http protocol. Here are the most important ones: • • • • • • 1XX – information messages (100 – trying, 180 – ringing, 183 – progress) 2XX – successful request completion (200 – OK) 3XX – call forwarding, the inquiry should be directed elsewhere (302 – temporarily moved, 305 – use proxy) 4XX – error (403 – forbidden) 5XX – server error (500 – Server Internal Error, 501 – not implemented) 6XX – global failure (606 – Not Acceptable)

The above shows a SIP call setup from Alice to Bob via proxy. The SIP phones of Alice and Bob belong to the same enterprise, which is company.com. Both of their SIP IP phones are registered with the proxy server in the company.com domain. 1. The UA of Alice sends an INVITE with Request-URI sip:bob@company.com to the proxy server. The INVITE request has a unique Call-ID header and a From-Tag. The Contact header in the INVITE request has the address of the UA of Alice. 2. The proxy server accepts the INVITE and sends a 100 Trying back to the UA of Alice. 3. The proxy server looks up the location server database, gets the UA address of Bob, and forwards the INVITE to the user agent of Bob. 4. The phone that Bob has accepts the incoming INVITE request and sends back 100 Trying to the proxy. 5. The user agent of Bob starts ringing to alert the user about the incoming call. The UA of Bob sends 180 Ringing to the proxy to indicate the ringing state. 6. The proxy forwards the 180 ringing to the UA of Alice. After the UA of Alice gets a 180, it starts playing a ringback tone to Alice. 7. Bob answers the call. The UA of Bob sends 200 OK to the proxy. The To header in 200 OK has a To-Tag that the UA of Bob generated. 200 OK has a Contact header that specifies the address of the UA of Bob. 8. The proxy forwards the 200 OK to the UA of Alice. 9. The UA of Alice acknowledges the 200 OK and sends an ACK directly to the UA of Bob. An ACK is sent to the UA of Bob based on the Contact header that is received in the 200 OK response. The proxy did not insert a RecordRoute header in the INVITE message, so subsequent messages in this dialog will not be routed via the proxy. At this time, the SIP dialog is established. The dialog identifiers are Call-ID, From-Tag, and To-Tag. 10. Alice and Bob are conversing. Audio packets are sent directly between the phones using RTP over UDP. 11. Bob disconnects the call. His UA sends a BYE request directly to the UA of Alice using the Contact header received in the initial INVITE message. The flow of audio packets between the two phones is stopped. 12. The UA of Alice acknowledges the BYE transaction by sending 200 OK. Her phones also initiate call disconnection. The call is now terminated.

Sign up to vote on this title
UsefulNot useful