Applications

Version 4 (Adrian Georgescu, 05/09/2012 09:25 am)

1 1 Tijmen de Mes
h1. Built-in Applications
2 1 Tijmen de Mes
3 1 Tijmen de Mes
h2. Multiparty Conference
4 1 Tijmen de Mes
5 1 Tijmen de Mes
SylkServer allows SIP end-points to create ad-hoc conference rooms by sending INVITE with SDP content to a random username at the hostname or domain where the server runs. Other participants can then join by sending an INVITE to the same SIP URI used to create the room.
6 1 Tijmen de Mes
7 3 Tijmen de Mes
h3. Supported Media
8 1 Tijmen de Mes
9 1 Tijmen de Mes
The INVITE and subsequent re-INVITE methods may contain one or more media types supported by the server. Each conference room mixed audio, instant messages and uploded files are dispatched to all participants.
10 1 Tijmen de Mes
11 1 Tijmen de Mes
+Audio+ The INVITE must propose a session with RTP (m=audio in SDP). Re-INVITE to add or remove audio to existing session is supported. G722, speex (both in wideband) and G711 codecs are supported.
12 1 Tijmen de Mes
<pre>
13 1 Tijmen de Mes
Content-Type: application/sdp
14 1 Tijmen de Mes
Content-Length: 233
15 1 Tijmen de Mes
16 1 Tijmen de Mes
v=0
17 1 Tijmen de Mes
o=- 3526098545 3526098547 IN IP4 81.23.228.139
18 1 Tijmen de Mes
s=SylkServer-1.2.3
19 1 Tijmen de Mes
t=0 0
20 1 Tijmen de Mes
c=IN IP4 81.23.228.139
21 1 Tijmen de Mes
m=audio 55324 RTP/AVP 9 101
22 1 Tijmen de Mes
c=IN IP4 85.17.186.7
23 1 Tijmen de Mes
a=rtcp:55325
24 1 Tijmen de Mes
a=rtpmap:9 G722/8000
25 1 Tijmen de Mes
a=rtpmap:101 telephone-event/8000
26 1 Tijmen de Mes
a=fmtp:101 0-15
27 1 Tijmen de Mes
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:1nDEh/WrJ57RBaHwhBG4+RAwzV9k/HxZhg1wClnx
28 1 Tijmen de Mes
a=sendrecv
29 1 Tijmen de Mes
</pre>
30 1 Tijmen de Mes
31 1 Tijmen de Mes
+Instant Messaging.+ The INVITE must propose a session with MSRP chat over TLS (m=message and a=path:msrps in the SDP). Re-INVITE to add or remove chat to existing session is supported. Private messaging extension between participants is also supported.
32 1 Tijmen de Mes
33 1 Tijmen de Mes
<pre>
34 1 Tijmen de Mes
Content-Type: application/sdp
35 1 Tijmen de Mes
Content-Length: 213
36 1 Tijmen de Mes
37 1 Tijmen de Mes
v=0
38 1 Tijmen de Mes
o=- 3526098545 3526098547 IN IP4 81.23.228.139
39 1 Tijmen de Mes
s=SylkServer-1.2.3
40 1 Tijmen de Mes
t=0 0
41 1 Tijmen de Mes
m=message 60167 TCP/TLS/MSRP *
42 1 Tijmen de Mes
c=IN IP4 81.23.228.139
43 1 Tijmen de Mes
a=path:msrps://81.23.228.139:60167/f8d1058769bebacacf62;tcp
44 1 Tijmen de Mes
a=accept-types:message/cpim
45 1 Tijmen de Mes
a=accept-wrapped-types:*
46 1 Tijmen de Mes
a=setup:passive
47 1 Tijmen de Mes
a=chatroom:private-messages
48 1 Tijmen de Mes
</pre>
49 1 Tijmen de Mes
50 1 Tijmen de Mes
+File Transfer+. The INVITE must propose a session with MSRP file transfer media description. Re-INVITE to add a file to existing session is supported. Participants that join later can request the previously uploaded files by using MSRP pull method.
51 1 Tijmen de Mes
52 1 Tijmen de Mes
<pre>
53 1 Tijmen de Mes
Content-Type: application/sdp
54 1 Tijmen de Mes
Content-Length:   407
55 1 Tijmen de Mes
56 1 Tijmen de Mes
v=0
57 1 Tijmen de Mes
o=- 3526099467 3526099468 IN IP4 81.23.228.139
58 1 Tijmen de Mes
s=SylkServer-1.2.3
59 1 Tijmen de Mes
c=IN IP4 81.23.228.139
60 1 Tijmen de Mes
t=0 0
61 1 Tijmen de Mes
m=message 39084 TCP/TLS/MSRP *
62 1 Tijmen de Mes
a=path:msrps://81.23.228.139:39084/a06af01b810519fb6090;tcp
63 1 Tijmen de Mes
a=recvonly
64 1 Tijmen de Mes
a=accept-types:*
65 1 Tijmen de Mes
a=accept-wrapped-types:*
66 1 Tijmen de Mes
a=setup:passive
67 1 Tijmen de Mes
a=file-selector:name:"Blink.pdf" type:application/pdf size:151036 hash:sha1:49:AD:49:...
68 1 Tijmen de Mes
</pre>
69 1 Tijmen de Mes
70 3 Tijmen de Mes
+Screen Sharing.+ This functionality is implemented as _com.ag-projects.screen-sharing_ extension to the chatroom functionality.
71 1 Tijmen de Mes
72 1 Tijmen de Mes
<pre>
73 1 Tijmen de Mes
Content-Type: application/sdp
74 1 Tijmen de Mes
...
75 1 Tijmen de Mes
76 1 Tijmen de Mes
m=message 40278 TCP/TLS/MSRP *
77 1 Tijmen de Mes
a=path:msrps://81.23.228.149:40278/2aa5bbb5d37731ef85c0;tcp
78 1 Tijmen de Mes
a=accept-types:message/cpim
79 1 Tijmen de Mes
a=accept-wrapped-types:*
80 1 Tijmen de Mes
a=setup:passive
81 3 Tijmen de Mes
a=chatroom:private-messages *com.ag-projects.screen-sharing*
82 1 Tijmen de Mes
</pre>
83 1 Tijmen de Mes
84 3 Tijmen de Mes
If the end-point detects and supports this private extension, it can share the screen by pushing at regular intervals a jpeg image with the desktop content over the MSRP chat stream. The image must be encapsulated in a CPIM envelope using content type _application/blink-screensharing_. Blink SIP client implements this extension.
85 1 Tijmen de Mes
<pre>
86 1 Tijmen de Mes
MSRP eea58af6af1b788 SEND
87 1 Tijmen de Mes
To-Path: msrps://81.23.228.149:41652/a65812de6f6a0725ee1a;tcp
88 1 Tijmen de Mes
From-Path: msrps://192.168.1.6:2855/e7028b404511ed77d6a2;tcp
89 1 Tijmen de Mes
Message-ID: 641f9960ded0638d
90 1 Tijmen de Mes
Byte-Range: 1-*/245347
91 1 Tijmen de Mes
Success-Report: yes
92 1 Tijmen de Mes
Failure-Report: yes
93 1 Tijmen de Mes
Content-Type: message/cpim
94 1 Tijmen de Mes
95 1 Tijmen de Mes
From: Adrian Georgescu <sip:31208005169@ag-projects.com>
96 1 Tijmen de Mes
To: <sip:nnauyj@conference.sip2sip.info>
97 1 Tijmen de Mes
DateTime: 2011-12-22T09:12:04+01:00
98 1 Tijmen de Mes
99 1 Tijmen de Mes
MIME-Version: 1.0
100 1 Tijmen de Mes
Content-Type: application/blink-screensharing
101 1 Tijmen de Mes
ÿØÿàJFIF .............
102 1 Tijmen de Mes
</pre>
103 1 Tijmen de Mes
The server then makes the screenshot available at a HTTP URL and publishes this URL to all participants using the conference information notification using <agp-conf:screen_image_url> extension. Participants can see the screen using a specialized client or a regular web browser.
104 1 Tijmen de Mes
105 3 Tijmen de Mes
h3. Conference Information
106 1 Tijmen de Mes
107 2 Tijmen de Mes
To obtain the conference information send a SUBSCRIBE request to the room URI for Event conference "RFC 4575":http://tools.ietf.org/html/rfc4579. The NOTIFY contains detailed information with the list of participants, their connected endpoints, media type and stream status and information about uploaded files.
108 2 Tijmen de Mes
<pre>
109 1 Tijmen de Mes
Content-Type: application/conference-info+xml
110 1 Tijmen de Mes
Content-Length:   975
111 1 Tijmen de Mes
112 1 Tijmen de Mes
<?xml version='1.0' encoding='UTF-8'?>
113 1 Tijmen de Mes
<conference-info xmlns:agp-conf="urn:ag-projects:xml:ns:conference-info" 
114 1 Tijmen de Mes
    xmlns="urn:ietf:params:xml:ns:conference-info" 
115 1 Tijmen de Mes
    entity="sip:agp@conference.sip2sip.info" state="full">
116 1 Tijmen de Mes
    <conference-description>
117 1 Tijmen de Mes
        <display-text>Ad-hoc conference</display-text>
118 1 Tijmen de Mes
        <free-text>Hosted by SylkServer-1.2.3</free-text>
119 1 Tijmen de Mes
        <agp-conf:resources>
120 1 Tijmen de Mes
            <agp-conf:files>
121 1 Tijmen de Mes
                <agp-conf:file name="Blink.pdf" hash="sha1:49:AD:49:...."
122 1 Tijmen de Mes
                size="151036" sender="AG <sip:31208005169@ag-projects.com>" status="OK"/>
123 1 Tijmen de Mes
            </agp-conf:files>
124 1 Tijmen de Mes
        </agp-conf:resources>
125 1 Tijmen de Mes
    </conference-description>
126 1 Tijmen de Mes
    <host-info>
127 1 Tijmen de Mes
        <web-page>http://sylkserver.com</web-page>
128 1 Tijmen de Mes
    </host-info>
129 1 Tijmen de Mes
    <conference-state>
130 1 Tijmen de Mes
        <user-count>1</user-count>
131 1 Tijmen de Mes
        <active>true</active>
132 1 Tijmen de Mes
    </conference-state>
133 1 Tijmen de Mes
    <users state="full">
134 1 Tijmen de Mes
        <user entity="sip:31208005169@ag-projects.com" state="full">
135 1 Tijmen de Mes
            <display-text>Adrian Georgescu</display-text>
136 1 Tijmen de Mes
            <agp-conf:screen_image_url>https://81.23.228.146/?image=WfPeNYF195.jpg</agp-conf:screen_image_url>
137 1 Tijmen de Mes
            <endpoint entity="sip:pbvusniw@95.97.50.27:54325" state="full">
138 1 Tijmen de Mes
                <display-text>Adrian Georgescu</display-text>
139 1 Tijmen de Mes
                <status>connected</status>
140 1 Tijmen de Mes
                    <joining-info>
141 1 Tijmen de Mes
                        <when>2011-09-27T09:49:05+02:00</when>
142 1 Tijmen de Mes
                    </joining-info>
143 1 Tijmen de Mes
                <media id="170092876"><type>message</type></media>
144 1 Tijmen de Mes
                <media id="2977223756"><type>audio</type></media>
145 1 Tijmen de Mes
            </endpoint>
146 1 Tijmen de Mes
        </user>
147 1 Tijmen de Mes
    </users>
148 1 Tijmen de Mes
</conference-info>
149 1 Tijmen de Mes
</pre>
150 3 Tijmen de Mes
151 3 Tijmen de Mes
h3. Participant Management
152 1 Tijmen de Mes
153 2 Tijmen de Mes
To add and remove participants, SylkServer supports INVITE and REFER methods as defined in "RFC4579 (Conferencing for User Agents)":http://tools.ietf.org/html/rfc4579#section-5 . One can remove or add participants by sending a REFER method to the conference URI.
154 1 Tijmen de Mes
155 2 Tijmen de Mes
<pre>
156 1 Tijmen de Mes
REFER sip:agp@conference.sip2sip.info SIP/2.0
157 1 Tijmen de Mes
Via: SIP/2.0/UDP 10.211.55.2:54325;rport;branch=z9hG4bKPj7PFxy8RLtr20jfVyUx2eis1H7.1aY7Np
158 1 Tijmen de Mes
Max-Forwards: 70
159 1 Tijmen de Mes
From: "Adrian Georgescu" <sip:31208005169@ag-projects.com>;tag=ZtGlJFOgGvwWQEMae6uTpuhT1aREkQeR
160 1 Tijmen de Mes
To: <sip:agp@conference.sip2sip.info>
161 1 Tijmen de Mes
Contact: <sip:pbvusniw@192.168.1.6:54325>
162 1 Tijmen de Mes
Call-ID: rYp1GQbSQ8kFrC1xccpfA5t9GXaR5qwt
163 1 Tijmen de Mes
CSeq: 6839 REFER
164 1 Tijmen de Mes
Event: refer
165 1 Tijmen de Mes
Accept: message/sipfrag;version=2.0
166 1 Tijmen de Mes
Allow-Events: conference, message-summary, presence, presence.winfo, xcap-diff, refer
167 1 Tijmen de Mes
Refer-To: <3333@sip2sip.info>;method=INVITE
168 1 Tijmen de Mes
Referred-By: sip:31208005169@ag-projects.com
169 1 Tijmen de Mes
User-Agent: Blink Pro 1.3.1 (MacOSX)
170 1 Tijmen de Mes
Content-Length:  0
171 2 Tijmen de Mes
</pre>
172 4 Adrian Georgescu
173 4 Adrian Georgescu
174 4 Adrian Georgescu
h2. XMPP Gateway
175 4 Adrian Georgescu
176 4 Adrian Georgescu
SylkServer can act like a transparent gateway between SIP and XMPP protocol. 
177 4 Adrian Georgescu
This can be used by a SIP service provider to bridge out to XMPP domains or  
178 4 Adrian Georgescu
to receive incoming requests from XMPP domains to the SIP users it serves.  
179 4 Adrian Georgescu
In a similar fashion, a XMPP service provider can use tehn gateway to bridge 
180 4 Adrian Georgescu
out to SIP domains and handle incoming requestes from SIP domains to the
181 4 Adrian Georgescu
XMPP users it serves.
182 4 Adrian Georgescu
183 4 Adrian Georgescu
A media session or a presence session initiated by an incoming connection on
184 4 Adrian Georgescu
the XMPP side is translated into an outgoing request on the SIP side and
185 4 Adrian Georgescu
the other way around.  To make this work, just add proper SIP or XMPP records into the
186 4 Adrian Georgescu
DNS zone for the domain that needs the gateway service.