Browse code

- remove sections about avp_aliases and avp_write functions, this was moved to the core long ago

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

Henning Westerholt authored on 07/07/2008 16:39:04
Showing 2 changed files
... ...
@@ -12,8 +12,8 @@ Ramona-Elena Modroiu
12 12
 
13 13
    Copyright � 2004, 2005 voice-system.ro
14 14
    Revision History
15
-   Revision $Revision$ $Date: 2008-03-10 17:13:24 +0200
16
-                              (Mon, 10 Mar 2008) $
15
+   Revision $Revision$ $Date: 2008-03-10 16:13:24 +0100
16
+                              (Mo, 10 Mär 2008) $
17 17
      __________________________________________________________
18 18
 
19 19
    Table of Contents
... ...
@@ -32,15 +32,14 @@ Ramona-Elena Modroiu
32 32
               1.4.1. avp_url (string)
33 33
               1.4.2. db_url (string)
34 34
               1.4.3. avp_table (string)
35
-              1.4.4. avp_aliases (string) - removed
36
-              1.4.5. use_domain (integer)
37
-              1.4.6. uuid_column (string)
38
-              1.4.7. username_column (string)
39
-              1.4.8. domain_column (string)
40
-              1.4.9. attribute_column (string)
41
-              1.4.10. value_column (string)
42
-              1.4.11. type_column (string)
43
-              1.4.12. db_scheme (string)
35
+              1.4.4. use_domain (integer)
36
+              1.4.5. uuid_column (string)
37
+              1.4.6. username_column (string)
38
+              1.4.7. domain_column (string)
39
+              1.4.8. attribute_column (string)
40
+              1.4.9. value_column (string)
41
+              1.4.10. type_column (string)
42
+              1.4.11. db_scheme (string)
44 43
 
45 44
         1.5. Exported Functions
46 45
 
... ...
@@ -48,45 +47,42 @@ Ramona-Elena Modroiu
48 47
               1.5.2. avp_db_store(source,name)
49 48
               1.5.3. avp_db_delete(source,name)
50 49
               1.5.4. avp_db_query(query[,dest])
51
-              1.5.5. avp_write(value,name) - removed
52
-              1.5.6. avp_delete(name)
53
-              1.5.7. avp_pushto(destination,name)
54
-              1.5.8. avp_check(name,op_value)
55
-              1.5.9. avp_copy(old_name,new_name)
56
-              1.5.10. avp_printf(dest, format)
57
-              1.5.11. avp_subst(avps, subst)
58
-              1.5.12. avp_op(name,op_value)
59
-              1.5.13. is_avp_set(name)
60
-              1.5.14. avp_print()
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()
61 59
 
62 60
    List of Examples
63 61
 
64 62
    1.1. AVP naming examples
65 63
    1.2. Set avp_url parameter
66 64
    1.3. Set avp_table parameter
67
-   1.4. Set avp_aliases in config file
68
-   1.5. Set use_domain parameter
69
-   1.6. Set uuid_column parameter
70
-   1.7. Set username_column parameter
71
-   1.8. Set domain_column parameter
72
-   1.9. Set attribute_column parameter
73
-   1.10. Set value_column parameter
74
-   1.11. Set type_column parameter
75
-   1.12. Set db_scheme parameter
76
-   1.13. avp_db_load usage
77
-   1.14. avp_db_store usage
78
-   1.15. avp_db_delete usage
79
-   1.16. avp_db_query usage
80
-   1.17. avp_write migration
81
-   1.18. avp_delete usage
82
-   1.19. avp_pushto usage
83
-   1.20. avp_check usage
84
-   1.21. avp_copy usage
85
-   1.22. avp_printf usage
86
-   1.23. avp_subst usage
87
-   1.24. avp_op usage
88
-   1.25. is_avp_set usage
89
-   1.26. avp_print usage
65
+   1.4. Set use_domain parameter
66
+   1.5. Set uuid_column parameter
67
+   1.6. Set username_column parameter
68
+   1.7. Set domain_column 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
73
+   1.12. avp_db_load usage
74
+   1.13. avp_db_store usage
75
+   1.14. avp_db_delete usage
76
+   1.15. avp_db_query usage
77
+   1.16. avp_delete usage
78
+   1.17. avp_pushto usage
79
+   1.18. avp_check usage
80
+   1.19. avp_copy usage
81
+   1.20. avp_printf usage
82
+   1.21. avp_subst usage
83
+   1.22. avp_op usage
84
+   1.23. is_avp_set usage
85
+   1.24. avp_print usage
90 86
 
91 87
 Chapter 1. Admin Guide
92 88
 
... ...
@@ -188,96 +184,85 @@ modparam("avpops","avp_url","mysql://user:passwd@host/database")
188 184
 modparam("avpops","avp_table","avptable")
189 185
 ...
190 186
 
191
-1.4.4. avp_aliases (string) - removed
192
-
193
-   This is no longer a parameter of 'avpops' module. AVP aliases
194
-   can be defined directly in configuration script, in global
195
-   parameters section.
196
-
197
-   Example 1.4. Set avp_aliases in config file
198
-...
199
-avp_aliases="uuid=I:660;email=s:email_addr;fwd=i:753"
200
-...
201
-
202
-1.4.5. use_domain (integer)
187
+1.4.4. use_domain (integer)
203 188
 
204 189
    If the domain part of the an URI should be used for identifying
205 190
    an AVP in DB operations.
206 191
 
207 192
    Default value is 0 (no).
208 193
 
209
-   Example 1.5. Set use_domain parameter
194
+   Example 1.4. Set use_domain parameter
210 195
 ...
211 196
 modparam("avpops","use_domain",1)
212 197
 ...
213 198
 
214
-1.4.6. uuid_column (string)
199
+1.4.5. uuid_column (string)
215 200
 
216 201
    Name of column containing the uuid (unique user id).
217 202
 
218 203
    Default value is "uuid".
219 204
 
220
-   Example 1.6. Set uuid_column parameter
205
+   Example 1.5. Set uuid_column parameter
221 206
 ...
222 207
 modparam("avpops","uuid_column","uuid")
223 208
 ...
224 209
 
225
-1.4.7. username_column (string)
210
+1.4.6. username_column (string)
226 211
 
227 212
    Name of column containing the username.
228 213
 
229 214
    Default value is "username".
230 215
 
231
-   Example 1.7. Set username_column parameter
216
+   Example 1.6. Set username_column parameter
232 217
 ...
233 218
 modparam("avpops","username_column","username")
234 219
 ...
235 220
 
236
-1.4.8. domain_column (string)
221
+1.4.7. domain_column (string)
237 222
 
238 223
    Name of column containing the domain name.
239 224
 
240 225
    Default value is "domain".
241 226
 
242
-   Example 1.8. Set domain_column parameter
227
+   Example 1.7. Set domain_column parameter
243 228
 ...
244 229
 modparam("avpops","domain_column","domain")
245 230
 ...
246 231
 
247
-1.4.9. attribute_column (string)
232
+1.4.8. attribute_column (string)
248 233
 
249 234
    Name of column containing the attribute name (AVP name).
250 235
 
251 236
    Default value is "attribute".
252 237
 
253
-   Example 1.9. Set attribute_column parameter
238
+   Example 1.8. Set attribute_column parameter
254 239
 ...
255 240
 modparam("avpops","attribute_column","attribute")
256 241
 ...
257 242
 
258
-1.4.10. value_column (string)
243
+1.4.9. value_column (string)
259 244
 
260 245
    Name of column containing the AVP value.
261 246
 
262 247
    Default value is "value".
263 248
 
264
-   Example 1.10. Set value_column parameter
249
+   Example 1.9. Set value_column parameter
265 250
 ...
266 251
 modparam("avpops","value_column","value")
267 252
 ...
268 253
 
269
-1.4.11. type_column (string)
254
+1.4.10. type_column (string)
270 255
 
271 256
    Name of column containing the AVP type.
272 257
 
273 258
    Default value is "type".
274 259
 
275
-   Example 1.11. Set type_column parameter
260
+   Example 1.10. Set type_column parameter
276 261
 ...
277 262
 modparam("avpops","type_column","type")
278 263
 ...
279 264
 
280
-1.4.12. db_scheme (string)
265
+1.4.11. db_scheme (string)
281 266
 
282 267
    Definition of a DB scheme to be used for non-standard access to
283 268
    Database information.
... ...
@@ -294,7 +279,7 @@ modparam("avpops","type_column","type")
294 279
 
295 280
    Default value is "NULL".
296 281
 
297
-   Example 1.12. Set db_scheme parameter
282
+   Example 1.11. Set db_scheme parameter
298 283
 ...
299 284
 modparam("avpops","db_scheme",
300 285
 "scheme1:table=subscriber;uuid_col=uuid;value_col=first_name")
... ...
@@ -332,7 +317,7 @@ modparam("avpops","db_scheme",
332 317
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
333 318
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
334 319
 
335
-   Example 1.13. avp_db_load usage
320
+   Example 1.12. avp_db_load usage
336 321
 ...
337 322
 avp_db_load("$fu","$(i:678)");
338 323
 avp_db_load("$ru/domain","i:/domain_preferences");
... ...
@@ -351,7 +336,7 @@ avp_db_load("$ru","$avp(i1:123)/$some_scheme");
351 336
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
352 337
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
353 338
 
354
-   Example 1.14. avp_db_store usage
339
+   Example 1.13. avp_db_store usage
355 340
 ...
356 341
 avp_db_store("$tu","$avp(i:678)");
357 342
 avp_db_store("$ru/username","$avp(email)");
... ...
@@ -368,7 +353,7 @@ avp_db_store("$ru/username","$avp(email)");
368 353
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
369 354
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
370 355
 
371
-   Example 1.15. avp_db_delete usage
356
+   Example 1.14. avp_db_delete usage
372 357
 ...
373 358
 avp_db_delete("$tu","$avp(i:678)");
374 359
 avp_db_delete("$ru/username","$avp(email)");
... ...
@@ -400,7 +385,7 @@ avp_db_delete("$uuid","$avp(s:404fwd)/fwd_table");
400 385
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
401 386
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
402 387
 
403
-   Example 1.16. avp_db_query usage
388
+   Example 1.15. avp_db_query usage
404 389
 ...
405 390
 avp_db_query("select password, ha1 from subscriber where username='$tu'"
406 391
 ,
... ...
@@ -408,24 +393,7 @@ avp_db_query("select password, ha1 from subscriber where username='$tu'"
408 393
 avp_db_query("delete from subscriber");
409 394
 ...
410 395
 
411
-1.5.5.  avp_write(value,name) - removed
412
-
413
-   The function has been removed from 'avpops' module. Same
414
-   functionality can be achived directly in configuration script
415
-   via assignement operator.
416
-
417
-   Example 1.17. avp_write migration
418
-...
419
-avp_write("$tu","$avp(i:678)");           => $avp(i:678) = $tu;
420
-avp_write("$ru/username","$avp(email)");  => $avp(email) = $rU;
421
-avp_write("$si","$avp(s:ip)");            => $avp(s:ip) = $si;
422
-avp_write("$du","$avp(s:next_hop)");      => $avp(s:next_hop) = $du;
423
-avp_write("$hdr(call-id)","$avp(i:11)");  => $avp(i:11) = $hdr(call-id);
424
-avp_write("i:333","$avp(i:6)");           => $avp(i:6) = 333;
425
-avp_write("s:abc","$avp(i:7)");           => $avp(i:7) = "abc";
426
-...
427
-
428
-1.5.6.  avp_delete(name)
396
+1.5.5.  avp_delete(name)
429 397
 
430 398
    Deletes from memory the AVPs with name or, if empty, all AVPs.
431 399
 
... ...
@@ -440,7 +408,7 @@ avp_write("s:abc","$avp(i:7)");           => $avp(i:7) = "abc";
440 408
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
441 409
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
442 410
 
443
-   Example 1.18. avp_delete usage
411
+   Example 1.16. avp_delete usage
444 412
 ...
445 413
 avp_delete("$avp(i:678)/g");
446 414
 avp_delete("$avp(email)");
... ...
@@ -448,7 +416,7 @@ avp_delete("i");
448 416
 avp_delete("a3");
449 417
 ...
450 418
 
451
-1.5.7.  avp_pushto(destination,name)
419
+1.5.6.  avp_pushto(destination,name)
452 420
 
453 421
    Pushes the value of AVP(s) into the SIP message.
454 422
 
... ...
@@ -470,7 +438,7 @@ avp_delete("a3");
470 438
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
471 439
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
472 440
 
473
-   Example 1.19. avp_pushto usage
441
+   Example 1.17. avp_pushto usage
474 442
 ...
475 443
 avp_pushto("$ru/domain","$fd");
476 444
 avp_pushto("$ru","$avp(i:678)");
... ...
@@ -479,7 +447,7 @@ avp_pushto("$du","$avp(i:679)");
479 447
 avp_pushto("$br","$avp(i:680)");
480 448
 ...
481 449
 
482
-1.5.8.  avp_check(name,op_value)
450
+1.5.7.  avp_check(name,op_value)
483 451
 
484 452
    Checks the value of the AVP(s) against an operator and value.
485 453
 
... ...
@@ -512,7 +480,7 @@ avp_pushto("$br","$avp(i:680)");
512 480
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
513 481
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
514 482
 
515
-   Example 1.20. avp_check usage
483
+   Example 1.18. avp_check usage
516 484
 ...
517 485
 avp_check("$avp(i:678)", "lt/i:345/g");
518 486
 avp_check("$fd","eq/$td/I");
... ...
@@ -521,7 +489,7 @@ avp_check("$avp(s:foo)","re/sip:.*@bar.net/g");
521 489
 avp_check("$avp(s:foo)","fm/$avp(fm_avp)/g");
522 490
 ...
523 491
 
524
-1.5.9.  avp_copy(old_name,new_name)
492
+1.5.8.  avp_copy(old_name,new_name)
525 493
 
526 494
    Copy / move an avp under a new name.
527 495
 
... ...
@@ -537,13 +505,13 @@ avp_check("$avp(s:foo)","fm/$avp(fm_avp)/g");
537 505
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
538 506
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
539 507
 
540
-   Example 1.21. avp_copy usage
508
+   Example 1.19. avp_copy usage
541 509
 ...
542 510
 avp_copy("$avp(i:678)", "$avp(s:345)/g");
543 511
 avp_copy("$avp(old)","$avp(new)/gd");
544 512
 ...
545 513
 
546
-1.5.10.  avp_printf(dest, format)
514
+1.5.9.  avp_printf(dest, format)
547 515
 
548 516
    NOTE: since OpenSER 1.3.0 the function has been moved to core
549 517
    and it is an alias to pv_printf().
... ...
@@ -562,13 +530,13 @@ avp_copy("$avp(old)","$avp(new)/gd");
562 530
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
563 531
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
564 532
 
565
-   Example 1.22. avp_printf usage
533
+   Example 1.20. avp_printf usage
566 534
 ...
567 535
 avp_printf("$avp(i:20)", "This is a $rm request with call-id $hdr(call-i
568 536
 d)");
569 537
 ...
570 538
 
571
-1.5.11.  avp_subst(avps, subst)
539
+1.5.10.  avp_subst(avps, subst)
572 540
 
573 541
    Perl/sed-like subst applied to AVPs having string value.
574 542
 
... ...
@@ -594,7 +562,7 @@ d)");
594 562
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
595 563
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
596 564
 
597
-   Example 1.23. avp_subst usage
565
+   Example 1.21. avp_subst usage
598 566
 ...
599 567
 # if avp i:678 has a string value in e-mail format, replace the
600 568
 # domain part with the value of domain part from R-URI
... ...
@@ -612,7 +580,7 @@ avp_subst("$avp(i:678)/$avp(i:679)/g", "/(.*)@(.*)/\1@$rd/");
612 580
    applied to all of them, after the first src_avp is processed,
613 581
    it will be added in avp list and next processing will use it.
614 582
 
615
-1.5.12.  avp_op(name,op_value)
583
+1.5.11.  avp_op(name,op_value)
616 584
 
617 585
    Different integer operations with avps.
618 586
 
... ...
@@ -639,13 +607,13 @@ avp_subst("$avp(i:678)/$avp(i:679)/g", "/(.*)@(.*)/\1@$rd/");
639 607
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
640 608
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
641 609
 
642
-   Example 1.24. avp_op usage
610
+   Example 1.22. avp_op usage
643 611
 ...
644 612
 avp_op("$avp(i:678)", "add/i:345/g");
645 613
 avp_op("$avp(number)","sub/$avp(number2)/d");
646 614
 ...
647 615
 
648
-1.5.13.  is_avp_set(name)
616
+1.5.12.  is_avp_set(name)
649 617
 
650 618
    Check if any AVP with name is set.
651 619
 
... ...
@@ -658,13 +626,13 @@ avp_op("$avp(number)","sub/$avp(number2)/d");
658 626
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
659 627
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
660 628
 
661
-   Example 1.25. is_avp_set usage
629
+   Example 1.23. is_avp_set usage
662 630
 ...
663 631
 if(is_avp_set("$avp(i:678)"))
664 632
     log("AVP with integer id 678 exists\n");
665 633
 ...
666 634
 
667
-1.5.14.  avp_print()
635
+1.5.13.  avp_print()
668 636
 
669 637
    Prints the list with all the AVPs from memory. This is only a
670 638
    helper/debug function.
... ...
@@ -672,7 +640,7 @@ if(is_avp_set("$avp(i:678)"))
672 640
    This function can be used from REQUEST_ROUTE, FAILURE_ROUTE,
673 641
    BRANCH_ROUTE, LOCAL_ROUTE and ONREPLY_ROUTE.
674 642
 
675
-   Example 1.26. avp_print usage
643
+   Example 1.24. avp_print usage
676 644
 ...
677 645
 avp_print();
678 646
 ...
... ...
@@ -168,22 +168,6 @@ modparam("avpops","avp_url","mysql://user:passwd@host/database")
168 168
 				<programlisting format="linespecific">
169 169
 ...
170 170
 modparam("avpops","avp_table","avptable")
171
-...
172
-				</programlisting>
173
-			</example>
174
-		</section>
175
-		<section>
176
-			<title><varname>avp_aliases</varname> (string) - removed</title>
177
-			<para>
178
-			This is no longer a parameter of 'avpops' module. AVP aliases can
179
-			be defined directly in configuration script, in global parameters
180
-			section.
181
-			</para>
182
-			<example>
183
-				<title>Set <varname>avp_aliases</varname> in config file</title>
184
-				<programlisting format="linespecific">
185
-...
186
-avp_aliases="uuid=I:660;email=s:email_addr;fwd=i:753"
187 171
 ...
188 172
 				</programlisting>
189 173
 			</example>
... ...
@@ -538,30 +522,6 @@ avp_db_delete("$uuid","$avp(s:404fwd)/fwd_table");
538 522
 avp_db_query("select password, ha1 from subscriber where username='$tu'",
539 523
 	"$avp(i:678);$avp(i:679)");
540 524
 avp_db_query("delete from subscriber");
541
-...
542
-				</programlisting>
543
-			</example>
544
-		</section>
545
-		<section>
546
-			<title>
547
-				<function moreinfo="none">avp_write(value,name) - removed</function>
548
-			</title>
549
-			<para>
550
-			The function has been removed from 'avpops' module. Same
551
-			functionality can be achived directly in configuration script
552
-			via assignement operator.
553
-			</para>
554
-			<example>
555
-				<title><function>avp_write</function> migration</title>
556
-				<programlisting format="linespecific">
557
-...
558
-avp_write("$tu","$avp(i:678)");           => $avp(i:678) = $tu;
559
-avp_write("$ru/username","$avp(email)");  => $avp(email) = $rU;
560
-avp_write("$si","$avp(s:ip)");            => $avp(s:ip) = $si;
561
-avp_write("$du","$avp(s:next_hop)");      => $avp(s:next_hop) = $du;
562
-avp_write("$hdr(call-id)","$avp(i:11)");  => $avp(i:11) = $hdr(call-id);
563
-avp_write("i:333","$avp(i:6)");           => $avp(i:6) = 333;
564
-avp_write("s:abc","$avp(i:7)");           => $avp(i:7) = "abc";
565 525
 ...
566 526
 				</programlisting>
567 527
 			</example>