1 / 64

A Gentle Introduction to SIP and CPL January 31, 2001

A Gentle Introduction to SIP and CPL January 31, 2001. Session Initiation Protocol Call Processing Language. Outline. What is SIP and Why is it Important (10 min) SIP Architecture and Protocol (15 min) SIP Call Flow Examples (10 min) The IETF Call Processing Language (15 min)

mason
Télécharger la présentation

A Gentle Introduction to SIP and CPL January 31, 2001

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. A Gentle Introduction toSIP and CPLJanuary 31, 2001 Session Initiation ProtocolCall Processing Language

  2. Outline • What is SIP and Why is it Important (10 min) • SIP Architecture and Protocol (15 min) • SIP Call Flow Examples (10 min) • The IETF Call Processing Language (15 min) • SIP Activities (10 min) • Discussion

  3. What is SIP andWhy is it Important Tom Gray Strategic Technology

  4. What SIP Is • SIP is a language and protocol for initiating, modifying and terminating interactive sessions • allows discovery of entities so that descriptions of sessions can be delivered • is explicitly designed for rendezvous with mobile users • is explicitly distributed with local user control • enables creation and sharing of information • maintains relationships over multiple interactions

  5. What SIP Is • compatible with existing telephony features but also designed for new applications enabled by the Internet • example of highly personalized call control • with location, presence, alerts, notifications ... • one of a family of protocols and languages • pervasive (DTMF of the Internet) • based on SMTP and HTTP • set of building blocks to design services • lightweight and extensible

  6. What SIP Is Not • a telephony protocol • a resource reservation protocol • a transfer protocol • a normative definition of any specific set of features • the AIN, Q.sig, H.323…

  7. Group TRIP Billing Group TRIP Billing Locate Group TRIP Billing ARS User Agent Client SIP User Agent User Agent SIP Server Client MGCP MGCP Media Gateway Media Gateway Media Gateway IP, ATM, PSTN… Media Gateway CPL

  8. SIP in Context Coordination Space SIP SIP Policy Agents External Data Sources SIP Policies Database Connection Control

  9. Alice Location/Presence Server ACD Proxy Server TRIP Carol BIGAgent BIG SIP Bob SIP Available English Available French Busy French Daniel Personal Agent ACD Example SIP SIP SIP Call inFrench… Personal Agents

  10. SIP Architecture and Protocol Kathy Baker Strategic Technology Based on the IETF Draft: ietf-sip-rfc2543bis-02.ps(November 24, 2000)

  11. Client sends a request message Server sends back a response message CALLER CALLEE 200 OK UserAgentServer UserAgentServer INVITE UserAgentClient UserAgentClient SIP User Agents

  12. SIP Servers • Proxy • Stateless Proxy • forgets about SIP request/response once it has been forwarded • Stateful Proxy • maintains record of SIP transaction • e.g. Outbound Proxy (located near client acts as firewall) • Redirect Server • does not issue SIP requests, only redirect responses • Registrar • allows user agents to register location information • typically co-located with Outbound Proxy

  13. SIP PATH INVITE 200 OK ACK ACK 302 INVITE UserAgentServer UserAgentServer INVITE 200 OK UserAgentClient UserAgentClient ACK INVITE 200 OK ACK MEDIA PATH SIP Architecture example Stateful Proxy CALLER CALLEE Redirect Server Stateless Proxy

  14. SIP Messages • Can either be Request or Response message • Request: From Client to Server • Response: From Server to Client • Can be passed: • from user agent to user agent • from SIP network server to user agent or vice versa • from SIP network server to SIP network server • Each SIP Message contains: • Request Line or Status Line • Header • Message (CPL, SDP, encrypted code, text or nothing)

  15. Addressing • SIP-URL sip:user@host • sip:Kathy_Baker@mitel.com • sip:extension1640@mitel.com • sip:Ramiro_Liscano@voicemail.mitel.com • Can accept parameters • sip:Tom_Gray@cell.mitel.com&priority=urgent • sip:Tom_Gray@mitel.com&subject=Bluetooth • Can be identified by generic URIs • kanata.systems.mitel.com • tel:13334442343

  16. INVITEACKOPTIONSBYEREGISTERCANCEL NOTIFYSUBSCRIBEREFERMESSAGE Request Message INVITE:sip:Daniel_Amyot@mitel.com SIP/2.0From: Kathy <sip:Kathy_Baker@mitel.com>To: Daniel <sip:Daniel_Amyot@mitel.com> Contact: sip:Kathy_Baker@desktop.mitel.comCall-ID: 20010110@kathy_phone.strat_techContent-Type: application/sdpContent-Length: 147 CSeq: 1 INVITE v=0o=UserA 2890844526 2890844526 IN IP4 here.coms=Session SDPc=IN IP4 100.101.102.103t=0 0m=audio 49172 RTP/AVP 0a=rtpmap:0 PCMU/8000 Request Line MessageHeader MessageBody

  17. Response Message SIP/2.0 200 OK Via: SIP/2.0/UDP kanata.mitel.com From: Kathy <sip:Kathy_Baker@mitel.com> To: Daniel <sip:Daniel_Amyot@mitel.com> Call-ID: 20010110@kathy_phone.strat_techContact: sip:Daniel_Amyot@desktop.mitel.comCSeq: 1 INVITE Status Line Status Codes 1xx Informational: - Trying - Ringing - Being Forwarded - Queued 200 Success 3xx Redirect 4xx Client Error 5xx Server Error 6xx Global Error MessageHeader MessageBody

  18. Request Performatives • INVITE “Would you like to chat?” • ACK“Thanks, received your confirmation. Let’s start chatting” • BYE“Okay, I’m ending the call now.” • CANCEL “Cancel that last request but don’t end the call” • OPTIONS“What functionality do you support?” • REGISTER“Direct all my calls to this phone.” Enables Mobility

  19. sip.kanata.mitel.com(stateful proxy) sip.ottawa.nortel.ca(redirect server) sip.mitel.com(stateless proxy) sip.nortel.com(stateful proxy) ACK 302 INVITE INVITE INVITE INVITE INVITE SIP/2.0 302 MOVED TEMPORARILY To: sip:john_smith@nortel.com From: sip:kathy_baker@mitel.com Call-ID: knsd08alas9dy@3.4.5.6 CSeq: INVITE 1Contact: sip:john@pc1234.ottawa.nortel.ca;q=0.7, sip:john_smith@home.com;q=0.9, INVITE sip:john_smith@nortel.com SIP/2.0Via: SIP/UDP/2.0 sip.kanata.mitel.com Via: SIP/UDP/2.0 sip.mitel.com To: sip:john_smith@nortel.com From: sip:kathy_baker@mitel.com Contact: sip:kathy@1640.kanata.mitel.com Call-ID: knsd08alas9dy@3.4.5.6 CSeq: INVITE 1 INVITE sip:john_smith@nortel.com SIP/2.0Via: SIP/2.0/UDP sip.kanata.mitel.com Via: SIP/2.0/UDP sip.mitel.com To: sip:john_smith@nortel.com From: sip:kathy_baker@mitel.com Contact: sip:kathy@1640.kanata.mitel.com Call-ID: knsd08alas9dy@3.4.5.6 CSeq: INVITE 1 INVITE sip:john@pc1234.ottawa.nortel.ca SIP/2.0 Via: SIP/2.0/UDP sip.kanata.mitel.com Via: SIP/2.0/UDP sip.mitel.com Via: SIP/2.0/UDP sip.nortel.comTo: sip:john_smith@nortel.com From: sip:kathy_baker@mitel.com Contact: sip:kathy@1640.kanata.mitel.com Call-ID: knsd08alas9dy@3.4.5.6 CSeq: INVITE 1 INVITE sip:john_smith@nortel.com SIP/2.0Via: SIP/UDP/2.0 sip.kanata.mitel.com Via: SIP/UDP/2.0 sip.mitel.com To: sip:john_smith@nortel.com From: sip:kathy_baker@mitel.com Contact: sip:kathy@1640.kanata.mitel.com Call-ID: knsd08alas9dy@3.4.5.6 CSeq: INVITE 1 ACK sip.ottawa.nortel.ca SIP/2.0To: sip:john_smith@nortel.com From: sip:kathy_baker@mitel.com Call-ID: knsd08alas9dy@3.4.5.6 CSeq: INVITE 1 INVITE sip:john_smith@nortel.com SIP/2.0Via: SIP/UDP/2.0 sip.kanata.mitel.com To: sip:john_smith@nortel.com From: sip:kathy_baker@mitel.com Contact: sip:kathy@ex1640.kanata.mitel.com Call-ID: knsd08alas9dy@3.4.5.6 CSeq: INVITE 1 INVITE Method CUA sip:kathy@ex1640.kanata.mitel.com SUA sip:john@pc1234.ottawa.nortel.ca

  20. sip.kanata.mitel.com(stateful proxy) sip.ottawa.nortel.ca(redirect server) sip.mitel.com(stateless proxy) sip.nortel.com(stateful proxy) 200 OK ACK 200 OK ACK 200 OK ACK 200 OK ACK ACK sip:john@pc1234.ottawa.nortel.caVia: SIP/2.0/UDP sip.kanata.mitel.com Via: SIP/2.0/UDP sip.mitel.com Via: SIP/2.0/UDP sip.nortel.comTo: sip:john_smith@nortel.com From: sip:kathy_baker@mitel.com Contact: sip:kathy@1640.kanata.mitel.com Call-ID: knsd08alas9dy@3.4.5.6 CSeq: ACK 1 SIP/2.0 200 OKVia: SIP/2.0/UDP sip.kanata.mitel.com Via: SIP/2.0/UDP sip.mitel.com Via: SIP/2.0/UDP sip.nortel.comTo: sip:john_smith@nortel.com From: sip:kathy_baker@mitel.com Contact: sip:john@pc1234.ottawa.nortel.caCall-ID: knsd08alas9dy@3.4.5.6 CSeq: INVITE 1 Responses and ACK Method CUA sip:kathy@ex1640.kanata.mitel.com SUA sip:john@pc1234.ottawa.nortel.ca

  21. sip.kanata.mitel.com(stateful proxy) sip.ottawa.nortel.ca(redirect server) sip.mitel.com(stateless proxy) sip.nortel.com(stateful proxy) BYE Method BYE BYE CUA BYE sip:kathy@ex1640.kanata.mitel.com SUA BYE kathy@ex1640.kanata.mitel.com SIP/2.0Via: SIP/2.0/UDP sip.kanata.mitel.com Via: SIP/2.0/UDP sip.nortel.comTo: sip kathy_baker@mitel.com From: sip: john_smith@nortel.com Contact: sip:john@pc1234.ottawa.nortel.caCall-ID: knsd08alas9dy@3.4.5.6 CSeq: 2 BYE sip:john@pc1234.ottawa.nortel.ca

  22. OPTIONS OPTIONS UserAgentServer UserAgentServer 200 OK 200 OK UserAgentClient UserAgentClient SIP/2.0 200 OK Via: SIP/2.0/UDP kanata.mitel.comTo: sip:tom_gray@mitel.comFrom: sip:kathy_baker@mitel.comCSeq: OPTIONS 12 Call-ID: 1234556677 Allow: INVITE,ACK,OPTIONS,CANCEL,REFERAccept: application/sdp;level=1, text/htmlAccept-Language: da, en-gb,q=0.8, en;q=0.7 OPTIONS:sip:tom_gray@mitel.com SIP/2.0 Via: SIP/2.0/UDP kanata.mitel.comTo: sip:tom_gray@mitel.comFrom: sip:kathy_baker@mitel.comCSeq: OPTIONS 12 Call-ID: 1234556677 OPTIONS:sip:tom_gray@mitel.com SIP/2.0 To: sip:tom_gray@mitel.comFrom: sip:kathy_baker@mitel.comCSeq: OPTIONS 12 Call-ID: 1234556677 OPTIONS Method SIP Proxy sip:tom_gray@mitel.com sip:kathy_baker@mitel.com

  23. UserAgentServer UserAgentClient REGISTER Method LocationServer REGISTER SIP Registrar 200 OK sip:kathy_baker@mitel.com SIP Proxy SIP/2.0 200 OK To: sip:kathy_baker@mitel.comFrom: sip:kathy_baker@mitel.comCSeq: 1 REGISTER Contact: sip:kbaker@cellphone.clearnet.ca&expires=12:00Call-ID: 1234556677 REGISTER:sip:registrar.systems.mitel.com SIP/2.0 To: sip:kathy_baker@mitel.comFrom: sip:kathy_baker@mitel.comCSeq: 1 REGISTERContact: sip:kbaker@cellphone.clearnet.ca&expires=12:00Call-ID: 1234556677

  24. SIP Extensions - 3PCC *** These methods have been added to extend SIP to support third party control. They enable external applications to control SIP Agents *** • REFER“Please go to this other place and do this” • SUBSCRIBE “I would like to monitor your call activity.” • NOTIFY“An event occurred.”

  25. REFER INVITE UserAgentServer UserAgentServer UserAgentClient UserAgentClient INVITE sip:ramiro_liscano@mitel.com SIP/2.0 To: sip:ramiro_liscano@mitel.comFrom: sip:tomsphone.mitel.comContact: sip:tomsphone.mitel.comCSeq: INVITE 1 Call-ID: 101@tomsphone.mitel.com REFER: sip:tomsphone.mitel.com SIP/2.0 Call-ID: 4@tomsdialer.mitel.com Refer-To: <sip:ramiro_liscano@mitel.com> REFER Method Dialer sip:tomsphone.mitel.com sip:ramiro_liscano@mitel.com

  26. SIP Call Flow Examples Tom Gray Strategic Technology

  27. INVITE INVITE 100 Trying 486 Busy ACK INVITE 180 Ringing 180 Ringing 200 OK 200 OK ACK ACK Call Forward Busy Carole Bob Alice Proxy Alice Calls Bob Bob is CFB to Carole

  28. INVITE INVITE 100 Trying 180 Ringing 180 Ringing 200 OK 200 OK ACK ACK 2 Way Communication Consultation Hold - 1 Carole Bob Alice Proxy Alice Calls Bob who then Consults with Carole and Returns to Alice Standard Pattern for Originating a Call

  29. Consultation Hold - 2 Carole Bob Alice Proxy INVITE (Hold) INVITE (Hold) Bob Puts Alice On Hold Do Re-Invite in Same Session to Change Call Parameters 200 OK 200 OK ACK ACK Audio Path Knocked Down

  30. Consultation Hold - 3 Carole Bob Alice Proxy INVITE Bob Calls Carole Make New Call for Consultation INVITE 100 Trying 180 Ringing 180 Ringing 200 OK 200 OK ACK ACK 2 Way Audio

  31. BYE BYE 200 OK 200 OK Audio Path Deleted INVITE INVITE 100 Trying 200 OK 200 OK ACK ACK 2 Way Audio Path Established Consultation Hold - 4 Carole Bob Alice Proxy Drop Consultation Session Re-Invite in Existing Session to Restore Call to Alice

  32. SUBSCRIBE 200 OK REFER (Alice (Invite)) INVITE NOTIFY 200 OK (NTFY) 180 Ringing 200 OK ACK (Invite) 200 OK (Refer) 2 Way Audio Third Party Call Control - 1 Bob Alice Carole’s PDA Carole’s Phone Carole uses a PDA Application to set up a conference with Alice and Bob Subscribe to Phone and Set Up Call to Alice

  33. Third Party Call Control - 2 Bob Carole’s Phone Alice Carole’s PDA REFER (Alice (Hold)) INVITE (Hold) 200 OK To Start Conference Put Alice on Hold ACK 200 OK Audio Path Knocked Down

  34. REFER (Refer(Alice)(Bob))) REFER (Invite(Bob)) INVITE 200 OK ACK 200 OK 200 OK Third Party Call Control - 3 Bob Alice Carole’s PDA Carole’s Phone REFER (Bob) INVITE Tell Phone to Set Up Call To Bob and with Same Call ID Tell Alice Conference with Bob 180 Trying 200 OK ACK 200 OK

  35. 200 OK 2 Way Audio Third Party Call Control - 4 Bob Alice Carole’s PDA Carole’s Phone INVITE 180 Ringing Alice Calls Carole’s Phone Carole’s PDA is Notified - Refers Phone to Re-Invite To Set Up Speech path NOTIFY 200 OK REFER INVITE 200 OK ACK

  36. The IETF Call Processing Language (CPL) Ramiro Liscano Strategic Technology Based on the IETF Draft: draft-ietf-iptel-cpl-04.ps

  37. Service Logic Programming Interface Requests Requests SIP Server Function Responses Responses System Requirements • Programming Telephony (SIP) Services SIP-CGI (Trusted Parties) or CPL (Un-trusted Parties)

  38. Language Requirements • Verifiable: Well-formed and executable. • Guaranteed to complete: No loops. • Safe to execute: Restrained environment. • Standardized Representation: • Readable and Producible: human or machine. • Protocol Independent: • Independent of Operating System or Signaling Protocol • Ease of Transport: File representation.

  39. Corporate Server Departmental Server Outgoing Proxy Route 1: Originator Signals through Servers End System Destination End System Originator CPL CPL CPL Route 2: Originator Directly Contacts Destination CPL CPL IPTel Route Signaling Example • Internet Telephony Signaling servers cannot know state of end systems they “control” since signaling may bypass them.

  40. Succeeded Failed Outcome 1 Outcome 2 Action 1 True Condition Action 2 False CPL Definition • A Language used to describe and control Internet Telephony Services. • Designed to be implemented on either Network Servers or User Agent Servers. • Describes Services as a Decision Graph based on XML Syntax.

  41. CPL Usefulness • Script Creation by End Users (Personal Assistance Functionality) • Customized call filtering. • Third Party Outsourcing • A standardized language. • Administrator Service Definition • Define enterprise policies. • Web Middleware • Service creation and customization using WEB interfaces.

  42. CPL Script Functionality • In a Signaling Server controls proxy, redirect, or rejection actions for the set-up of a call. Replaces SIP-CGI? • Focused on “local” control rather than “global” coordination of multiple signaling servers as in IN architecture. • Defines a list of Condition/Action Pairs that concentrates on user “location” routing. • Controversial Question: Should a CPL script execute on the END System?

  43. Creating and Transporting CPL Scripts • CPL is easily created using “text” editors or “SGML” type of editors. • Script needs to be transported onto a CPL-enabled network server. (Currently no standard agreed upon) • WEB Uploading • SIP Register method. • SOAP (Simple Object Access Protocol) • All approaches require user authentication and script persistency.

  44. Which Script is executed? (In Progress) • Scripts are associated with a particular Internet telephony address: SIP To or From: Kathy_Baker@mitel.com • One script/user executes at a time. • Originator before Destination • Administrator scripts before user scripts. • Only one script for a particular event. Newer script substitutes old script. • Problems with compound and “Otherwise” tag conditionals.

  45. Motivation for Using CPL • CPL is not Turing-complete and does not support loops or recursion. It is guaranteed to terminate. • Script resources are bounded under a proposed standard and therefore execution of the script is guaranteed. • CPL can be easily created and manipulated because interpreter can manage all conditions specified in the language.

  46. CPL High Level Structure • Call Processing Actions • Top-Level Actions (<incoming> OR <outgoing>) • Subactions (Non-recursive actions called from other actions) busy Location url:sip:jones@ example.com proxy timeout: 10s Call Address-switch field: from subfield:host timeout failure Subdomain-of: example.com Location url:sip:jones@ voicemail. example.com redirect otherwise Voicemail

  47. A Switch based on an Address of the Call Request Field = origin | destination | original destination Subfield = address-type | user | host | port | tel | display SIP Mappings: origin = From: original destination = To: Top Level Actions to Take on User’s Incoming Call Triggers on Incoming Call Destination = Owner SIP Trigger: INVITE Location Modifier Used to Add or Remove locations from location set Action to Take IF origin host = example.com Alternative Actions CPL Code Example <cpl> <subaction id="voicemail"> <location url="sip:jones@voicemail.example.com"> <redirect /> </location> </subaction> <incoming> <address-switch field="origin" subfield="host"> <address subdomain-of="example.com"> <location url="sip:jones@example.com"> <proxy timeout="10"> <busy> <sub ref="voicemail" /> </busy> <noanswer> <sub ref="voicemail" /> </noanswer> <failure> <sub ref="voicemail" /> </failure> </proxy> </location> </address> <otherwise> <sub ref="voicemail" /> </otherwise> </address-switch> </incoming> </cpl>

  48. Redirect Action Directs calling party to place call to set of locations. Immediately terminates CPL. SIP Signaling: Server sends 3xx response. Proxy Action Causes call request to be forwarded to the locations in the location set. CPL chooses “adequate” response to the call attempt. If “successful” CPL terminates. SIP Signaling: busy = 486 | 600 response redirection = 3xx response failure = other 4xx | 5xx | 6xx resp. no-answer = no response. CPL Signaling Actions <subaction id="voicemail"> <location url="sip:jones@voicemail.example.com"> <redirect /> </location> </subaction> <incoming> <address-switch field="origin" subfield="host"> <address subdomain-of="example.com"> <location url="sip:jones@example.com"> <proxy timeout="10"> <busy> <sub ref="voicemail" /> </busy> <noanswer> <sub ref="voicemail" /> </noanswer> <failure> <sub ref="voicemail" /> </failure> </proxy> </location> </address> <otherwise> <sub ref="voicemail" /> </otherwise> </address-switch> </incoming>

  49. Other Types of Switches • Time Switch • start, end, duration, freq, until, byday, etc. • Based on Internet Calendaring and Scheduling Core Object Specification (iCal COS), RFC 2445. <time dtstart=“19970105T083000” duration=“PT10M” freq=“yearly” interval=“2” bymonth=“1” byday=“SU”> Starting Jan 5th, 1997 08:30 for 10 minutes. Every Sunday in January from 08:30-08:40 every other year. • Priority Switches • Based on Priority Tags (emergency, urgent, normal, non-urgent)

  50. Other Types of Switches (cont.) • String Switch • Decisions can be based on free-form strings present in a call request. • Five fields defined • subject - subject of call. • Organization - organization of the originator of the call. • user-agent - program | device that made the call. • Language - language of choice. • Display - free-form text meant to be displayed with call.

More Related