1 / 32

Network Operations

SIP Deep Dive. Bill Efthimiou APAN33 SIP workshop February 2012. Network Operations. Agenda. SIP Basics SIP Components and SIP Addressing SIP Messaging Syntax SIP Transaction and Dialog SIP Call Flows DNS NAPTR and SRV SIP Header SIP Mobility

Télécharger la présentation

Network Operations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SIP Deep Dive Bill Efthimiou APAN33 SIP workshop February 2012 Network Operations

  2. Agenda • SIP Basics • SIP Components and SIP Addressing • SIP Messaging Syntax • SIP Transaction and Dialog • SIP Call Flows • DNS NAPTR and SRV • SIP Header • SIP Mobility • SIP and B2BUA – Back to Back User Agent • SIP Peering 2

  3. The Basics of SIP • 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 3

  4. Where does SIP fit in? 4

  5. SIP User Agents • User Agent Client (UAC) – An entity initiates a call • User Agent Server (UAS) – An entity receives a call 5

  6. SIP Servers • 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 6

  7. SIP Proxy Server • Proxy Servers – forwarding requests, rewrite message, forking, etc • Stateful – remembers all requests • Stateless – forgets requests after forwarded 7

  8. SIP Addressing • 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) • Devices – URI represents a single device/application, sip:syd-fax1@aarnet.edu.au is a fax machine • Users – URI represents a user’s contact detail, sip:leon.li@aarnet.edu.au 8

  9. 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. SIP Messages • There are two types of SIP Messages • Requests • Responses

  11. SIP Messages – Request-Line, example

  12. SIP Messages – Status-Line, example

  13. SIP Requests • 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 3rd 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 13

  14. SIP Responses • Response Code (detailed list at http://en.wikipedia.org/wiki/List_of_SIP_response_codes)

  15. 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. 302 Moved Temporarily The requesting client SHOULD retry the request at the new address(es) given by the Contact header field. The Request-URIof 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. 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. SIP Call Flow Source: sipschool.com 18

  19. SIP call Routing- Fixed (How does a proxy server know where to forward the INVITE?) Hard coding/Fixed Dial plan example in the lab,

  20. SIP call Routing- SRV RR SRVRecord, 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.

  21. DNS NAPTR and SRV (Cont’d)

  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. Example DNS SERVER Source: sipschool.com

  24. SIP Headers SIP Header is HTTP like and contains important information. Examples • Registration • Invite • Next hop? • Record-route • Via • Contact

  25. 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. SIP Mobility • 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 26

  27. SIP Call Forking - Parallel Source: sipschool.com 27

  28. SIP Call Forking - Sequential Source: sipschool.com

  29. SIP B2BUA • 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 29

  30. SIP Trunking • 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. 30

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

  32. Thanks Comments ?

More Related