<p></p>
<p dir="auto">I am not sure it is the reason for this case, but something is wrong there, because if the global <code class="notranslate">T</code> is already set, then there is no <code class="notranslate">REF</code> done to <code class="notranslate">T</code>, but the function does always to <code class="notranslate">UNREF</code> at the end.</p>
<p dir="auto">It should do first <code class="notranslate">t = tmb.t_gett();</code> and then <code class="notranslate">if(t == NULL || t == T_UNDEFINED)</code> do <code class="notranslate">tmb.t_check(msg, &_branch)</code> and on success retrieve <code class="notranslate">T</code> with another <code class="notranslate">tmb.t_gett()</code>. If <code class="notranslate">t_check()</code> had to be done, then <code class="notranslate">REF</code> was done and <code class="notranslate">UNREF</code> has to be done at the end.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/3156#issuecomment-1227171208">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZIYL6CTCQEUPQF5C2LV25O3NANCNFSM5ZIRRXFA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/ABO7UZPMYUBON6QQVAMDEFDV25O3NA5CNFSM5ZIRRXFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOJESSLCA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><kamailio/kamailio/issues/3156/1227171208</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/3156#issuecomment-1227171208",
"url": "https://github.com/kamailio/kamailio/issues/3156#issuecomment-1227171208",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>