This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
devel:config-engines [2016/05/03 18:34] miconda |
devel:config-engines [2016/05/03 19:04] miconda |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Configuration File Engines ====== | ====== Configuration File Engines ====== | ||
- | Kamailio implements from scratch the interpreter for its configuration file scripting language(used inside kamailio.cfg). | + | Kamailio implements from scratch the interpreter for its configuration file native |
Starting with v5.0.0, the routing blocks can be written in some other (well known) scripting languages and run via their embedded interpreters inside Kamailio. Known to work: | Starting with v5.0.0, the routing blocks can be written in some other (well known) scripting languages and run via their embedded interpreters inside Kamailio. Known to work: | ||
Line 34: | Line 34: | ||
* an extended set of data types, expressions and statements already available | * an extended set of data types, expressions and statements already available | ||
* a large set of extensions and libraries already available | * a large set of extensions and libraries already available | ||
- | | + | * good documentation about language itself and its extensions |
+ | | ||
Internally, the support for implementing routing logic in an embedded language is codenamed **KEMI** - Kamailio EMbedded Interface. | Internally, the support for implementing routing logic in an embedded language is codenamed **KEMI** - Kamailio EMbedded Interface. | ||
Line 40: | Line 41: | ||
===== Exporting Functions To KEMI ===== | ===== Exporting Functions To KEMI ===== | ||
- | The current | + | Because Kamailio needs to load modules in order to export useful functions to KEMI, statical wrappers to C functions implemented in other modules cannot be used, because they will introduce dependencies on each embedded interpreter for all modules. |
+ | |||
+ | The implementation relies on defining a set of generic functions that are exported | ||
+ | |||
+ | Currently the association table size is 1024 (it means that there can be maximum 1024 Kamailio | ||
Each existing component of Kamailio (e.g., module), can export new functions to KEMI in the following way: | Each existing component of Kamailio (e.g., module), can export new functions to KEMI in the following way: |