[sr-dev] [kamailio/kamailio] rr module is_direction("downstream") and $ruid("dir") always evaluate downstream to true. (#1729)

Daniel-Constantin Mierla notifications at github.com
Mon Nov 19 13:19:18 CET 2018


`KSR.rr.is_direction(...)` returns `1` if the direction is matching the parameter and `-1` if not. It does not return `true` or `false`, therefore be sure you do the appropriate comparison, it is different that kamailio.cfg language, where a negative return value is evaluated as false and positive is evaluate to true. In Lua, you have to do `<0` or `>0`.

Then, there is no function exported by kamailio `headers.get("$rdir(name)")`.

So overall, it looks like misunderstanding/misuse, rather than a bug in the code. You can discuss more or sr-users if you have further questions about using KEMI and Lua. If it proves to be a bug somewhere, then this can be reopen.

-- 
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/1729#issuecomment-439874589
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20181119/b9cf0bd2/attachment.html>


More information about the sr-dev mailing list