<p><a href="https://github.com/achalkov" class="user-mention">@achalkov</a> I guess you get the bug because the new body has the same Content-Type with the one you strip. Because of this, there is an incompatibility between strip_body() and add_body() functions, because of the lumps(opensips message editing mechanism). Anyhow, isn't the add_body() function enough for what you need? Don't know whether you read the docs, but they state that " If a body already exists, it will be replaced with the new one."[0] So you don't need to call the strip_body() function.</p>

<p>[0]<a href="http://www.opensips.org/html/docs/modules/2.2.x/sipmsgops.html#id294297">http://www.opensips.org/html/docs/modules/2.2.x/sipmsgops.html#id294297</a></p>

<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/issues/698#issuecomment-157321476">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciTBCl-R-ehyahVAJiCXg8tF1wVPtks5pGu5xgaJpZM4Ghzws.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/issues/698#issuecomment-157321476"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>