Module: kamailio Branch: master Commit: 5460db2e59341f143d607de744faa8413216afd5 URL: https://github.com/kamailio/kamailio/commit/5460db2e59341f143d607de744faa841...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-11-27T17:53:30+01:00
textops: docs - notes that msg_apply_changes() may be required for multi-part operations
- GH #1719
---
Modified: src/modules/textops/doc/textops_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/5460db2e59341f143d607de744faa841... Patch: https://github.com/kamailio/kamailio/commit/5460db2e59341f143d607de744faa841...
---
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>