User Tools

Site Tools


devel:kamailio-5.0-design

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
devel:kamailio-5.0-design [2016/02/28 11:50]
miconda
devel:kamailio-5.0-design [2016/03/01 09:25]
miconda [Exporting Functions To Embedded Interpreters]
Line 29: Line 29:
 ==== Exporting Functions To Embedded Interpreters ==== ==== Exporting Functions To Embedded Interpreters ====
  
-  * define and implement an export interface from modules to embedded interpreters to automatically add new functions to embedded interpretersin a similar fashion as for adding functions to configuration file+  * define and implement an export interface from modules to embedded interpreters to automatically add new functions to embedded interpreters 
 +  * it should be in a similar fashion as for adding functions to configuration file, but without fixup mechanism, so bare string/integer parameters can be provided by embedded interpreters 
 + 
 +Interface fields: 
 + 
 +  * submodule name in embedded interpreter 
 +  * function name in embedded interpreter 
 +  * parameter types 
 +  * pointer to c function 
 + 
 +Example: 
 + 
 +<code c> 
 +// export t_reply(200, "OK"
 + 
 +sr_exapi_t mod_exapi[] = { 
 +  { "sr.tm", "reply", {PARAM_INT, PARAM_STR, 0}, t_reply }, 
 +  { 0, 0, {0}, 0} 
 +}; 
 +</code>
  
 ==== Routing Logic In Embedded Interpreters Scripting ==== ==== Routing Logic In Embedded Interpreters Scripting ====
Line 38: Line 57:
  
 ===== Source Tree Structure ===== ===== Source Tree Structure =====
 +
 +Goals:
 +
 +  * group files per components to be easier to spot their role, especially the core, include files and utilities
 +
 +==== Reorganizing Source Files Location ====
  
 It was discussed in the past: It was discussed in the past:
  
   * source code files should be relocated to have a better structure for include headers, core files, modules and internal libraries as well as utilities   * source code files should be relocated to have a better structure for include headers, core files, modules and internal libraries as well as utilities
 +
 +Two models proposed:
 +
 +  * a) only move core files in a new 'core' folder in the root directory
 +  * b) move all source code files for Kamailio in a new 'src' folder, with further re-organization with subfolders inside 'src'
  
 ===== Build System ===== ===== Build System =====
  
-Revising the build system based on Makefiles.+Goals: 
 + 
 +  * revising the build system based on Makefiles. 
 + 
 +==== Reviewing Alternative Build Systems ====
  
 Alternatives to analyze: Alternatives to analyze:
devel/kamailio-5.0-design.txt · Last modified: 2016/05/03 18:33 by miconda