OnlineTraining:Introduction to sip
From VTLabs.org
Contents |
Instruction to SIP
This document objective is to work as a guideline for anyone who wants to be introduced to VOIP, specifically SIP. It is not a document filled with SIP content, it is more a index of other documents and tools. It also try to highlight some important topics within them to save time and effort. After reading the documents, there is a Hands On section for those who want to test the concepts with sample applications.
On the first chapter we will get familiar with sip, its names, architecture, servers, etc. The second chapter talks about proxies and routing policies. The third.... well the third is about to be defined....
The idea here is to work together through the use of collaborative tools like forum and wiki to exchange doubts, knowledge, ideas, etc. So, question? suggestion? Please post them to our forum (you must be connected to our VPN) . If you like to contribute with this document please do it
Getting familiar with the protocol
Readings
Scope: slides 1 to 39 Objectives: understand the protocol architecture, know the provided services, get some historical background and see some voip pros and cons.
Scope: slides 49 to 68 Objectives: be introduced to the network elements (proxy, registrar, b2bua) and understand the role of each one of them, be familiar with message flows between endpoints and servers, know the difference between stateless and statefull proxy.
Scope: chapter 16 Objectives: get a superficial knowledge of proxy behavior, be introduced to proxy message routing, get more detailed information about stateless and statefull proxies.
Scope: chapter 17 Objectives: be familiar with sip server sip transactions (server transactions, client transaction), it's state machines and error handling mechanisms, know the difference between invite transactions and all other transactions.
Hands on
The application
For training purposes we will create a simple application at first moment and will add more complexities and capabilities as the knowledge grows. For the moment we have to configure a statefull proxy with registrar. This proxy must be able to register (without authentication) two user agents: Mr Caller and Mrs Callee, to find them (lookup by user agent name) and to route calls between them. The following diagram roughly depicts the scenarios:
+--------+ +-------+ +--------+
|sipp UAC| |Openser| |sipp UAS|
+---+----+ +---+---+ +---+----+
| register-> | |
|-----------------------| |
| | <-register |
| <-200 OK |--------------------|
|-----------------------| |
| | 200 OK-> |
| |--------------------|
| | |
| | .Registrar Lookup|
| INVITE-> | .' |
|-----------------------|' INVITE-> |
| |--------------------|
| | <-RINGING |
| <-RINGING |--------------------|
|-----------------------| |
| | <-200 OK |
| <-200 0K |--------------------|
|-----------------------| |
|<==================== RTP =================>|
Resources
- Sip proxy: http://www.openser.org
- Sniffer: http://www.wireshark.org
- SIP UA for testing purposes: http://sipp.sourceforge.net
Setup
- Following the steps 1 to 6 of http://www.openser.org/dokuwiki/doku.php/install:openser-from-svn should install openser with a default script.
- To install sipp just refer to http://sipp.sourceforge.net/doc/reference.html#Installation. We'll be using embedded UAC/UAS with RTP in our tests
- to capture sip packets one can use wireshark or tcpdump depending on the availability of wireshark on the proxy machine. To install wireshark refer to http://www.wireshark.org/docs/wsug_html_chunked/ChapterBuildInstall.html
System Architecture
It is required at least two different hosts, one running openser as proxy/registrar and another one to run sipp as UAC/UAS. One could do it all in a single host but it would be more dificult to read logs and captured data. The use of virtual machines can be the solution if there is not enough hosts avaliable. We strongly recommend the use of fedora core 5.
