[sr-dev] [kamailio/kamailio] not properly compassion (#2701)

Daniel-Constantin Mierla notifications at github.com
Sat Apr 3 08:25:47 CEST 2021


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_cod

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210402/c4cf5be0/attachment.htm>


More information about the sr-dev mailing list