Module: kamailio
Branch: 5.2
Commit: 6da8a5b4cb1f9b97aa2f92bc5d97786443712099
URL:
https://github.com/kamailio/kamailio/commit/6da8a5b4cb1f9b97aa2f92bc5d97786…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-11-27T20:03:55+01:00
textops: docs - notes that msg_apply_changes() may be required for multi-part operations
- GH #1719
(cherry picked from commit 5460db2e59341f143d607de744faa8413216afd5)
---
Modified: src/modules/textops/doc/textops_admin.xml
---
Diff:
https://github.com/kamailio/kamailio/commit/6da8a5b4cb1f9b97aa2f92bc5d97786…
Patch:
https://github.com/kamailio/kamailio/commit/6da8a5b4cb1f9b97aa2f92bc5d97786…
---
diff --git a/src/modules/textops/doc/textops_admin.xml
b/src/modules/textops/doc/textops_admin.xml
index 8e0f350056..d348ccf6be 100644
--- a/src/modules/textops/doc/textops_admin.xml
+++ b/src/modules/textops/doc/textops_admin.xml
@@ -1638,6 +1638,7 @@ if (starts_with("$rU", "+358"))
set_body_multipart("test", "text/plain", "delimiter");
msg_apply_changes();
append_body_part(...);
+msg_apply_changes();
...
@@ -1690,12 +1691,17 @@ text
The core will take care of the last boundary ending "--". Detecting wich one
is
the last and fixing the others if needed.
</para>
+ <para>
+ Note: it may be required that msg_apply_changes() from textopsx module
+ has to be executed if there are other operations over the new body.
+ </para>
<example>
<title><function>append_body_part</function> usage</title>
<programlisting format="linespecific">
...
$var(b) = "7e Od 04 55 75 69 20 4d 61 6b 65 43 61 6c 6c";
append_body_part("$var(b)", "application/vnd.cirpack.isdn-ext",
"signal;handling=required");
+msg_apply_changes();
...
# Will append this to the body:
@@ -1721,6 +1727,7 @@ Content-Disposition: signal;handling=required
...
$var(b) = "<info>active</info>";
append_body_part("$var(b)", "application/xml\r\nX-Header: xyz");
+msg_apply_changes();
...
# Will append this to the body:
@@ -1773,12 +1780,17 @@ Content-Disposition: signal;handling=required
The core will take care of the last boundary ending "--". Detecting wich one
is
the last and fixing the others if needed.
</para>
+ <para>
+ Note: it may be required that msg_apply_changes() from textopsx module
+ has to be executed if there are other operations over the new body.
+ </para>
<example>
<title><function>append_body_part_hex</function> usage</title>
<programlisting format="linespecific">
...
$var(b) = "6b 61 6d 61 69 6c 69 6f";
append_body_part_hex("$var(b)", "application/my-custom-ext");
+msg_apply_changes();
...
# Will append this to the body:
@@ -1894,11 +1906,16 @@ get_body_part("application/vnd.cirpack.isdn-ext",
"$var(hbody)");
The core will take care of the last boundary ending "--". Detecting wich one
is
the last and fixing the others if needed.
</para>
+ <para>
+ Note: it may be required that msg_apply_changes() from textopsx module
+ has to be executed if there are other operations over the new body.
+ </para>
<example>
<title><function>remove_body_part</function> usage</title>
<programlisting format="linespecific">
...
remove_body_part("application/vnd.cirpack.isdn-ext");
+msg_apply_changes();
...
</programlisting>
</example>