Introduction to Session Initiation Protocol (SIP) Xiaotao Wu and Kundan Singh Columbia University October 24, 2002
Oct 24,2002 Intro to SIP/Columbia Univ2 Agenda What is SIP? Basic call setup IM and presence Conferencing Services Unified messaging PSTN inter-working Columbia test-bed High level idea on how to build a SIP-based infrastructure
Oct 24,2002 Intro to SIP/Columbia Univ3 SIP is …, SIP is not … SIP = core protocol for establishing sessions in the Internet (peer-to-peer) Transports session description information from initiator (caller) to callee Allows change of parameters in mid-session Terminate session NOT for distribution of multimedia data NOT suitable for media gateway control
Oct 24,2002 Intro to SIP/Columbia Univ4 home.com office.com alice bob m2.home.com Basic call setup like identifier: Alice’s phone registers with home.com Registrar => REGISTER home.com SIP/2.0 To: Contact: …
Oct 24,2002 Intro to SIP/Columbia Univ5 home.com office.com alice bob m2.home.com Basic call setup like identifier: Alice’s phone registers with home.com Bob dials Phone does DNS DNS lookup for sip.udp.home.com Resolve to pc4.home.com pc4.home.com
Oct 24,2002 Intro to SIP/Columbia Univ6 home.com office.com alice bob m2.home.com Basic call setup like identifier: Alice’s phone registers with home.com Bob dials Phone does DNS Phone sends INVITE; acts as UAC pc4.home.com INVITE … To: From: “Bob” … c=IN IP m=audio 8000 RTP/AVP User agent client
Oct 24,2002 Intro to SIP/Columbia Univ7 home.com office.com alice bob m2.home.com Basic call setup Phone sends INVITE; acts as UAC Server can proxy the call to current location pc4.home.com INVITE … To: From: “Bob” … Proxy
Oct 24,2002 Intro to SIP/Columbia Univ8 home.com office.com alice bob m2.home.com Basic call setup Phone sends INVITE; acts as UAC Server can proxy the call to current location Alice’s phone rings; acts as a UAS pc4.home.com SIP/ Ringing Proxy User agent server
Oct 24,2002 Intro to SIP/Columbia Univ9 home.com office.com alice bob m2.home.com Basic call setup Phone sends INVITE; acts as UAC Server can proxy the call to current location Alice’s phone rings; acts as a UAS When Alice picks up, call is accepted and bob’s phone sends ACK to complete the setup pc4.home.com SIP/ OK … c=IN IP m=audio 9000 RTP/AVP 0 8
Oct 24,2002 Intro to SIP/Columbia Univ10 home.com office.com alice bob Basic call setup Encoded audio packets sent over RTP
Oct 24,2002 Intro to SIP/Columbia Univ11 home.com office.com alice bob Basic call setup Encoded audio packets sent over RTP When either party hangs up BYE is sent BYE
Oct 24,2002 Intro to SIP/Columbia Univ12 Advanced scenario Bob (1) (2) (3) (4) (5) (6) (7) Alice (8) (9) (10) (11) (12) (13)
Oct 24,2002 Intro to SIP/Columbia Univ13 Highlights of SIP Addressing Naming Contacts More ;mobility=mobile Robustness Stateless proxy Security (authentication/encryption) Digest, TLS, …
Oct 24,2002 Intro to SIP/Columbia Univ14 Advanced services Fits in basic SIP model or defined as extensions presence, instant messaging, caller preference, callee capabilities,... Integration of web, , IM Programmability of services. SIP-CGI, CPL, SIP-servlet SIP conferencing
Oct 24,2002 Intro to SIP/Columbia Univ15 Presence and instant messaging General event notification method for Internet presence, conferencing, device control Presence extensions SUBSCRIBE to request notifications NOTIFY when event occurs Instant messaging MESSAGE with text body
Oct 24,2002 Intro to SIP/Columbia Univ16 SIP Conferencing Different conference models (centralized, distributed) Basic task: join/leave conference Dial in, Refer dial in Dial out, Refer dial out REFER INVITE REFER INVITE server
Oct 24,2002 Intro to SIP/Columbia Univ17 Conference control Conference control (SIP + SOAP) Access control Pre-authorized to join Consult a user with appropriate privileges to join Different privileges (chair, floor chair) Floor control safe and mutually exclusive access to shared resource audio channel (right to talk; typically, one) video (limited by bandwidth, screen) pointer and input focus for whiteboard and shared applications (one, but also multiple pointers)
Oct 24,2002 Intro to SIP/Columbia Univ18 Conference state notification SUBSCRIBE to conference, receive NOTIFY State Participant : active, departed, booted, failed dialog state, floor state Media sending: received-by-all, muted receiving: receiving-all, anchor-only active departed
Oct 24,2002 Intro to SIP/Columbia Univ19 SIP Services Common gateway interface (CGI) Call processing language (CPL) SIP servlet Make call when boss is online … Enter your authentication PIN for billing… B2BUA Double ringing sound when boss calls… Endpoint Forward to office phone during day, and home phone during evening… Proxy/registrar Endpoint Endpoint service markup language (ESML) Use finger for locating user…
Oct 24,2002 Intro to SIP/Columbia Univ20 Endpoint call control Today’s endpoint Processing ability Graphical rendering Storage capacity SIP promotes end system services Two SIP UAs can talk to each other directly. Service-related information is explicitly contained in SIP headers. The simplicity of SIP makes it easier for end system to perform services.
Oct 24,2002 Intro to SIP/Columbia Univ21 Endpoint Service Markup Language (ESML) Language for endpoint service creation Direct user interaction, direct media control Handle converged information, e.g., call, presence, Example: when buddy is online, make a call <esml name="online_call" require="generic presence ui"> <alert sound=“ring.au" text="Calling …" />
Oct 24,2002 Intro to SIP/Columbia Univ22 SIP CGI Programming language independent Maintains state via an opaque token For SIP proxies and endpoints: call routing controlling forking call rejection call modification (Priority, Call-Info) RFC 3050 Priority.pl SIP_FROM SIP_TO stdin CGI-PROXY-REQUEST stdout
Oct 24,2002 Intro to SIP/Columbia Univ23 SIP CGI contd. Block if (defined $ENV{SIP_FROM} && $ENV{SIP_FROM} =~ { print "SIP/ I can't talk right now\n\n"; } Make calls from boss as urgent: if (defined $ENV{SIP_FROM} && $ENV{SIP_FROM} =~ { foreach $reg (get_regs()) { print "CGI-PROXY-REQUEST $reg SIP/2.0\n"; print "Priority: urgent\n\n"; }
Oct 24,2002 Intro to SIP/Columbia Univ24 CPL XML-based; interpreted Control Restricted to branching and subroutines no variables, no loops structured tree describing actions performed on call setup event Event incoming and outgoing events Switch address, language, time, priority Action Proxy, redirect, reject (busy) Graphical tools Protocol-independent SIP, H.323 Extensions CPL for presence Logging Call not match match actions
Oct 24,2002 Intro to SIP/Columbia Univ25 CPL contd. <time dtstart=" T140000Z" dtend=" T150000Z">
Oct 24,2002 Intro to SIP/Columbia Univ26 SIP servlet Java-based Runs in SIP server Receives SIP objects and processes them public class RejectServlet extends SipServletAdapter { public boolean doInvite(SipRequest req) { SipResponse res = req.createResponse(); res.setStatus(603); res.send(); return true; }
Oct 24,2002 Intro to SIP/Columbia Univ27 Unified messaging Answering machine and voice mail Centralized vs. distributed Existing protocols RTSP, SIP, Integration with other services , web, video, fax, instant messaging and presence
Oct 24,2002 Intro to SIP/Columbia Univ28 Voic Design alternatives: Your phone redirects the call to voice mail after 10 seconds The SIP proxy is configured to forward the call to voic if busy or no response Voice mail server pretends as another phone but delays the “pick up” by 10 seconds Advanced: Integration with , VPIM Multimedia mail Issues Call reclaiming Retrieval and deletion: Web interface, media server (rtsp://…), SIP (sip:…), PSTN (press 1 to listen…)
Oct 24,2002 Intro to SIP/Columbia Univ29 VoiceXML End user PSTN Voice gateway Web server Service logic (CGI, servlet, JSP) Voice and telephony functions VoiceXML browser End user VXML HTML Internet IVR platform Voice and telephony functions (ASR, TTS, DTMF) Service logic (application specific) SipVXML Gateway
Oct 24,2002 Intro to SIP/Columbia Univ30 VoiceXML contd. Enter your Id: Your ID, please. Telephony, speech synthesis or audio output, user input and grammar, program flow, variable and properties, error handling, …
Oct 24,2002 Intro to SIP/Columbia Univ31 VoiceXML contd. Unified messaging access by phone Event notification and scheduling Audio volume control for conference Advanced conference control
Oct 24,2002 Intro to SIP/Columbia Univ32 PSTN interworking Translating audio (PCMU/PCMA) Translating signaling (PRI/T1,ISUP) Overlap signaling Advanced features in SIP are lost in PSTN Translating identifiers (phone number) Determining transition points Telephone network SIP/PSTN gateway SIP serverIP endpoint Telephone subscriber
Oct 24,2002 Intro to SIP/Columbia Univ33 PSTN to IP Gateway knows the SIP server ENUM DNS => e164.arpa => Suitable for relatively “static” contacts
Oct 24,2002 Intro to SIP/Columbia Univ34 IP to PSTN Static mapping xxxx ITGW information is dynamic: Overlapping networks Multiple providers Load balancing TRIP Route advertisement Can be implemented in outbound proxy Suitable for current hierarchical network at 4¢/min at 1¢/min free
Oct 24,2002 Intro to SIP/Columbia Univ35 Columbia SIP servers (CINEMA) Internal Telephone Extn: 7040 SIP/PSTN Gateway Department PBX Web based configuration Web server Telephone switch SQL database sipd: Proxy, redirect, registrar server Extn: 7134 NetMeeting H.323 rtspd: media server sipum: Unified messaging Quicktime RTSP clients RTSP Extn: x Single machine SNMP (Network Management) sipconf: Conference server siph323: SIP-H.323 translator Local/long distance
Oct 24,2002 Intro to SIP/Columbia Univ36 Columbia SIP user agent (sipc) Media Audio, video, text, white board Screen sharing Shared web browsing Advanced Presence, instant messaging Programmable call handling Conference control Emergency notification and handling Device control
Oct 24,2002 Intro to SIP/Columbia Univ37 SIP beyond telephony DO SIP/2.0 ….. turn lamp on serial port lamp X10 device
Oct 24,2002 Intro to SIP/Columbia Univ38 Summary SIP based IP telephony infrastructure Basic call Registration Addressing Proxy Advanced services Instant messaging Presence Conferencing Programmability Voice/video mail Interactive voice response PSTN interworking SIP: Servers: Client: