<p>Here is an example of the string transformations in use:</p>

<h2>opensips.cfg specifics</h2>

<pre><code>modparam("cfgutils", "varset", "secret=s:90hf230fh209fh209")

route {
  ...
  xlog("L_INFO", "Call-ID            : $ci\n");
  $var(xor) = $(ci{s.xor, $var(secret)});
  xlog("L_INFO", "Call-ID XOR        : $var(xor)\n");
  $var(b64encoded) = $(var(xor){s.b64encode});
  xlog("L_INFO", "Call-ID b64encoded : $var(b64encoded)\n");
  $var(b64decoded) = $(var(b64encoded){s.b64decode});
  xlog("L_INFO", "Call-ID b64decoded : $var(b64decoded)\n");
  xlog("L_INFO", "Call-ID XOR        : $(var(b64decoded){s.xor, $var(secret)})\n");
}
</code></pre>

<h2>log output</h2>

<pre><code>Jul  1 17:33:34 localhost opensips: Call-ID            : ZjdiZDlmNTY2NDk4ZWNiYzNlNGVlNzA4ODM3NTFmNjg
Jul  1 17:33:34 localhost opensips: Call-ID XOR        : cZ#014#017hw\#013&amp;fi#013(,Y#004cn~#001?H}\(/d\w#034)#006}t#003&amp;2t^~#014#017
Jul  1 17:33:34 localhost opensips: Call-ID b64encoded : Y1oMD2h3XAsmZmkLKCxZBGNufgE/SH1cKC9kXHccKQZ/fXQDJjJ0Xn4MDw==
Jul  1 17:33:34 localhost opensips: Call-ID b64decoded : cZ#014#017hw\#013&amp;fi#013(,Y#004cn~#001?H}\(/d\w#034)#006}t#003&amp;2t^~#014#017
Jul  1 17:33:34 localhost opensips: Call-ID XOR        : ZjdiZDlmNTY2NDk4ZWNiYzNlNGVlNzA4ODM3NTFmNjg
</code></pre>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>&nbsp;&nbsp;<a href='https://github.com/OpenSIPS/opensips/pull/565'>https://github.com/OpenSIPS/opensips/pull/565</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Added b64encode, b64decode, and xor string transformations</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/565/files#diff-0">transformations.c</a>
    (96)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/OpenSIPS/opensips/pull/565/files#diff-1">transformations.h</a>
    (3)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/OpenSIPS/opensips/pull/565.patch'>https://github.com/OpenSIPS/opensips/pull/565.patch</a></li>
  <li><a href='https://github.com/OpenSIPS/opensips/pull/565.diff'>https://github.com/OpenSIPS/opensips/pull/565.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/pull/565">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciT7iu2RQib6Y4uMupTpZNY29iwgTks5oZEe8gaJpZM4FQKS-.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/OpenSIPS/opensips/pull/565"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>