Configuration

Version 18 (Adrian Georgescu, 04/25/2010 08:43 am)

1 1 Adrian Georgescu
2 18 Adrian Georgescu
h1. Configuration
3 1 Adrian Georgescu
4 1 Adrian Georgescu
5 18 Adrian Georgescu
6 18 Adrian Georgescu
7 18 Adrian Georgescu
8 18 Adrian Georgescu
h2. Database
9 18 Adrian Georgescu
10 18 Adrian Georgescu
11 1 Adrian Georgescu
Both OpenXCAP backends (Database and OpenSIPS) depend on a database engine to store service subscribers
12 1 Adrian Georgescu
and XCAP resources. The database creation scripts are found in the scripts/ directory
13 1 Adrian Georgescu
14 9 Adrian Georgescu
15 18 Adrian Georgescu
h3. Create Tables
16 18 Adrian Georgescu
17 18 Adrian Georgescu
18 1 Adrian Georgescu
If you use OpenSIPS backend, you do not need to create any tables and configure OpenXCAP to use the same database as OpenSIPS. 
19 16 Adrian Georgescu
20 16 Adrian Georgescu
If you want to setup OpenXCAP to use its own database, create the database:
21 16 Adrian Georgescu
22 18 Adrian Georgescu
<pre>
23 1 Adrian Georgescu
mysqladmin create openxcap
24 18 Adrian Georgescu
</pre>
25 5 Adrian Georgescu
26 5 Adrian Georgescu
and the tables using the script: 
27 5 Adrian Georgescu
28 1 Adrian Georgescu
[browser:setup/mysql-create-tables.sql]
29 1 Adrian Georgescu
30 1 Adrian Georgescu
This script creates two tables:
31 18 Adrian Georgescu
# subscriber, which is used to authenticate XCAP requests
32 18 Adrian Georgescu
# xcap, where the XCAP documents are actually stored
33 1 Adrian Georgescu
34 5 Adrian Georgescu
The subscriber table is a subset of the subscriber table from OpenSIPS, xcap table is the same as the one from OpenSIPS.
35 1 Adrian Georgescu
36 1 Adrian Georgescu
37 18 Adrian Georgescu
h3. Add MySQL user
38 18 Adrian Georgescu
39 18 Adrian Georgescu
40 5 Adrian Georgescu
Use the following script as template, edit it first and run it against on your database:
41 5 Adrian Georgescu
42 18 Adrian Georgescu
<pre>
43 5 Adrian Georgescu
setup/mysql-create-user.sql
44 18 Adrian Georgescu
</pre>
45 5 Adrian Georgescu
46 5 Adrian Georgescu
47 18 Adrian Georgescu
h2. OpenXCAP
48 18 Adrian Georgescu
49 18 Adrian Georgescu
50 3 Adrian Georgescu
If you have installed the debian package copy /etc/openxcap/config.ini.sample  to /etc/openxcap/config.ini. For other Linux OS copy config.ini.sample from the tar archive to the same directory. Edit config.ini with your settings.
51 1 Adrian Georgescu
52 18 Adrian Georgescu
source:"config.ini.sample"
53 1 Adrian Georgescu
54 1 Adrian Georgescu
The specific settings for an installation must be set from the configuration file, which is split in several configuration sections.
55 1 Adrian Georgescu
56 1 Adrian Georgescu
The [Server] section contains global settings: the IP address and port where OpenXCAP listens for client requests.
57 2 Adrian Georgescu
58 1 Adrian Georgescu
The XCAP root is the context that contains all the documents across all applications and users that
59 1 Adrian Georgescu
are managed by the server. Only the client requests that address the root defined here are accepted.
60 1 Adrian Georgescu
If the root URI has the "https" scheme, the server will listen for requests in TLS mode. The X509
61 1 Adrian Georgescu
certificate and private key that will identify the server are loaded using the values in the [TLS] section. 
62 1 Adrian Georgescu
63 4 Adrian Georgescu
OpenXCAP support multiple, interchangeable backend modules. Each backend knows where and how to
64 4 Adrian Georgescu
authorize and authenticate XCAP users and where to store the XCAP documents. Currently, supported values
65 4 Adrian Georgescu
are "Database" and "OpenSIPS", the specific settings will be taken the corresponding sections, [Database] or
66 4 Adrian Georgescu
[OpenSIPS].
67 1 Adrian Georgescu
68 5 Adrian Georgescu
An XCAP request must be authenticated before it's handled, and the various settings are found in the
69 1 Adrian Georgescu
[Authentication] section. 
70 4 Adrian Georgescu
71 5 Adrian Georgescu
A trusted peer IP list can be defined,  requests matching this list will be accepted without authentication.
72 5 Adrian Georgescu
73 4 Adrian Georgescu
Client requests must be authenticated in the context of a realm that is the same as the SIP domain. This realm is derived in real time for each request using the following logic:
74 4 Adrian Georgescu
75 18 Adrian Georgescu
* if the user section of the XCAP URI (the section following the "users" path segment) is in the form of username@domain, the realm is taken from the domain part
76 18 Adrian Georgescu
* some XCAP clients (e.g. CounterPath's Eyebeam), only put the username in the XCAP URI, so there is the need for a convention to determine the realm: it must be included in the XCAP root URI on the client side. For example, if the XCAP root of the server is http://example.com/xcap-root, the client should be provisioned with http://example.com/xcap-root@domain/
77 18 Adrian Georgescu
* if the above logic does not provide the realm, the realm will be taken from the default_realm setting of [Authentication]
78 1 Adrian Georgescu
79 1 Adrian Georgescu
There are separate configuration settings for each backend. The current supported back-ends are Database
80 1 Adrian Georgescu
and OpenSIPS.
81 4 Adrian Georgescu
82 4 Adrian Georgescu
The Database section contains the database connection URI to the database where the service subscribers
83 5 Adrian Georgescu
are kept (authentication_db_uri) and the database connection URI to the database where XCAP documents are
84 4 Adrian Georgescu
stored. Currently, only MySQL database engine has been implemented.
85 4 Adrian Georgescu
86 1 Adrian Georgescu
The OpenSIPS section contains all the settings of the Database section, plus the URL where OpenSIPS's XMLRPC
87 4 Adrian Georgescu
management interface is listening for commands. The refreshWatchers command is sent to OpenSIPS management 
88 4 Adrian Georgescu
interface to inform the server that the XCAP documents have been changed for a user so that OpenSIPS can send notifications out according to the new policy in real-time.
89 4 Adrian Georgescu
90 1 Adrian Georgescu
When using TLS you must generate an X.509 certificate and a key. Consult Internet resources for how to do this. The procedure is the same as for any other TLS server like Apache web server.
91 1 Adrian Georgescu
92 1 Adrian Georgescu
93 18 Adrian Georgescu
h2. opensips-mi-proxy
94 18 Adrian Georgescu
95 18 Adrian Georgescu
96 1 Adrian Georgescu
If you have installed the debian package copy /etc/opensips-mi-proxy/config.ini.sample  to /etc/opensips-mi-proxy/config.ini. For other Linux OS copy config.ini.sample from the tar archive to the same directory. Edit config.ini with your settings.
97 1 Adrian Georgescu
98 18 Adrian Georgescu
<pre>
99 1 Adrian Georgescu
[OpenSIPS]
100 1 Adrian Georgescu
socket = /var/run/opensips/socket
101 1 Adrian Georgescu
102 1 Adrian Georgescu
[MIProxy]
103 1 Adrian Georgescu
;listen_url = http://<defaultIPAddress>:8080
104 1 Adrian Georgescu
;trusted = any
105 18 Adrian Georgescu
</pre>
106 1 Adrian Georgescu
107 1 Adrian Georgescu
For more information see the README and INSTALL files that come together with the tar archive.
108 1 Adrian Georgescu
109 1 Adrian Georgescu
110 18 Adrian Georgescu
h2. soap-simple-proxy
111 18 Adrian Georgescu
112 18 Adrian Georgescu
113 1 Adrian Georgescu
If you have installed the debian package copy /etc/soap-simple-proxy/config.ini.sample  to /etc/soap-simple-proxy/config.ini. For other Linux OS copy config.ini.sample from the tar archive to the same directory. Edit config.ini with your settings.
114 1 Adrian Georgescu
115 18 Adrian Georgescu
<pre>
116 1 Adrian Georgescu
[SOAP Server]
117 1 Adrian Georgescu
address = 0.0.0.0
118 1 Adrian Georgescu
port = 9300
119 1 Adrian Georgescu
log_requests = Yes
120 1 Adrian Georgescu
121 1 Adrian Georgescu
[WSDL]
122 1 Adrian Georgescu
public_service_url = https://example.com/soap-simple-proxy/
123 1 Adrian Georgescu
internal_service_url = http://private-address:9200/
124 1 Adrian Georgescu
125 1 Adrian Georgescu
[XCAP]
126 1 Adrian Georgescu
root_uri = http://xcap.example.com/xcap-root
127 18 Adrian Georgescu
</pre>
128 1 Adrian Georgescu
129 1 Adrian Georgescu
For more information see the README and INSTALL files that come together with the tar archive.
130 1 Adrian Georgescu
131 1 Adrian Georgescu
132 18 Adrian Georgescu
h2. OpenSIPS
133 18 Adrian Georgescu
134 18 Adrian Georgescu
135 1 Adrian Georgescu
The following OpenSIPS configuration example enables OpenSIPS to act like a dedicated SIP Presence server that accepts messages from a trusted SIP Proxy with XCAP authorization enabled using OpenXCAP as policy server. The SIP Proxies defined as trusted peers must be configured to authenticate and authorize  the PUBLISH and SUBSCRIBE methods.
136 1 Adrian Georgescu
137 1 Adrian Georgescu
Is advisable to consult http://opensips.org web site, documentation section for the up to date configuration and settings.
138 1 Adrian Georgescu
139 18 Adrian Georgescu
<pre>
140 1 Adrian Georgescu
141 1 Adrian Georgescu
listen       = 10.0.0.1:5060
142 1 Adrian Georgescu
143 1 Adrian Georgescu
# --- module loading ---
144 1 Adrian Georgescu
145 1 Adrian Georgescu
mpath = "/usr/lib/opensips/modules"
146 1 Adrian Georgescu
loadmodule "mi_fifo.so"
147 1 Adrian Georgescu
loadmodule "mi_datagram.so"
148 1 Adrian Georgescu
loadmodule "mysql.so"
149 1 Adrian Georgescu
loadmodule "sl.so"
150 1 Adrian Georgescu
loadmodule "maxfwd.so"
151 1 Adrian Georgescu
loadmodule "tm.so"
152 1 Adrian Georgescu
loadmodule "rr.so"
153 1 Adrian Georgescu
loadmodule "xlog.so"
154 1 Adrian Georgescu
155 1 Adrian Georgescu
loadmodule "presence.so"
156 1 Adrian Georgescu
loadmodule "presence_xml.so"
157 1 Adrian Georgescu
loadmodule "presence_mwi.so"
158 1 Adrian Georgescu
loadmodule "presence_xcapdiff.so"
159 1 Adrian Georgescu
loadmodule "pua.so"
160 1 Adrian Georgescu
loadmodule "pua_mi.so"
161 1 Adrian Georgescu
loadmodule "rls.so"
162 1 Adrian Georgescu
163 1 Adrian Georgescu
164 1 Adrian Georgescu
# ----------------- setting module-specific parameters ---------------
165 1 Adrian Georgescu
166 1 Adrian Georgescu
# -- rr params --
167 1 Adrian Georgescu
# add value to ;lr param to make some broken UAs happy
168 1 Adrian Georgescu
modparam("rr", "enable_full_lr", 1)
169 1 Adrian Georgescu
170 1 Adrian Georgescu
modparam("mi_datagram", "socket_name",       "/var/run/opensips/socket")
171 1 Adrian Georgescu
modparam("mi_datagram", "unix_socket_user",  "opensips")
172 1 Adrian Georgescu
modparam("mi_datagram", "unix_socket_group", "opensips")
173 1 Adrian Georgescu
174 1 Adrian Georgescu
modparam("mi_fifo", "fifo_name", "/var/run/opensips/fifo")
175 1 Adrian Georgescu
modparam("mi_fifo", "fifo_user",  "opensips")
176 1 Adrian Georgescu
modparam("mi_fifo", "fifo_group", "opensips")
177 1 Adrian Georgescu
178 1 Adrian Georgescu
# -- presence params --
179 1 Adrian Georgescu
modparam("presence", "db_url", "mysql://opensips:password@db/opensips")
180 1 Adrian Georgescu
modparam("presence", "server_address", "sip:presence@10.0.0.1")
181 1 Adrian Georgescu
modparam("presence", "fallback2db", 1)
182 1 Adrian Georgescu
modparam("presence", "clean_period",  30)
183 1 Adrian Georgescu
184 1 Adrian Georgescu
# -- xcap params --
185 1 Adrian Georgescu
modparam("presence_xml", "db_url", "mysql://opensips:password@db/opensips")
186 1 Adrian Georgescu
modparam("presence_xml", "force_active", 0)
187 1 Adrian Georgescu
modparam("presence_xml", "pidf_manipulation", 1)
188 1 Adrian Georgescu
modparam("presence_xml", "integrated_xcap_server", 1)
189 1 Adrian Georgescu
190 1 Adrian Georgescu
# -- rls params --
191 1 Adrian Georgescu
192 1 Adrian Georgescu
modparam("rls", "db_url", "mysql://opensips:password@db/opensips")
193 1 Adrian Georgescu
modparam("rls", "server_address",         "sip:rls@10.0.0.1")
194 1 Adrian Georgescu
modparam("rls", "to_presence_code", 5)
195 1 Adrian Georgescu
modparam("rls", "integrated_xcap_server", 1)
196 1 Adrian Georgescu
197 1 Adrian Georgescu
198 1 Adrian Georgescu
# -------------------------  request routing logic -------------------
199 1 Adrian Georgescu
 
200 1 Adrian Georgescu
# main routing logic
201 1 Adrian Georgescu
 
202 1 Adrian Georgescu
route {
203 1 Adrian Georgescu
    xlog("L_INFO", "----- Start routing");
204 1 Adrian Georgescu
205 1 Adrian Georgescu
    if ((method=="PUBLISH" || method=="SUBSCRIBE" || method=="NOTIFY")) {
206 1 Adrian Georgescu
        xlog("L_INFO", "Presence event: $hdr(Event)\n");
207 1 Adrian Georgescu
    }
208 1 Adrian Georgescu
209 1 Adrian Georgescu
    if(is_method("PUBLISH")) {
210 1 Adrian Georgescu
        if ((src_ip==10.0.0.1 && src_port==5060)) {  
211 1 Adrian Georgescu
            sl_send_reply("404", "Domain not served here");
212 1 Adrian Georgescu
            return;
213 1 Adrian Georgescu
        }
214 1 Adrian Georgescu
        if (is_from_local()) {
215 1 Adrian Georgescu
            if (avp_check("$hdr(Event)", "fm/presence*/i") && ($au != $rU || $ar != $rd)) {
216 1 Adrian Georgescu
                xlog("L_WARN", "Account $au@$ar tried to publish $hdr(Event) event for $ru\n");
217 1 Adrian Georgescu
                sl_send_reply("403", "Publishing $hdr(Event) events for others is forbidden");
218 1 Adrian Georgescu
               return; 
219 1 Adrian Georgescu
            }
220 1 Adrian Georgescu
       } else {
221 1 Adrian Georgescu
            sl_send_reply("403", "PUBLISH forbidden for outside domains");
222 1 Adrian Georgescu
            return;
223 1 Adrian Georgescu
        }
224 1 Adrian Georgescu
225 1 Adrian Georgescu
        if (t_newtran()) {  
226 1 Adrian Georgescu
            handle_publish();
227 1 Adrian Georgescu
            t_release();
228 1 Adrian Georgescu
        } else {
229 1 Adrian Georgescu
            sl_reply_error();
230 1 Adrian Georgescu
        }
231 1 Adrian Georgescu
        exit;
232 1 Adrian Georgescu
    } else if( is_method("NOTIFY"))
233 1 Adrian Georgescu
        if (has_totag()) {
234 1 Adrian Georgescu
            if (!loose_route()) {
235 1 Adrian Georgescu
                if (!t_newtran()) {
236 1 Adrian Georgescu
                    sl_reply_error();
237 1 Adrian Georgescu
                    exit;
238 1 Adrian Georgescu
                }
239 1 Adrian Georgescu
                rls_handle_notify();
240 1 Adrian Georgescu
                switch ($retcode) {
241 1 Adrian Georgescu
                case 1:
242 1 Adrian Georgescu
                    # Notify processed by rls
243 1 Adrian Georgescu
                    xlog("L_INFO", "$rm processed by RLS\n");
244 1 Adrian Georgescu
                    t_release();
245 1 Adrian Georgescu
                    exit;
246 1 Adrian Georgescu
                    break;
247 1 Adrian Georgescu
                case -1:
248 1 Adrian Georgescu
                    # Error
249 1 Adrian Georgescu
                    xlog("L_INFO", "$rm processed by RLS but has error\n");
250 1 Adrian Georgescu
                    t_reply("500", "Server error while processing RLS NOTIFY");
251 1 Adrian Georgescu
                    exit;
252 1 Adrian Georgescu
                    break;
253 1 Adrian Georgescu
                default:
254 1 Adrian Georgescu
                    if (uri == "sip:rls@10.0.0.1") {
255 1 Adrian Georgescu
                        xlog("L_ERR", "$rm should be processed by RLS but was not recognized\n");
256 1 Adrian Georgescu
                        xlog("L_INFO", "Dropping $rm because it will loop\n");
257 1 Adrian Georgescu
                        t_reply("500", "Server error while processing RLS NOTIFY");
258 1 Adrian Georgescu
                        exit;  
259 1 Adrian Georgescu
                    } else {   
260 1 Adrian Georgescu
                        xlog("L_INFO", "$rm handled by presence\n");
261 1 Adrian Georgescu
                        t_release();
262 1 Adrian Georgescu
                    }
263 1 Adrian Georgescu
                }
264 1 Adrian Georgescu
            }
265 1 Adrian Georgescu
        } else {
266 1 Adrian Georgescu
            # Out-of-dialog NOTIFY
267 1 Adrian Georgescu
            sl_send_reply("405", "Method Not Allowed");
268 1 Adrian Georgescu
            exit;
269 1 Adrian Georgescu
        }
270 1 Adrian Georgescu
271 1 Adrian Georgescu
    } else if( is_method("SUBSCRIBE")) {
272 1 Adrian Georgescu
        if (!has_totag()) {
273 1 Adrian Georgescu
            if (loose_route()) {
274 1 Adrian Georgescu
                xlog("L_ERR", "Incorrectly formatted $rm request. Rejected.\n");
275 1 Adrian Georgescu
                sl_send_reply("400", "Incorrectly formatted request");
276 1 Adrian Georgescu
                return;
277 1 Adrian Georgescu
            }
278 1 Adrian Georgescu
279 1 Adrian Georgescu
            if ((src_ip==10.0.0.1 && src_port==5060) && is_present_hf("Record-Route")) {
280 1 Adrian Georgescu
                sl_send_reply("404", "Domain not served here");
281 1 Adrian Georgescu
                return;
282 1 Adrian Georgescu
            }
283 1 Adrian Georgescu
284 1 Adrian Georgescu
            if (is_from_local()) {
285 1 Adrian Georgescu
                   if (!(src_ip==10.0.0.1 && src_port==5060)) {
286 1 Adrian Georgescu
                       xlog("L_INFO", "Request came directly from the subscriber\n");
287 1 Adrian Georgescu
                        setflag(18);
288 1 Adrian Georgescu
                   }
289 1 Adrian Georgescu
290 1 Adrian Georgescu
                    if ((avp_check("$hdr(Event)", "fm/*.winfo/i") || avp_check("$hdr(Event)", "eq/message-summary/i")) &&
291 1 Adrian Georgescu
                        ($au != $rU || $ar != $rd)) {
292 1 Adrian Georgescu
                        xlog("L_WARN", "Account $au@$ar tried to subscribe to $ru for $hdr(Event)\n");
293 1 Adrian Georgescu
                        sl_send_reply("403", "Subscription to others $hdr(Event) is forbidden");
294 1 Adrian Georgescu
                        return;
295 1 Adrian Georgescu
                    }
296 1 Adrian Georgescu
                }
297 1 Adrian Georgescu
            }
298 1 Adrian Georgescu
299 1 Adrian Georgescu
            # Internal presence handling
300 1 Adrian Georgescu
            if (!t_newtran()) {
301 1 Adrian Georgescu
                sl_reply_error();
302 1 Adrian Georgescu
                exit;
303 1 Adrian Georgescu
            }
304 1 Adrian Georgescu
305 1 Adrian Georgescu
            rls_handle_subscribe();
306 1 Adrian Georgescu
307 1 Adrian Georgescu
            switch ($retcode) {
308 1 Adrian Georgescu
            case 5:
309 1 Adrian Georgescu
                # RLS indicated that message should be processed by presence
310 1 Adrian Georgescu
311 1 Adrian Georgescu
                if (is_uri_host_local()) {
312 1 Adrian Georgescu
                    if (does_uri_exist()) {
313 1 Adrian Georgescu
                        handle_subscribe();
314 1 Adrian Georgescu
                        t_release();
315 1 Adrian Georgescu
                    } else {   
316 1 Adrian Georgescu
                        t_reply("404", "User not found");
317 1 Adrian Georgescu
                    }
318 1 Adrian Georgescu
                    exit;
319 1 Adrian Georgescu
                }
320 1 Adrian Georgescu
                break;
321 1 Adrian Georgescu
            default:
322 1 Adrian Georgescu
                t_release();   
323 1 Adrian Georgescu
                exit;
324 1 Adrian Georgescu
            }
325 1 Adrian Georgescu
        } else {
326 1 Adrian Georgescu
            # In-dialog SUBSCRIBE
327 1 Adrian Georgescu
            if (uri=="sip:presence@10.0.0.1" || uri=="sip:rls@10.0.0.1" || !loose_route()) {
328 1 Adrian Georgescu
                # Internal presence handling
329 1 Adrian Georgescu
                if (t_newtran()) {
330 1 Adrian Georgescu
                    rls_handle_subscribe();
331 1 Adrian Georgescu
                    if ($retcode==5) {
332 1 Adrian Georgescu
                        handle_subscribe();
333 1 Adrian Georgescu
                    }
334 1 Adrian Georgescu
                    t_release();
335 1 Adrian Georgescu
                } else {
336 1 Adrian Georgescu
                    sl_reply_error();
337 1 Adrian Georgescu
                }
338 1 Adrian Georgescu
                exit;
339 1 Adrian Georgescu
            }
340 1 Adrian Georgescu
        }
341 1 Adrian Georgescu
    } else {
342 1 Adrian Georgescu
        xlog("L_INFO", "Method $rm Not Acceptable Here");
343 1 Adrian Georgescu
        sl_send_reply("488", "Not Acceptable Here");
344 14 Adrian Georgescu
        exit;
345 1 Adrian Georgescu
    };
346 1 Adrian Georgescu
}
347 18 Adrian Georgescu
</pre>
348 1 Adrian Georgescu
349 1 Adrian Georgescu
350 18 Adrian Georgescu
h1. Running the server
351 18 Adrian Georgescu
352 18 Adrian Georgescu
353 1 Adrian Georgescu
For non Debian systems copy openxcap, soap-simple-proxy and opensips-mi-proxy  startup scripts from their debian directory present in each tar file to /etc/init.d/ and edit them to match your system.
354 1 Adrian Georgescu
355 1 Adrian Georgescu
Start OpenXCAP server: 
356 1 Adrian Georgescu
357 18 Adrian Georgescu
<pre>
358 1 Adrian Georgescu
/etc/init.d/openxcap start
359 18 Adrian Georgescu
</pre>
360 1 Adrian Georgescu
361 1 Adrian Georgescu
You can also start OpenXCAP in no fork mode, which is useful to debug the configuration. This will not put the server in the background and will log its messages in the console where it was started:
362 1 Adrian Georgescu
363 18 Adrian Georgescu
<pre>
364 6 Adrian Georgescu
adigeo@ag-imac3:~/work/openxcap$sudo ./openxcap --no-fork
365 1 Adrian Georgescu
Starting OpenXCAP 1.2.0
366 6 Adrian Georgescu
Listening on: 0.0.0.0:80
367 6 Adrian Georgescu
XCAP root: http://xcap.example.com/xcap-root
368 6 Adrian Georgescu
xcap.server.HTTPFactory starting on 80
369 18 Adrian Georgescu
</pre>
370 6 Adrian Georgescu
371 6 Adrian Georgescu
Start opensips-mi-proxy: 
372 6 Adrian Georgescu
373 18 Adrian Georgescu
<pre>
374 6 Adrian Georgescu
/etc/init.d/opensips-mi-proxy start
375 18 Adrian Georgescu
</pre>
376 1 Adrian Georgescu
377 1 Adrian Georgescu
Start soap-simple-proxy: 
378 1 Adrian Georgescu
379 18 Adrian Georgescu
<pre>
380 1 Adrian Georgescu
/etc/init.d/soap-simple-proxy start
381 18 Adrian Georgescu
</pre>
382 1 Adrian Georgescu
383 1 Adrian Georgescu
Start opensips-mi-proxy
384 1 Adrian Georgescu
385 18 Adrian Georgescu
<pre>
386 1 Adrian Georgescu
/etc/init.d/opensips-mi-proxy start
387 18 Adrian Georgescu
</pre>
388 12 Adrian Georgescu
389 18 Adrian Georgescu
390 18 Adrian Georgescu
h2. Logging
391 18 Adrian Georgescu
392 12 Adrian Georgescu
 
393 15 Adrian Georgescu
OpenXCAP logs its start, stop and error messages to /var/log/syslog. Client access requests are logged in /var/log/openxcap/access.log. You can configure the logging of the headers and bodies of client requests and responses in the Logging section of the configuration file.
394 15 Adrian Georgescu
395 15 Adrian Georgescu
396 15 Adrian Georgescu
397 18 Adrian Georgescu
h2. Adding Accounts
398 18 Adrian Georgescu
399 18 Adrian Georgescu
400 1 Adrian Georgescu
The accounts used for authentication of XCAP requests are stored in OpenSIPS subscriber table. You can add subscribers by using your favorite OpenSIPS subscriber management tool. Check the following script that can be used to add manually account to opensips subscriber table:
401 7 Adrian Georgescu
402 11 Adrian Georgescu
[browser:scripts/add-openxcap-user.py]
403 17 Adrian Georgescu
404 18 Adrian Georgescu
After completing this chapter, go to [[Testing]] section.