Title: Introduction to Session Initiation Protocol SIP
1Introduction to Session Initiation Protocol (SIP)
- Xiaotao Wu and Kundan Singh
- xiaotaow,kns10_at_cs.columbia.edu
- Columbia University
- October 24, 2002
2Agenda
- 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
3SIP 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
4Basic call setup
- E-mail like identifier ltsipalice_at_home.comgt
- Alices phone registers with home.com
REGISTER home.com SIP/2.0 To sipalice_at_home.com C
ontact sipalice_at_m2.home.com
office.com
Registrar
alice
m2.home.com
bob
home.com
alice_at_home.com gt alice_at_m2.home.com
5Basic call setup
- E-mail like identifier ltsipalice_at_home.comgt
- Alices phone registers with home.com
- Bob dials alice_at_home.com Phone does DNS
office.com
alice
DNS lookup for sip.udp.home.com Resolve to
pc4.home.com
pc4.home.com
m2.home.com
bob
home.com
6Basic call setup
- E-mail like identifier ltsipalice_at_home.comgt
- Alices phone registers with home.com
- Bob dials alice_at_home.com Phone does DNS
- Phone sends INVITE acts as UAC
INVITE sipalice_at_home.com To
sipalice_at_home.com From Bob ltsipbob_at_office.com
gt cIN IP4 128.59.19.60 maudio 8000 RTP/AVP 0
5 8
office.com
alice
pc4.home.com
m2.home.com
bob
home.com
User agent client
7Basic call setup
- Phone sends INVITE acts as UAC
- Server can proxy the call to current location
INVITE sipalice_at_m2.home.com To
sipalice_at_home.com From Bob ltsipbob_at_office.com
gt
office.com
alice
pc4.home.com
m2.home.com
bob
home.com
Proxy
8Basic call setup
- Phone sends INVITE acts as UAC
- Server can proxy the call to current location
- Alices phone rings acts as a UAS
SIP/2.0 180 Ringing
office.com
alice
pc4.home.com
m2.home.com
bob
home.com
Proxy
User agent server
9Basic call setup
- Phone sends INVITE acts as UAC
- Server can proxy the call to current location
- Alices phone rings acts as a UAS
- When Alice picks up, call is accepted and bobs
phone sends ACK to complete the setup
SIP/2.0 200 OK cIN IP4 135.180.144.32 maudio
9000 RTP/AVP 0 8
office.com
alice
pc4.home.com
m2.home.com
bob
home.com
10Basic call setup
- Encoded audio packets sent over RTP
office.com
alice
bob
home.com
11Basic call setup
- Encoded audio packets sent over RTP
- When either party hangs up BYE is sent
office.com
alice
BYE sipbob_at_office.com
bob
home.com
12Advanced scenario
(1)
13Highlights of SIP
- Addressing
- Naming sippresident_at_whitehouse.gov
- Contacts sipbob_at_128.59.19.605060
- More mobilitymobile
- Robustness
- Stateless proxy
- Security (authentication/encryption)
- Digest, TLS,
14Advanced services
- Fits in basic SIP model or defined as extensions
- presence, instant messaging, caller preference,
callee capabilities, ... - Integration of web, email, IM
- Programmability of services.
- SIP-CGI, CPL, SIP-servlet
- SIP conferencing
15Presence 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
16SIP Conferencing
- Different conference models (centralized,
distributed) - Basic task join/leave conference
- Dial in, Refer dial in
- Dial out, Refer dial out
INVITE
INVITE
REFER
INVITE
server
REFER
17Conference 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)
18Conference 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
- ltconference-info version"0" state"full"
entitymeeting_at_example.com"gt - ltuser uri"sipalice_at_home.com"
display-nameAlice"gt - ltstatusgtactivelt/statusgt
- ltmedia-statusgt
- ltmedia-stream media-type"audio"/gt
- lt/media-statusgt
- lt/usergt
- ltuser uri"sipbob_at_office.com"
display-nameBob Wilson"gt - ltstatusgtdepartedlt/statusgt
- lt/usergt
- lt/conference-infogt
19SIP Services
Double ringing sound when boss calls
Enter your authentication PIN for billing
Use finger for locating user
B2BUA
Endpoint
Make call when boss is online
Proxy/registrar
Endpoint
Forward to office phone during day, and home
phone during evening
- Common gateway interface (CGI)
- Call processing language (CPL)
- SIP servlet
- Endpoint service markup language (ESML)
20Endpoint call control
- Todays 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.
21Endpoint Service Markup Language (ESML)
- Language for endpoint service creation
- Direct user interaction, direct media control
- Handle converged information, e.g., call,
presence, email - Example when buddy is online, make a call
- ltesml name"online_call"
- require"generic presence ui"gt
- ltnotification status"online" priority"0.5"gt
- ltaddress-switch field"origin"gt
- ltaddress isalice_at_office.com"gt
- ltcall /gt
- ltalert soundring.au"
- text"Calling " /gt
- lt/addressgt
- lt/address-switchgt
- lt/notificationgt
- lt/esmlgt
22SIP 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
23SIP CGI contd.
- Block _at_anonymous.com
- if (defined ENVSIP_FROM
- ENVSIP_FROM "sip_at_anonymous.com")
-
- print "SIP/2.0 600 I can't talk right
now\n\n" -
- Make calls from boss as urgent
- if (defined ENVSIP_FROM
- ENVSIP_FROM /sipboss_at_mycompany.com/)
-
- foreach reg (get_regs())
-
- print "CGI-PROXY-REQUEST reg SIP/2.0\n"
- print "Priority urgent\n\n"
-
24CPL
- 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
- Email
25CPL contd.
- lt?xml version"1.0" ?gt
- lt!DOCTYPE cpl PUBLIC "-//IETF//DTD RFC2824 CPL
1.0//EN" "cpl.dtd"gt -
- ltcplgt
- ltincominggt
- lttime-switchgt
- lttime dtstart"20020830T140000Z"
- dtend"20020830T150000Z"gt
- ltreject status"reject" reasonBusy" /gt
- lt/timegt
- lt/time-switchgt
- lt/incominggt
- lt/cplgt
26SIP 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
-
27Unified messaging
- Answering machine and voice mail
- Centralized vs. distributed
- Existing protocols
- RTSP, SIP, E-mail
- Integration with other services
- E-mail, web, video, fax, instant messaging and
presence
28Voicemail
- Design alternatives
- Your phone redirects the call to voice mail after
10 seconds - The SIP proxy is configured to forward the call
to voicemail if busy or no response - Voice mail server pretends as another phone but
delays the pick up by 10 seconds - Advanced
- Integration with E-mail, VPIM
- Multimedia mail
- Issues
- Call reclaiming
- Retrieval and deletion
- Web interface, media server (rtsp//), SIP
(sip), PSTN (press 1 to listen)
29VoiceXML
Gateway
SipVXML
PSTN
End user
IVR platform
- Voice and telephony functions
- (ASR, TTS, DTMF)
- Service logic (application specific)
30VoiceXML contd.
ltformgt ltfield nameidgt ltpromptgt
Your ID, please. lt/promptgt lt/fieldgt
ltblockgt ltsubmit nexturl/gt
lt/blockgt lt/formgt
ltform actionurlgt Enter your Id ltinput
nameidgt ltinput typesubmitgt lt/formgt
Telephony, speech synthesis or audio output, user
input and grammar, program flow, variable and
properties, error handling,
31VoiceXML contd.
- Unified messaging access
- Email by phone
- Event notification and scheduling
- Audio volume control for conference
- Advanced conference control
32PSTN interworking
sipbob_at_home.com
1 212 9397063
Telephone network
Telephone subscriber
SIP/PSTN gateway
SIP server
IP endpoint
- 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
33PSTN to IP
- Gateway knows the SIP server
- ltsip7063_at_conductor.cs.columbia.eduuserphonegt
- ENUM
- DNS
- 1 212 9397042 gt 2.4.0.7.9.3.9.2.1.2.1.e164.arpa
gt siphgs_at_cs.columbia.edu - Suitable for relatively static contacts
34IP to PSTN
- Static mapping
- 1-212-939xxxx gt _at_itgw1.cs.columbia.edu
- ITGW information is dynamic
- Overlapping networks
- Multiple providers
- Load balancing
- TRIP
- Route advertisement
- Can be implemented in outbound proxy
- Suitable for current hierarchical network
- 1 _at_service.mci.com at 4/min
- 1212 _at_nyc.gw.com at 1/min
- 1212939 _at_itgw1.columbia.edu free
35Columbia SIP servers (CINEMA)
Telephone switch
Local/long distance 1-212-5551212
rtspd media server
Quicktime
Single machine
RTSP
sipconf Conference server
RTSP clients
Department PBX
sipum Unified messaging
Internal Telephone Extn 7040
713x
sipd Proxy, redirect, registrar server
SQL database
SIP/PSTN Gateway
Web based configuration
SNMP (Network Management)
Extn 7134
H.323
Extn 7136
siph323 SIP-H.323 translator
NetMeeting
xiaotaow_at_cs
36Columbia 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
37SIP beyond telephony
DO siplamp_at_cs.columbia.edu SIP/2.0 .. ltControlgt
ltActiongtturn lamp onlt/Actiongt lt/Controlgt
lamp
serial port
X10 device
38Summary
- 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 http//www.cs.columbia.edu/sip Servers
http//www.cs.columbia.edu/IRT/cinema Client
http//www.cs.columbia.edu/IRT/sipc