Configuration

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

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