Module: kamailio Branch: master Commit: d6cd5655df83d233562ab557a0e73cb5e65f0b1c URL: https://github.com/kamailio/kamailio/commit/d6cd5655df83d233562ab557a0e73cb5...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-04-05T20:03:44+02:00
textops: documentation for append_body_part_hex()
---
Modified: src/modules/textops/doc/textops_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/d6cd5655df83d233562ab557a0e73cb5... Patch: https://github.com/kamailio/kamailio/commit/d6cd5655df83d233562ab557a0e73cb5...
---
diff --git a/src/modules/textops/doc/textops_admin.xml b/src/modules/textops/doc/textops_admin.xml index 3ff09fb812..966169d2dd 100644 --- a/src/modules/textops/doc/textops_admin.xml +++ b/src/modules/textops/doc/textops_admin.xml @@ -1561,6 +1561,63 @@ 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> + </section> + + <section id="textops.f.append_body_part_hex"> + <title> + <function moreinfo="none">append_body_part_hex(txt,content_type[, content_disposition])</function> + </title> + <para> + Append a part on multipart body SIP message, with the content provided + in hexa format. Will use "unique-boundary-1" as boundary. + </para> + <para>Meaning of the parameters is as follows:</para> + <itemizedlist> + <listitem> + <para><emphasis>txt</emphasis> - content for the multipart body in + hexa format. Spaces can be used between the pairs of hexa digits + to make it easier to read in the config, they are ignored and + not added in the body part. The parameter can include + pseudo-variables. + </para> + </listitem> + <listitem> + <para><emphasis>content_type</emphasis> - value of Content-Type header, + can include pseudo-variables. + </para> + </listitem> + <listitem> + <para><emphasis>content_disposition</emphasis> - value of Content-Disposition header, + can include pseudo-variables. + </para> + </listitem> + </itemizedlist> + <para> + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE. + </para> + <para> + The core will take care of the last boundary ending "--". Detecting wich one is + the last and fixing the others if needed. + </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"); +... + +# Will append this to the body: + +... +Content-Type: application/my-custom-ext + +kamailio + --unique-boundary-1 ... </programlisting>