Wednesday, September 24, 2008

Generic Data Container

A new feature that allows to store and share arbitrary data across Kamailio (OpenSER) configuration file is available

Elena-Ramona Modroiu has just introduced a generic hash table container for usage in configuration file. The hash table is in shared memory, therefore the values are global over all kamailio processes.

The items in hash table can be accessed via $sht(name). The name can include pseudo-variables that will be evaluated at runtime. In this way, the hash table can be used to store data per user or other key and can offer functionality of dealing with array of values.

An example of how to protect against dictionary attacks is in the README:

http://www.kamailio.org/docs/modules/devel/htable.html

As a roadmap for the new module, planned for addition:
- MI commands to get/set items in hash table
- ability to save/load in/from database
- ability to init items at startup
- auto-expire time for items

This completes global variables space along with shared variables $shv(name)) which are single value and allow only static name, but they are faster to access (see cfgutils readme file for more details on $shv(name)).

Announcement email is here:

http://lists.kamailio.org/pipermail/users/2008-September/019764.html

No comments: