<p>In <a href="https://github.com/kamailio/kamailio/pull/390#discussion_r44639702">modules/rtpengine/rtpengine.c</a>:</p>
<pre style='color:#555'>>      }
>  
>    if (body_out)
>            *body_out = body;
>  
> +  if (op == OP_DELETE) {
> +          /* Delete the key<->value from the hashtable */
> +          if (!rtpengine_hash_table_remove(&callid)) {
</pre>
<p>Some notes:</p>

<ul>
<li>when session is created, there is no to-tag (initial invite)</li>
<li>the via-branch can be different for re-invite or bye, so it cannot be used as part of the key all the time</li>
</ul>

<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/pull/390/files#r44639702">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZTvkIjtphxCCmQnbDwH1mRZVll-lks5pFFyYgaJpZM4GcraR.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/pull/390/files#r44639702"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>