File: README

package info (click to toggle)
openser 1.1.0-9etch1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,828 kB
  • ctags: 11,809
  • sloc: ansic: 120,528; sh: 5,249; yacc: 1,716; makefile: 1,261; php: 656; perl: 205; sql: 190
file content (308 lines) | stat: -rw-r--r-- 7,690 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308

uri_db Module

Jan Janak

   FhG FOKUS

Edited by

Jan Janak

Bogdan-Andrei Iancu

   Copyright  2003 FhG FOKUS

   Copyright  2005 voice-system.ro
     _________________________________________________________

   Table of Contents
   1. User's Guide

        1.1. Overview
        1.2. Dependencies

              1.2.1. OpenSER Modules
              1.2.2. External Libraries or Applications

        1.3. Exported Parameters

              1.3.1. db_url (string)
              1.3.2. uri_table (string)
              1.3.3. uri_user_column (string)
              1.3.4. uri_domain_column (string)
              1.3.5. uri_uriuser_column (string)
              1.3.6. subscriber_table (string)
              1.3.7. subscriber_user_column (string)
              1.3.8. subscriber_domain_column (string)
              1.3.9. use_uri_table (integer)
              1.3.10. use_domain (integer)

        1.4. Exported Functions

              1.4.1. check_to()
              1.4.2. check_from()
              1.4.3. does_uri_exist()

   2. Developer's Guide
   3. Frequently Asked Questions

   List of Examples
   1-1. Set db_url parameter
   1-2. Set uri_table parameter
   1-3. Set uri_user_column parameter
   1-4. Set uri_domain_column parameter
   1-5. Set uri_uriuser_column parameter
   1-6. Set subscriber_table parameter
   1-7. Set subscriber_user_column parameter
   1-8. Set subscriber_domain_column parameter
   1-9. Set use_uri_table parameter
   1-10. Set use_domain parameter
   1-11. check_to usage
   1-12. check_from usage
   1-13. does_uri_exist usage
     _________________________________________________________

Chapter 1. User's Guide

1.1. Overview

   Various checks related to SIP URI.
     _________________________________________________________

1.2. Dependencies

1.2.1. OpenSER Modules

   The following modules must be loaded before this module:

     * a OpenSER database module (optional).
     _________________________________________________________

1.2.2. External Libraries or Applications

   The following libraries or applications must be installed
   before running OpenSER with this module loaded:

     * None.
     _________________________________________________________

1.3. Exported Parameters

1.3.1. db_url (string)

   URL of the database to be used.

   If the db_url string is empty, the DB backend will be disabled
   - some function may operated without DB support.

   Default value is "DEFAULT_RODB_URL". 

   Example 1-1. Set db_url parameter
...
modparam("uri_db", "db_url", "mysql://username:password@localhost/opens
er")
...
     _________________________________________________________

1.3.2. uri_table (string)

   Table containing list of allowed URIs for each user.

   Default value is "uri". 

   Example 1-2. Set uri_table parameter
...
modparam("uri_db", "uri_table", "uri")
...
     _________________________________________________________

1.3.3. uri_user_column (string)

   Column holding usernames in the URI table.

   Default value is "username". 

   Example 1-3. Set uri_user_column parameter
...
modparam("uri_db", "uri_user_column", "username")
...
     _________________________________________________________

1.3.4. uri_domain_column (string)

   Column holding domain in the URI table.

   Default value is "domain". 

   Example 1-4. Set uri_domain_column parameter
...
modparam("uri_db", "uri_domain_column", "domain")
...
     _________________________________________________________

1.3.5. uri_uriuser_column (string)

   Column holding URI username in the URI table.

   Default value is "uri_user". 

   Example 1-5. Set uri_uriuser_column parameter
...
modparam("uri_db", "uri_uriuser_column", "uri_user")
...
     _________________________________________________________

1.3.6. subscriber_table (string)

   Name of the subscriber table.

   Default value is "subscriber". 

   Example 1-6. Set subscriber_table parameter
...
modparam("uri_db", "subscriber_table", "subscriber")
...
     _________________________________________________________

1.3.7. subscriber_user_column (string)

   Column holding username in subscriber table.

   Default value is "username". 

   Example 1-7. Set subscriber_user_column parameter
...
modparam("uri_db", "subscriber_user_column", "username")
...
     _________________________________________________________

1.3.8. subscriber_domain_column (string)

   Column holding domains in the subscriber table.

   Default value is "domain". 

   Example 1-8. Set subscriber_domain_column parameter
...
modparam("uri_db", "subscriber_domain_column", "domain")
...
     _________________________________________________________

1.3.9. use_uri_table (integer)

   Specify if the "uri" table should be used for checkings
   instead of "subscriber" table. Non 0 value means true.

   If enabled, setting a non-null db_url is mandatory.

   Default value is "0 (false)". 

   Example 1-9. Set use_uri_table parameter
...
modparam("uri_db", "use_uri_table", 1)
...
     _________________________________________________________

1.3.10. use_domain (integer)

   Specify if the domain part of the URI should be used to
   identify the users (along with username). Useful in multi
   domain setup. Non 0 value means true.

   Default value is "0 (false)". 

   Example 1-10. Set use_domain parameter
...
modparam("uri_db", "use_domain", 1)
...
     _________________________________________________________

1.4. Exported Functions

1.4.1. check_to()

   Check To username against URI table (if use_uri_table is set)
   or digest credentials (no DB backend required).

   This function can be used from REQUEST_ROUTE.

   Example 1-11. check_to usage
...
if (check_to()) {
        ...
};
...
     _________________________________________________________

1.4.2. check_from()

   Check From username against URI table (if use_uri_table is
   set) or digest credentials (no DB backend required).

   This function can be used from REQUEST_ROUTE.

   Example 1-12. check_from usage
...
if (check_from()) {
        ...
};
...
     _________________________________________________________

1.4.3. does_uri_exist()

   Check if username in the request URI belongs to an existing
   user.

   As the checking is done against URI table (if use_uri_table is
   set) or subscriber table, setting a non-null db_url is
   mandatory.

   This function can be used from REQUEST_ROUTE.

   Example 1-13. does_uri_exist usage
...
if (does_uri_exist()) {
        ...
};
...
     _________________________________________________________

Chapter 2. Developer's Guide

   The module does not provide any API to use in other OpenSER
   modules.
     _________________________________________________________

Chapter 3. Frequently Asked Questions

   3.1. Where can I find more about OpenSER?
   3.2. Where can I post a question about this module?
   3.3. How can I report a bug?

   3.1. Where can I find more about OpenSER?

   Take a look at http://openser.org/.

   3.2. Where can I post a question about this module?

   First at all check if your question was already answered on
   one of our mailing lists:

     * User Mailing List -
       http://openser.org/cgi-bin/mailman/listinfo/users
     * Developer Mailing List -
       http://openser.org/cgi-bin/mailman/listinfo/devel

   E-mails regarding any stable OpenSER release should be sent to
   <users@openser.org> and e-mails regarding development versions
   should be sent to <devel@openser.org>.

   If you want to keep the mail private, send it to
   <team@openser.org>.

   3.3. How can I report a bug?

   Please follow the guidelines provided at:
   http://sourceforge.net/tracker/?group_id=139143.