Sip

Post on 23-Oct-2014

31 views 1 download

Tags:

Transcript of Sip

< Computer Engineering

Mobile SIP COMMUNICATOR Date: 24 March 2012

Mobile SIP (Session Initiation Protocol) Communicator

Group Members:-PRASAD PURNAYEJUGAL PORWALAJINKYA PHALKEMAHESH TEKADE

Seminar Guide:-Prof. M.V.Marathe

Mobile SIP (Session Initiation Protocol) Communicator

Agenda

Introduction to SIP(Session Initiation Protocol)

Components & Elements of Session Initiation Protocol

SIP Functioning

SIP Communicator –Mobile Version Implementation

Mobile SIP (Session Initiation Protocol) Communicator

>Traditionaltelephony

>Internet telephony

internet telephony

Mobile SIP (Session Initiation Protocol) Communicator

VoIP

H.323

• By ITU_T(International Telecommunication Union_ Telecommunication Standards)

• For Multimedia Application on telephony

H.323 drawbacks

• Requires significant work to scale the apps with protocol

• First Establish the connection and then negotiates the Capabilities and Features

Mobile SIP (Session Initiation Protocol) Communicator

HISTORY OF SIP

REUSE OF COMMON ELEMENTS

HTTP-

DNS -

SMTP-

404

SRV

MIME

“The Session Initiation Protocol (SIP) is an application-layer control (signaling) protocol for creating, modifying and terminating sessions with one or more participants.”

Can be used for voice, video, etc..

Follows on HTTP & SMTP

Mobile SIP (Session Initiation Protocol) Communicator

What is SIP

Application

Transport

Network

Physical/Data Link Ethernet

IP

TCP UDP

RTSP SIP

SDP codecs

RTP DNS(SRV)

Mobile SIP (Session Initiation Protocol) Communicator

WHERE IS SIP LOCATED?

H.323 Standard

Jabber (XMPP)

SCCP(Skinny Client Control Protocol By Cisco )

SIP (Session Initiation Protocol)

Inter-Asterisk Exchange Protocol by Asterisk (IAX2)

Mobile SIP (Session Initiation Protocol) Communicator

Some of the Protocols that Uses VoIP

SIP (Session Initiation Protocol)H.323 Standard

Mobile SIP (Session Initiation Protocol) Communicator

•Addressing mode- URI(Uniform Resource Indicators)

•Call establishment Methods.

•Network administration level.

•mobility

Jabber (XMPP)

XML (extensible markup language) based protocol.

Originally its scope was only instant messaging.

Uses RTP for data transmission

Adopted of XMPP by Google for use in its Google Talk service

Mobile SIP (Session Initiation Protocol) Communicator

SCCP(Skinny Client Control Protocol By Cisco )

protocol used by Cisco in its CallManager server and associated phone terminals.

It is a proprietary protocol so publicinformation is scarce.

Mobile SIP (Session Initiation Protocol) Communicator

Inter-Asterisk Exchange Protocol by Asterisk (IAX2)

IAX protocol is that it combines both signaling and voice data into the same data stream.

The best known VoIP related Free Software server is Asterisk.

Mobile SIP (Session Initiation Protocol) Communicator

Locating Users and Resolving Their SIP address To IP Address

Mobile SIP (Session Initiation Protocol) Communicator

SIP FEATURES

Manage the Setup And tear down the calls for ALL USERS IN THE SESSION

Mobile SIP (Session Initiation Protocol) Communicator

SIP FEATURES

Negotiation Capabilities among ALL SESSION PARTICIPANTS

Mobile SIP (Session Initiation Protocol) Communicator

SIP FEATURES

Changing Session parameters DURING THE CALL

Mobile SIP (Session Initiation Protocol) Communicator

SIP FEATURES

Introduction to SIP(Session Initiation Protocol)

Components & Elements of Session Initiation Protocol

SIP Functioning

SIP Communicator –Mobile Version Implementation

Mobile SIP (Session Initiation Protocol) Communicator

Introduction to SIP(Session Initiation Protocol)

Introduction to SIP(Session Initiation Protocol)

Components & Elements of Session Initiation Protocol

SIP Functioning

SIP Communicator –Mobile Version Implementation

Mobile SIP (Session Initiation Protocol) Communicator

User Agents(clients & Server)

Proxy Server

Registrar Redirect Server

SIP

Mobile SIP (Session Initiation Protocol) Communicator

SIP NETWORK ELEMENTS

User Agents (Clients & Server)

Proxy server

Registrar

Redirect server

NETWORK ELEMENTS

Mobile SIP (Session Initiation Protocol) Communicator

Mobile SIP (Session Initiation Protocol) Communicator

• SIP enabled device is called User Agent

• Takes direction or input from a user and acts as an agent on their be- half to set up and tear down media sessions with other user agents

• A UA should advertise its capabilities and features in any request it sends. This allows other UAs to learn them without having to make an explicit capabilities query

USER AGENTS

Mobile SIP (Session Initiation Protocol) Communicator

1)Presence Agent

• It authenticates a subscription request.

• If the authentication passes, it establishes a dialog and sends the notifications over that dialog.

CATEGORIES OF SIP USER AGENTS

Mobile SIP (Session Initiation Protocol) Communicator

2)Back to Back User Agent(B2BUA)

• Receives a SIP re- quest, then reformulates the request and sends it out as a new request.

• B2BUA device can be used to implement an anonymizer service in which two SIP UAs can communicate without either party learning the other party’s URI, IP address, or other information

• However it reduces reliability of SIP Sessions over Internet because it breaks end-to-end nature of an Internet protocol such as SIP

CATEGORIES OF SIP USER AGENTS

Mobile SIP (Session Initiation Protocol) Communicator

• SIP servers are applications that accept SIP requests and respond to them

• servers provide services and features to user agents, they must support both TCP and UDP for transport

SIP Servers

Mobile SIP (Session Initiation Protocol) Communicator1)Proxy Servers

A SIP proxy server receives a SIP request from a user agent or another proxy and acts on behalf of the user agent in forwarding or responding to the request

A proxy is not a B2BUA since it is only allowed to modify requests and responses according to strict rules set out in RFC 3261.

Some further sub types of Proxy Servers

a)Stateful Proxy Serverb)Stateless Proxy Server

Mobile SIP (Session Initiation Protocol) Communicator

2)Redirect ServersA redirect is a type of SIP Server that responds to, but

does not forward, requestsIt comes into picture when the callee is outside the

domain of caller.

Mobile SIP (Session Initiation Protocol) Communicator

Registrar Server

•A SIP registrar server was introduced in the example of Figure 3.3. A registrar server, also known as a registration server, accepts SIP REGISTER requests; all other requests receive a 501 Not Implemented response

• The contact information from the request is then made available to other SIP servers within the same admin- istrative domain, such as proxies and redirect servers

Mobile SIP (Session Initiation Protocol) Communicator

Star Point:FOR SECURED REGISTRATION OF THE USER,SIP USES SOME OF THE FOLLOWING PROTOCOLS:1)IPSec 2)TLS 3)DNSSec

Registrar Server

Mobile SIP (Session Initiation Protocol) Communicator

TCP

(Transmission Control Protocol)

RTP

(Real-time Transmission Protocol)

UDP

(User Datagram Protocol)

RTCP

(RTP Control Protocol)

SIP

SIP Components

RTP(Real-time Transport Protocol)

Mobile SIP (Session Initiation Protocol) Communicator

•Real-Time Transport Protocol was developed to enable the transport of real- time datagrams containing voice, video, or other information over IP.

• Both H.323 and SIP use RTP for media transport, making it the most common standard for Internet communications.

RTP(Real-time Transport Protocol)

Mobile SIP (Session Initiation Protocol) Communicator

RTP allows for the detection of some of the impairments introduced by an IP network, such as:

• Packet loss;• Variable transport delay;• Out of sequence packet arrival; • Asymmetric routing.

RTP(Real-time Transport Protocol)

Mobile SIP (Session Initiation Protocol) Communicator

How RTP fits into the common media processing steps?1. Coding.2. Packetization3. Transport.4. Depacketization.5. Buffering.6. Decoding.7. Playback.

RTP(Real-time Transport Protocol)

Mobile SIP (Session Initiation Protocol) Communicator

In terms of media quality, the two most important factors area)Packet Loss Rateb)End to End Latency

1) RTP media sessions are unidirectional—they define how media is sent from the media source to the media sink.

2) In order to avoid any third party from interrupting the session we use Secure RTP(SRTP)

RTCP(RTP Control Protocol)

Mobile SIP (Session Initiation Protocol) Communicator

It allows participants in an RTP session to send each other quality re- ports and statistics, and exchange some basic identity information.The five types of RTCP packets are shown as follows :1. SENDER REPORT(SR)2.RECEIVER REPORT(RR)3.SOURCE DESCRIPTION(SDES)4.BYE(BYE)5.APPLICATION SPECIFIC(APP)

RTCP(RTP Control Protocol)

Mobile SIP (Session Initiation Protocol) Communicator

The use of reports allows feedback on the quality of the connection including information such as:• Number of packets sent and received;• Number of packets lost;• Packet jitter.

1)Designed to scale for very large conferences2)RTCP Extended Reports

a).RTCP extended reports defines seven additional report blocks.They were defined due to limitation of the basic SR and RR.

b.)In addition, RTCP-XR defines a way to estimate actual voice call quality and exchange this information.

Introduction to SIP(Session Initiation Protocol)

Components & Elements of Session Initiation Protocol

SIP Functioning

SIP Communicator –Mobile Version Implementation

Mobile SIP (Session Initiation Protocol) Communicator

Request Response

Mobile SIP (Session Initiation Protocol) Communicator

INVITE

REGISTER

BYE

ACK

CANCEL

OPTIONS

SIP REQUEST MESSAGES

Mobile SIP (Session Initiation Protocol) Communicator

INVITE

used to establish media sessions between user agents.

Has a message body containing the media information of the caller.

Mobile SIP (Session Initiation Protocol) Communicator

Mandatory Header Fields in an INVITE

ViaToFromCall-IDCSeqContactMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

INVITE sip:Marconi@radio.org SIP/2.0Via: SIP/2.0/UDP lab.high-voltage.org:5060;branch=z9hG4bKfw19bMax-Forwards: 70To: G. Marconi <sip:Marconi@radio.org>From: Nikola Tesla <sip:n.tesla@high-voltage.org>;tag=76341Call-ID: j2qu348ek2328wsCSeq: 1 INVITESubject: About That Power Outage...Contact: <sip:n.tesla@lab.high-voltage.org>

Mobile SIP (Session Initiation Protocol) Communicator

REGISTER

The REGISTER method is used by a UA to notify a SIP network of its currentContactA REGISTER request may contain a message body, although its use is not defi ned in the standard.

Mobile SIP (Session Initiation Protocol) Communicator

Mandatory Header Fields in a REGISTER

ViaToFromCall-IDCseqMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

REGISTER sip:registrar.athens.gr SIP/2.0Via: SIP/2.0/UDP 01.202.203.204:5060;branch=z9hG4bK313Max-Forwards:70To: sip:euclid@athens.grFrom: <sip:secretary@academy.athens.gr>;tag=543131Call-ID: 48erl8132409wqerCSeq: 1 REGISTERContact: sip:euclid@parthenon.athens.grContact: mailto:euclid@geometry.orgContent-Length: 0

Mobile SIP (Session Initiation Protocol) Communicator

BYE

The BYE method is used to terminate an established media session. A BYE is sent only by UAs participating in the session, never by proxies or other third parties.A BYE cannot be used to cancel pending INVITEs because it will not be forked like an INVITE and may not reach the same set of UAs as the INVITE.

Mobile SIP (Session Initiation Protocol) Communicator

Mandatory Header Fields in BYE

ViaToFromCall-IDCseqMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

BYE sip:info@hypotenuse.org SIP/2.0Via: SIP/2.0/TCPport443.hotmail.com:54212;branch=z9hG4bK312bcMax-Forwards:70To: <sip:info@hypotenuse.org>;tag=63124From: <sip:pythag42@hotmail.com>;tag=9341123Call-ID: 34283291273CSeq: 47 BYEContent-Length: 0

Mobile SIP (Session Initiation Protocol) Communicator

ACK

The ACK method is used to acknowledge final responses to INVITE requests.Final responses to all other requests are never acknowledged.

Mobile SIP (Session Initiation Protocol) Communicator

Mandatory Header Fields in an ACK

ViaToFromCall-IDCseqMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

ACK sip:laplace@mathematica.org SIP/2.0Via: SIP/2.0/TCP 128.5.2.1:5060;branch=z9hG4bK1834Max-Forwards:70To: Marquis de Laplace <sip:laplace@mathematica.org>;tag=90210From: Nathaniel Bowditch <sip:n.bowditch@salem.ma.us>;tag=887865Call-ID: 152-45-32-N-32-23-47-W

Mobile SIP (Session Initiation Protocol) Communicator

CANCEL

used to terminate pending INVITEs or call attemptsCan be generated by both User Agents Or Proxy Servers

Mobile SIP (Session Initiation Protocol) Communicator

Mandatory Header Fields in CANCEL

ViaToFromCall-IDCseqMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

CANCEL sip:i.newton@cambridge.edu.gb SIP/2.0Via: SIP/2.0/UDP 10.downing.gb:5060;branch=z9hG4bK3134134Max-Forwards:70To: Isaac Newton <sip:i.newton@cambridge.edu.gb>From: Rene Descartes <sip:visitor@10.downing.gb>;tag=034323Call-ID: 23d8e0e4e2e505329299e288bbd4155aCSeq: 32156 CANCELContent-Length: 0

Mobile SIP (Session Initiation Protocol) Communicator

OPTIONS

The OPTIONS method is used to query a user agent or server about its capabilities and discover its current availability.May Not contain Message body

Mobile SIP (Session Initiation Protocol) Communicator

Mandatory Header Fields in an OPTION

ViaToFromCall-IDCseqMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

OPTIONS sip:user@carrier.com SIP/2.0Via: SIP/2.0/UDP cavendish.kings.cambridge.edu.uk;branch=z9hG4bK1834Max-Forwards:70To: <sip:wiliamhopkins@cam.ac.uk>From: J.C. Maxwell <sip:james.maxwell@kings.cambridge.edu.uk>;tag=34Call-ID: 747469e729acd305CSeq: 29 OPTIONSContent-Length: 0

Mobile SIP (Session Initiation Protocol) Communicator

1XX Provisional 100 Trying

2XX Successful 200 OK

3XX Redirection 302 Moved temporarily

4XX Client Error 404 Not Found

5XX Server Error 504 Server Time-out

6XX Global Failure 603 Decline

SIP RESPONSE MESSAGES

Mobile SIP (Session Initiation Protocol) Communicator

SIP Flows - Basic

ACK

200 - OK

INVITE: sip:18.18.2.4“Calls”

18.18.2.4

180 - Ringing Rings

200 - OK Answers

BYEHangs up

RTPTalking Talking

User A

User B

Mobile SIP (Session Initiation Protocol) Communicator

200 - OK

REGISTER: sip:dbaron@MIT.EDU

401 - Unauthorized

REGISTER: (add credentials)

Mobile SIP (Session Initiation Protocol) Communicator

Registrarclient

INVITE: sip:dbaron@MIT.EDU“Calls” dbaron

@MIT.EDUINVITE: sip:dbaron@18.18.2.4

180 - Ringing

Rings180 - Ringing

200 - OK Answers

200 - OK

ACK

BYEHangs up

200 - OK

User A

User B

MIT.E

Proxy

Talking TalkingRTP

Mobile SIP (Session Initiation Protocol) Communicator

INVITE sip:werner.heisenberg@munich.de SIP/2.0Via: SIP/2.0/UDP 100.101.102.103:5060;branch=z9hG4bKmp17aMax-Forwards: 70To: Heisenberg <sip:werner.heisenberg@munich.de>From: E. Schroedinger <sip:schroed5244@wave.org>;tag=42

INVITE sip:werner.heisenberg@200.201.202.203Via: SIP/2.0/UDP proxy.munich.de:5060;branch=z9hG4bK83842.1Via: SIP/2.0/UDP 100.101.102.103:5060;branch=z9hG4bKmp17aMax-Forwards: 69To: Heisenberg <sip:werner.heisenberg@munich.de>From: E. Schroedinger <sip:schroed5244@wave.org>;tag=42

INVITE: sip:joe@MIT.EDU“Calls” joe @MIT.EDU

INVITE: sip:38400@18.162.0.25

100 - Trying

ACKACK

User A MIT.EDU

Proxy

30161Gateway

180 - Ringing

180 - Ringing

Rings

200 - OK

200 - OK

Answers

BYEHangs up

BYE

200 - OK

200 - OK

Talking TalkingRTP

Mobile SIP (Session Initiation Protocol) Communicator

Mobile SIP (Session Initiation Protocol) Communicator

Introduction to SIP(Session Initiation Protocol)

Components & Elements of Session Initiation Protocol

SIP Functioning

SIP Communicator –Mobile Version Implementation

Idea of Mobile Implementation

Platform of working J2ME (on ANDROID)

Requirement Specification in terms of Network Service provider

Different Modules used in application

Stepwise Working of communicator

Feasibility of the Project

Mobile SIP (Session Initiation Protocol) Communicator

Mobile SIP (Session Initiation Protocol) Communicator

Classes

SipAudioCall

SipAudioCall.Listener

SipErrorCode

SipManager

SipProfile

SipProfile.Builder

SipSession

SipSession.Listener

SipSession.State

SipRegistrationListener

Mobile SIP (Session Initiation Protocol) Communicator

Classes used

SIP MANAGER

• register()• unregister()• isRegistered() • isVoipSupported()• makeAudioCall()• makeVideoCall()• newInstance()• open()• takeAudioCall()• takeVideoCall()

Mobile SIP (Session Initiation Protocol) Communicator

PROFILE BUILDER

Classes used

•setAuthUserName()•setAutoRegistration()•setDisplayName()•setPassword()•setPort()•setProfileName()•setProtocol()

Mobile SIP (Session Initiation Protocol) Communicator

PEER PROFILE

Classes used

•getAuthUserName()•getDisplayName()•getPassword()•getSipDomain()•getPort()•getProfileName()•getProtocol()•getProxyAddress()•getSipDomain()

Mobile SIP (Session Initiation Protocol) Communicator

AUDIO CALL

Classes used

•getLocalProfile()•getPeerProfile()•answerCall()•attachCall()•holdCall()•continueCall()•endCall()•startAudio()•toggleMute()

Mobile SIP (Session Initiation Protocol) Communicator

AUDIO Call Listener

Classes used

•onCallBusy()•onCallEnded()•onCallEstablished()•onCallHeld()•onCalling()•onChanged()•onError()•onReadyToCall()•onRinging()•onRingingBack()

Mobile SIP (Session Initiation Protocol) Communicator

ERROR CODE

Classes used

•CROSS_DOMAIN_AUTHENTICATION()•DATA_CONNECTION_LOST()•INVALID_CREDENTIALS()•INVALID_REMOTE_URI()•IN_PROGRESS()•NO_ERROR()

•PEER_NOT_REACHABLE()•SERVER_ERROR()•SERVER_UNREACHABLE()•SOCKET_ERROR()•TIME_OUT()•TRANSACTION_TERMINATED()

Mobile SIP (Session Initiation Protocol) Communicator

SESSION

Classes used

•answerCall()•changeCall()•endCall()•getCallId()•getLocalIp()•getLocalProfile()•getPeerProfile()

•getState()•isInCall()•makeCall()•Register()•setListener()•Unregister()

Mobile SIP (Session Initiation Protocol) Communicator

SESSION STATE

Classes used

•REGISTERING()•INCOMING_CALL()•INCOMING_CALL_ANSWERING()•IN_CALL()•NOT_DEFINED()•OUTGOING_CALL()•OUTGOING_CALL_CANCELING()•OUTGOING_CALL_RING_BACK()•DEREGISTERING()

Register to SIP server

Profile Exists

Request For New Session

Ask For Peer Profile

Establish Connection

Session Initiated

End Session

YES

Create New Profile

NO

Manager

Register()

isRegistered()

newInstance()

Register to SIP server

Profile Exists

Request For New Session

Ask For Peer Profile

Establish Connection

Session Initiated

End Session

YES

Create New Profile

NO

Profile Builder

setAutoRegistration()

setDisplayName()

setPassword()

setPort()

setProfileName()

setProtocol()

Register to SIP server

Profile Exists

Request For New Session

Ask For Peer Profile

Establish Connection

Session Initiated

End Session

YES

Create New Profile

NO

Session

getCallId

getLocalIp

getLocalProfile

changeCall

Register to SIP server

Profile Exists

Request For New Session

Ask For Peer Profile

Establish Connection

Session Initiated

End Session

YES

Create New Profile

NO

Profile

getAuthUserName()

getDisplayName()

getPassword()

getPort()

getProfileName()

getProtocol()

getProxyAddress()

getSipDomain()

Register to SIP server

Profile Exists

Request For New Session

Ask For Peer Profile

Establish Connection

Session Initiated

End Session

YES

Create New Profile

NO

AudioanswerCall()

attachCall()

close()

continueCall()

endCall()

holdCall()

isInCall()

isMuted()

isOnHold()

makeCall()

setSpeakerMode()

startAudio()

toggleMute

Register to SIP server

Profile Exists

Request For New Session

Ask For Peer Profile

Establish Connection

Session Initiated

End Session

YES

Create New Profile

NO

Manager

Unregister()

Close()

Mobile SIP (Session Initiation Protocol) Communicator

Advantages

Enables Data and Voice convergence

Mobility

Enhanced audio quality

Integrated Presence

Simplicity & Extensibility

Can run over reliable & unreliable transport protocols

Mobile SIP (Session Initiation Protocol) Communicator

Conclusion

1. SIP, though not used extensively in day to day life, is a evolving protocol. Which in future can revolutionalise the internet telephony system.

2. The rapid conversion to SIP is a strong step towards inter-operability.i.e various vendors will inter-operate for the better functioning.

3. Numerous application level features and capabilities are developed to advance mobility and productivity fot business and their end users.

4. SIP based communications deliver a suite of solutions that can significantly enhance users’ communication options and productivity.

Mobile SIP (Session Initiation Protocol) Communicator

References

1. H. Schulzrinne, “Re-engineering the telephone system,” Proc. of IEEE Singapore Intl. Conf. on Networks (SICON) 1997: The Next Millennium, Singapore, Apr. 14–17, 1997, pp. 261–275.2. H. Schulzrinne, S. Casner, R. Frederick, and V. Jacobson, “RTP: a transport protocol for real-time applications, Request for Comments (Proposed Standard) 1889,” IETF, Jan. 1996.3. B. Braden, L. Zhang, S. Berson, S. Herzog, and S. Jamin, “Resource ReSerVation protocol (RSVP)—version 1 functional specification, Request for Comments (Proposed Standard) 2205,” IETF, Oct. 1997.4. B. Braden and L. Zhang, “Resource ReSerVation protocol (RSVP) version 1 message processing rules, Request for Comments (Proposed Standard) 2209,” IETF, Oct. 1997.

Thank you !!