<p></p>
<p>That sdp function returns 4, 6 or -1.</p>
<p>The true for comparing with 1 happens because of how return code for functions is evaluated: negative values are evaluated to false and positive values are evaluated to true -- that is something specific for kamailio config interpreter, existing pretty much from the day 0 of the ser project.</p>
<p>It is documented in core cookbook in the section for return and in the FAQ:</p>
<ul>
<li><a href="https://www.kamailio.org/wiki/tutorials/faq/main#how_is_the_function_return_cod" rel="nofollow">https://www.kamailio.org/wiki/tutorials/faq/main#how_is_the_function_return_cod</a></li>
</ul>
<p>Where I just added an explicit example for this case. Try the variant with getting the return value via $rc and if does not work reopen. Also the default config file has a similar approach for lookup location evaluation.</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/2701#issuecomment-812820615">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZJUFUJCHBJIUP3WHUDTG2YGXANCNFSM42J37CSA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZOTFCD7HONLDOKIAZDTG2YGXA5CNFSM42J37CSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGBZKRBY.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/2701#issuecomment-812820615",
"url": "https://github.com/kamailio/kamailio/issues/2701#issuecomment-812820615",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>