<p>No, I am calling msg_apply_changes() <em>after</em> append_body_part() as you recommended, and it is not crashing any more. It does not correctly append the isup though due to the error I pasted.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/issues/240#issuecomment-121604868">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZfyISnPTJmdinuLLRSniIlhhdz9nks5odk3_gaJpZM4FVVkh.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/kamailio/kamailio/issues/240#issuecomment-121604868"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>