[SR-Dev] Kamailio MI in shared modules

Daniel-Constantin Mierla miconda at gmail.com
Thu Feb 19 15:35:16 CET 2009



On 02/19/2009 03:39 PM, Jan Janak wrote:
> On 19-02 14:35, Andrei Pelinescu-Onciul wrote:
>   
>> On Feb 19, 2009 at 14:28, Jan Janak <jan at iptel.org> wrote:
>>     
>>> On 19-02 14:24, Jan Janak wrote:
>>>       
>>>> Hello,
>>>>
>>>> I just figured that the kamailio interface in shared modules (such as
>>>> db_berkeley and db_flatstore) wouldn't work. Such modules are defined with
>>>> -DSER_MOD_INTERFACE and thus use the module_exports structure from SER, which
>>>> does not have the MI structure entry.
>>>>
>>>> So although such modules have all the MI commands and they link with libkmi,
>>>> none of the management functions gets exported through the module API.
>>>>
>>>> Is there any solution to this yet?
>>>>
>>>>   Jan.
>>>>         
>>> Maybe the modules which contain MI commands should be recompiled with
>>> -DOPENSER_MOD_INTERFACE with the module interface structures changed to those
>>> from kamailio because ser module structures are a subset of those from
>>> kamailio? Any opinions or recommendations?
>>>       
>> ser module structures are not a subset of kamailio (e.g. rpc, on_break
>> a.s..o.).
>>
>> IMHO in the future we should drop mi completely (rpc does the same
>> thing, it's less complex and much more easier to use).
>> The same should go for statistics (they need a complete rewrite, they
>> are paritculary performance adverse :-)).
>>     
>
> OK, is there any solution we can use now? Or do we just ignore the MI problem
> for the moment?
>   
over the time, the MI might be replaced by rpc or something better. For 
now log of modules use it and would be hard to update. Same for 
statistics, many monitoring tools and SNMP module depends on it right now.

However, we can get to a common module interface and the extensions in 
each side to be exported via mod_register function. The mod_register is 
already in kamailio 1.5. Nevertheless, after 1.5 release we can change 
the interface.

I am afraid that if we try to make too many hacks around 
-DOPENSER_MOD_INTERFACE or -DSER_MOD_INTERFACE, the code may end up very 
ugly.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the sr-dev mailing list