Wednesday, 5 August 2009

SIP

SIP is a text-based, application-layer control signaling protocol that is used for setting up, modifying, and tearing down multimedia sessions between participants. It is defined in RFC 3261 (which obsoletes RFC 2543) and takes advantage of elements of HTTP, SMTP, and SDP.

In the process of setting up and tearing down sessions, SIP supports the capability to determine a user’s location and the user’s willingness to communicate, and ascertain appropriate media parameters. By default, SIP uses port 5060 for TCP/UDP and port 5061 for TLS over TCP.

Various elements contribute to SIP’s capability to establish, manage, and terminate sessions, and these include :



  • User agent (UA): This is an endpoint that can act as both a user agent client (UAC) and a user agent server (UAS). A UA could, for example, be a SIP IP phone.

  • UAC: This is a logical entity that initiates and sends requests, such as those specifying the INVITE method. The UAC is a logical role, so it lasts only for the duration of a SIP transaction. A transaction comprises all messages beginning with the initial request message and ending with the final response message.

  • UAS: This is an entity that responds to a SIP request by accepting, rejecting, or redirecting the request. The UAS role also lasts only for the duration of the transaction.

  • Redirect server: This is a (user agent) server that provides address translation and redirects clients to alternative destination addresses. It does this by sending 3xx responses to requests.

  • Proxy server: A SIP proxy server’s primary role is to provide routing, but it can also enforce policies, provide features, and authenticate and authorize users.

  • Registrar server: This allows users to register their current locations (this information is added to a location service). Registrar servers use the information to provide a lookup service that allows SIP UAs to be located.

  • Location service: This is created by a registrar server and is populated with bindings of address-of-record (AOR, a user’s “public” address) to contact addresses. The location service can be used by proxy or redirect servers to retrieve information relating to a called party’s possible locations.

  • Back-to-back user agent (B2BUA): This is an entity that receives requests but, to process them, has itself to generate requests. Because it both processes and generates requests, its functionality is a combination of that of a UAC and a UAS. Note that it differs from a proxy server in that it must participate in all requests corresponding to dialogs that it has set up. A dialog is a SIP peer-to-peer relationship between UAs that exists for some time.

  • Presence server: This is a physical device that is aware of the willingness and capability of tracked parties (presentities) to communicate across a set of devices, and distributes this information to interested parties (watchers). Information about a tracked party’s willingness and capability to communicate is known as presence information.

There are two SIP message types



  • Request: This is a message sent by a client to a server that is used to invoke certain operations or functions.

  • Response: This is a message sent by a server to a client that indicates the status of the request received from the client.

As already mentioned, request messages can invoke certain functions on a server. These functions are known as methods. A method is specified in a request message sent by a client to a server, and they include



  • INVITE: When a UAC wants to initiate a session, it sends an INVITE request to a server. When this arrives at a UAS (it may be forwarded by proxies), the UAS processes it and sends an appropriate type of response message .

  • ACK: This message is sent in reply to a final response message from a server.

  • BYE: Used to terminate a session.

  • CANCEL: A CANCEL request is used to terminate a pending request (a request for which a final response has not yet been received). When a caller’s UA (UAC) wishes to hang up when there has not yet been a final response to an INVITE, the session will still be pending, so a CANCEL will be sent. In this case, the CANCEL constitutes a request to stop ringing.

  • REGISTER: This message is used to register contact information. When a user wants to initiate a session with another user, SIP must locate the host at which the destination user is currently reachable. The location of the host is often determined by a proxy or redirect server because these servers will frequently receive requests that they are then responsible for forwarding to the destination user’s host.
    To locate the destination user host, the server consults a location service, the purpose of which is to provide address bindings. These address bindings consist of URI to user agent at which a user is currently located.
    Address bindings can be created using a process called registration. Registration entails sending REGISTER messages to an element called a registrar server. As previously mentioned, a registrar server is a front end for the location service that both reads and writes mappings based on REGISTER messages.

  • OPTIONS: A UA can query another UA or SIP server about its capabilities using an OPTIONS request. In this way, a client can find out capabilities such as supported methods, content types, codecs, and so on before, for example, sending an INVITE specifying required options.

  • INFO: This method is defined in RFC 2976 and can be used to carry session-related control information such as ISUP or ISDN signalling information.

    There are six different ranges of response:
    - 1XX: Responses in this range are provisional or informational.
    - 2XX: These indicate success
    - 3XX: These responses indicate redirection.
    - 4XX: These responses indicate client errors.
    - 5XX: These indicate server errors.
    - 6XX: These indicate global failures.

The following Figure illustrates a typical SIP session established via a proxy server.

No comments:

Post a Comment