[SR-Dev] first kamailio module ran on the sip-router core

Andrei Pelinescu-Onciul andrei at iptel.org
Thu Nov 20 23:00:54 CET 2008


On Nov 20, 2008 at 23:44, Daniel-Constantin Mierla <miconda at gmail.com> wrote:
> 
> 
> On 11/20/08 22:36, Andrei Pelinescu-Onciul wrote:
> >siputils is the first kamailio module that did succesfully run on
> >sip-core.
> >
> >I did only 2 small changes:
> >- added DEFS+=-DKAMAILIO_MOD_INTERFACE to the Makefile
> >- s/MIN/MIN_int 
> >
> >There are a few modules that would need a little bit more changes, like
> >everything using core send functions (they changed a bit in ser),
> >do_action() and build_*, but in all this cases these are minor updates.
> >
> >More will be compileable as soon as we unify the fixups, but I think the
> >biggest problem right now is the DB interface (from a module point
> >of view, we still  haven't unified the config file).
> >  
> I think both of them can co-exists. I see no other conflicts than naming 
> space -- so we need at least renaming of the db directory. Also they can 
> be moved as library.
> 
> BTW, should be there a naming policy for library? Like prefix with sr_ 
> or similar?
> 
> -example: libsr_dbk - sip router's library for DB interface compatible 
> with Kamailio

Yes, it might be better to have a  "sr_" prefix.
Right now in ser we have for some (libser_cds, libser_presence) and
 no prefix for others (libbinrpc).

Normally they will be installed in their own dir (e.g. /usr/lib/sr and the 
modules in /usr/lib/sr/modules), but having a separate prefix is even safer.

BTW: to quickly create a library just copy the Makefile from lib/print/
 and change the name in it, and add your .c and .h files.

To use a library from a module, just add to the module's Makefile:

SERLIBPATH=../../lib
# ser libraries, in the format path/shortname , where shortname is
# what will be used for -l
SER_LIBS=$(SERLIBPATH)/print/print

Compiling the module will re-compile the library automatically if needed
(e.g. some change in it). make install will also re-link the module
 (needed to change the rpath).


Andrei



More information about the sr-dev mailing list