Download presentation
1
Presence and IM using sip
4/22/2017 SIP beyond VoIP Presence and IM using sip
2
“Presence, the dial tone of the 21-st century”
Henry Sinnreich, “The Godfather” of SIP
3
Adrian Georgescu Founder and CEO of AG Projects
Co-chair of ISOC SIP WG in the Netherlands Management board member of OpenSIPS Software Foundation Adrian Georgescu
4
AG Projects Core Business
Delivery and Support of Scalable Turnkey SIP Infrastructures Since 2002 AG Projects Core Business
5
Projects we are involved with
OpenSIPS OpenXCAP MSRP Relay CDRTool MediaProxy SIP SIMPLE client SDK Blink Projects we are involved with
6
All successful rich communications clients to date implement IM and Presence as a main built-in feature even if VoIP is the money generating service. When all money has been made from proprietary solutions for real-time communications, a global solution based on universally accepted standards will emerge to absorb the demand for Presence and IM Why this IS relevant
7
The standards for real-time communications are being forged by Internet Engineering Task Force
IETF
8
IETF SIP SIMPLE Working Group
SIP for Instant Messaging and Presence Leveraging Extensions (SIMPLE) IETF WG produces interoperable standards for SIP, Instant Messaging and Presence IETF SIP SIMPLE Working Group
9
SIP SIMPLE standards MSRP Protocol and its Relay extension
SUBSCRIBE, NOTIFY and PUBLISH SIP methods XCAP Protocol for storage of end-user documents SIP SIMPLE standards
10
Message Session Relay Protocol (MSRP) is a protocol for transmitting a series of related instant messages in the context of a session. Message sessions are treated like any other media stream when set up via a rendezvous or session creation protocol such as the Session Initiation Protocol (SIP). MSRP Sessions are defined in RFC 4975 and RFC 4976. MSRP Protocol
11
Is reliable by using TCP transport and secure by using TLS
End-to-end delivery confirmation for each message Works sequential, suitable for chat sessions No limit for data size, allows chunking Built-in NAT traversal capability MSRP Properties
12
Session description for Instant Messaging
Content-Type: application/sdp Content-Length: 303 v=0 o= IN IP s=Blink (MacOSX) c=IN IP t=0 0 m=message 2855 TCP/TLS/MSRP * a=path:msrps:// :2855/b2d10bb428210c0ec686;tcp a=accept-types:message/cpim text/* application/im-iscomposing+xml a=accept-wrapped-types:* a=setup:active Session description for Instant Messaging
13
Session Description for File Transfer
Content-Type: application/sdp Content-Length: 408 v=0 o= IN IP s=Blink (MacOSX) c=IN IP t=0 0 m=message 2855 TCP/TLS/MSRP * a=path:msrps:// :2855/b0bd df628;tcp a=sendonly a=accept-types:* a=accept-wrapped-types:* a=setup:active a=file-selector:name:"About Stacks.pdf" type:com.adobe.pdf size: hash:sha1:83:D4:BB:70:67:FE:D7:04:89:99:2F:14:40:F3:40:46:93:88:0B:33 Session Description for File Transfer
14
MSRP Methods AUTH – To reserve a session in a MSRP relay
SEND – To send messages (or chunks of them) REPORT – For end-to-end delivery confirmation MSRP Methods
15
MSRP AUTH Method SENDING:
:18: : : > :2855 MSRP cecb7a09dd77a505 AUTH To-Path: msrps://ag-projects.com;tcp From-Path: msrps:// :65310/60089caac481a5898a73;tcp Authorization: Digest username=" ", nonce="KDiJ6dUltB241YpjU1XEKTEyODM4NDc0ODMuNTg3OjgwLjEwMS45Ni4yMA==", realm="ag-projects.com", qop="auth", cnonce="5546b6f e0f9c2af95ba2a", nc=" ", opaque="c1e58368ebe508df8d84b94e71f9b8de", response="79546d58ae501c977c5f4ce74bb4fdfc" cecb7a09dd77a505$ RECEIVED: :18: : :65310 < :2855 MSRP cecb7a09dd77a OK To-Path: msrps:// :65310/60089caac481a5898a73;tcp From-Path: msrps://ag-projects.com;tcp Authentication-Info: cnonce="5546b6f e0f9c2af95ba2a", nc= , rspauth="d96211e21bbe0d489c3e3a1c215794f3", qop=auth Use-Path: msrps://node03.dns-hosting.info:2855/KDiJ6dUltB241YpjU1XEKTEyODM4NDc0ODMuNTg3OjgwLjEwMS45Ni4yMA==;tcp Expires: 600 MSRP AUTH Method
16
MSRP SEND method RECEIVED:
:18: : :65310 < :2855 MSRP OC26za431IPezi3SfKpgNIpt SEND To-Path: msrps:// :65310/60089caac481a5898a73;tcp ://node03.dns-hosting.info:2855/KDiJ6dUltB241YpjU1XEKTEyODM4NDc0ODMuNTg3OjgwLjEwMS45Ni4yMA==;tcp msrps:// :2856/a80a757b57acee5bcd69;tcp Byte-Range: 1-240/240 Message-ID: 837fda182d73143e Content-Type: message/cpim To: Adrian Georgescu From: DateTime: T08:18: Content-Type: text/plain Welcome to the room, Adrian Georgescu. You are the only participant in the room OC26za431IPezi3SfKpgNIpt$ SENDING: :18: : : > :2855 MSRP OC26za431IPezi3SfKpgNIpt 200 OK To-Path: msrps://node03.dns-hosting.info:2855/KDiJ6dUltB241YpjU1XEKTEyODM4NDc0ODMuNTg3OjgwLjEwMS45Ni4yMA==;tcp From-Path: msrps:// :65310/60089caac481a5898a73;tcp MSRP SEND method
17
IM Architecture SIP Client that implements MSRP protocol
SIP Server, a standard SIP Proxy MSRP Relay for NAT traversal IM Architecture
18
IM Architecture A standard SIP Proxy is used in combination with a MSRP Relay. The receiving end-point reserves a TCP port on the publicly reachable relay and offers it in its 200 OK answer to the calling end-point.
19
XCAP protocol (RFC 4825) allows a client to read, write, and modify application configuration data stored in XML format on a server by using HTTP protocol. An XCAP server is used to store data like buddy lists and presence policy in combination with a SIP Presence server to provide a complete SIP SIMPLE server solution. XCAP Protocol
20
Presence Rules – stores policy shared with the Presence Agent
Resource Lists – stores contact names and SIP addresses RLS Services – stores contacts to which server can subscribe Icon – stores user photo and makes it available for subscribers PIDF Manipulation – stores presence information when off-line XCAP documents
21
Correlating buddy lists with policy information is tough enough
Getting it right is the most complex part building a SIP client OMA has defined how XCAP is used for Presence (yet more convoluted) Implementation complexity an order of magnitude higher than a VoIP call XCAP documents Usage
22
PUBLISH – SIP Extension for Event state Publication RFC3903
SUBSCRIBE/NOTIFY – SIP Event Notification RFC 3265 Event packages – Presence, Winfo, Xcap-diff SIP Methods
23
Publish method PUBLISH sip:31208005169@ag-projects.com SIP/2.0
From: "Adrian Georgescu" To: "Adrian Georgescu" Call-ID: CXP.qcaQG.LYO1bY0gN-JH1u4hEBuy49 Event: presence Expires: 600 Content-Type: application/pidf+xml User-Agent: Blink (MacOSX) Content-Length: 745 <?xml version='1.0' encoding='UTF-8'?> <presence xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model” <tuple id="lkqpmdpo"> <status> <basic>closed</basic> </status> <contact <timestamp> T11:52:28+02:00</timestamp> </tuple> <dm:person id="exnktxob"> <dm:timestamp> T11:52:07+02:00</dm:timestamp> </dm:person> <dm:device id="erquznkp"> <dm:note xml:lang="en">Powered by Blink (MacOSX)</dm:note> </dm:device> </presence> Publish method
24
Subscribe method SUBSCRIBE sip:31208005169@ag-projects.com SIP/2.0
Via: SIP/2.0/UDP :60131;rport;branch=z9hG4bKPjzeIfWP8Qwt7cexqnCTioMIif.PM3Zvml From: "Adrian Georgescu" To: Contact: Call-ID: nfJWHU.kiCqywvL6Qr5oWcFukyTgQ4Cx CSeq: SUBSCRIBE Event: presence Expires: 600 Accept: application/pidf+xml User-Agent: Blink (MacOSX) Content-Length: 0 Subscribe method
25
Notify method NOTIFY sip:nvdaehwt@80.101.96.20:64137 SIP/2.0
Record-Route: <sip: ;lr;ftag= > To: From: CSeq: 1 NOTIFY Call-ID: Vb5aZkC5K5G3nQUZZJLQQd.19NXrnQgd Content-Length: 1288 User-Agent: OpenSIPS (1.4.5-tls (i386/linux)) Event: presence Contact: Subscription-State: active;expires=600 Content-Type: application/pidf+xml <?xml version="1.0" encoding="UTF-8"?> … </presence> Notify method
26
Presence Architecture
4/22/2017 SIP Client that implements Presence methods and XCAP SIP Server that implements a Presence Agent XCAP Server for document storage (policy and buddy lists) Presence Architecture
27
Presence Architecture
A Presence Agent together with an XCAP server aggregates the presence information for all SIP devices that belong to a certain SIP address and allows subscriptions to this information based on end-user policy.
28
Presence Aggregation Multiple devices can publish partial presence document aggregated by the Presence Agent
29
Watcher Info Event Watcher info event is used for monitoring external parties that subscribed to our own presence. Based on this list we can build a policy that is uploaded into the Presence Agent using XCAP protocol.
30
RLS Services extension to Presence Event
Subscription to RLS services lowers the SIP traffic on the last mile. The SIP client subscribes to only one SIP URI that is expanded by the RLS server into a list. The server sends back consolidated NOTIFY messages.
31
XCAP Diff Event Multiple clients can automatically synchronize their buddy lists and presence policy by subscribing to this Event. When an XCAP document is changed by one device, the others get notified and can fetch it again.
32
Subscribe for xcap-diff
SUBSCRIBE SIP/2.0. From: "saghul" To: "saghul" Contact: Call-ID: wnIA-6Qe1hiB3cxUN06JzxQRKjUe3UCT. CSeq: 9073 SUBSCRIBE. Event: xcap-diff. User-Agent: Blink (Linux). Content-Type: application/resource-lists+xml. Content-Length: <?xml version='1.0' encoding='UTF-8'?> <rl:resource-lists xmlns:rl="urn:ietf:params:xml:ns:resource-lists" xmlns:agp-rl="urn:ag-projects:xml:ns:resource-lists"><rl:list><rl:entry uri="org.openxcap.dialog-rules/users/sip%3Asaghul_test%40sip2sip.info/index"/><rl:entry uri="pidf-manipulation/users/sip%3Asaghul_test%40sip2sip.info/index"/><rl:entry uri="org.openmobilealliance.pres-rules/users/sip%3Asaghul_test%40sip2sip.info/index"/><rl:entry uri="resource-lists/users/sip%3Asaghul_test%40sip2sip.info/index"/><rl:entry uri="rls-services/users/sip%3Asaghul_test%40sip2sip.info/index"/></rl:list></rl:resource-lists> Subscribe for xcap-diff
33
Available SIP SIMPLE Software
OpenSIPS – SIP Presence Agent OpenXCAP – XCAP Policy Server MSRP Relay – NAT Traversal for IM and File Transfer based on MSRP SIP SIMPLE client SDK – Client SDK for all the above Blink – A GUI client built on top of SIP SIMPLE client SDK Available SIP SIMPLE Software
34
The Presence Agent is the most important architectural component
Originally developed in OpenSER, now present in all SER variants Software currently developed and supported by Voice System S.R.L. Home site: OpenSIPS
35
Openxcap XCAP server integrated with OpenSIPS Presence Agent
Developed and supported by AG Projects Openxcap
36
MSRP Relay NAT Traversal solution integrated with OpenSIPS
Developed and supported by AG Projects MSRP Relay
37
SIP SIMPLE client SDK is a Software Development Kit for development of Real Time Applications based on SIP and related protocols for media transport like Presence, Audio and Instant Messaging (IM). Other media types can be easily added by using an extensible high-level API. Developed and supported by AG Projects SIP SIMPLE client SDK
38
SIP SIMPLE client SDK - CLI
sip-subscribe-presence sip-subscribe-rls sip-subscribe-xcap-diff sip-subscribe-winfo sip-publish-presence xcap-pres-rules xcap-rls-services SIP SIMPLE client SDK - CLI
39
Blink A state of the art, easy to use SIP client built on top of
SIP SIMPLE client SDK. Currently available for Mac, Linux and Windows. Developed and supported by AG Projects Blink
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.