Browse code

- added missing ')' (closes #1730516)

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

Daniel-Constantin Mierla authored on 13/07/2007 10:05:18
Showing 2 changed files
... ...
@@ -1,4 +1,3 @@
1
-
2 1
 textops Module
3 2
 
4 3
 Andrei Pelinescu-Onciul
... ...
@@ -12,7 +11,7 @@ Andrei Pelinescu-Onciul
12 11
 Daniel-Constantin Mierla
13 12
 
14 13
    Copyright � 2003 FhG FOKUS
15
-     _________________________________________________________
14
+     __________________________________________________________
16 15
 
17 16
    Table of Contents
18 17
    1. User's Guide
... ...
@@ -83,7 +82,7 @@ Daniel-Constantin Mierla
83 82
    1-22. remove_hf usage
84 83
    1-23. has_body usage
85 84
    1-24. is_privacy usage
86
-     _________________________________________________________
85
+     __________________________________________________________
87 86
 
88 87
 Chapter 1. User's Guide
89 88
 
... ...
@@ -91,7 +90,7 @@ Chapter 1. User's Guide
91 90
 
92 91
    This is mostly an example module. It implements text based
93 92
    operation (search, replace, append a.s.o).
94
-     _________________________________________________________
93
+     __________________________________________________________
95 94
 
96 95
 1.1.1. Known Limitations
97 96
 
... ...
@@ -100,7 +99,7 @@ Chapter 1. User's Guide
100 99
    header field:
101 100
 From: medabeda
102 101
  <sip:medameda@foo.bar>;tag=1234
103
-     _________________________________________________________
102
+     __________________________________________________________
104 103
 
105 104
 1.2. Dependencies
106 105
 
... ...
@@ -109,7 +108,7 @@ From: medabeda
109 108
    The following modules must be loaded before this module:
110 109
 
111 110
      * No dependencies on other OpenSER modules.
112
-     _________________________________________________________
111
+     __________________________________________________________
113 112
 
114 113
 1.2.2. External Libraries or Applications
115 114
 
... ...
@@ -117,7 +116,7 @@ From: medabeda
117 116
    before running OpenSER with this module loaded:
118 117
 
119 118
      * None.
120
-     _________________________________________________________
119
+     __________________________________________________________
121 120
 
122 121
 1.3. Exported Functions
123 122
 
... ...
@@ -134,9 +133,9 @@ From: medabeda
134 133
 
135 134
    Example 1-1. search usage
136 135
 ...
137
-if ( search("[Ss][Ii][Pp]" ) { /*....*/ };
136
+if ( search("[Ss][Ii][Pp]") ) { /*....*/ };
138 137
 ...
139
-     _________________________________________________________
138
+     __________________________________________________________
140 139
 
141 140
 1.3.2. search_body(re)
142 141
 
... ...
@@ -151,9 +150,9 @@ if ( search("[Ss][Ii][Pp]" ) { /*....*/ };
151 150
 
152 151
    Example 1-2. search_body usage
153 152
 ...
154
-if ( search_body("[Ss][Ii][Pp]" ) { /*....*/ };
153
+if ( search_body("[Ss][Ii][Pp]") ) { /*....*/ };
155 154
 ...
156
-     _________________________________________________________
155
+     __________________________________________________________
157 156
 
158 157
 1.3.3. search_append(re, txt)
159 158
 
... ...
@@ -171,7 +170,7 @@ if ( search_body("[Ss][Ii][Pp]" ) { /*....*/ };
171 170
 ...
172 171
 search_append("[Oo]pen[Ss]er", " SIP Proxy");
173 172
 ...
174
-     _________________________________________________________
173
+     __________________________________________________________
175 174
 
176 175
 1.3.4. search_append_body(re, txt)
177 176
 
... ...
@@ -190,7 +189,7 @@ search_append("[Oo]pen[Ss]er", " SIP Proxy");
190 189
 ...
191 190
 search_append_body("[Oo]pen[Ss]er", " SIP Proxy");
192 191
 ...
193
-     _________________________________________________________
192
+     __________________________________________________________
194 193
 
195 194
 1.3.5. replace(re, txt)
196 195
 
... ...
@@ -208,7 +207,7 @@ search_append_body("[Oo]pen[Ss]er", " SIP Proxy");
208 207
 ...
209 208
 replace("openser", "OpenSER SIP Proxy");
210 209
 ...
211
-     _________________________________________________________
210
+     __________________________________________________________
212 211
 
213 212
 1.3.6. replace_body(re, txt)
214 213
 
... ...
@@ -227,7 +226,7 @@ replace("openser", "OpenSER SIP Proxy");
227 226
 ...
228 227
 replace_body("openser", "OpenSER SIP Proxy");
229 228
 ...
230
-     _________________________________________________________
229
+     __________________________________________________________
231 230
 
232 231
 1.3.7. replace_all(re, txt)
233 232
 
... ...
@@ -245,7 +244,7 @@ replace_body("openser", "OpenSER SIP Proxy");
245 244
 ...
246 245
 replace_all("openser", "OpenSER SIP Proxy");
247 246
 ...
248
-     _________________________________________________________
247
+     __________________________________________________________
249 248
 
250 249
 1.3.8. replace_body_all(re, txt)
251 250
 
... ...
@@ -264,7 +263,7 @@ replace_all("openser", "OpenSER SIP Proxy");
264 263
 ...
265 264
 replace_body_all("openser", "OpenSER SIP Proxy");
266 265
 ...
267
-     _________________________________________________________
266
+     __________________________________________________________
268 267
 
269 268
 1.3.9. subst('/re/repl/flags')
270 269
 
... ...
@@ -288,13 +287,13 @@ replace_body_all("openser", "OpenSER SIP Proxy");
288 287
 # replace the uri in to: with the message uri (just an example)
289 288
 if ( subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1\u\2/ig') ) {};
290 289
 
291
-# replace the uri in to: with the value of avp sip_address (just an exa
292
-mple)
293
-if ( subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)
294
-\2/ig') ) {};
290
+# replace the uri in to: with the value of avp sip_address (just an exam
291
+ple)
292
+if ( subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)\
293
+2/ig') ) {};
295 294
 
296 295
 ...
297
-     _________________________________________________________
296
+     __________________________________________________________
298 297
 
299 298
 1.3.10. subst_uri('/re/repl/flags')
300 299
 
... ...
@@ -316,24 +315,23 @@ if ( subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)
316 315
 
317 316
    Example 1-10. subst_uri usage
318 317
 ...
319
-# adds 3463 prefix to numeric uris, and save the original uri (\0 match
320
-)
318
+# adds 3463 prefix to numeric uris, and save the original uri (\0 match)
321 319
 # as a parameter: orig_uri (just an example)
322 320
 if (subst_uri('/^sip:([0-9]+)@(.*)$/sip:3463\1@\2;orig_uri=\0/i')){$
323 321
 
324
-# adds the avp 'uri_prefix' as prefix to numeric uris, and save the ori
325
-ginal
322
+# adds the avp 'uri_prefix' as prefix to numeric uris, and save the orig
323
+inal
326 324
 # uri (\0 match) as a parameter: orig_uri (just an example)
327
-if (subst_uri('/^sip:([0-9]+)@(.*)$/sip:$avp(uri_prefix)\1@\2;orig_uri=
328
-\0/i')){$
325
+if (subst_uri('/^sip:([0-9]+)@(.*)$/sip:$avp(uri_prefix)\1@\2;orig_uri=\
326
+0/i')){$
329 327
 
330 328
 ...
331
-     _________________________________________________________
329
+     __________________________________________________________
332 330
 
333 331
 1.3.11. subst_user('/re/repl/flags')
334 332
 
335
-   Runs the re substitution on the message uri (like subst_uri
336
-   but works only on the user portion of the uri)
333
+   Runs the re substitution on the message uri (like subst_uri but
334
+   works only on the user portion of the uri)
337 335
 
338 336
    Meaning of the parameters is as follows:
339 337
 
... ...
@@ -354,12 +352,11 @@ if (subst_uri('/^sip:([0-9]+)@(.*)$/sip:$avp(uri_prefix)\1@\2;orig_uri=
354 352
 if (subst_user('/3642$/36423463/')){$
355 353
 
356 354
 ...
357
-# adds avp 'user_prefix' as prefix to username in r-uri ending with 364
358
-2
355
+# adds avp 'user_prefix' as prefix to username in r-uri ending with 3642
359 356
 if (subst_user('/(.*)3642$/$avp(user_prefix)\13642/')){$
360 357
 
361 358
 ...
362
-     _________________________________________________________
359
+     __________________________________________________________
363 360
 
364 361
 1.3.12. subst_body('/re/repl/flags')
365 362
 
... ...
@@ -384,7 +381,7 @@ if (subst_user('/(.*)3642$/$avp(user_prefix)\13642/')){$
384 381
 if ( subst_body('/^o=(.*) /o=$fU ') ) {};
385 382
 
386 383
 ...
387
-     _________________________________________________________
384
+     __________________________________________________________
388 385
 
389 386
 1.3.13. append_to_reply(txt)
390 387
 
... ...
@@ -402,7 +399,7 @@ if ( subst_body('/^o=(.*) /o=$fU ') ) {};
402 399
 append_to_reply("Foo: bar\r\n");
403 400
 append_to_reply("Foo: $rm at $Ts\r\n");
404 401
 ...
405
-     _________________________________________________________
402
+     __________________________________________________________
406 403
 
407 404
 1.3.14. append_hf(txt)
408 405
 
... ...
@@ -414,9 +411,9 @@ append_to_reply("Foo: $rm at $Ts\r\n");
414 411
        pseudo-variables which will be replaced at run time.
415 412
 
416 413
    Note: Headers which are added in main route cannot be removed
417
-   in further routes (e.g. failure routes). So, the idea is not
418
-   to add there any headers that you might want to remove later.
419
-   To add headers temporarely use the branch route because the
414
+   in further routes (e.g. failure routes). So, the idea is not to
415
+   add there any headers that you might want to remove later. To
416
+   add headers temporarely use the branch route because the
420 417
    changes you do there are per-branch.
421 418
 
422 419
    This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
... ...
@@ -427,7 +424,7 @@ append_to_reply("Foo: $rm at $Ts\r\n");
427 424
 append_hf("P-hint: VOICEMAIL\r\n");
428 425
 append_hf("From-username: $fU\r\n");
429 426
 ...
430
-     _________________________________________________________
427
+     __________________________________________________________
431 428
 
432 429
 1.3.15. append_hf(txt, hdr)
433 430
 
... ...
@@ -447,7 +444,7 @@ append_hf("From-username: $fU\r\n");
447 444
 append_hf("P-hint: VOICEMAIL\r\n", "Call-ID");
448 445
 append_hf("From-username: $fU\r\n", "Call-ID");
449 446
 ...
450
-     _________________________________________________________
447
+     __________________________________________________________
451 448
 
452 449
 1.3.16. insert_hf(txt)
453 450
 
... ...
@@ -466,7 +463,7 @@ append_hf("From-username: $fU\r\n", "Call-ID");
466 463
 insert_hf("P-hint: VOICEMAIL\r\n");
467 464
 insert_hf("To-username: $tU\r\n");
468 465
 ...
469
-     _________________________________________________________
466
+     __________________________________________________________
470 467
 
471 468
 1.3.17. insert_hf(txt, hdr)
472 469
 
... ...
@@ -486,7 +483,7 @@ insert_hf("To-username: $tU\r\n");
486 483
 insert_hf("P-hint: VOICEMAIL\r\n", "Call-ID");
487 484
 insert_hf("To-username: $tU\r\n", "Call-ID");
488 485
 ...
489
-     _________________________________________________________
486
+     __________________________________________________________
490 487
 
491 488
 1.3.18. append_urihf(prefix, suffix)
492 489
 
... ...
@@ -504,7 +501,7 @@ insert_hf("To-username: $tU\r\n", "Call-ID");
504 501
 ...
505 502
 append_urihf("CC-Diversion: ", "\r\n");
506 503
 ...
507
-     _________________________________________________________
504
+     __________________________________________________________
508 505
 
509 506
 1.3.19. is_present_hf(hf_name)
510 507
 
... ...
@@ -512,8 +509,8 @@ append_urihf("CC-Diversion: ", "\r\n");
512 509
 
513 510
    Note
514 511
 
515
-   The function is also able to distinguish the compact names.
516
-   For exmaple "From" will match with "f"
512
+        The function is also able to distinguish the compact names. For
513
+        exmaple "From" will match with "f"
517 514
 
518 515
    Meaning of the parameters is as follows:
519 516
 
... ...
@@ -526,14 +523,14 @@ append_urihf("CC-Diversion: ", "\r\n");
526 523
 ...
527 524
 if (is_present_hf("From")) log(1, "From HF Present");
528 525
 ...
529
-     _________________________________________________________
526
+     __________________________________________________________
530 527
 
531 528
 1.3.20. append_time()
532 529
 
533
-   Adds a time header to the reply of the request. You must use
534
-   it before functions that are likely to send a reply, e.g.,
535
-   save() from 'registrar' module. Header format is: "Date: %a,
536
-   %d %b %Y %H:%M:%S GMT", with the legend:
530
+   Adds a time header to the reply of the request. You must use it
531
+   before functions that are likely to send a reply, e.g., save()
532
+   from 'registrar' module. Header format is: "Date: %a, %d %b %Y
533
+   %H:%M:%S GMT", with the legend:
537 534
 
538 535
      * %a abbreviated week of day name (locale)
539 536
      * %d day of month as decimal number
... ...
@@ -552,12 +549,12 @@ if (is_present_hf("From")) log(1, "From HF Present");
552 549
 ...
553 550
 append_time();
554 551
 ...
555
-     _________________________________________________________
552
+     __________________________________________________________
556 553
 
557 554
 1.3.21. is_method(name)
558 555
 
559
-   Check if the method of the message matches the name. If name
560
-   is a known method (invite, cancel, ack, bye, options, info,
556
+   Check if the method of the message matches the name. If name is
557
+   a known method (invite, cancel, ack, bye, options, info,
561 558
    update, register, message, subscribe, notify, refer, prack),
562 559
    the function performs method ID testing (integer comparison)
563 560
    instead of ignore case string comparison.
... ...
@@ -591,7 +588,7 @@ if(is_method("OPTION|UPDATE"))
591 588
     # process OPTIONs and UPDATEs here
592 589
 }
593 590
 ...
594
-     _________________________________________________________
591
+     __________________________________________________________
595 592
 
596 593
 1.3.22. remove_hf(hname)
597 594
 
... ...
@@ -613,16 +610,16 @@ if(remove_hf("User-Agent"))
613 610
     # User Agent header removed
614 611
 }
615 612
 ...
616
-     _________________________________________________________
613
+     __________________________________________________________
617 614
 
618 615
 1.3.23. has_body(), has_body(mime)
619 616
 
620 617
    The function returns true if the SIP message has a body
621
-   attached. The checked includes also the "Content-Lenght"
622
-   header presence and value.
618
+   attached. The checked includes also the "Content-Lenght" header
619
+   presence and value.
623 620
 
624
-   If a paramter is given, the mime described will be also
625
-   checked against the "Content-Type" header.
621
+   If a paramter is given, the mime described will be also checked
622
+   against the "Content-Type" header.
626 623
 
627 624
    Meaning of the parameters is as follows:
628 625
 
... ...
@@ -639,7 +636,7 @@ if(has_body("application/sdp"))
639 636
     # do interesting stuff here
640 637
 }
641 638
 ...
642
-     _________________________________________________________
639
+     __________________________________________________________
643 640
 
644 641
 1.3.24. is_privacy(privacy_type)
645 642
 
... ...
@@ -659,20 +656,20 @@ if(is_privacy("id"))
659 656
     # do interesting stuff here
660 657
 }
661 658
 ...
662
-     _________________________________________________________
659
+     __________________________________________________________
663 660
 
664 661
 1.4. Known Limitations
665 662
 
666 663
    Search functions are applied to the original request, i.e.,
667 664
    they ignore all changes resulting from message processing in
668 665
    OpenSER script.
669
-     _________________________________________________________
666
+     __________________________________________________________
670 667
 
671 668
 Chapter 2. Developer's Guide
672 669
 
673 670
    The module does not provide any API to use in other OpenSER
674 671
    modules.
675
-     _________________________________________________________
672
+     __________________________________________________________
676 673
 
677 674
 Chapter 3. Frequently Asked Questions
678 675
 
... ...
@@ -686,8 +683,8 @@ Chapter 3. Frequently Asked Questions
686 683
 
687 684
    3.2. Where can I post a question about this module?
688 685
 
689
-   First at all check if your question was already answered on
690
-   one of our mailing lists:
686
+   First at all check if your question was already answered on one
687
+   of our mailing lists:
691 688
 
692 689
      * User Mailing List -
693 690
        http://openser.org/cgi-bin/mailman/listinfo/users
... ...
@@ -87,7 +87,7 @@ From: medabeda
87 87
 		<title><function>search</function> usage</title>
88 88
 		<programlisting format="linespecific">
89 89
 ...
90
-if ( search("[Ss][Ii][Pp]" ) { /*....*/ };
90
+if ( search("[Ss][Ii][Pp]") ) { /*....*/ };
91 91
 ...
92 92
 </programlisting>
93 93
 		</example>
... ...
@@ -115,7 +115,7 @@ if ( search("[Ss][Ii][Pp]" ) { /*....*/ };
115 115
 		<title><function>search_body</function> usage</title>
116 116
 		<programlisting format="linespecific">
117 117
 ...
118
-if ( search_body("[Ss][Ii][Pp]" ) { /*....*/ };
118
+if ( search_body("[Ss][Ii][Pp]") ) { /*....*/ };
119 119
 ...
120 120
 </programlisting>
121 121
 		</example>