Presentation is loading. Please wait.

Presentation is loading. Please wait.

AARNet Copyright 2011 Network Operations SIP Deep Dive Bill Efthimiou APAN33 SIP workshop February 2012.

Similar presentations


Presentation on theme: "AARNet Copyright 2011 Network Operations SIP Deep Dive Bill Efthimiou APAN33 SIP workshop February 2012."— Presentation transcript:

1 AARNet Copyright 2011 Network Operations SIP Deep Dive Bill Efthimiou APAN33 SIP workshop February 2012

2 AARNet Copyright 2011 Agenda 2 1. SIP Basics 2. SIP Components and SIP Addressing 3. SIP Messaging Syntax 4. SIP Transaction and Dialog 5. SIP Call Flows 6. DNS NAPTR and SRV 7. SIP Header 8. SIP Mobility 9. SIP and B2BUA – Back to Back User Agent 10. SIP Peering

3 AARNet Copyright 2011 The Basics of SIP 3 RFC3261 Session Initiation Protocol Application-layer Signalling protocol Setup, Modify and Tear down sessions Invite participants to existing sessions Add/remove media to/from existing sessions Establish user Presence Personal mobility – single identity IPv4 and IPv6 support

4 AARNet Copyright 2011 Where does SIP fit in? 4

5 AARNet Copyright 2011 SIP User Agents 5 User Agent Client (UAC) – An entity initiates a call User Agent Server (UAS) – An entity receives a call

6 AARNet Copyright 2011 SIP Servers 6 Registrar Servers – users/services registration Location Servers – maintaining users locations Redirect Servers  Accept request, map the requested address to new addresses, and return to the client  No initial requests  Do not accept calls Proxy Servers – next slide

7 AARNet Copyright 2011 SIP Proxy Server 7 Proxy Servers – forwarding requests, rewrite message, forking, etc  Stateful – remembers all requests  Stateless – forgets requests after forwarded

8 AARNet Copyright 2011 SIP Addressing 8 SIP Addresses are URIs with the same format as an email address i.e. user@domain or user@host. They can refer to Services, Devices and Users. Service – URI points to conference, sip:61262112650@aarnet.edu.au is a conference service on the MCU (bridge) sip:61262112650@aarnet.edu.au Devices – URI represents a single device/application, sip:syd- fax1@aarnet.edu.au is a fax machinesip:syd- fax1@aarnet.edu.au Users – URI represents a user’s contact detail, sip:leon.li@aarnet.edu.au sip:leon.li@aarnet.edu.au

9 AARNet Copyright 2011 SIP Registration A Common operation in SIP. Registration is a common way for a server to learn the current location of a user. REGISTER messages associate a users SIP or SIPS URI (eg, sip:bob@biloxi.com) with the machine/phone/etc into which he/she is currently logged in. The registrar writes this association, also called a binding, to a database, called the location service, where it can be used by the proxy in the domain. Often, a registrar server for a domain is co-located with the proxy for that domain. A user “Bob” is not limited to registering from a single device. For example, both his SIP phone at home and the one in the office could send registrations. This information is stored together in the location service and allows a proxy to perform various types of searches to locate Bob.

10 AARNet Copyright 2011 SIP Messages There are two types of SIP Messages  Requests  Responses

11 AARNet Copyright 2011 SIP Messages – Request-Line, example

12 AARNet Copyright 2011 SIP Messages – Status-Line, example

13 AARNet Copyright 2011 SIP Requests 13 INVITE – to initiate a session ACK – to indicate the receipt of the corresponding msg BYE – to terminate a session CANCEL – to cease a previous request REGISTER – to send registration details to a Registrar OPTIONS – to query another UA or a proxy server as to its capabilities INFO – to carry session related control information REFER – to direct the recipient to contact a 3 rd party, e.g. call transfer PRACK – provisional ACK (to 1XX only except 100 Trying) PUBLISH – to advertise event state, like presence SUBSCRIBE – to request the status of a session/UA etc for a detailed list, http://en.wikipedia.org/wiki/List_of_SIP_request_methods http://en.wikipedia.org/wiki/List_of_SIP_request_methods

14 AARNet Copyright 2011 Response Code (detailed list at http://en.wikipedia.org/wiki/List_of_SIP_response_codes) http://en.wikipedia.org/wiki/List_of_SIP_response_codes SIP Responses DescriptionCodeExample Informational1XX100 Trying 180 Ringing Success2XX200 OK Redirect3XX300 Multi Choices 301 Move permanently Clients Errors4XX400 Bad Request 401 Unauthorized 404 Not Found 408 Timeout 483 Too Many Hops Server Errors5XX500 Internal Server Error 503 Service Unavailable Global Errors6XX600 Busy Everywhere

15 AARNet Copyright 2011 301 Moved Permanently The user can no longer be found at the address in the Request-URI, and the requesting client SHOULD retry at the new address given by the Contact header field. The requestor SHOULD update any local directories, address books, and user location caches with this new value and redirect future requests to the address(es) listed. Source: RFC3261

16 AARNet Copyright 2011 302 Moved Temporarily The requesting client SHOULD retry the request at the new address(es) given by the Contact header field. The Request-URI of the new request uses the value of the Contact header field in the response. The duration of the validity of the Contact URI can be indicated through an Expires header field or an expires parameter in the Contact header field. Both proxies and UAs MAY cache this URI for the duration of the expiration time. If there is no explicit expiration time, the address is only valid once for recursing, and MUST NOT be cached for future transactions. Source: RFC3261

17 AARNet Copyright 2011 SIP Transactions and Dialogs Transaction: from the first request to the final response Dialog: starts with an INVITE transaction and ends with a BYE transaction DialogID = Call-ID + local tag + remote tag. Note, From/To/Call-ID never changed in a dialog. Source: Building Telephony Systems with OpenSER, by Flavio E. Goncalves

18 AARNet Copyright 2011 SIP Call Flow 18 Source: sipschool.com

19 AARNet Copyright 2011 SIP call Routing- Fixed ( How does a proxy server know where to forward the INVITE?) Hard coding/Fixed Dial plan example in the lab, Dialled NumberDestination 1XXX192.168.1.21 2XXX192.168.1.22 3XXX192.168.1.23 4XXX192.168.1.24

20 AARNet Copyright 2011 SIP call Routing- SRV RR SRV Record, RFC 2782 –A specification of data in the DNS defining the location _sip._tcp.example.com. 86400 IN SRV 10 60 5060 bigbox.example.com. _sip._tcp.example.com. 86400 IN SRV 10 20 5060 smallbox1.example.com. _sip._tcp.example.com. 86400 IN SRV 10 10 5060 smallbox2.example.com. _sip._tcp.example.com. 86400 IN SRV 10 10 5066 smallbox2.example.com. _sip._tcp.example.com. 86400 IN SRV 20 0 5060 backupbox.example.com. _service._proto.nameTTLclassSRVpriorityweightporttarget _sip._udp.example.com86400INSRV0550601.1.1.1

21 AARNet Copyright 2011 DNS NAPTR and SRV (Cont’d)

22 AARNet Copyright 2011 22 SIP call Routing- NAPTR (using ENUM) The example NAPTR records below show a translation from the number range +123456* to sip:123456*@sample.edu in the SIP case. For H.323 the NAPTR records map h323:123456* to h323:123456*@sample.edu. Source: NRENUM.net: https://confluence.terena.org/display/NRENum/How+to+use+NAPTR+and+SRV+records+for+H.323+or+SIP+with+nrenum.net

23 AARNet Copyright 2011 Example Source: sipschool.com DNS SERVER

24 AARNet Copyright 2011 SIP Headers SIP Header is HTTP like and contains important information. Examples –RegistrationRegistration –InviteInvite Next hop? –Record-route –Via –Contact

25 AARNet Copyright 2011 SIP Header Reminder Record-Route Added by the proxy so that it can stay in the messaging path between the endpoints for the duration of the session Branch –To identify the transaction –MUST always begin with the characters "z9hG4bK". Tag Random string added by the UA for identification purpose Remember in the Reply header –Via –From –To –Call-ID are copied exactly from Request.

26 AARNet Copyright 2011 SIP Mobility 26 Proxying and redirecting requests to a user’s current location Device/network independent  PC, Smartphone, IP phone etc  LAN, WiFi, 3G etc User must register

27 AARNet Copyright 2011 SIP Call Forking - Parallel 27 Source: sipschool.com

28 AARNet Copyright 2011 SIP Call Forking - Sequential Source: sipschool.com

29 AARNet Copyright 2011 SIP B2BUA 29 Back to Back User Agent (for example, SBC) A logical network element operates between both end points of a phone call or communications session and divides the communication channel into two call legs and mediates all SIP signalling between both ends of the call, from call establishment to termination. As all control messages for each call flow through the B2BUA, a service provider may implement value-added features available during the call. Benefit  Centralise call management  Billing  Network topology hiding  H.323 and SIP inter-working  QoS enforcement  NAT traversal

30 AARNet Copyright 2011 SIP Trunking 30 What is SIP trunking? A “logical” connection from a PBX from a customer site to an Internet Telephony Service Provider (ITSP) network. Benefit replace existing E1/T1 flexible with number of channels number porting single existence for multiple regions (for example, SIP lines for Sydney and Melbourne can co-located in Sydney) Rich Media can be enabled, such as rich callerID, video, presence, etc.

31 AARNet Copyright 2011 SIP Peering 31 What is SIP peering? A “logical” connection between two organizations Benefit lower cost trusted relationship AARNet’s use case

32 AARNet Copyright 2011 32 Thanks Comments ?


Download ppt "AARNet Copyright 2011 Network Operations SIP Deep Dive Bill Efthimiou APAN33 SIP workshop February 2012."

Similar presentations


Ads by Google