Module: kamailio
Branch: master
Commit: 64097569eccad8185117255a6018a32615c9945d
URL: 
https://github.com/kamailio/kamailio/commit/64097569eccad8185117255a6018a32615c9945d

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date: 2018-09-12T08:40:01+02:00

textops: docs - note about how to add additional headers for a body part

- GH #1632

---

Modified: src/modules/textops/doc/textops_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/64097569eccad8185117255a6018a32615c9945d.diff
Patch: 
https://github.com/kamailio/kamailio/commit/64097569eccad8185117255a6018a32615c9945d.patch

---

diff --git a/src/modules/textops/doc/textops_admin.xml 
b/src/modules/textops/doc/textops_admin.xml
index cfcca4daf6..8e0f350056 100644
--- a/src/modules/textops/doc/textops_admin.xml
+++ b/src/modules/textops/doc/textops_admin.xml
@@ -1694,7 +1694,7 @@ text
                <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"
+$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");
 ...
 
@@ -1706,6 +1706,31 @@ Content-Disposition: signal;handling=required
 
 7e Od 04 55 75 69 20 4d 61 6b 65 43 61 6c 6c
 
+--unique-boundary-1
+...
+</programlisting>
+               </example>
+               <para>
+               If other headers are wanted to be added for a body part, they 
can be
+               appended after the value of the content-type parameter, 
separated by
+               `\r\n` (at the very end do not add the '\r\n').
+               </para>
+               <example>
+               <title><function>append_body_part</function> with 
headers</title>
+               <programlisting format="linespecific">
+...
+$var(b) = "<info>active</info>";
+append_body_part("$var(b)", "application/xml\r\nX-Header: xyz");
+...
+
+# Will append this to the body:
+
+...
+Content-Type: application/vnd.cirpack.isdn-ext
+Content-Disposition: signal;handling=required
+
+7e Od 04 55 75 69 20 4d 61 6b 65 43 61 6c 6c
+
 --unique-boundary-1
 ...
 </programlisting>
@@ -1767,6 +1792,10 @@ kamailio
 ...
 </programlisting>
                </example>
+               <para>
+               If other headers are wanted to be added for a body part, see 
the docs
+               for append_body_part(...) function.
+               </para>
        </section>
 
        <section id="textops.f.get_body_part">


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to