Browse code

- docs updated (closes 1353130)

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

Bogdan-Andrei Iancu authored on 22/11/2005 22:19:01
Showing 2 changed files
... ...
@@ -39,6 +39,7 @@ Andrei Pelinescu-Onciul
39 39
               1.3.11. is_present_hf(hf_name)
40 40
               1.3.12. append_time()
41 41
               1.3.13. is_method(name)
42
+              1.3.14. remove_hf(hname)
42 43
 
43 44
         1.4. Known Limitations
44 45
 
... ...
@@ -59,6 +60,7 @@ Andrei Pelinescu-Onciul
59 60
    1-11. is_present_hf usage
60 61
    1-12. append_time usage
61 62
    1-13. is_method usage
63
+   1-14. remove_hf usage
62 64
      _________________________________________________________
63 65
 
64 66
 Chapter 1. User's Guide
... ...
@@ -398,6 +400,28 @@ if(is_method("OPTION|UPDATE"))
398 400
 ...
399 401
      _________________________________________________________
400 402
 
403
+1.3.14. remove_hf(hname)
404
+
405
+   Remove from message all headers with name "hname"
406
+
407
+   Returns true if at least one header is found and removed.
408
+
409
+   Meaning of the parameters is as follows:
410
+
411
+     * hname - header name to be removed.
412
+
413
+   This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
414
+   FAILURE_ROUTE and BRANCH_ROUTE.
415
+
416
+   Example 1-14. remove_hf usage
417
+...
418
+if(remove_hf("User-Agent"))
419
+{
420
+    # User Agent header removed
421
+}
422
+...
423
+     _________________________________________________________
424
+
401 425
 1.4. Known Limitations
402 426
 
403 427
    Search functions are applied to the original request, i.e.,
... ...
@@ -49,8 +49,8 @@ From: medabeda
49 49
 	<section>
50 50
 		<title>External Libraries or Applications</title>
51 51
 		<para>
52
-		The following libraries or applications must be installed before running
53
-		&ser; with this module loaded:
52
+		The following libraries or applications must be installed before 
53
+		running &ser; with this module loaded:
54 54
 			<itemizedlist>
55 55
 			<listitem>
56 56
 			<para>
... ...
@@ -260,7 +260,8 @@ if ( subst('/^To:(.*)sip:[^@]*@[a-zA-Z0-9.]+(.*)$/t:\1$avp(sip_address)\2/ig') )
260 260
 		</listitem>
261 261
 		</itemizedlist>
262 262
 		<para>
263
-		This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE.
263
+		This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, 
264
+		FAILURE_ROUTE, BRANCH_ROUTE.
264 265
 		</para>
265 266
 		<example>
266 267
 		<title><function>subst_uri</function> usage</title>
... ...
@@ -306,7 +307,8 @@ if (subst_uri('/^sip:([0-9]+)@(.*)$/sip:$avp(uri_prefix)\1@\2;orig_uri=\0/i')){$
306 307
 		</listitem>
307 308
 		</itemizedlist>
308 309
 		<para>
309
-		This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE.
310
+		This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, 
311
+		FAILURE_ROUTE, BRANCH_ROUTE.
310 312
 		</para>
311 313
 		<example>
312 314
 		<title><function>subst</function> usage</title>
... ...
@@ -555,6 +557,44 @@ if(is_method("OPTION|UPDATE"))
555 557
 		</example>
556 558
 	</section>
557 559
 
560
+	<section>
561
+		<title>
562
+		<function moreinfo="none">remove_hf(hname)</function>
563
+		</title>
564
+		<para>
565
+		Remove from message all headers with name <quote>hname</quote>
566
+		</para>
567
+		<para>
568
+		Returns true if at least one header is found and removed.
569
+		</para>
570
+		<para>Meaning of the parameters is as follows:</para>
571
+		<itemizedlist>
572
+		<listitem>
573
+			<para><emphasis>hname</emphasis> - header name to be removed.
574
+			</para>
575
+		</listitem>
576
+		</itemizedlist>
577
+		<para>
578
+		This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, 
579
+		FAILURE_ROUTE and BRANCH_ROUTE.
580
+		</para>
581
+		<example>
582
+		<title><function>remove_hf</function> usage</title>
583
+		<programlisting format="linespecific">
584
+...
585
+if(remove_hf("User-Agent"))
586
+{
587
+    # User Agent header removed
588
+}
589
+...
590
+</programlisting>
591
+		</example>
592
+	</section>
593
+
594
+
595
+
596
+
597
+
558 598
 	</section>
559 599
 	<section>
560 600
 		<title>Known Limitations</title>