Peers is a minimalist SIP User-Agent. Ok, what does it mean ? What is SIP ? Well, this is what this page is about.
SIP
IETF
SIP AND FRIENDS
SIP INTERNALS (Overview)
NETWORK
SIP stands for Session Initiation Protocol. I won't try to give you a long training about what SIP is, but I want to give you the way I understand it.
To me, SIP is a protocol that enables its user to create, update and close sessions between peers. Those sessions are abstract, it means that any operation can be done between the two involved peers. A session is a sort of relationship. This is the theory. In day-to-day life, SIP cannot be used for everything, because standards lacks. SIP is still a young protocol and standards have not been written on every feature that could be implemented using SIP. For the moment, SIP can create sessions for telephone calls, eventually with a video stream. You can also send simple text messages, like SMS (Short Message Service), but that's all.
SIP is defined by IETF (Internet Engineering Task Force), I like to demystify all those acronyms. It is an organization that provides standards for Internet. Thus, many students, developers and companies can implement a program that complies with those standards. Those standards all have a RFCxxx reference, for example RFC3261 is the SIP RFC. RFC stands for Request For Comments. Actually, RFC3261 only defines the basic SIP notions. On this site, RFC3261 will sometime be referred to as the RFC. Many RFCs have been added later about SIP. There are extensions that generally strives to add new features to SIP. Remember that you can find any RFC on IETF web site with the following format:
http://www.ietf.org/rfc/rfc3261.txt
This is the best documentation about SIP. Of course, it is the specification!
SIP alone is nice... but useless! In fact, some protocols have been associated with it to provide telecom-like services: SDP and RTP. SDP is Session Description Protocol (RFC4566) and RTP stands for Realtime Transport Protocol (RFC3550). SDP is employed to describe the media session that is to be created between peers. RTP is then used to transmit the media packets on the network, RTP is often use over UDP (User Datagram Protocol). It is very important to understand the role of each protocol:
Well, this was the big picture. Now, let's see what SIP really is.
First, SIP is a text-based protocol, it may seem obvious, but sometimes it better to start with simple notions... An other point, SIP has many features taken from HTTP (RFC2616, HyperText Transfert Protcol).
SIP messages are dived in two categories: requests and responses. All SIP message fall in one of those categories.
Requests start with a simple word (a method) and a URI (RFC3986, Unified Resource Identifier). Here is an example: INVITE sip:alice@atlanta.com [...] There are other methods, here are the most important ones:
We will not dive into each one (this is the RFC role) but, please note that INVITE is employed to create a session and BYE is used to terminate a session.
Responses start with a 3-digits number, this is the response code. Here are the main ranges of response codes:
Remember HTTP ? So, that is quite easy.
The RFC defines three basic definitions that must be understood by any SIP developer:
A transaction is: a transaction is a request and its responses. Right, a request can have several responses. A dialog is a peer-to-peer relationship between two IP (Internet Protocol) connection points. Easy, taken from the RFC... the dialog is the abstract relationship with your peer. That is the reason why it is sometimes called a session, but it must not be confused with a multimedia session (or media session). The media session is the set of multimedia streams that travel on the network, transporting sound or video packets.
Still a cup of theory... that's almost the end.
SIP defines several nodes on a network. Some nodes correspond to a software installed on SIP users' computer, some nodes correspond to a stack installed on servers not, at user's home. The software that is used by SIP users is a User-Agent. Do you remember that SIP is a peer-to-peer protocol ? Yes, so that's the reason why this User-Agent is split in two roles: a UAS (User-Agent Server) and a UAC (User-Agent Client). The UAC will enable the user to call anyone, and the UAS will enable the user to be called by its friends.
Now you see what Peers is.
Each user on a SIP network has a SIP URI (sip:alice@atlanta.com for example...). And to associate the SIP URI with the IP address of the SIP user, there is a special server called REGISTRAR. That's where the REGISTER method is used. The SIP User-Agent sends a REGISTER to its REGISTRAR to indicate its IP address. Actually, this is a bit more complicated, but this page is just here to give you an overview of SIP. For more information about SIP, refer to its specification: http://www.ietf.org/rfc/rfc3261.txt