Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app_lua: add functions for handling script flags #666

Closed
wants to merge 1 commit into from

Conversation

jgallartm
Copy link

No description provided.

@miconda
Copy link
Member

miconda commented Jun 10, 2016

These functions should be available already in master branch, but exported by the KSR module, not the old sr module:

In lua script you have to use something like:

KSR.setflag(10);

The KSR is exported as part of the new KEMI, but can be used even if you don't write full routing blocks in Lua:

@jgallartm
Copy link
Author

Hi Daniel,

that's true, the patch makes sense for the 4.x versions. However, the flags we're trying to manage are these ones: http://kamailio.org/docs/modules/4.4.x/modules/kex.html#kex.f.setsflag, not the "regular" ones. I can't see those functions in master either.

@miconda
Copy link
Member

miconda commented Jun 10, 2016

OK -- I wasn't expecting those "script" flags to be used much and thought it is about the message flags.

You will have to make the patch for master and use the kemi aprroach -- in this way the functions will become available to all kemi interpreters at once (right now lua and python). It should be simpler than what you did, no exporting via inter-module api and code in app_lua, it will be only some bits inside the kex module. Perhaps maxfwd is a good example to look at how a function is exported to kemi.

miconda added a commit that referenced this pull request Jun 20, 2016
@miconda
Copy link
Member

miconda commented Jun 20, 2016

Implemented via kemi - commit referenced above.

@miconda miconda closed this Jun 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants