sip: From - Computer Science, Columbia

Download Report

Transcript sip: From - Computer Science, Columbia

A Generic Event Notification System
Using XML and SIP
Knarig Arabshian and Henning Schulzrinne
Department of Computer Science
Columbia University
{knarig,hgs}@cs.columbia.edu
September 12, 2003
NYMAN Workshop
Event Notification



Event notification can be applied to
many different systems
SIP has been extended to support event
notification
Various types of event notification
systems using subscribe/notify



Presence/Instant Messaging
Emergency Notification
Conference control
Overview





What is SIP (Session Initiation
Protocol)?
Details of SIP event notification
architecture
Incorporating XML
Benefits
Conclusions
What is SIP?





The Session Initiation Protocol (SIP) is a signaling
protocol used for establishing sessions in an IP network.
SIP is part of the IETF standards and is modeled upon
other Internet protocols such as SMTP (Simple Mail
Transfer Protocol for e-mail) and HTTP (Hypertext
Transfer Protocol for www)
SIP is also being used in Microsoft Messenger in
Windows XP
A session could be a simple two-way telephone call or it
could be a collaborative multimedia conference session.
Different services are possible
 Internet telephony
 Event notification
 Device control
What is SIP?


Two Components within SIP: User
Agent and the SIP Network Server.
User Agent



end system component for the call
can be both a User Agent Client (UAC) and
a User Agent Server (UAS)
client element initiates the calls and the
server element answers the calls.
What is SIP?

SIP Network Server


Network device that handles the signaling
associated with multiple calls.
Main function of the SIP servers is to provide
name resolution and user location



Caller is unlikely to know the IP address or host name of
the called party
Caller will dial an email-like address or a telephone
number associated with the called party.
Receives requests, determines where to send
these, and passes them onto the next server
(using next hop routing principals).
Basic call setup



E-mail like identifier: <sip:[email protected]>
Alice’s phone registers with home.com
Bob dials [email protected]; Local server does DNS
REGISTER home.com SIP/2.0
To: sip:[email protected]
Contact: sip:[email protected]
…
Registrar
office.com
bob
DNS lookup sip.udp.home.com
Resolve to m2.home.com
[email protected] =>
[email protected]
alice
m2.home.com
home.com
Basic call setup


Phone sends INVITE; acts as User Agent Client
Server can proxy the call to current location
office.com
INVITE sip:[email protected] …
To: sip:[email protected]
From: “Bob” <sip:[email protected]>
…
INVITE sip:[email protected] …
To: sip:[email protected]
From: “Bob” <sip:[email protected]>
…
c=IN IP4 128.59.19.60
m=audio 8000 RTP/AVP 0 5 8
alice
m2.home.com
bob
User agent client
Proxy
home.com
Basic call setup


Alice’s phone rings; acts as a User Agent Server
When Alice picks up, call is accepted and Bob’s phone sends
ACK to complete the setup
SIP/2.0 180 Ringing
SIP/2.0 200 OK
…
office.com
c=IN IP4 135.180.144.32
m=audio 9000 RTP/AVP 0 8
alice
pc4.home.com
m2.home.com
bob
Proxy
home.com
User agent
server
Basic call setup

Encoded audio packets sent over RTP
office.com
alice
bob
home.com
Basic call setup

When either party hangs up BYE is sent
office.com
alice
BYE sip:[email protected]
bob
home.com
Columbia SIP user agent (sipc)


Media
 Audio, video, text, white board
 Screen sharing
 Shared web browsing
Advanced
 Presence, instant messaging
 Conference control
 Emergency notification and handling
 Device control
Subscribe/Notify



SIP has also been extended to generate
event notifications and instant
messages
Users subscribe to an event with the
SUBSCRIBE method and receive
notifications via NOTIFY
This feature can be used for various
event notification systems
Subscribe Request





Resembles that of a SIP INVITE
Must have one “Event” header in the header
field which will specify the type of event it is
subscribing to
Must also contain an “Expires” header which
defines the duration of the subscription
Subscriptions to multiple events requires
multiple subscribe messages to be sent to the
notifier
To unsubscribe, it sends a SUBSCRIBE
message with the ”Expires” field set to zero
Subscribe Request


Can contain optional message body in
SUBSCRIBE request

Further details of notification

Standardized grammar to automate the
processing of the SUBSCRIBE request in
the Notification Server
If message body is not present then
Subscriber will expect the default method
of alert
Notify Request



Notification server receives the
subscription, adds the subscriber to the
particular event list and then generates
NOTIFY requests accordingly
The “Event” header will indicate the type of
notification it is
The message body of the NOTIFY message
may include a remote procedure call or
other details of notification.
SUBSCRIBE sip:[email protected] SIP/2.0
Event: sos
Expires: 86400
From: sip:[email protected]
To: sip:[email protected]
CLIENT
(SUBSCRIBER)
SIP/2.0 202 Accepted
From: sip:[email protected]
Expires: 86400
NOTIFY sip:[email protected] SIP/2.0
Event: sos
To: sip:[email protected]
From: sip:[email protected]
SERVER
(NOTIFIER)
Incorporating XML




XML (Extensible Markup Language) is
“metalanguage”, which is a language used for
describing other languages
An XML schema is an XML language that defines
various data types found in the XML document
Popular in web-related programming
Good choice for interoperability within many
different types of institutional systems.
XML Messages and SIP

XML messages may be used for representing

schemas used for automatic GUI generation and configuration of
sub-events
<?xml version="1.0" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="Fire">
<xs:sequence>
<xs:element name="location" type="string"/>
<xs:element name="severity" type="string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>

a filter for events subscribed to
<?xml version="1.0" encoding="UTF-8"?>
<ev-filter-set xmlns="urn:ietf:params:xml:ns:simple-winfo-filter">
<ev-filter id = “Fire">
<trigger>
<changed changed-by=“Forest Hills, NY” //*[@location] </changed>
<changed changed-by =“Severe” //*[@severity] </changed>
</trigger>
</ev-filter>
</ev-filter-set>

performing remote procedure calls (SOAP)
<?xml version='1.0'?>
<:SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAPENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<:SOAP-ENV:Body>
<:Fire>
<:location xsi:type="xsd:string">Flushing, NY</:location>
<:severity xsi:type="xsd:string">severe</:severity>
</:Fire>
</:SOAP-ENV:Body>
</:SOAP-ENV:Envelope>
Message Flow
Runs on
separate host
Runs on
separate host
1) SIP SUBSCRIBE message requesting possible events
2) 302 Redirect message with body listing all the events
SIPC
3) SUBSCRIBE message with body containing
an XML filter for event (ie. Fire)
4) 200 OK
SIPD
5) 302 Redirect message with a reference to the
XML Schema for event Fire
6) GUI generated with XML Schema and user selects the filtered
values. Updated SUBSCRIBE sent to server with filtered values in
XML format in SIP message body
7) 200 OK
GUI Screens Generated
Detailed overview of architecture
2) Generic emergency
address: [email protected] is
added to sipc
3) Sipc contacts notification server and
gets list of emergency events user can
subscribe to
1) Event generators
publish their events to
notification server
Fire
[email protected]
Notification server (sipd)
Earthquake
5) Sipc gets XML schema
reference from notification
server that will generate a form
which queries for the event’s
properties. Sipc then updates its
subscription to the notification
server with the filtered
expressions
4) User
subscribes to
event it wants
to be notified
of
Detailed overview of architecture
3)Sipc will process SOAP body
and invoke the procedure
call—such as flashing of lights
2) Sipd will process parameters of the
fire and send a NOTIFY to sipc
including SOAP body
1) Fire occurs and event
generator notifies sipd
Fire
[email protected]
Notification server (sipd)
Earthquake
Benefits: Why SIP and XML?

Device Neutrality


More Information


Video conferencing, text messaging
Automated Action


SIP-based end systems, ranging from IP telephones to
3G wireless handsets
Device control using the SIP “DO” method
Generic in its Application

Using XML schemas and messages allows for variety
of event notification systems
Conclusion and Future Work




SIP is a signaling protocol that supports
SUBSCRIBE/NOTIFY methods
Incorporating XML in SIP event notification
allows the system to be generic in its
application
Currently implementing emergency
notification
Future work includes incorporating all the
different types of events supported in sipc in
one generic event notification module