A Report on Sip
Essay by review • February 19, 2011 • Research Paper • 1,612 Words (7 Pages) • 1,420 Views
A Virtual Whiteboard Application
Irfan Abid (05-0094), Usman Chaudhry (05-0104)
Abstract вЂ" This application allows two users (one being server, and other client) to connect to each other using SIP. After connection, server can start drawing basic shapes on drawing canvas in application and client side can view it. SIP is used so that users don’t need to know each other’s physical IP beforehand to start. Users must only know each other’s ID. Registrar server keeps track of ID’s and their associated IP addresses.
MOTIVATION
The authors have always been interested in computer graphics, so they decided to take the project related to graphics which would seem interesting to casual computer users. Drawings are fun, as well as useful for illustration purposes. There are certain situations where text messages are not suitable for conveying information. For example, a user looking at a bar graph can quickly get an overview of the situation at first sight. While same information if contained in text message would require the reader to spend some time reading it.
SIP seemed promising for connection and session related tasks because it allowed users to be able to connect with a unique ID regardless of their physical location. Users can log on from different machines with different IP addresses, with their registered user ID’s. For our purposes we are only using this very basic functionality of SIP, i.e. to keep track of IP addresses of different users as they log on.
RELATED WORK
Authors have worked on other protocols before, such as ARP, ICMP etc. However, this was their first time to work on an application layer protocol. Further, they had done projects related to simple graphics in C++ in OOP course.
PROBLEM STATEMENT
It is desired to be able to make an application, which allowed users to do some communication using graphics instead of boring text. It is also desired to use an existing simple graphics application and modify it to use for this purpose. It is also desired to provide users, the convenience of being location independent. They should be able to communicate from anywhere without having to explicitly type each other’s IP addresses to connect.
METHODOLOGY
To provide users the ability to be independent of their physical locations, we can assign each user a unique ID. When each user logs on, he gets himself registered with Registrar server. Registrar server saves user’s ID and its IP address for current session. When a user wants to connect to another user, he simply invites the user through the server. If invitation is accepted by the user then he sends an OK message along with his IP address. At this point both users know each other’s IP address, and they can start actual communication. If users log off, and log on from another location, then same events happens with different IP addresses.
After connection establishment, the server side (which is the user who is drawing) starts dragging shapes on canvas in window. The application maintains an elements array. As a new shape is created by the server, the shape is given a unique ID and added to the array. A message is also generated containing information about that shape. The application reads the shape information and performs necessary steps to make it ready to transmit. It converts integers to characters and inserts zeroes at start of each property if necessary. Zero padding is necessary to keep the message length constant for different values of x, y, width, height. After message preparation, the message is sent. The message contains following information:
1. Shape ID: It is one character long. It represents shape type which can be one of the following:
i. Line (ID : 1)
ii. Circle (ID : 2)
iii. Ellipse (ID : 3)
iv. Rectangle (ID : 4)
v. Rounded Rectangle (ID : 5)
2. Element ID: It is one character long. As each shape is created, it is assigned an element ID to check whether it already exists on receiver end, or it is a new shape. Two shapes cannot have same element ID.
3. X-location: It is 4 characters long. It represents X-location of shape.
4. YвЂ"location: It is 3 characters long. It represents Y-location of shape.
5. Width: it is 3 characters long. It represents width of shape.
6. Height: it is 4 characters long. It represents height of shape.
At receiver end, the message is received and the reverse conversion is performed. Information is again converted back to integers. Element ID is checked to see whether it is already present in elements array. If it is present, then receiver only resizes or moves corresponding shape. Otherwise, a new shape is created using shape ID, and it is assigned other properties accordingly.
FLOWCHARTS
Fig. 1. Flow Chart of Registrar Server. Registrar server maintains list of users’ ID’s and their corresponding IP addresses.
Fig. 2. Flow chart of User1. In our application User1 has the ability to draw. User1 is also referred in text as server.
Fig. 3. Flow chart of User2. In our application, User2 does not have ability to draw and acts as a spectator only. User2 is also referred in text as client.
SIP ENTITIES
Session Initialization Protocol (SIP) was designed by Internet Engineering Task Force (IETF). SIP is a signaling protocol, widely used for setting up and tearing down multimedia communication sessions. It works at application layer in TCP/IP model. It is limited to only the setup, modification and termination of sessions. It serves four major purposes:
• SIP allows for the establishment of user location (i.e. translating from a user's name to their current network address).
• SIP provides for feature negotiation so that all of the participants
...
...