That sdp function returns 4, 6 or -1.
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.
It is documented in core cookbook in the section for return and in the FAQ:
*
https://www.kamailio.org/wiki/tutorials/faq/main#how_is_the_function_return…
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.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2701#issuecomment-812820615