<p>One more I just noticed: if the .type!=DB1_STRING, it assume is DB1_STR, because it is printing that value, but can be any other type, like DB1_INT and then there will be a crash.</p>

<p>Printing type is ok, but before the second LM_ERR has to be a check on the type before printing some specific fields.</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/pull/220#issuecomment-115276701">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZZEJmlTKASPy6HZPAIaBf1AmO1sEks5oXAgqgaJpZM4FLFz0.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/220#issuecomment-115276701"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>