Sip

83
< Computer Engineering Mobile SIP COMMUNICATOR Date: 24 March 2012

Transcript of Sip

Page 1: Sip

< Computer Engineering

Mobile SIP COMMUNICATOR Date: 24 March 2012

Page 2: Sip

Mobile SIP (Session Initiation Protocol) Communicator

Group Members:-PRASAD PURNAYEJUGAL PORWALAJINKYA PHALKEMAHESH TEKADE

Seminar Guide:-Prof. M.V.Marathe

Page 3: Sip

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

Page 4: Sip

Mobile SIP (Session Initiation Protocol) Communicator

>Traditionaltelephony

>Internet telephony

internet telephony

Page 5: Sip

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

Page 6: Sip

Mobile SIP (Session Initiation Protocol) Communicator

HISTORY OF SIP

REUSE OF COMMON ELEMENTS

HTTP-

DNS -

SMTP-

404

SRV

MIME

Page 7: Sip

“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

Page 8: 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?

Page 9: Sip

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

Page 10: Sip

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

Page 11: Sip

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

Page 12: Sip

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

Page 13: Sip

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

Page 14: Sip

Locating Users and Resolving Their SIP address To IP Address

Mobile SIP (Session Initiation Protocol) Communicator

SIP FEATURES

Page 15: Sip

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

Mobile SIP (Session Initiation Protocol) Communicator

SIP FEATURES

Page 16: Sip

Negotiation Capabilities among ALL SESSION PARTICIPANTS

Mobile SIP (Session Initiation Protocol) Communicator

SIP FEATURES

Page 17: Sip

Changing Session parameters DURING THE CALL

Mobile SIP (Session Initiation Protocol) Communicator

SIP FEATURES

Page 18: Sip

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)

Page 19: Sip

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

Page 20: Sip

User Agents(clients & Server)

Proxy Server

Registrar Redirect Server

SIP

Mobile SIP (Session Initiation Protocol) Communicator

SIP NETWORK ELEMENTS

Page 21: Sip

User Agents (Clients & Server)

Proxy server

Registrar

Redirect server

NETWORK ELEMENTS

Mobile SIP (Session Initiation Protocol) Communicator

Page 22: Sip

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

Page 23: Sip

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

Page 24: Sip

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

Page 25: Sip

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

Page 26: Sip

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

Page 27: Sip

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.

Page 28: Sip

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

Page 29: Sip

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

Page 30: Sip

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

Page 31: Sip

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.

Page 32: Sip

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.

Page 33: Sip

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.

Page 34: Sip

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)

Page 35: Sip

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)

Page 36: Sip

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.

Page 37: Sip

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

Page 38: Sip

Request Response

Mobile SIP (Session Initiation Protocol) Communicator

Page 39: Sip

INVITE

REGISTER

BYE

ACK

CANCEL

OPTIONS

SIP REQUEST MESSAGES

Mobile SIP (Session Initiation Protocol) Communicator

Page 40: Sip

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

Page 41: Sip

Mandatory Header Fields in an INVITE

ViaToFromCall-IDCSeqContactMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

Page 42: Sip

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

Mobile SIP (Session Initiation Protocol) Communicator

Page 43: Sip

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

Page 44: Sip

Mandatory Header Fields in a REGISTER

ViaToFromCall-IDCseqMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

Page 45: Sip

REGISTER sip:registrar.athens.gr SIP/2.0Via: SIP/2.0/UDP 01.202.203.204:5060;branch=z9hG4bK313Max-Forwards:70To: sip:[email protected]: <sip:[email protected]>;tag=543131Call-ID: 48erl8132409wqerCSeq: 1 REGISTERContact: sip:[email protected]: mailto:[email protected]: 0

Mobile SIP (Session Initiation Protocol) Communicator

Page 46: Sip

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

Page 47: Sip

Mandatory Header Fields in BYE

ViaToFromCall-IDCseqMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

Page 48: Sip

BYE sip:[email protected] SIP/2.0Via: SIP/2.0/TCPport443.hotmail.com:54212;branch=z9hG4bK312bcMax-Forwards:70To: <sip:[email protected]>;tag=63124From: <sip:[email protected]>;tag=9341123Call-ID: 34283291273CSeq: 47 BYEContent-Length: 0

Mobile SIP (Session Initiation Protocol) Communicator

Page 49: Sip

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

Page 50: Sip

Mandatory Header Fields in an ACK

ViaToFromCall-IDCseqMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

Page 51: Sip

ACK sip:[email protected] SIP/2.0Via: SIP/2.0/TCP 128.5.2.1:5060;branch=z9hG4bK1834Max-Forwards:70To: Marquis de Laplace <sip:[email protected]>;tag=90210From: Nathaniel Bowditch <sip:[email protected]>;tag=887865Call-ID: 152-45-32-N-32-23-47-W

Mobile SIP (Session Initiation Protocol) Communicator

Page 52: Sip

CANCEL

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

Mobile SIP (Session Initiation Protocol) Communicator

Page 53: Sip

Mandatory Header Fields in CANCEL

ViaToFromCall-IDCseqMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

Page 54: Sip

CANCEL sip:[email protected] SIP/2.0Via: SIP/2.0/UDP 10.downing.gb:5060;branch=z9hG4bK3134134Max-Forwards:70To: Isaac Newton <sip:[email protected]>From: Rene Descartes <sip:[email protected]>;tag=034323Call-ID: 23d8e0e4e2e505329299e288bbd4155aCSeq: 32156 CANCELContent-Length: 0

Mobile SIP (Session Initiation Protocol) Communicator

Page 55: Sip

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

Page 56: Sip

Mandatory Header Fields in an OPTION

ViaToFromCall-IDCseqMax-Forwards

Mobile SIP (Session Initiation Protocol) Communicator

Page 57: Sip

OPTIONS sip:[email protected] SIP/2.0Via: SIP/2.0/UDP cavendish.kings.cambridge.edu.uk;branch=z9hG4bK1834Max-Forwards:70To: <sip:[email protected]>From: J.C. Maxwell <sip:[email protected]>;tag=34Call-ID: 747469e729acd305CSeq: 29 OPTIONSContent-Length: 0

Mobile SIP (Session Initiation Protocol) Communicator

Page 58: Sip

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

Page 59: Sip

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

Page 60: Sip

200 - OK

REGISTER: sip:[email protected]

401 - Unauthorized

REGISTER: (add credentials)

Mobile SIP (Session Initiation Protocol) Communicator

Registrarclient

Page 61: Sip

INVITE: sip:[email protected]“Calls” dbaron

@MIT.EDUINVITE: sip:[email protected]

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:[email protected] SIP/2.0Via: SIP/2.0/UDP 100.101.102.103:5060;branch=z9hG4bKmp17aMax-Forwards: 70To: Heisenberg <sip:[email protected]>From: E. Schroedinger <sip:[email protected]>;tag=42

INVITE sip:[email protected]: 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:[email protected]>From: E. Schroedinger <sip:[email protected]>;tag=42

Page 62: Sip

INVITE: sip:[email protected]“Calls” joe @MIT.EDU

INVITE: sip:[email protected]

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

Page 63: Sip

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

Page 64: Sip

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

Page 65: Sip

Mobile SIP (Session Initiation Protocol) Communicator

Classes

SipAudioCall

SipAudioCall.Listener

SipErrorCode

SipManager

SipProfile

SipProfile.Builder

SipSession

SipSession.Listener

SipSession.State

SipRegistrationListener

Page 66: Sip

Mobile SIP (Session Initiation Protocol) Communicator

Classes used

SIP MANAGER

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

Page 67: Sip

Mobile SIP (Session Initiation Protocol) Communicator

PROFILE BUILDER

Classes used

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

Page 68: Sip

Mobile SIP (Session Initiation Protocol) Communicator

PEER PROFILE

Classes used

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

Page 69: Sip

Mobile SIP (Session Initiation Protocol) Communicator

AUDIO CALL

Classes used

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

Page 70: Sip

Mobile SIP (Session Initiation Protocol) Communicator

AUDIO Call Listener

Classes used

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

Page 71: Sip

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()

Page 72: Sip

Mobile SIP (Session Initiation Protocol) Communicator

SESSION

Classes used

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

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

Page 73: Sip

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()

Page 74: Sip

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()

Page 75: Sip

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()

Page 76: Sip

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

Page 77: Sip

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()

Page 78: Sip

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

Page 79: Sip

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()

Page 80: Sip

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

Page 81: Sip

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.

Page 82: Sip

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.

Page 83: Sip

Thank you !!