Beruflich Dokumente
Kultur Dokumente
Jiri Kuthan, iptel.org/FhG With additions by Henning Schulzrinne sip:jiri@iptel.org September 2003, December 2005
Motivation: Applications
Motivation: Scenarios
Motivation: Scenarios
E1
DSL
Services available to all companys users, on-site, offsite and multi-site toll RIPE Meeting bypass. No telephone line required for home-workers and remote offices. WaveLAN Single infrastructure for data and voice. T1 Effectiveness tools. Service operation can be outsourced in a Centrex-like manner (MCI Advantage). Like with web/email, single server may host multiple domains.
SIP & ENUM
Technology: SIP
SIP is HTTP-like, textual, client-server protocol, using email-like addresses So-called Proxy server takes care of setting up sessions between users Signaling independent on media both take different path
#0 DNS SRV Query ? iptel.org Reply: IP Address of iptel.org SIP Server
INVITE sip:jiri@iptel.org From: sip:Caller@sip.com;tag=12 To: sip: jiri@iptel.org #1 Call-ID: 345678@sip.com OK 200 From: sip:Caller@sip.com;tag=12 To: sip: jiri@iptel.org;tag=34 Call-ID: 345678@sip.com
#4
Proxy
Caller@sip.com
Media streams #5 SIP & ENUM
sip:jiri@195.37.78.173
Technology: SIP
proxy
Proxy servers maintain central role in SIP networks: They glue SIP components such as phones, gateways, applications and other domains They provide place for service implementation (missed calls, forwarding, screening, etc.) and service access control SER: www.iptel.org/ser/
Other domains
SIP & ENUM
Technology: SIP
Concern: Performance
Performance are you really able to process all the crap messages you receive over the public Internet? iptel.orgs operational observation: 80% of traffic is invalid messages caused by misconfigured or broken devices. Use of applications such as presence increase per-user load compared to VoIP roughly by factor of 100. Other stress factors: reboot avalanches, DoS. Nevertheless we have the capacity today: our measurements indicate proxy transactional throughput of hundreds to thousands of calls per second. Sufficient to power large subscriber populations.
History
Carrying voice on IP-based packet networks first identified by Cohen in 1977* Commercialization and standardization began in 1995; Vocaltec the first company to ship IP2PSTN gateways (proprietary) SIP standardization began in IETF in 1995 Adoption of SIP for use in 3GPP in late nineties Motivation:
Cost saving through telco by-passing Service Integration
* D. Cohen, Issues in transnet packetized voice communications, In Proceedings of the 5th Data Communications Symposium
designers, operators, vendors, and researchers concerned with the evolution of the Internet architecture and the smooth operation of the Internet. Working Groups related to Internet telephony:
SIP: core Session Initiation Protocol QoS Related: DiffServ, IntServ, SIPPING: Future SIP extensions and RSVP PSTN legacy: SigTran, Megaco related issues and Presence Leveraging ENUM: integration of E.164 numbering with Internet services interaction of PSTN and IP services: PINT,SPIRITS SIMPLE: SIP for Instant
Messaging
IPTEL: Internet Telephony AVT: Audio Video Transport
Media Transport
Getting packetized voice over lossy and congested network in realtime RTP protocol for transmitting real-time data such as audio, video and games
IETF Practice: Decomposition Principle; Separate protocols are used for separate purposes. All of them on top of IP.
HTTP
TLS
SIP TCP
RADIUS UDP
RTP
STUN
PPP
Ethernet GPRS SONET V.x
AALx
ATM
Packetized Communication
Signaling Protocol Media Transport
End Users
Call Server
End Users
IP Router
Note: Every packet may take a completely different path Signaling takes typically different path than media does Both signaling and media as well as other applications (FTP, web, email, ) look alike up to transport layer and share the same fate
SIP & ENUM
Given All Supporting Protocols are In Place, What Do I need on SIP Part?
SIP Registrar
accept registration requests from users maintains users whereabouts at a Location Server (like GSM HLR)
All of these elements are logical and are typically part of a single server!
SIP & ENUM
SIP Registrar
Location Database
Jiri @ 195.37.78.173
#2
REGISTER sip:iptel.org SIP/2.0 From: sip:jiri@iptel.org To: sip:jiri@iptel.org Contact: <sip:195.37.78.173> #1 Expires: 3600
#3
SIP registrar keeps track of users whereabouts. This registration example establishes presence of user with address jiri@iptel.org for one hour and binds this address to users current location 195.37.78.173.
SIP/2.0 200 OK
Basic SIP Call-Flow (Proxy SIP Proxy looks up next hops for requests to Mode) served users in location database and
forwards the requests there.
jiri@195.37.78.173
#2
Location Database
#0 DNS SRV Query ? iptel.org Reply: IP Address of iptel.org SIP Server #3
INVITE sip:jiri@iptel.org From: sip:Caller@sip.com;tag=12 To: sip: jiri@iptel.org #1 Call-ID: 345678@sip.com OK 200 From: sip:Caller@sip.com;tag=12 To: sip: jiri@iptel.org;tag=34 Call-ID: 345678@sip.com
#7
jiri
#6
Proxy
ACK sip:jiri@195.37.78.173
Caller@sip.com
Media streams #8 SIP & ENUM
sip:jiri@195.37.78.173
SIP End-devices
User Agent (user application)
UA Client (originates calls) UA Server (listens for incoming calls)
Types of UAs:
Softphone and hardphones Messaging clients PSTN gateways Media servers (voicemail) Etc.
gw01.asia.pstn.com
#3
#4
Destinations Proxy in the target first-hit proxy area distributes load identifies a proxy in a gateway farm. serving dialed area. Note: signaling (in red) may take a completely different path from media (in blue).
SIP & ENUM
#5 CANCEL #6 OK #7 INVITE
INVITE a@a.com
OK
Legend SIP signaling SIP state media
SIP proxies deliver a one-time rendezvous service (as opposed to state storage service). Thus a stateful proxy just keeps state during a SIP rendezvous transaction and completely forgets it afterwards. A SIP proxy is not aware of existing calls. In case of failure, existing calls are NOT affected! Subsequent transactions may take a direct path!
INVITE
Unless route recording is used, subsequent transactions (e.g., BYE) take a direct path to destination as indicated in Contact: header field. OK Contact: Todays common practice is to sip:jiri@195.3.4.9 turn record-routing ALWAYS on to deal with devices that speak different transport protocols and need a mediator in-between them.
Response
v=0 o=UserA 2890844526 2890844526 IN IP4 here.com s=Session SDP c=IN IP4 100.101.102.103 t=0 0 m=audio 49172 RTP/AVP 0 a=rtpmap:0 PCMU/8000
Payload
v=0 o=UserB 2890844527 2890844527 IN IP4 there.com s=Session SDP c=IN IP4 110.111.112.113 t=0 0 m=audio 3456 RTP/AVP 0 a=rtpmap:0 PCMU/8000
SIP addressing
Users identified by SIP or tel URIs
sip:alice@example.com
tel: URIs describe E.164 number, not dialed digits (RFC 2806bis) tel URIs SIP URIs by outbound proxy A person can have any number of SIP URIs The same SIP URI can reach many different phones, in different networks
sequential & parallel forking GRUUs conferences device identifiers (sip:foo@128.59.16.15)
tel:110
sip:sos@domain
Registration binds SIP URIs (e.g., device addresses) to SIP address-of-record (AOR)
SIP Addresses
SIP gives you a globally reachable address.
Callees bind their temporary address to the global one using SIP REGISTER method. Callers use this address to establish real-time communication with callees.
URLs used as address data format; examples: sip:jiri@iptel.org sip:voicemail@iptel.org?subject=callme sip:sales@hotel.xy; geo.position:=48.54_-123.84_120 must include host, may include user name, port number, parameters (e.g., transport), etc. may be embedded in Webpages, email signatures, printed on your business card, etc. address space unlimited non-SIP URLs can be used as well (mailto:, http:, ...)
SIP & ENUM
CANCEL cancels a pending INVITE BYE terminates sessions REGISTER binds a permanent address to current location;
may convey user data (CPL scripts)
2yz Success
200 ok
3yz Redirection
300 Multiple Choices 301 Moved Permanently 302 Moved Temporarily
SIP & ENUM
End-2-end
It puts most of intelligence into end-devices (user agents) good for scalability and extensibility The network infrastructure designed to be leight-weighted. Network functionality (registrar, proxy) are typically logical parts of a single server.
It delivers mobility: User can register from one or more locations with IP connectivity
SIP & ENUM
A is having a call with B. A decides to transfer B to C. It sends a REFER to B with Cs address. Eventually, A is notified on successful transfer using NOTIFY (#6).
#3 #4
#2 202 Accept
#6
NOTIFY (OK)
#7
#5
200 ACK
200 OK
media
timeline SIP & ENUM
draft-ietf-sip-cc-transfer, RFC3515
Call Transfer/REFER
Accomplished using the REFER method. The REFER method indicates that the recipient (identified by the Request-URI) should contact a third party using the contact information provided in the method. New header fields: Refer-To, Refer-By. NOTIFY method used to report on result of referral. Note: No changes to proxy behavior required. Variants:
With Consultation Hold (SIP Hold and unattended transfer) Attended Transfer, I.e., with a short conference
Presence-based
facilitates unscheduled communications provide recipient-specific information only contact in real-time if destination is willing and able appropriately use synchronous vs. asynchronous communication guide media use (text vs. audio) predict availability in the near future (timed presence)
current solutions:
voice mail tedious, doesnt scale, hard to search and catalogue, no indication of when call might be returned automated call back rarely used, too inflexible
Context-aware communication
context = the interrelated conditions in which something exists or occurs anything known about the participants in the (potential) communication relationship both at caller and callee
time capabilities location activity/availability sensor data (mood, bio) CPL caller preferences location-based call routing location events presence privacy issues similar to location data
SIP & ENUM
Basic presence
Role of presence initially: can I send an instant message and expect a response? now: should I use voice or IM? is my call going to interrupt a meeting? is the callee awake? Yahoo, MSN, Google, Skype presence services: on-line & off-line
useful in modem days but many people are (technically) on-line 24x7 thus, need to provide more context
calendar
cell
manual
(views) services
alice@example.com audio, video, text r42@example.com video
devices
privacy filtering
XCAP
select best source resolve contradictions
depends on watcher
XCAP
composition policy
(not defined yet)
privacy policy
draft-ietf-simple-presence-data-model
SUBSCRIBE
difference to previous notification
watcher
NOTIFY
Rich presence
More information automatically derived from
sensors: physical presence, movement electronic activity: calendars
Rich information:
multiple contacts per presentity
device (cell, PDA, phone, ) service (audio)
activities, current and planned surroundings (noise, privacy, vehicle, ) contact information composing (typing, recording audio/video IM, )
<tuple>
<device>
<place-is>
<place-type> <privacy> <relationship>
<service-class>
<sphere> <status-icon> <time-offset>
<user-input>
SIP & ENUM
PA
NOTIFY
CPL
LESS
INVITE
Location-based services
Finding services based on location physical services (stores, restaurants, ATMs, ) electronic services (media I/O, printer, display, ) not covered here Using location to improve (network) services communication
incoming communications changes based on where I am
configuration
devices in room adapt to their current users
awareness
others are (selectively) made aware of my location
security
proximity grants temporary access to local resources
location-based events
subscribe to locations, not people Alice has entered the meeting room subscriber may be device in room our lab stereo changes CDs for each person that enters the room
RFC3428
Instant Messaging
Goal: deliver short messages rapidly SIP Extension: MESSAGE Method
Message body of any MIME type (including Common Profile for Instant Messaging, draft-ietf-impp-cpim ) im type URLs used
MESSAGE sip:user2@domain.com SIP/2.0 Via: SIP/2.0/UDP user1pc.domain.com From: im:user1@domain.com To: im:user2@domain.com Contact: sip:user1@user1pc.domain.com Call-ID: asd88asd77a@1.2.3.4 CSeq: 1 MESSAGE Content-Type: text/plain Content-Length: 18 Watson, come here. SIP & ENUM
RFC3265
Subscribe-Notify
Goal: ability to be notified when a condition occurs Applications:
User presence and related applications Call-back (notify when the other party becomes available) VoiceMail Notification (notify when a voicemail message is stored) [draft-ietf-sipping-mwi] Traffic Alerts (notify on traffic jam)
Extensions: SUBSRIBE and NOTIFY methods, Event and Allow-Events headers, 489 Bad Event Response Code Subscription subject to expiration similarly to how REGISTER is
SIP & ENUM
draft-ietf-simplepresence
#5 REGISTER joe #6 OK
Service Programming
They key is efficiency of service programming. Dont be worried about buzzword compliance too much.
SIP & ENUM
Service creation
Tailor a shared infrastructure to individual users traditionally, only by vendors (and sometimes carriers) learn from web models: killer app vertical apps
end system
CPL scripts
Servlets
Interpreters
SIP-CGI
Java Servlets
CPL
SIP Messages
Protocol stack
Jkus call processing logic: If ($caller is in {Jane, Bob}) proxy to jku@cell.com else proxy to voicemail@trash.com
Jkus call processing logic: If ($caller ==Jane) play Mozart else play Smetana
#1 INVITE jku
RFC 3050
Follows Web-CGI. Unlike Web-CGI, SIP-CGI supports proxying and processes responses as well. Language-indpendent (Perl, C, ...) Communicates through input/output and environment variables. CGI programs unlimited in their power. Drawback: Buggy scripts may affect server behavior easily. Persistency token (cookie) is passed between SIP server and CGI to keep state across requests and related responses.
SIP-CGI I/O
Script input: environment variables (AUTH_TYPE, CONTENT_LENGTH, REQUEST_URI, etc.) and SIP message on stdin Script output: set of messages consisting of action lines, CGI header fields and SIP header fields on stdout Action lines:
Generating a response: status line Proxying:
CGI-PROXY-REQUEST <dest-url> <sip-version> Additional header fields may be followed they will be merged with the original request.
Forward response: CGI-FORWARD-RESPONSE <token> <sipversion> Set cookie for subsequent messages: CGI-SET-COOKIE <token> <sipversion> Determine if the script should be called for the next message belonging to the same transaction: CGI-AGAIN ("yes" | "no") <sipversion>
SIP & ENUM
draft-ietf-iptel-cpl
CPL Example
<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>
LESS: simplicity
Generality (few and simple concepts) Uniformity (few and simple rules)
Trigger rule Switch rule Action rule Modifier rule
modifiers
trigger
switches
actions
LESS: Safety
Type safety
Strong typing in XML schema Static type checking
Memory access
No direct memory access
LESS snapshot
incoming call
<less> If the call from my boss <incoming> <address-switch> <address is=sip:myboss@abc.com"> Turn off the stereo <device:turnoff device=sip:stereo_room1@abc.com/> <media media=audio> <accept/> Accept the call with only audio </media> </address> </address-switch> </incoming> </less>
LESS packages
im
web
Device agent
RFC2916
ENUM
Problem: caller is in PSTN (can use only digit keys) and would like to reach a SIP callee Answer: ENUM. Create a global directory with telephone numbers that map to SIP addresses (or email, etc.). Lookup mechanism: DNS maps E.164 numbers to a set of user-provisioned URIs The E.164 number queries are formed as a reversed dot-separated number digits, to which string .e164.arpa is appended, e.g.:
+4319793321 1.2.3.3.9.7.9.1.3.4.e164.arpa
DNS/ENUM helps ingress gateway to resolve SIP address from E.164 number Typically, owner of an ENUM entry can manipulate the address association through a web provisioning interface
! sip:jiri@iptel.org
PSTN: +4917
INVITE sip:jiri@iptel.org
200 OK w/JPEG
SIP/2.0 200 OK Via: SIP/2.0/UDP here.com:5060 From: BigGuy <sip:UserA@here.com> To: LittleGuy <sip:UserB@there.com> Call-ID: 12345601@here.com...
RFC 2617
1. REGISTER
3. REGISTER w/credentials
4. OK
Proxy
Cheating attempt: user gh with tries to register as user a To do so, the cheater submits proper ghs credentials but uses as address of record in To header field Registrar must enforce a policy that links digest identity to permissible addresses of records
Record-Routing
Record-Routing
Refresher: by default, only the initial request (INVITE) visits a proxy, subsequent requests (BYE) travel directly to offload servers Problems:
some applications need to see all signaling, accounting for example UAs may live in different protocol realms (TCP vs UDP, IPv4 versus v6) and can communicate only through the proxy server
Solution: record-routing: proxy servers append a hint to processed requests which advices phones to keep the servers in path for subsequent communication
Record-Routing Example
INVITE sip:jiri@iptel.org From: joe@abc.com;tag=12 Contact: <sip:joe@1.2.3.4> INVITE sip:jiri@iptel.org From: joe@abc.com;tag=12 Record-route: <sip:rr@1.2.3.4;lr>
Record-Routing Apps
Record-Routing can be also use to piggy-back session-state in SIP messages to leave server stateless Example:
A RR-parameter can include timestamp for initial invite When CDRs are generated on receipt of BYE, the call duration is calculated as current_time()rr_timestamp_parameter() Note: In security-sensitive application like above, it is necessary to introduce message integrity
3GPP: Architecture
Alternative Access Network Applications & Services *) SCP Mh CAP Gn Gp TE R MT Um
ERAN Legacy mobile signaling Network CSCF
R-SGW Ms Cx
CSCF
Multimedia IP Networks
Mw Mm Mg
Gi Gc
Mr MRF Gi GGSN
Gi MGCF Mc T-SGW *)
Iu-ps' Iu Iu1
TE R
1 2
MT Uu
UTRAN
Mh R-SGW
Information Resources
Author: jiri@iptel.org Related IETF work: http://www.iptel.org/ietf/ SIP Express Router: http://www.iptel.org/ser/ SIP Products: http://www.iptel.org/info/products SIP Tutorial: http://www.iptel.org/sip/ SIP Site: http://www.cs.columbia.edu/sip/
Glossary
ALG Application-Level-Gateway CDR Call Detail Record CGI Common Gateway Interface CPL Call Processing Language DTMF Dual Tone Multi-Frequency ETSI European Telecommunications Standards Institute IETF Internet Engineering Task Force ITSP Internet Telephony Service Providers ITU International Telecommunication Union IVR Interactive Voice Reponse JAIN Java APIs for Integrated Network Framework LEC Local Exchange Carrier LNP Local Number Portability NAT Network Address Translation MGCP Media Gateway Control Protocol OSP Open Settlement Protocol PSTN Public Switched Telephone Network QoS Quality of Service RTCP RTP Control Protocol RTP Real-Time Transport Protocol RTSP Real-Time Streaming Protocol SDP Session Description Protocol SIP Session Initiation Protocol SS7 Signaling System Nr. 7 TRIP Telephony Routing over IP VoIP Voice over IP