Top Banner
1 ECE355 Project VoIP SIP Applications Enhancements Tiuley Alguindigue Lab Instructor [email protected]
29

Project Setup Tutorial

Dec 05, 2014

Download

Documents

Catharine24

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Project Setup Tutorial

1

ECE355 ProjectVoIP SIP Applications

Enhancements

Tiuley Alguindigue

Lab Instructor

[email protected]

Page 2: Project Setup Tutorial

2

Overview

• Project description• SIP and SIP elements • SIP COMMUNICATOR (Sip Agent)• SIP PROXY (JAIN-SIP-PRESENCE-PROXY )• Project setup • Configuration files• Making a phone call• Version control and code sharing• Preparation Tasks• References

Page 3: Project Setup Tutorial

3

Introduction

You will implement additional features for SIP COMMUNICATOR and SIP PROXY.

Features will allow a user to specify :

• An address to forward calls to

• A list of blocked users

• Billing capabilities

Page 4: Project Setup Tutorial

4

Introduction

You will use the Java API for Integrated Networks Session Initiation protocol (JAIN-SIP) which is the full implementation of the SIP Protocol RFC 3261 standard by the National Institute of Standards and Technology (NIST).

https://jain-sip.dev.java.net/

The base projects for this course, SIP COMMUNICATOR and SIP PROXY implement VoIP using the JAIN-SIP libraries.

The source code for these two projects will be provided in the course web site.

Page 5: Project Setup Tutorial

5

Session Initiation Protocol (SIP)

An application-layer control (signalling) protocol for creating, modifying, and terminating sessions with one or more participants.

These sessions include Internet telephone calls, multimedia distribution, and multimedia conferences.

Participants in a SIP session agree on set of compatible media types.

Page 6: Project Setup Tutorial

6

SIP Support for Multimedia Communications

Five facets of establishing and terminating multimedia communications:

• User location• User availability• User capabilities• Session management

Page 7: Project Setup Tutorial

7

SIP Elements User Agents SIP allows Internet endpoints (called user agents) to discover one another and to agree on a characterization of a session they would like to share.

Proxy servers Help route requests to the user's current location, authenticate and authorize users for services, implement provider call-routing policies, and provide features to users.

Registration servers Allows users to upload their current locations for use by proxy servers.

Page 10: Project Setup Tutorial

10

SIP COMMUNICATOR• A software-based IP phone that runs on a PC audio/video.

• You can use SIP COMMUNICATOR to place VoIP phone calls between two PCs or between a PC and an IP Phone(such as the one in the E2-2363 Lab)

• A SIP User Agent in Java.– Can act as a client: creates a SIP request and sends it.– Also as a server: generates a response to a SIP request.

• Based on JAIN SIP libraries and JMFJAIN SIP Tutorial at http://snad.ncsl.nist.gov/proj/iptel/

• Project info at https://sip-communicator.dev.java.net/ and http://www.sip-communicator.org

• ECE355 project will be based in the Pre 1.0 version of SIP COMMUNICATOR.

Page 11: Project Setup Tutorial

11

SIP COMMUNICATOR

Page 12: Project Setup Tutorial

12

SIP PROXY

• Using the JAIN-SIP-PRESENCE-PROXYimplementation.

• SIP Proxy, SIP Registar, and SIP Presence server.

• Based on JAIN SIP libraries

• Project info at https://jain-sip.dev.java.net/

Page 13: Project Setup Tutorial

13

Project Setup• Project start code is distributed in tar file posted in course web site.

• The Development environment is Windows. You will need the Java 1.4.2 SDK or above.

• We recommend that you use Eclipse as your IDE

• We distribute the start code as an Eclipse workspace.

Page 14: Project Setup Tutorial

14

Project Setup• Eclipse 3.1 is available the NEXUS Windows labs

E2-2363 is the lab assigned to ECE355.

• Eclipse 3.2.1 can be downloaded from http://www.eclipse.org/downloads/index.php

• If you are using a different IDE you will need to specify run parameters for the applications and the Java VM.

The start code for the ECE355 can NOT be obtained from the official project site. New versions of SIP COMMUNICATOR and SIP PROXY are under development, and are not available yet.

We base this project in what is called their Pre 1.0 versions.

Page 15: Project Setup Tutorial

15

Project Setup1. Download from project course web page the tar file

2. Expand it using command: tar –xvf c:\ECE355ProjectStart.tarThe tar file is expanded to directory c:\ECE355

3. Open Eclipse and switch to workspacec:\ECE355\workspace

You will now see in your workspace two instances of SIP COMMUNICATOR and one of the SIP PROXY.

The second instance is used to start a second client in the same machine so we can demonstrate a phone call using only one machine.

Page 16: Project Setup Tutorial

16

SIP COMMUNICATOR Run Configuration

Page 17: Project Setup Tutorial

17

SIP PROXYRun Configuration

Page 18: Project Setup Tutorial

18

Making a Phone Call Ports used for SIP

SIP COM 1 SIP COM 2

SIP PROXY

5060 5060

4000

Page 19: Project Setup Tutorial

19

Making a Phone Call All ports

SIP COM 1 SIP COM 2

SIP PROXY

5060 5060

4000

22224(Audio)

22222(Video)

Page 20: Project Setup Tutorial

20

SIP COMMUNICATORConfiguration file

• SIP COMMUNICATOR reads execution parameters from sip-communicator.xml file

• Parameters in this file are currently set so that SIP COMMUNICATOR will use the SIP Services provided by SIP PROXY running locally (127.0.0.1).

<sip> <PUBLIC_ADDRESS value="talguind"/> <TRANSPORT value=""/> <REGISTRAR_ADDRESS value="127.0.0.1:4000"/> <USER_NAME value="tiuley"/> <STACK_PATH value="gov.nist"/> <PREFERRED_LOCAL_PORT value=""/> <DISPLAY_NAME value="Tiuley Alguindigue"/> <REGISTRAR_TRANSPORT value="UDP"/> <REGISTRATIONS_EXPIRATION value="3600"/> <REGISTRAR_PORT value="5060"/>

<DEFAULT_DOMAIN_NAME value="127.0.0.1:4000"/> <DEFAULT_AUTHENTICATION_REALM value="127.0.0.1:4000"/> <WAIT_UNREGISTGRATION_FOR value="1100"/> <SAME_USER_EVERYWHERE value="true"/> …..</sip>

JAIN-SIP-PRESENCE-PROXYIP Address and Port

SIP COMMUNICATOR Port

Page 21: Project Setup Tutorial

21

SIP COMMUNICATORConfiguration file

• Parameters in sip-communicator.xml file also indicate the ports used for audio/video communication

<sip>

<media>

<PREFERRED_AUDIO_ENCODING value="9"/> <PREFERRED_VIDEO_ENCODING value="26"/> <MEDIA_SOURCE value=""/> <MEDIA_BUFFER_LENGTH value="100"/> <IP_ADDRESS value=""/> <AUDIO_PORT value="22224"/> <VIDEO_PORT value="22222"/> </media> …..</sip>

Default Values areAUDIO 22224VIDEO 22222

Page 22: Project Setup Tutorial

22

• SIP PROXY uses reads parameters from configuration.xml file

• Parameters in this file are currently set so the SIP proxy runs in the same machine using Port 4000.

<CONFIGURATION> <SIP_STACK stack_name="nist-proxy"stack_IP_address="127.0.0.1"router_path="gov.nist.sip.proxy.router.ProxyRouter"<?xml version='1.0' encoding='us-ascii'?>max_connections="20"thread_pool_size="20" >

<LISTENING_POINT port="4000" transport="udp" /><LISTENING_POINT port="4000" transport="tcp" /><DOMAIN domain="there.com" /><DOMAIN domain="pingtel.com" /><DOMAIN domain="ubi.com" /><DOMAIN domain="hotmail.com" /><DOMAIN domain="nist.gov" /><DOMAIN domain="nitrogen.epact.se" /></SIP_STACK>

Local IP Address

Port 4000udp is used

SIP PROXYConfiguration file

Page 23: Project Setup Tutorial

23

Making a Phone Call

• For testing, you can run the two instances of SIP COMMUNICATOR in one machine. You will need to change the SIP port, Audio and Video ports in the sip-communicator.xml files for the second instance.

Page 24: Project Setup Tutorial

24

Version Control and Code Sharing CVS

• We provide CVS - Concurrent Versions System in the UNIX environment.

• We’ll create empty CVS repositories in each UNIX group account called sip-communicator.cvs.

• Use this repository for Version Control and Code Sharing when implementing new features.

• Eclipse provides an interface to CVS, documented in the eclipse on-line help.

Specify your group members through the Course Book System by the end of this week.

Page 25: Project Setup Tutorial

25

Eclipse interface to CVS.

• Create a new repository location

• Host is eceunix.uwaterloo.ca

• Repository path is/home/e355gNN/sip-communicator.cvs

NN : Group Number

• User ID, and Password for UNIX Accounts.

Page 26: Project Setup Tutorial

26

Eclipse interface to CVS. Create a new repository location

Page 27: Project Setup Tutorial

27

Preparation Tasks

• Install Java SDK and Eclipse• Install SIP COMUNICATOR and SIP PROXY • Make a successful phone call• Gain understanding of the software by :

– Examining console output ( include with first deliverable)– Using the Eclipse debugger– What are the main classes involved when making a phone call?– Explore the trace feature in the SIP proxy, as well as the output

found in file debug/server_log.txt

• Connect to your group CVS repository and check in your project start code.

Page 28: Project Setup Tutorial

28

References

• SIP COMMUNICATOR:

https://sip-communicator.dev.java.net/

• SIP PROXY:

https://jain-sip.dev.java.net/

• SIP Specification

http://rfc.net/rfc3261.html

• SIP Tutorial – Understanding SIP, iptel.org

http://www.iptel.org/files/siptutorial.pdf

• SIP with Java - Tutorial.

http://www.ece.uwaterloo.ca/~ece355/project/references/SIPWithJava.pdf

Page 29: Project Setup Tutorial

29

References

• JAIN SIP Tutorialhttp://snad.ncsl.nist.gov/proj/iptel/

• Eclipse:

http://www.eclipse.org/

• CVS - Concurrent Versions Systemhttp://www.nongnu.org/cvs/