Module: kamailio
Branch: master
Commit: be18e641c409d9a23dae7fd1c5bae2e0ad057ed7
URL:
https://github.com/kamailio/kamailio/commit/be18e641c409d9a23dae7fd1c5bae2e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-10-05T07:42:10+02:00
textopsx: update the readme for keep_hf()
---
Modified: modules/textopsx/README
Modified: modules/textopsx/doc/functions.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/be18e641c409d9a23dae7fd1c5bae2e…
Patch:
https://github.com/kamailio/kamailio/commit/be18e641c409d9a23dae7fd1c5bae2e…
---
diff --git a/modules/textopsx/README b/modules/textopsx/README
index 5239885..bbc859b 100644
--- a/modules/textopsx/README
+++ b/modules/textopsx/README
@@ -22,7 +22,7 @@ Daniel-Constantin Mierla
2.1. msg_apply_changes()
2.2. change_reply_status(code, reason)
2.3. remove_body()
- 2.4. keep_hf(regexp)
+ 2.4. keep_hf([regexp])
2.5. fnmatch(value, expr [, flags])
2.6. append_hf_value(hf, hvalue)
2.7. insert_hf_value(hf, hvalue)
@@ -68,7 +68,7 @@ Chapter 1. Admin Guide
2.1. msg_apply_changes()
2.2. change_reply_status(code, reason)
2.3. remove_body()
- 2.4. keep_hf(regexp)
+ 2.4. keep_hf([regexp])
2.5. fnmatch(value, expr [, flags])
2.6. append_hf_value(hf, hvalue)
2.7. insert_hf_value(hf, hvalue)
@@ -97,7 +97,7 @@ Chapter 1. Admin Guide
2.1. msg_apply_changes()
2.2. change_reply_status(code, reason)
2.3. remove_body()
- 2.4. keep_hf(regexp)
+ 2.4. keep_hf([regexp])
2.5. fnmatch(value, expr [, flags])
2.6. append_hf_value(hf, hvalue)
2.7. insert_hf_value(hf, hvalue)
@@ -170,12 +170,14 @@ onreply_route {
remove_body();
...
-2.4. keep_hf(regexp)
+2.4. keep_hf([regexp])
Remove headers that don't match the regular expression regexp. Several
header are ignored always (thus not removed): Via, From, To, Call-ID,
CSeq, Content-Length, Content-Type, Max-Forwards, Contact, Route,
- Record-Route -- these can be removed one by one with remove_hf().
+ Record-Route -- these can be removed one by one with remove_hf(). If
+ regexp is missing, then only the headers listed above are kept, the
+ rest are removed.
This function can be used from ANY_ROUTE.
diff --git a/modules/textopsx/doc/functions.xml b/modules/textopsx/doc/functions.xml
index 204c227..280b730 100644
--- a/modules/textopsx/doc/functions.xml
+++ b/modules/textopsx/doc/functions.xml
@@ -103,14 +103,15 @@ remove_body();
<section id="textopsx.f.keep_hf">
<title>
- <function moreinfo="none">keep_hf(regexp)</function>
+ <function moreinfo="none">keep_hf([regexp])</function>
</title>
<para>
Remove headers that don't match the regular expression regexp.
Several header are ignored always (thus not removed): Via, From,
To, Call-ID, CSeq, Content-Length, Content-Type, Max-Forwards,
Contact, Route, Record-Route -- these can be removed one by one
- with remove_hf().
+ with remove_hf(). If regexp is missing, then only the headers
+ listed above are kept, the rest are removed.
</para>
<para>
This function can be used from ANY_ROUTE.