Browse code

- fix link entity names, patch from Carsten Gross - regenerate READMEs

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4630 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 07/08/2008 09:15:08
Showing 86 changed files
... ...
@@ -1,4 +1,3 @@
1
-
2 1
 Acc Module
3 2
 
4 3
 Jiri Kuthan
... ...
@@ -28,8 +27,8 @@ Bogdan-Andrei Iancu
28 27
    Copyright � 2004, 2006 voice-system.ro
29 28
    Revision History
30 29
    Revision $Revision$ $Date: 2008-08-06 12:08:33 +0200
31
-   (Wed, 06 Aug 2008) $
32
-     _________________________________________________________
30
+                              (Mi, 06 Aug 2008) $
31
+     __________________________________________________________
33 32
 
34 33
    Table of Contents
35 34
 
... ...
@@ -95,10 +94,10 @@ Bogdan-Andrei Iancu
95 94
 
96 95
         1.6. Exported Functions
97 96
 
98
-              1.6.1. acc_log_request(comment) 
99
-              1.6.2. acc_db_request(comment, table) 
100
-              1.6.3. acc_rad_request(comment) 
101
-              1.6.4. acc_diam_request(comment) 
97
+              1.6.1. acc_log_request(comment)
98
+              1.6.2. acc_db_request(comment, table)
99
+              1.6.3. acc_rad_request(comment)
100
+              1.6.4. acc_diam_request(comment)
102 101
 
103 102
    2. Frequently Asked Questions
104 103
 
... ...
@@ -151,17 +150,17 @@ Chapter 1. Admin Guide
151 150
    different backends like syslog, SQL, RADIUS and DIAMETER (beta
152 151
    version).
153 152
 
154
-   To account a transaction and to choose which set of backends
155
-   to be used, the script writer just has to set some flags (see
156
-   the module parameters section for flag definitions
157
-   Section 1.5, "Exported Parameters"). If the accounting flag
158
-   for a specific backend is set, the acc module will then report
159
-   on completed transaction. A typical usage of the module takes
160
-   no acc-specific script command -- the functionality binds
153
+   To account a transaction and to choose which set of backends to
154
+   be used, the script writer just has to set some flags (see the
155
+   module parameters section for flag definitions Section 1.5,
156
+   "Exported Parameters"). If the accounting flag for a specific
157
+   backend is set, the acc module will then report on completed
158
+   transaction. A typical usage of the module takes no
159
+   acc-specific script command -- the functionality binds
161 160
    invisibly through transaction processing. Script writers just
162 161
    need to mark the transaction for accounting with proper
163
-   setflag. Even so, the module allows the script writter to
164
-   force accounting in special cases via some script functions.
162
+   setflag. Even so, the module allows the script writter to force
163
+   accounting in special cases via some script functions.
165 164
 
166 165
    The accounting module will log by default a fixed set of
167 166
    attributes for the transaction - if you customize your
... ...
@@ -192,11 +191,11 @@ Chapter 1. Admin Guide
192 191
        with BYEs for generating proper CDRs for example for
193 192
        purpose of billing, then it is better done in the entity
194 193
        which processes accounting information.
195
-     * If a UA fails in middle of conversation, a proxy will
196
-       never find out about it. In general, a better practice is
197
-       to account from an end-device (such as PSTN gateway),
198
-       which best knows about call status (including media status
199
-       and PSTN status in case of the gateway).
194
+     * If a UA fails in middle of conversation, a proxy will never
195
+       find out about it. In general, a better practice is to
196
+       account from an end-device (such as PSTN gateway), which
197
+       best knows about call status (including media status and
198
+       PSTN status in case of the gateway).
200 199
 
201 200
    The SQL backend support is compiled in the module. For RADIUS
202 201
    and DIAMETER you need to enable it by recompiling the module
... ...
@@ -208,24 +207,24 @@ Chapter 1. Admin Guide
208 207
    radius client needs to be configured properly. To do so, use
209 208
    the template at etc/radiusclient.conf and make sure that
210 209
    module's radius_config parameter points to its location. In
211
-   particular, accounting secret must match that one configured
212
-   in server and proper dictionary is used (one is available at
213
-   etc/sip_dictionary). Also note that Debian radiusclient-ng
214
-   uses /var/run/radius.seq as seqfile but Kamailio Debian init
215
-   script expects /var/run/kamailio/kamailio_radius.seq, so is
216
-   needed to change it in radiusclient-ng configuration or in
217
-   Kamailio Debian init script (if not, Kamailio can't create the
218
-   seq file when not running as root). Uses along with FreeRadius
219
-   ( http://www.freeradius.org/) and Radiator (
220
-   http://www.open.com.au/radiator/) servers have been reported
221
-   to us.
210
+   particular, accounting secret must match that one configured in
211
+   server and proper dictionary is used (one is available at
212
+   etc/sip_dictionary). Also note that Debian radiusclient-ng uses
213
+   /var/run/radius.seq as seqfile but Kamailio Debian init script
214
+   expects /var/run/kamailio/kamailio_radius.seq, so is needed to
215
+   change it in radiusclient-ng configuration or in Kamailio
216
+   Debian init script (if not, Kamailio can't create the seq file
217
+   when not running as root). Uses along with FreeRadius (
218
+   http://www.freeradius.org/) and Radiator (
219
+   http://www.open.com.au/radiator/) servers have been reported to
220
+   us.
222 221
 
223 222
    NOTE: diameter support was developed for DISC (DIameter Server
224 223
    Client project at http://developer.berlios.de/projects/disc/).
225 224
    This project seems to be no longer maintained and DIAMETER
226
-   specifications were updated in the meantime. Thus, the
227
-   DIAMETER part in the module is obsolete and needs rework to be
228
-   usable with opendiameter or other DIAMETER servers.
225
+   specifications were updated in the meantime. Thus, the DIAMETER
226
+   part in the module is obsolete and needs rework to be usable
227
+   with opendiameter or other DIAMETER servers.
229 228
 
230 229
 1.1.1. General Example
231 230
 
... ...
@@ -236,8 +235,8 @@ modparam("acc", "log_flag", 1)
236 235
 if (uri=~"sip:+40") /* calls to Romania */ {
237 236
     if (!proxy_authorize("sip_domain.net" /* realm */,
238 237
     "subscriber" /* table name */))  {
239
-        proxy_challenge("sip_domain.net" /* realm */, "0" /* no qop */
240
-);
238
+        proxy_challenge("sip_domain.net" /* realm */, "0" /* no qop */ )
239
+;
241 240
         exit;
242 241
     }
243 242
 
... ...
@@ -261,13 +260,13 @@ if (uri=~"sip:+40") /* calls to Romania */ {
261 260
 
262 261
 1.2.2. Definitions and syntax
263 262
 
264
-   Selection of extra information is done via xxx_extra
265
-   parameters by specifying the names of additional information
266
-   you want to log. This information is defined via
267
-   pseudo-variables and may include headers, AVPs values or other
268
-   message or system values. The syntax of the parameter is:
269
-     * xxx_extra = extra_definition (';'extra_definition)* 
270
-     * extra_definition = log_name '=' pseudo_variable 
263
+   Selection of extra information is done via xxx_extra parameters
264
+   by specifying the names of additional information you want to
265
+   log. This information is defined via pseudo-variables and may
266
+   include headers, AVPs values or other message or system values.
267
+   The syntax of the parameter is:
268
+     * xxx_extra = extra_definition (';'extra_definition)*
269
+     * extra_definition = log_name '=' pseudo_variable
271 270
 
272 271
    The full list of supported pseudo-variables in Kamailio is
273 272
    availabe at:
... ...
@@ -282,13 +281,12 @@ if (uri=~"sip:+40") /* calls to Romania */ {
282 281
        table the columns corresponding to each extra data;
283 282
      * RADIUS accounting - log_name will be the AVP name used for
284 283
        packing the data into RADIUS message. The log_name will be
285
-       translated to AVP number via the dictionary. IMPORTANT:
286
-       add in RADIUS dictionary the log_name attribute.
284
+       translated to AVP number via the dictionary. IMPORTANT: add
285
+       in RADIUS dictionary the log_name attribute.
287 286
      * DIAMETER accounting - log_name will be the AVP code used
288
-       for packing the data into DIAMETER message. The AVP code
289
-       is given directly as integer, since DIAMETER has no
290
-       dictionary support yet. IMPORTANT: log_name must be a
291
-       number.
287
+       for packing the data into DIAMETER message. The AVP code is
288
+       given directly as integer, since DIAMETER has no dictionary
289
+       support yet. IMPORTANT: log_name must be a number.
292 290
 
293 291
 1.2.3. How it works
294 292
 
... ...
@@ -308,21 +306,21 @@ if (uri=~"sip:+40") /* calls to Romania */ {
308 306
    billed, user B must pay for the call - as last party modifing
309 307
    the call destination-, and not A - as initiator of the call.
310 308
    Call forwarding on server is only one example which shows the
311
-   necessity of the having an accounting engine with multiple
312
-   legs support.
309
+   necessity of the having an accounting engine with multiple legs
310
+   support.
313 311
 
314 312
 1.3.2. Configuration
315 313
 
316 314
    First how it works: The idea is to have a set of AVPs and for
317
-   each call leg to store a set of values in the AVPs. The
318
-   meaning of the AVP content is stricly decided by the script
319
-   writer - it can be the origin and source of the leg, its
320
-   status or any other related information. If you have a set of
321
-   4 AVPS (AVP1, AVP2, AVP3, AVP4), then for the "A call B and B
322
-   forwards to C" example, you need to set a different set of
323
-   values for the AVPs for each leg ([A,B] and [B,C]) . The
324
-   script writer must take care and properly insert all these AVP
325
-   from the script (in proper order and with the correct type).
315
+   each call leg to store a set of values in the AVPs. The meaning
316
+   of the AVP content is stricly decided by the script writer - it
317
+   can be the origin and source of the leg, its status or any
318
+   other related information. If you have a set of 4 AVPS (AVP1,
319
+   AVP2, AVP3, AVP4), then for the "A call B and B forwards to C"
320
+   example, you need to set a different set of values for the AVPs
321
+   for each leg ([A,B] and [B,C]) . The script writer must take
322
+   care and properly insert all these AVP from the script (in
323
+   proper order and with the correct type).
326 324
 
327 325
    When the accounting information for the call will be
328 326
    written/sent, all the call-leg pairs will be added (based on
... ...
@@ -349,9 +347,9 @@ Note
349 347
        the colums for call-leg info (a column for each AVP of the
350 348
        set).
351 349
      * Radius -- all sets will be added to the same Radius
352
-       accounting message as RADIUS AVPs - for each call-leg a
353
-       set of RADIUS AVPs will be added (corresponding to the
354
-       per-leg AVP set)
350
+       accounting message as RADIUS AVPs - for each call-leg a set
351
+       of RADIUS AVPs will be added (corresponding to the per-leg
352
+       AVP set)
355 353
 
356 354
 Note
357 355
        You will need to add in your dictionary the RADIUS AVPs
... ...
@@ -362,8 +360,8 @@ Note
362 360
 
363 361
 1.4.1. Kamailio Modules
364 362
 
365
-   The module depends on the following modules (in the other
366
-   words the listed modules must be loaded before this module):
363
+   The module depends on the following modules (in the other words
364
+   the listed modules must be loaded before this module):
367 365
      * tm -- Transaction Manager
368 366
      * a database module -- If SQL support is used.
369 367
      * rr -- Record Route, if "detect_direction" module parameter
... ...
@@ -413,8 +411,8 @@ modparam("acc", "report_ack", 1)
413 411
 1.5.4. report_cancels (integer)
414 412
 
415 413
    By default, CANCEL reporting is disabled -- most accounting
416
-   applications wants to see INVITE's cancellation status. Turn
417
-   on if you explicitly want to account CANCEL transactions.
414
+   applications wants to see INVITE's cancellation status. Turn on
415
+   if you explicitly want to account CANCEL transactions.
418 416
 
419 417
    Default value is 0 (no).
420 418
 
... ...
@@ -424,10 +422,10 @@ modparam("acc", "report_cancels", 1)
424 422
 1.5.5. detect_direction (integer)
425 423
 
426 424
    Controlles the direction detection for sequential requests. If
427
-   enabled (non zero value), for sequential requests with
428
-   upstream direction (from callee to caller), the FROM and TO
429
-   will be swapped (the direction will be preserved as in the
430
-   original request).
425
+   enabled (non zero value), for sequential requests with upstream
426
+   direction (from callee to caller), the FROM and TO will be
427
+   swapped (the direction will be preserved as in the original
428
+   request).
431 429
 
432 430
    It affects all values related to TO and FROM headers (body,
433 431
    URI, username, domain, TAG).
... ...
@@ -463,8 +461,8 @@ modparam("acc", "multi_leg_info",
463 461
 
464 462
 1.5.7. log_flag (integer)
465 463
 
466
-   Request flag which needs to be set to account a transaction
467
-   via syslog.
464
+   Request flag which needs to be set to account a transaction via
465
+   syslog.
468 466
 
469 467
    Default value is not-set (no flag).
470 468
 
... ...
@@ -492,9 +490,9 @@ modparam("acc", "log_level", 2)   # Set log_level to 2
492 490
 
493 491
 1.5.10. log_facility (string)
494 492
 
495
-   Log facility to which accounting messages are issued to
496
-   syslog. This allows to easily seperate the accounting specific
497
-   logging from the other log messages.
493
+   Log facility to which accounting messages are issued to syslog.
494
+   This allows to easily seperate the accounting specific logging
495
+   from the other log messages.
498 496
 
499 497
    Default value is LOG_DAEMON.
500 498
 
... ...
@@ -563,8 +561,7 @@ modparam("acc", "service_type", 16)
563 561
    Default value is NULL.
564 562
 
565 563
    Example 1.16. radius_extra example
566
-modparam("acc", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)"
567
-)
564
+modparam("acc", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
568 565
 
569 566
 1.5.17. db_flag (integer)
570 567
 
... ...
@@ -692,8 +689,8 @@ modparam("acc", "acc_time_column", "time")
692 689
    Default value is NULL.
693 690
 
694 691
    Example 1.29. db_extra example
695
-modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)
696
-")
692
+modparam("acc", "db_extra", "ct=$hdr(Content-type); email=$avp(s:email)"
693
+)
697 694
 
698 695
 1.5.30. diameter_flag (integer)
699 696
 
... ...
@@ -717,8 +714,8 @@ modparam("acc", "diameter_missed_flag", 3)
717 714
 
718 715
 1.5.32. diameter_client_host (string)
719 716
 
720
-   Hostname of the machine where the DIAMETER Client is running
721
-   -- DIAMETER specific.
717
+   Hostname of the machine where the DIAMETER Client is running --
718
+   DIAMETER specific.
722 719
 
723 720
    Default value is "localhost".
724 721
 
... ...
@@ -742,16 +739,16 @@ modparam("acc", "diameter_client_port", 3000)
742 739
    Default value is NULL.
743 740
 
744 741
    Example 1.34. diameter_extra example
745
-modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:
746
-email)")
742
+modparam("acc", "diameter_extra", "7846=$hdr(Content-type);7847=$avp(s:e
743
+mail)")
747 744
 
748 745
 1.6. Exported Functions
749 746
 
750 747
 1.6.1.  acc_log_request(comment)
751 748
 
752 749
    acc_request reports on a request, for example, it can be used
753
-   to report on missed calls to off-line users who are replied
754
-   404 - Not Found. To avoid multiple reports on UDP request
750
+   to report on missed calls to off-line users who are replied 404
751
+   - Not Found. To avoid multiple reports on UDP request
755 752
    retransmission, you would need to embed the action in stateful
756 753
    processing.
757 754
 
... ...
@@ -799,8 +796,8 @@ acc_rad_request("Some comment");
799 796
 
800 797
 1.6.4.  acc_diam_request(comment)
801 798
 
802
-   Like acc_log_request, acc_diam_request reports on a request.
803
-   It reports to the configured Diameter server.
799
+   Like acc_log_request, acc_diam_request reports on a request. It
800
+   reports to the configured Diameter server.
804 801
 
805 802
    Meaning of the parameters is as follows:
806 803
      * comment - Comment to be appended.
... ...
@@ -816,55 +813,57 @@ Chapter 2. Frequently Asked Questions
816 813
 
817 814
    2.1.
818 815
 
819
-   What happend with old log_fmt parameter
816
+       What happend with old log_fmt parameter
817
+
818
+       The parameter became obsolete with the restructure of the data
819
+       logged by ACC module (refer to the Overview chapter). For
820
+       similar behaviour you can use the extra accouting (see the
821
+       coresponding chapter).
820 822
 
821
-   The parameter became obsolete with the restructure of the data
822
-   logged by ACC module (refer to the Overview chapter). For
823
-   similar behaviour you can use the extra accouting (see the
824
-   coresponding chapter).
825 823
    2.2.
826 824
 
827
-   What happend with old multi_leg_enabled parameter
825
+       What happend with old multi_leg_enabled parameter
826
+
827
+       The parameter becaome obsolete by the addition of the new
828
+       multi_leg_info parameter. The multi-leg accouting is
829
+       automatically enabled when multi_leg_info is defined.
828 830
 
829
-   The parameter becaome obsolete by the addition of the new
830
-   multi_leg_info parameter. The multi-leg accouting is
831
-   automatically enabled when multi_leg_info is defined.
832 831
    2.3.
833 832
 
834
-   What happend with old src_leg_avp_id and dst_leg_avp_id
835
-   parameters
833
+       What happend with old src_leg_avp_id and dst_leg_avp_id
834
+       parameters
835
+
836
+       The parameter was replaced by the more generic new parameter
837
+       multi_leg_info. This allows logging (per-leg) of more
838
+       information than just dst and src.
836 839
 
837
-   The parameter was replaced by the more generic new parameter
838
-   multi_leg_info. This allows logging (per-leg) of more
839
-   information than just dst and src.
840 840
    2.4.
841 841
 
842
-   Where can I find more about Kamailio?
842
+       Where can I find more about Kamailio?
843
+
844
+       Take a look at http://www.kamailio.org/.
843 845
 
844
-   Take a look at http://www.kamailio.org/kamailiohome;.
845 846
    2.5.
846 847
 
847
-   Where can I post a question about this module?
848
+       Where can I post a question about this module?
849
+
850
+       First at all check if your question was already answered on one
851
+       of our mailing lists:
852
+         * User Mailing List -
853
+           http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
854
+         * Developer Mailing List -
855
+           http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel
848 856
 
849
-   First at all check if your question was already answered on
850
-   one of our mailing lists:
851
-     * User Mailing List -
852
-       http://lists.kamailio.org/cgi-bin/mailman/listinfo/userska
853
-       mailiousers;
854
-     * Developer Mailing List -
855
-       http://lists.kamailio.org/cgi-bin/mailman/listinfo/develka
856
-       mailiodev;
857
+       E-mails regarding any stable Kamailio release should be sent to
858
+       <users@lists.kamailio.org> and e-mails regarding development
859
+       versions should be sent to <devel@lists.kamailio.org>.
857 860
 
858
-   E-mails regarding any stable Kamailio release should be sent
859
-   to <users@lists.kamailio.org> and e-mails regarding
860
-   development versions should be sent to
861
-   <devel@lists.kamailio.org>.
861
+       If you want to keep the mail private, send it to
862
+       <team@lists.kamailio.org>.
862 863
 
863
-   If you want to keep the mail private, send it to
864
-   <team@lists.kamailio.org>.
865 864
    2.6.
866 865
 
867
-   How can I report a bug?
866
+       How can I report a bug?
868 867
 
869
-   Please follow the guidelines provided at:
870
-   http://sourceforge.net/tracker/?group_id=139143kamailiobugs;.
868
+       Please follow the guidelines provided at:
869
+       http://sourceforge.net/tracker/?group_id=139143.
... ...
@@ -1,4 +1,3 @@
1
-
2 1
 ALIAS_DB Module
3 2
 
4 3
 Daniel-Constantin Mierla
... ...
@@ -18,7 +17,7 @@ Daniel-Constantin Mierla
18 17
    Copyright � 2005 voice-system.ro
19 18
 
20 19
    Copyright � 2008 asipto.com
21
-     _________________________________________________________
20
+     __________________________________________________________
22 21
 
23 22
    Table of Contents
24 23
 
... ...
@@ -43,7 +42,7 @@ Daniel-Constantin Mierla
43 42
 
44 43
         1.4. Exported Functions
45 44
 
46
-              1.4.1. alias_db_lookup(table_name) 
45
+              1.4.1. alias_db_lookup(table_name)
47 46
 
48 47
    List of Examples
49 48
 
... ...
@@ -67,9 +66,9 @@ Chapter 1. Admin Guide
67 66
    for search (no memory caching).
68 67
 
69 68
    Having no memory caching the speed of search can decrease but
70
-   the provisioning is easier. With very fast databases like
71
-   MySQL the speed penalty can be lowered. Also, the search can
72
-   be performed on different tables in the same script.
69
+   the provisioning is easier. With very fast databases like MySQL
70
+   the speed penalty can be lowered. Also, the search can be
71
+   performed on different tables in the same script.
73 72
 
74 73
 1.2. Dependencies
75 74
 
... ...
@@ -91,19 +90,19 @@ Chapter 1. Admin Guide
91 90
    Database URL.
92 91
 
93 92
    Default value is
94
-   "mysql://openserro:openserro@localhost/openser". 
93
+   "mysql://openserro:openserro@localhost/openser".
95 94
 
96 95
    Example 1.1. Set db_url parameter
97 96
 ...
98
-modparam("alias_db", "db_url", "dbdriver://username:password@dbhost/dbn
99
-ame")
97
+modparam("alias_db", "db_url", "dbdriver://username:password@dbhost/dbna
98
+me")
100 99
 ...
101 100
 
102 101
 1.3.2. user_column (str)
103 102
 
104 103
    Name of the column storing username.
105 104
 
106
-   Default value is "username". 
105
+   Default value is "username".
107 106
 
108 107
    Example 1.2. Set user_column parameter
109 108
 ...
... ...
@@ -114,7 +113,7 @@ modparam("alias_db", "user_column", "susername")
114 113
 
115 114
    Name of the column storing user's domain.
116 115
 
117
-   Default value is "domain". 
116
+   Default value is "domain".
118 117
 
119 118
    Example 1.3. Set domain_column parameter
120 119
 ...
... ...
@@ -125,7 +124,7 @@ modparam("alias_db", "domain_column", "sdomain")
125 124
 
126 125
    Name of the column storing alias username.
127 126
 
128
-   Default value is "alias_username". 
127
+   Default value is "alias_username".
129 128
 
130 129
    Example 1.4. Set alias_user_column parameter
131 130
 ...
... ...
@@ -136,7 +135,7 @@ modparam("alias_db", "alias_user_column", "auser")
136 135
 
137 136
    Name of the column storing alias domain.
138 137
 
139
-   Default value is "alias_domain". 
138
+   Default value is "alias_domain".
140 139
 
141 140
    Example 1.5. Set alias_domain_column parameter
142 141
 ...
... ...
@@ -149,7 +148,7 @@ modparam("alias_db", "alias_domain_column", "adomain")
149 148
    searching for alias. If set to 0, the domain from R-URI is not
150 149
    used, if set to 1 the domain from R-URI is used.
151 150
 
152
-   Default value is "0". 
151
+   Default value is "0".
153 152
 
154 153
    Example 1.6. Set use_domain parameter
155 154
 ...
... ...
@@ -161,7 +160,7 @@ modparam("alias_db", "use_domain", 1)
161 160
    Specifies the prefix to be stripped from the domain in R-URI
162 161
    before doing the search.
163 162
 
164
-   Default value is "NULL". 
163
+   Default value is "NULL".
165 164
 
166 165
    Example 1.7. Set domain_prefix parameter
167 166
 ...
... ...
@@ -174,7 +173,7 @@ modparam("alias_db", "domain_prefix", "sip.")
174 173
    the R-URI, the rest are added as branches.
175 174
 
176 175
    Default value is "0" (0 - don't add branches; 1 - add
177
-   branches). 
176
+   branches).
178 177
 
179 178
    Example 1.8. Set append_branches parameter
180 179
 ...
... ...
@@ -185,12 +184,12 @@ modparam("alias_db", "append_branches", 1)
185 184
 
186 185
 1.4.1.  alias_db_lookup(table_name)
187 186
 
188
-   The function takes the R-URI and search to see whether it is
189
-   an alias or not. If it is an alias for a local user, the R-URI
190
-   is replaced with user's SIP uri.
187
+   The function takes the R-URI and search to see whether it is an
188
+   alias or not. If it is an alias for a local user, the R-URI is
189
+   replaced with user's SIP uri.
191 190
 
192
-   The function returns TRUE if R-URI is alias and it was
193
-   replaced by user's SIP uri.
191
+   The function returns TRUE if R-URI is alias and it was replaced
192
+   by user's SIP uri.
194 193
 
195 194
    Meaning of the parameters is as follows:
196 195
      * table_name - the name of the table where to search for
... ...
@@ -29,8 +29,8 @@ Jan Janak
29 29
 
30 30
    Copyright � 2005 voice-system.ro
31 31
    Revision History
32
-   Revision $Revision$ $Date: 2008-08-06 13:08:33 +0300
33
-                              (Wed, 06 Aug 2008) $
32
+   Revision $Revision$ $Date: 2008-08-06 12:08:33 +0200
33
+                              (Mi, 06 Aug 2008) $
34 34
      __________________________________________________________
35 35
 
36 36
    Table of Contents
... ...
@@ -1,4 +1,3 @@
1
-
2 1
 Auth_db Module
3 2
 
4 3
 Jan Janak
... ...
@@ -30,8 +29,8 @@ Jan Janak
30 29
    Copyright � 2005 voice-system.ro
31 30
    Revision History
32 31
    Revision $Revision$ $Date: 2008-03-19 21:40:18 +0100
33
-   (Wed, 19 Mar 2008) $
34
-     _________________________________________________________
32
+                              (Mi, 19 Mär 2008) $
33
+     __________________________________________________________
35 34
 
36 35
    Table of Contents
37 36
 
... ...
@@ -56,8 +55,8 @@ Jan Janak
56 55
 
57 56
         1.4. Exported Functions
58 57
 
59
-              1.4.1. www_authorize(realm, table) 
60
-              1.4.2. proxy_authorize(realm, table) 
58
+              1.4.1. www_authorize(realm, table)
59
+              1.4.2. proxy_authorize(realm, table)
61 60
 
62 61
    List of Examples
63 62
 
... ...
@@ -88,11 +87,11 @@ Chapter 1. Admin Guide
88 87
 
89 88
 1.2.1. Kamailio Modules
90 89
 
91
-   The module depends on the following modules (in the other
92
-   words the listed modules must be loaded before this module):
90
+   The module depends on the following modules (in the other words
91
+   the listed modules must be loaded before this module):
93 92
      * auth -- Generic authentication functions
94
-     * database -- Any database module (currently mysql,
95
-       postgres, dbtext)
93
+     * database -- Any database module (currently mysql, postgres,
94
+       dbtext)
96 95
 
97 96
 1.2.2. External Libraries or Applications
98 97
 
... ...
@@ -107,22 +106,22 @@ Chapter 1. Admin Guide
107 106
    This is URL of the database to be used. Value of the parameter
108 107
    depends on the database module used. For example for mysql and
109 108
    postgres modules this is something like
110
-   mysql://username:password@host:port/database. For dbtext
111
-   module (which stores data in plaintext files) it is directory
112
-   in which the database resides.
109
+   mysql://username:password@host:port/database. For dbtext module
110
+   (which stores data in plaintext files) it is directory in which
111
+   the database resides.
113 112
 
114 113
    Default value is
115
-   "mysql://openserro:openserro@localhost/openser". 
114
+   "mysql://openserro:openserro@localhost/openser".
116 115
 
117 116
    Example 1.1. db_url parameter usage
118
-modparam("auth_db", "db_url", "dbdriver://username:password@dbhost/dbna
119
-me")
117
+modparam("auth_db", "db_url", "dbdriver://username:password@dbhost/dbnam
118
+e")
120 119
 
121 120
 1.3.2. user_column (string)
122 121
 
123
-   This is the name of the column holding usernames. Default
124
-   value is fine for most people. Use the parameter if you really
125
-   need to change it.
122
+   This is the name of the column holding usernames. Default value
123
+   is fine for most people. Use the parameter if you really need
124
+   to change it.
126 125
 
127 126
    Default value is "username".
128 127
 
... ...
@@ -132,8 +131,8 @@ modparam("auth_db", "user_column", "user")
132 131
 1.3.3. domain_column (string)
133 132
 
134 133
    This is the name of the column holding domains of users.
135
-   Default value is fine for most people. Use the parameter if
136
-   you really need to change it.
134
+   Default value is fine for most people. Use the parameter if you
135
+   really need to change it.
137 136
 
138 137
    Default value is "domain".
139 138
 
... ...
@@ -142,12 +141,12 @@ modparam("auth_db", "domain_column", "domain")
142 141
 
143 142
 1.3.4. password_column (string)
144 143
 
145
-   This is the name of the column holding passwords. Passwords
146
-   can be either stored as plain text or pre-calculated HA1
147
-   strings. HA1 strings are MD5 hashes of username, password, and
148
-   realm. HA1 strings are more safe because the server doesn't
149
-   need to know plaintext passwords and they cannot be obtained
150
-   from HA1 strings.
144
+   This is the name of the column holding passwords. Passwords can
145
+   be either stored as plain text or pre-calculated HA1 strings.
146
+   HA1 strings are MD5 hashes of username, password, and realm.
147
+   HA1 strings are more safe because the server doesn't need to
148
+   know plaintext passwords and they cannot be obtained from HA1
149
+   strings.
151 150
 
152 151
    Default value is "ha1".
153 152
 
... ...
@@ -158,10 +157,9 @@ modparam("auth_db", "password_column", "password")
158 157
 
159 158
    As described in the previous section this parameter contains
160 159
    name of column holding pre-calculated HA1 string that were
161
-   calculated including the domain in the username. This
162
-   parameter is used only when calculate_ha1 is set to 0 and user
163
-   agent send a credentials containing the domain in the
164
-   username.
160
+   calculated including the domain in the username. This parameter
161
+   is used only when calculate_ha1 is set to 0 and user agent send
162
+   a credentials containing the domain in the username.
165 163
 
166 164
    Default value of the parameter is ha1b.
167 165
 
... ...
@@ -170,14 +168,13 @@ modparam("auth_db", "password_column_2", "ha1_2")
170 168
 
171 169
 1.3.6. calculate_ha1 (integer)
172 170
 
173
-   This parameter tells the server whether it should use
174
-   plaintext passwords or a pre-calculated HA1 string for
175
-   authentification.
171
+   This parameter tells the server whether it should use plaintext
172
+   passwords or a pre-calculated HA1 string for authentification.
176 173
 
177 174
    If the parameter is set to 1 and the username parameter of
178 175
    credentials contains also "@domain" (some user agents append
179
-   the domain to the username parameter), then the server will
180
-   use the HA1 values from the column specified in the
176
+   the domain to the username parameter), then the server will use
177
+   the HA1 values from the column specified in the
181 178
    "password_column_2" parameter. If the username parameter
182 179
    doesn't contain a domain, the server will use the HA1 values
183 180
    from the column given in the "password_column"parameter.
... ...
@@ -186,15 +183,15 @@ modparam("auth_db", "password_column_2", "ha1_2")
186 183
    calculated from the column specified in the "password_column"
187 184
    parameter.
188 185
 
189
-   The "password_column_2"column contain also HA1 strings but
190
-   they should be calculated including the domain in the username
191
-   parameter (as opposed to password_column which (when
192
-   containing HA1 strings) should always contains HA1 strings
193
-   calculated without domain in username.
186
+   The "password_column_2"column contain also HA1 strings but they
187
+   should be calculated including the domain in the username
188
+   parameter (as opposed to password_column which (when containing
189
+   HA1 strings) should always contains HA1 strings calculated
190
+   without domain in username.
194 191
 
195 192
    This ensures that the authentication will always work when
196
-   using pre-calculated HA1 strings, not depending on the
197
-   presence of the domain in username.
193
+   using pre-calculated HA1 strings, not depending on the presence
194
+   of the domain in username.
198 195
 
199 196
    Default value of this parameter is 0.
200 197
 
... ...
@@ -225,19 +222,18 @@ modparam("auth_db", "use_domain", 1)
225 222
    name as the column name.
226 223
 
227 224
    Parameter syntax:
228
-     * load_credentials = credential (';' credential)* 
225
+     * load_credentials = credential (';' credential)*
229 226
      * credential = (avp_specification '=' column_name) |
230
-       (column_name) 
227
+       (column_name)
231 228
      * avp_specification = '$avp(' + 'i:'ID | 's:'NAME | alias +
232
-       ')' 
229
+       ')'
233 230
 
234 231
    Default value of this parameter is "rpid".
235 232
 
236 233
    Example 1.8. load_credentials parameter usage
237 234
 # load rpid column into $avp(i:13) and email_address column
238 235
 # into $avp(s:email_address)
239
-modparam("auth_db", "load_credentials", "$avp(i:13)=rpid;email_address"
240
-)
236
+modparam("auth_db", "load_credentials", "$avp(i:13)=rpid;email_address")
241 237
 
242 238
 1.4. Exported Functions
243 239
 
... ...
@@ -261,15 +257,15 @@ modparam("auth_db", "load_credentials", "$avp(i:13)=rpid;email_address"
261 257
      * -1 (invalid user) - authentication user does not exist.
262 258
 
263 259
    Meaning of the parameters is as follows:
264
-     * realm - Realm is a opaque string that the user agent
265
-       should present to the user so he can decide what username
266
-       and password to use. Usually this is domain of the host
267
-       the server is running on.
268
-       If an empty string "" is used then the server will
269
-       generate it from the request. In case of REGISTER requests
270
-       To header field domain will be used (because this header
271
-       field represents a user being registered), for all other
272
-       messages From header field domain will be used.
260
+     * realm - Realm is a opaque string that the user agent should
261
+       present to the user so he can decide what username and
262
+       password to use. Usually this is domain of the host the
263
+       server is running on.
264
+       If an empty string "" is used then the server will generate
265
+       it from the request. In case of REGISTER requests To header
266
+       field domain will be used (because this header field
267
+       represents a user being registered), for all other messages
268
+       From header field domain will be used.
273 269
        The string may contain pseudo variables.
274 270
      * table - Table to be used to lookup usernames and passwords
275 271
        (usually subscribers table).
... ...
@@ -303,13 +299,13 @@ if (www_authorize("siphub.net", "subscriber")) {
303 299
      * -1 (invalid user) - authentication user does not exist.
304 300
 
305 301
    Meaning of the parameters is as follows:
306
-     * realm - Realm is a opaque string that the user agent
307
-       should present to the user so he can decide what username
308
-       and password to use. Usually this is domain of the host
309
-       the server is running on.
310
-       If an empty string "" is used then the server will
311
-       generate it from the request. From header field domain
312
-       will be used as realm.
302
+     * realm - Realm is a opaque string that the user agent should
303
+       present to the user so he can decide what username and
304
+       password to use. Usually this is domain of the host the
305
+       server is running on.
306
+       If an empty string "" is used then the server will generate
307
+       it from the request. From header field domain will be used
308
+       as realm.
313 309
        The string may contain pseudo variables.
314 310
      * table - Table to be used to lookup usernames and passwords
315 311
        (usually subscribers table).
... ...
@@ -1,4 +1,3 @@
1
-
2 1
 AUTH_DIAMETER Module
3 2
 
4 3
 Elena-Ramona Modroiu
... ...
@@ -12,8 +11,8 @@ Elena-Ramona Modroiu
12 11
    Copyright � 2003, 2004 FhG FOKUS
13 12
    Revision History
14 13
    Revision $Revision$ $Date: 2008-08-06 12:08:33 +0200
15
-   (Wed, 06 Aug 2008) $
16
-     _________________________________________________________
14
+                              (Mi, 06 Aug 2008) $
15
+     __________________________________________________________
17 16
 
18 17
    Table of Contents
19 18
 
... ...
@@ -33,9 +32,9 @@ Elena-Ramona Modroiu
33 32
 
34 33
         1.4. Exported Functions
35 34
 
36
-              1.4.1. diameter_www_authorize(realm) 
37
-              1.4.2. diameter_proxy_authorize(realm) 
38
-              1.4.3. diameter_is_user_in(who, group) 
35
+              1.4.1. diameter_www_authorize(realm)
36
+              1.4.2. diameter_proxy_authorize(realm)
37
+              1.4.3. diameter_is_user_in(who, group)
39 38
 
40 39
         1.5. Installation and Running
41 40
 
... ...
@@ -114,7 +113,7 @@ Chapter 1. Admin Guide
114 113
 
115 114
    Hostname of the machine where the DIAMETER Client is running.
116 115
 
117
-   Default value is "localhost". 
116
+   Default value is "localhost".
118 117
 
119 118
    Example 1.2. Set diameter_client_host parameter
120 119
 ...
... ...
@@ -125,7 +124,7 @@ modparam("auth_diameter", "diameter_client_host", "10.10.10.10")
125 124
 
126 125
    Port number where the DIAMETER Client is listening.
127 126
 
128
-   Default value is "3000". 
127
+   Default value is "3000".
129 128
 
130 129
    Example 1.3. Set diameter_client_port parameter
131 130
 ...
... ...
@@ -137,7 +136,7 @@ modparam("auth_diameter", "diameter_client_port", 3000)
137 136
    Specifies whether the domain name part of URI is used when
138 137
    checking the user's privileges.
139 138
 
140
-   Default value is "0 (0==false and 1==true )". 
139
+   Default value is "0 (0==false and 1==true )".
141 140
 
142 141
    Example 1.4. Set use_domain parameter
143 142
 ...
... ...
@@ -148,11 +147,11 @@ modparam("auth_diameter", "use_domain", 1)
148 147
 
149 148
 1.4.1.  diameter_www_authorize(realm)
150 149
 
151
-   SIP Server checks for authorization having a DIAMETER server
152
-   in backend. If no credentials are provided inside the SIP
153
-   request then a challenge is sent back to UAC. If the
154
-   credentials don't match the ones computed by DISC then "403
155
-   Forbidden" is sent back.
150
+   SIP Server checks for authorization having a DIAMETER server in
151
+   backend. If no credentials are provided inside the SIP request
152
+   then a challenge is sent back to UAC. If the credentials don't
153
+   match the ones computed by DISC then "403 Forbidden" is sent
154
+   back.
156 155
 
157 156
    Negative codes may be interpreted as follows:
158 157
      * -5 (generic error) - some generic error occurred and no
... ...
@@ -1,4 +1,3 @@
1
-
2 1
 Auth_radius Module
3 2
 
4 3
 Jan Janak
... ...
@@ -29,8 +28,8 @@ Jan Janak
29 28
    Copyright � 2005 voice-system.ro
30 29
    Revision History
31 30
    Revision $Revision$ $Date: 2008-03-08 00:03:56 +0100
32
-   (Sat, 08 Mar 2008) $
33
-     _________________________________________________________
31
+                              (Sa, 08 Mär 2008) $
32
+     __________________________________________________________
34 33
 
35 34
    Table of Contents
36 35
 
... ...
@@ -82,16 +81,16 @@ Chapter 1. Admin Guide
82 81
 
83 82
 1.2. Additional Credentials
84 83
 
85
-   When performing authentification, the RADIUS server may
86
-   include in the response additional credentials. This scheme is
87
-   very useful in fetching additional user information from the
88
-   RADIUS server without making extra queries.
84
+   When performing authentification, the RADIUS server may include
85
+   in the response additional credentials. This scheme is very
86
+   useful in fetching additional user information from the RADIUS
87
+   server without making extra queries.
89 88
 
90 89
    The additional credentials are embedded in the RADIUS reply as
91 90
    AVPs "SIP-AVP". The syntax of the value is:
92
-     * value = SIP_AVP_NAME SIP_AVP_VALUE 
93
-     * SIP_AVP_NAME = STRING_NAME | '#'ID_NUMBER 
94
-     * SIP_AVP_VALUE = ':'STRING_VALUE | '#'NUMBER_VALUE 
91
+     * value = SIP_AVP_NAME SIP_AVP_VALUE
92
+     * SIP_AVP_NAME = STRING_NAME | '#'ID_NUMBER
93
+     * SIP_AVP_VALUE = ':'STRING_VALUE | '#'NUMBER_VALUE
95 94
 
96 95
    All additional credentials will be stored as Kamailio AVPs
97 96
    (SIP_AVP_NAME = SIP_AVP_VALUE).
... ...
@@ -114,8 +113,8 @@ Chapter 1. Admin Guide
114 113
 
115 114
 1.3.1. Kamailio Modules
116 115
 
117
-   The module depends on the following modules (in the other
118
-   words the listed modules must be loaded before this module):
116
+   The module depends on the following modules (in the other words
117
+   the listed modules must be loaded before this module):
119 118
      * auth -- Generic authentication functions
120 119
 
121 120
 1.3.2. External Libraries or Applications
... ...
@@ -130,8 +129,8 @@ Chapter 1. Admin Guide
130 129
 
131 130
 1.4.1. radius_config (string)
132 131
 
133
-   This is the location of the configuration file of radius
134
-   client libraries.
132
+   This is the location of the configuration file of radius client
133
+   libraries.
135 134
 
136 135
    Default value is
137 136
    "/usr/local/etc/radiusclient-ng/radiusclient.conf".
... ...
@@ -153,22 +152,21 @@ modparam("auth_radius", "service_type", 15)
153 152
 
154 153
 1.4.3. use_ruri_flag (integer)
155 154
 
156
-   When this parameter is set to the value other than "-1" and
157
-   the request being authenticated has flag with matching number
158
-   set via setflag() function, use Request URI instead of uri
155
+   When this parameter is set to the value other than "-1" and the
156
+   request being authenticated has flag with matching number set
157
+   via setflag() function, use Request URI instead of uri
159 158
    parameter value from the Authorization / Proxy-Authorization
160
-   header field to perform RADIUS authentication. This is
161
-   intended to provide workaround for misbehaving NAT / routers /
162
-   ALGs that alter request in the transit, breaking
163
-   authentication. At the time of this writing, certain versions
164
-   of Linksys WRT54GL are known to do that.
159
+   header field to perform RADIUS authentication. This is intended
160
+   to provide workaround for misbehaving NAT / routers / ALGs that
161
+   alter request in the transit, breaking authentication. At the
162
+   time of this writing, certain versions of Linksys WRT54GL are
163
+   known to do that.
165 164
 
166 165
    Default value is "-1".
167 166
 
168 167
    Example 1.4. use_ruri_flag parameter usage
169 168
 modparam("auth_radius", "use_ruri_flag", 22)
170 169
 
171
-
172 170
 1.5. Exported Functions
173 171
 
174 172
 1.5.1. radius_www_authorize(realm)
... ...
@@ -194,15 +192,15 @@ modparam("auth_radius", "use_ruri_flag", 22)
194 192
    they are valid or not.
195 193
 
196 194
    Meaning of the parameter is as follows:
197
-     * realm - Realm is a opaque string that the user agent
198
-       should present to the user so he can decide what username
199
-       and password to use. Usually this is domain of the host
200
-       the server is running on.
201
-       If an empty string "" is used then the server will
202
-       generate it from the request. In case of REGISTER requests
203
-       To header field domain will be used (because this header
204
-       field represents a user being registered), for all other
205
-       messages From header field domain will be used.
195
+     * realm - Realm is a opaque string that the user agent should
196
+       present to the user so he can decide what username and
197
+       password to use. Usually this is domain of the host the
198
+       server is running on.
199
+       If an empty string "" is used then the server will generate
200
+       it from the request. In case of REGISTER requests To header
201
+       field domain will be used (because this header field
202
+       represents a user being registered), for all other messages
203
+       From header field domain will be used.
206 204
        The string may contain pseudo variables.
207 205
 
208 206
    This function can be used from REQUEST_ROUTE.
... ...
@@ -231,12 +229,12 @@ if (!radius_www_authorize("siphub.net")) {
231 229
    they are valid or not.
232 230
 
233 231
    Meaning of the parameters is as follows:
234
-     * realm - Realm is a opaque string that the user agent
235
-       should present to the user so he can decide what username
236
-       and password to use. This is usually one of the domains
237
-       the proxy is responsible for. If an empty string "" is
238
-       used then the server will generate realm from host part of
239
-       From header field URI.
232
+     * realm - Realm is a opaque string that the user agent should
233
+       present to the user so he can decide what username and
234
+       password to use. This is usually one of the domains the
235
+       proxy is responsible for. If an empty string "" is used
236
+       then the server will generate realm from host part of From
237
+       header field URI.
240 238
        The string may contain pseudo variables.
241 239
      * uri_user - Uri_user is an optional pseudo variable
242 240
        parameter whose value, if present, will be given to Radius
... ...
@@ -249,14 +247,13 @@ if (!radius_www_authorize("siphub.net")) {
249 247
 
250 248
    Example 1.6. proxy_authorize usage
251 249
 ...
252
-if (!radius_proxy_authorize("")) {   # Realm and URI user will be autog
253
-enerated
250
+if (!radius_proxy_authorize("")) {   # Realm and URI user will be autoge
251
+nerated
254 252
         proxy_challenge("", "1");
255 253
 };
256 254
 ...
257
-if (!radius_proxy_authorize("$pd", "$pU")) { # Realm and URI user are t
258
-aken
259
-        proxy_challenge("$pd", "1");         # from P-Preferred-Identit
260
-y
255
+if (!radius_proxy_authorize("$pd", "$pU")) { # Realm and URI user are ta
256
+ken
257
+        proxy_challenge("$pd", "1");         # from P-Preferred-Identity
261 258
 };                                           # header field
262 259
 ...
... ...
@@ -1,4 +1,3 @@
1
-
2 1
 avp_radius Module
3 2
 
4 3
 Juha Heinanen
... ...
@@ -14,8 +13,8 @@ Daniel-Constantin Mierla
14 13
    Copyright � 2004 Juha Heinanen
15 14
    Revision History
16 15
    Revision $Revision$ $Date: 2008-03-08 00:03:56 +0100
17
-   (Sat, 08 Mar 2008) $
18
-     _________________________________________________________
16
+                              (Sa, 08 Mär 2008) $
17
+     __________________________________________________________
19 18
 
20 19
    Table of Contents
21 20
 
... ...
@@ -49,15 +48,15 @@ Chapter 1. Admin Guide
49 48
 
50 49
 1.1. Overview
51 50
 
52
-   avp_radius module allows loading of user's attributes into
53
-   AVPs from Radius. User's name and domain can be based on From
54
-   URI, Request URI, or authenticated credentials.
51
+   avp_radius module allows loading of user's attributes into AVPs
52
+   from Radius. User's name and domain can be based on From URI,
53
+   Request URI, or authenticated credentials.
55 54
 
56 55
    The module assumes that Radius returns the AVPs as values of
57 56
    reply attribute SIP-AVP. Its value must be a string of form:
58
-     * value = SIP_AVP_NAME SIP_AVP_VALUE 
59
-     * SIP_AVP_NAME = STRING_NAME | '#'ID_NUMBER 
60
-     * SIP_AVP_VALUE = ':'STRING_VALUE | '#'NUMBER_VALUE 
57
+     * value = SIP_AVP_NAME SIP_AVP_VALUE
58
+     * SIP_AVP_NAME = STRING_NAME | '#'ID_NUMBER
59
+     * SIP_AVP_VALUE = ':'STRING_VALUE | '#'NUMBER_VALUE
61 60
 
62 61
    Example 1.1. "SIP-AVP" RADIUS AVP exmaples
63 62
 ....
... ...
@@ -79,8 +78,8 @@ Chapter 1. Admin Guide
79 78
 
80 79
 1.2.1. Kamailio Modules
81 80
 
82
-   The module depends on the following modules (in the other
83
-   words the listed modules must be loaded before this module):
81
+   The module depends on the following modules (in the other words
82
+   the listed modules must be loaded before this module):
84 83
      * none
85 84
 
86 85
 1.2.2. External Libraries or Applications
... ...
@@ -95,8 +94,8 @@ Chapter 1. Admin Guide
95 94
 
96 95
 1.3.1. radius_config (string)
97 96
 
98
-   This is the location of the configuration file of radius
99
-   client libraries.
97
+   This is the location of the configuration file of radius client
98
+   libraries.
100 99
 
101 100
    Default value is
102 101
    "/usr/local/etc/radiusclient-ng/radiusclient.conf".
... ...
@@ -1,4 +1,3 @@
1
-
2 1
 AVPops Module
3 2
 
4 3
 Ramona-Elena Modroiu
... ...
@@ -14,8 +13,8 @@ Ramona-Elena Modroiu
14 13
    Copyright � 2004, 2005 voice-system.ro
15 14
    Revision History
16 15
    Revision $Revision$ $Date: 2008-08-06 12:08:33 +0200
17
-   (Wed, 06 Aug 2008) $
18
-     _________________________________________________________
16
+                              (Mi, 06 Aug 2008) $
17
+     __________________________________________________________
19 18
 
20 19
    Table of Contents
21 20
 
... ...
@@ -44,33 +43,33 @@ Ramona-Elena Modroiu
44 43
 
45 44
         1.5. Exported Functions
46 45
 
47
-              1.5.1. avp_db_load(source,name) 
48
-              1.5.2. avp_db_store(source,name) 
49
-              1.5.3. avp_db_delete(source,name) 
50
-              1.5.4. avp_db_query(query[,dest]) 
51
-              1.5.5. avp_delete(name) 
52
-              1.5.6. avp_pushto(destination,name) 
53
-              1.5.7. avp_check(name,op_value) 
54
-              1.5.8. avp_copy(old_name,new_name) 
55
-              1.5.9. avp_printf(dest, format) 
56
-              1.5.10. avp_subst(avps, subst) 
57
-              1.5.11. avp_op(name,op_value) 
58
-              1.5.12. is_avp_set(name) 
59
-              1.5.13. avp_print() 
46
+              1.5.1. avp_db_load(source,name)
47
+              1.5.2. avp_db_store(source,name)
48
+              1.5.3. avp_db_delete(source,name)
49
+              1.5.4. avp_db_query(query[,dest])
50
+              1.5.5. avp_delete(name)
51
+              1.5.6. avp_pushto(destination,name)
52
+              1.5.7. avp_check(name,op_value)
53
+              1.5.8. avp_copy(old_name,new_name)
54
+              1.5.9. avp_printf(dest, format)
55
+              1.5.10. avp_subst(avps, subst)
56
+              1.5.11. avp_op(name,op_value)
57
+              1.5.12. is_avp_set(name)
58
+              1.5.13. avp_print()
60 59
 
61 60
    List of Examples
62 61
 
63 62
    1.1. AVP naming examples
64 63
    1.2. Set avp_url parameter
65 64
    1.3. Set avp_table parameter
66
-   1.4. Set use_domain parameter 
65
+   1.4. Set use_domain parameter
67 66
    1.5. Set uuid_column parameter
68 67
    1.6. Set username_column parameter
69 68
    1.7. Set domain_column parameter
70
-   1.8. Set attribute_column parameter 
71
-   1.9. Set value_column parameter 
72
-   1.10. Set type_column parameter 
73
-   1.11. Set db_scheme parameter 
69
+   1.8. Set attribute_column parameter
70
+   1.9. Set value_column parameter
71
+   1.10. Set type_column parameter
72
+   1.11. Set db_scheme parameter
74 73
    1.12. avp_db_load usage
75 74
    1.13. avp_db_store usage
76 75
    1.14. avp_db_delete usage
... ...
@@ -92,11 +91,11 @@ Chapter 1. Admin Guide
92 91
    AVPops (AVP-operations) modules implements a set of script
93 92
    functions which allow access and manipulation of user AVPs
94 93
    (preferences) and pseudo-variables. AVPs are a powerful tool
95
-   for implementing services/preferences per user/domain. Now
96
-   they are usable directly from configuration script. Functions
97
-   for interfacing DB resources (loading/storing/removing),
98
-   functions for swapping information between AVPs and SIP
99
-   messages, function for testing/checking the value of an AVP.
94
+   for implementing services/preferences per user/domain. Now they
95
+   are usable directly from configuration script. Functions for
96
+   interfacing DB resources (loading/storing/removing), functions
97
+   for swapping information between AVPs and SIP messages,
98
+   function for testing/checking the value of an AVP.
100 99
 
101 100
    AVPs are persistent per SIP transaction, being available in
102 101
    "route", "branch_route" and "failure_route". To make them
... ...
@@ -135,9 +134,9 @@ Chapter 1. Admin Guide
135 134
        The type flag is mandatory.
136 135
        script_flags must be an 8 bit unsigned number, therefore
137 136
        can be set up to 8 flags. If no script flag is provided,
138
-       the name will match all AVPs, regardless they have or not
139
-       a script flag set (preserves the compatibility with the
140
-       old naming schema).
137
+       the name will match all AVPs, regardless they have or not a
138
+       script flag set (preserves the compatibility with the old
139
+       naming schema).
141 140
      * avp_name = string | integer
142 141
        string - might be any alphanumeric string, wich contain
143 142
        following characters: [a-z] [A-Z] [0-9] '_'
... ...
@@ -152,8 +151,8 @@ Chapter 1. Admin Guide
152 151
 $avp(i:11) - the AVP identified by integer 11
153 152
 $avp(s:foo) - the AVP identified by the string 'foo'
154 153
 $avp(bar) - the AVP identified by the AVP alias 'bar'
155
-$avp(i3:123) - the AVP identified by the integer 123 which has script f
156
-lags 1
154
+$avp(i3:123) - the AVP identified by the integer 123 which has script fl
155
+ags 1
157 156
     and 2 set
158 157
 ...
159 158
 
... ...
@@ -163,7 +162,7 @@ lags 1
163 162
 
164 163
    DB URL for database connection.
165 164
 
166
-   This parameter is optional, it's default value being NULL. 
165
+   This parameter is optional, it's default value being NULL.
167 166
 
168 167
    Example 1.2. Set avp_url parameter
169 168
 ...
... ...
@@ -178,7 +177,7 @@ modparam("avpops","avp_url","mysql://user:passwd@host/database")
178 177
 
179 178
    DB table to be used.
180 179
 
181
-   This parameter is optional, it's default value being NULL. 
180
+   This parameter is optional, it's default value being NULL.
182 181
 
183 182
    Example 1.3. Set avp_table parameter
184 183
 ...
... ...
@@ -187,12 +186,12 @@ modparam("avpops","avp_table","avptable")
187 186
 
188 187
 1.4.4. use_domain (integer)
189 188
 
190
-   If the domain part of the an URI should be used for
191
-   identifying an AVP in DB operations.
189
+   If the domain part of the an URI should be used for identifying
190
+   an AVP in DB operations.
192 191
 
193
-   Default value is 0 (no). 
192
+   Default value is 0 (no).
194 193
 
195
-   Example 1.4. Set use_domain parameter 
194
+   Example 1.4. Set use_domain parameter
196 195
 ...
197 196
 modparam("avpops","use_domain",1)
198 197
 ...
... ...
@@ -201,7 +200,7 @@ modparam("avpops","use_domain",1)
201 200
 
202 201
    Name of column containing the uuid (unique user id).
203 202
 
204
-   Default value is "uuid". 
203
+   Default value is "uuid".
205 204
 
206 205
    Example 1.5. Set uuid_column parameter
207 206
 ...
... ...
@@ -212,7 +211,7 @@ modparam("avpops","uuid_column","uuid")
212 211
 
213 212
    Name of column containing the username.
214 213
 
215
-   Default value is "username". 
214
+   Default value is "username".
216 215
 
217 216
    Example 1.6. Set username_column parameter
218 217
 ...
... ...
@@ -223,7 +222,7 @@ modparam("avpops","username_column","username")
223 222
 
224 223
    Name of column containing the domain name.
225 224
 
226
-   Default value is "domain". 
225
+   Default value is "domain".
227 226
 
228 227
    Example 1.7. Set domain_column parameter
229 228
 ...
... ...
@@ -234,9 +233,9 @@ modparam("avpops","domain_column","domain")
234 233
 
235 234
    Name of column containing the attribute name (AVP name).
236 235
 
237
-   Default value is "attribute". 
236
+   Default value is "attribute".
238 237
 
239
-   Example 1.8. Set attribute_column parameter 
238
+   Example 1.8. Set attribute_column parameter
240 239
 ...
241 240
 modparam("avpops","attribute_column","attribute")
242 241
 ...
... ...
@@ -245,9 +244,9 @@ modparam("avpops","attribute_column","attribute")
245 244
 
246 245
    Name of column containing the AVP value.
247 246
 
248
-   Default value is "value". 
247
+   Default value is "value".
249 248
 
250
-   Example 1.9. Set value_column parameter 
249
+   Example 1.9. Set value_column parameter
251 250
 ...
252 251
 modparam("avpops","value_column","value")
253 252
 ...
... ...
@@ -256,20 +255,20 @@ modparam("avpops","value_column","value")
256 255
 
257 256
    Name of column containing the AVP type.
258 257
 
259
-   Default value is "type". 
258
+   Default value is "type".
260 259
 
261
-   Example 1.10. Set type_column parameter 
260
+   Example 1.10. Set type_column parameter
262 261
 ...
263 262
 modparam("avpops","type_column","type")
264 263
 ...
265 264
 
266 265
 1.4.11. db_scheme (string)
267 266
 
268
-   Definition of a DB scheme to be used for non-standard access
269
-   to Database information.
267
+   Definition of a DB scheme to be used for non-standard access to
268
+   Database information.
270 269
 
271 270
    Definition of a DB scheme. Scheme syntax is:
272
-     * db_scheme = name':'element[';'element]* 
271
+     * db_scheme = name':'element[';'element]*
273 272
      * element =
274 273
           + 'uuid_col='string
275 274
           + 'username_col='string
... ...
@@ -278,9 +277,9 @@ modparam("avpops","type_column","type")
278 277
           + 'value_type='('integer'|'string')
279 278
           + 'table='string
280 279
 
281
-   Default value is "NULL". 
280
+   Default value is "NULL".
282 281
 
283
-   Example 1.11. Set db_scheme parameter 
282
+   Example 1.11. Set db_scheme parameter
284 283
 ...
285 284
 modparam("avpops","db_scheme",
286 285
 "scheme1:table=subscriber;uuid_col=uuid;value_col=first_name")
... ...
@@ -299,19 +298,18 @@ modparam("avpops","db_scheme",
299 298
      * source - what info is used for identifying the AVPs.
300 299
        Parameter syntax:
301 300
           + source = (pvar|str_value)
302
-            ['/'('username'|'domain'|'uri'|'uuid')]) 
303
-          + pvar = any pseudo variable defined in Kamailio. If
304
-            the pvar is $ru (request uri), $fu (from uri), $tu
305
-            (to uri) or $ou (original uri), then the implicit
306
-            flag is 'uri'. Otherwise, the implicit flag is
307
-            'uuid'. 
301
+            ['/'('username'|'domain'|'uri'|'uuid')])
302
+          + pvar = any pseudo variable defined in Kamailio. If the
303
+            pvar is $ru (request uri), $fu (from uri), $tu (to
304
+            uri) or $ou (original uri), then the implicit flag is
305
+            'uri'. Otherwise, the implicit flag is 'uuid'.
308 306
      * name - which AVPs will be loaded from DB into memory.
309 307
        Parameter syntax is:
310
-          + name = avp_spec['/'(table_name|'$'db_scheme)] 
308
+          + name = avp_spec['/'(table_name|'$'db_scheme)]
311 309
           + avp_spec =
312
-            matching_flags|$avp(avp_name)|$avp(avp_alias) 
310
+            matching_flags|$avp(avp_name)|$avp(avp_alias)
313 311
           + matching_flags = 'a' | 'A' | 'i' | 'I' | 's' | 'S'
314
-            [script_flags] 
312
+            [script_flags]
315 313
             'a' or 'A' means matching any of AVP name types ('i'
316 314
             and 's') (NOTE: matching_flags cannot be used with
317 315
             $db_scheme because the name of AVP to save in cannot
... ...
@@ -373,14 +371,14 @@ avp_db_delete("$uuid","$avp(s:404fwd)/fwd_table");
373 371
        contain pseudo-variables.
374 372
        You must escape any pseudo-variables manually to prevent
375 373
        SQL injection attacks. You can use the existing
376
-       transformations escape.common and unescape.common to
377
-       escape and unescape the content of any pseudo-variable.
378
-       Failing to escape the variables used in the query makes
379
-       you vulnerable to SQL injection, e.g. make it possible for
380
-       an outside attacker to alter your database content.
381
-     * dest - a list with AVP names where to store the result.
382
-       The format is "$avp(name1);$avp(name2);...". If this
383
-       parameter is ommited, the result is stored in
374
+       transformations escape.common and unescape.common to escape
375
+       and unescape the content of any pseudo-variable. Failing to
376
+       escape the variables used in the query makes you vulnerable
377
+       to SQL injection, e.g. make it possible for an outside
378
+       attacker to alter your database content.
379
+     * dest - a list with AVP names where to store the result. The
380
+       format is "$avp(name1);$avp(name2);...". If this parameter
381
+       is ommited, the result is stored in
384 382
        "$avp(i:1);$avp(i:2);...". If the result gives many rows,
385 383
        then multiple AVPs with corresponding name will be added.
386 384
        The value type of the AVP (string or integer) will be
... ...
@@ -391,8 +389,8 @@ avp_db_delete("$uuid","$avp(s:404fwd)/fwd_table");
391 389
 
392 390
    Example 1.15. avp_db_query usage
393 391
 ...
394
-avp_db_query("select password, ha1 from subscriber where username='$tu'
395
-",
392
+avp_db_query("select password, ha1 from subscriber where username='$tu'"
393
+,
396 394
         "$avp(i:678);$avp(i:679)");
397 395
 avp_db_query("delete from subscriber");
398 396
 ...
... ...
@@ -404,10 +402,10 @@ avp_db_query("delete from subscriber");
404 402
    Meaning of the parameters is as follows:
405 403
      * name - which AVPs will be deleted from memory. Parameter
406 404
        syntax is:
407
-          + name = (matching_flags|avp_name|avp_alias)['/'flag] 
405
+          + name = (matching_flags|avp_name|avp_alias)['/'flag]
408 406
           + matching_flags = please refer to avp_db_load()
409
-            function 
410
-          + flag = 'g'|'G' 
407
+            function
408
+          + flag = 'g'|'G'
411 409
 
412 410
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
413 411
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
... ...
@@ -425,19 +423,19 @@ avp_delete("a3");
425 423
    Pushes the value of AVP(s) into the SIP message.
426 424
 
427 425
    Meaning of the parameters is as follows:
428
-     * destination - as what will be the AVP value pushed into
429
-       SIP message. Parameter syntax:
430
-          + destination = '$ru' ['/'('username'|'domain')] |
431
-            '$du' | '$br' 
432
-          + $ru '['/'('username'|'domain')] - write the AVP in
433