<p></p>
<p><code>KSR.tm.t_relay()</code> is returning int. The sample config has it like <code>if KSR.tm.t_relay() < 0:</code>, but I guess it should work evaluating an int anyhow in the if condition of python. Does it happen every time the script is executed? Do you get any other error messages before those pasted above, from the start of kamailio?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2366#issuecomment-650944682">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZMHWPCGMIWPCUUXXPLRZAWQHANCNFSM4OC3RJVA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZMFO7V5RJR6ZQIR3HLRZAWQHA5CNFSM4OC3RJVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE3GKBKQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2366#issuecomment-650944682",
"url": "https://github.com/kamailio/kamailio/issues/2366#issuecomment-650944682",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>