How to insert modules in kamailio?
Hi people, I worked with ser but now I'm migrating to kamailio... I'd like to know how to insert a ser module in the kamailio? Example: In the ser modules exist the route module and I want to use it in the kamailio. It's possible?
Cheers, Bruno
On 05/11/2010 09:19 AM, Bruno Bresciani wrote:
Hi people, I worked with ser but now I'm migrating to kamailio... I'd like to know how to insert a ser module in the kamailio? Example: In the ser modules exist the route module and I want to use it in the kamailio. It's possible?
Sure, just make sure:
1) The module is in the "module path", i.e. the set of directories searched for modules.
2) Do: loadmodule "modname"
It is not necessary any longer to specify the full filename, e.g. "modname.so". Merely "modname" will do.
3. Module parameters are supplied afterward using "modparam", e.g.
modparam("modname", "param_name", "value")
Note no semicolon at the end of this statement.
4. Multiple modules' parameters can be combined if they share a name:
modparam("modname1|modname2|modname3", "param_name", "value")
Thanks for your help alex... I'll try to do what you said, and if I have any doubt I'll ask your help ok?
Cheers,
Bruno
2010/5/11 Alex Balashov abalashov@evaristesys.com
On 05/11/2010 09:19 AM, Bruno Bresciani wrote:
Hi people, I worked with ser but now I'm migrating to kamailio... I'd
like to know how to insert a ser module in the kamailio? Example: In the ser modules exist the route module and I want to use it in the kamailio. It's possible?
Sure, just make sure:
- The module is in the "module path", i.e. the set of directories searched
for modules.
- Do: loadmodule "modname"
It is not necessary any longer to specify the full filename, e.g. "modname.so". Merely "modname" will do.
- Module parameters are supplied afterward using "modparam", e.g.
modparam("modname", "param_name", "value")
Note no semicolon at the end of this statement.
- Multiple modules' parameters can be combined if they share a name:
modparam("modname1|modname2|modname3", "param_name", "value")
-- Alex Balashov - Principal Evariste Systems LLC 1170 Peachtree Street 12th Floor, Suite 1200 Atlanta, GA 30309 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
On 5/11/10 3:19 PM, Bruno Bresciani wrote:
How to insert modules in kamailio?
Hi people, I worked with ser but now I'm migrating to kamailio... I'd like to know how to insert a ser module in the kamailio? Example: In the ser modules exist the route module and I want to use it in the kamailio. It's possible?
to shed some light, version 3.0 includes both kamailio and ser modules. It is practically the same source code, just different default modules used for auth, rr, a.s.o.
Here is an picture trying to detail the source code structure: http://sip-router.org/releases/
In this context, you can say you upgraded to 3.0 and it is up to you if you want to compile as kamailio or as ser :-).
The kamailio_3.0 branch has disabled the compilation of duplicated ser modules (those located in modules_s directory). To enable, do:
make modules_dirs="modules modules_k modules_s" cfg
then compile and install.
Cheers, Daniel
Daniel eu já estava baixando a versão 3.0 porque inclui tanto kamailio e módulos de ser. Deixe-me ver se entendi: Para incluir o módulo de rota no kamailio 3,0 basta apenas copiá-lo para modules_s diretório e depois compilar?
2010/5/11 Daniel-Constantin Mierla miconda@gmail.com
Hello,
On 5/11/10 3:19 PM, Bruno Bresciani wrote:
How to insert modules in kamailio?
Hi people, I worked with ser but now I'm migrating to kamailio... I'd like to know how to insert a ser module in the kamailio? Example: In the ser modules exist the route module and I want to use it in the kamailio. It's possible?
to shed some light, version 3.0 includes both kamailio and ser modules.
It is practically the same source code, just different default modules used for auth, rr, a.s.o.
Here is an picture trying to detail the source code structure: http://sip-router.org/releases/
In this context, you can say you upgraded to 3.0 and it is up to you if you want to compile as kamailio or as ser :-).
The kamailio_3.0 branch has disabled the compilation of duplicated ser modules (those located in modules_s directory). To enable, do:
make modules_dirs="modules modules_k modules_s" cfg
then compile and install.
Cheers, Daniel
-- Daniel-Constantin Mierla
Daniel I was now downloading the version 3.0 because includes both kamailio and ser modules. Let me see if I understand: To include the route module in the kamailio 3.0 just only copy it to modules_s directory and then compile?
2010/5/11 Bruno Bresciani bruno.bresciani@gmail.com
Daniel eu já estava baixando a versão 3.0 porque inclui tanto kamailio e módulos de ser. Deixe-me ver se entendi: Para incluir o módulo de rota no kamailio 3,0 basta apenas copiá-lo para modules_s diretório e depois compilar?
2010/5/11 Daniel-Constantin Mierla miconda@gmail.com
Hello,
On 5/11/10 3:19 PM, Bruno Bresciani wrote:
How to insert modules in kamailio?
Hi people, I worked with ser but now I'm migrating to kamailio... I'd like to know how to insert a ser module in the kamailio? Example: In the ser modules exist the route module and I want to use it in the kamailio. It's possible?
to shed some light, version 3.0 includes both kamailio and ser modules.
It is practically the same source code, just different default modules used for auth, rr, a.s.o.
Here is an picture trying to detail the source code structure: http://sip-router.org/releases/
In this context, you can say you upgraded to 3.0 and it is up to you if you want to compile as kamailio or as ser :-).
The kamailio_3.0 branch has disabled the compilation of duplicated ser modules (those located in modules_s directory). To enable, do:
make modules_dirs="modules modules_k modules_s" cfg
then compile and install.
Cheers, Daniel
-- Daniel-Constantin Mierla
On 5/11/10 4:00 PM, Bruno Bresciani wrote:
Daniel I was now downloading the version 3.0 because includes both kamailio and ser modules. Let me see if I understand: To include the route module in the kamailio 3.0 just only copy it to modules_s directory and then compile?
is it a module you wrote? Or is an existing ser module? I couldn't spot a route module in directory modules_s, but a prefix_route...
If it is a private module you wrote, then you may need to do some changes in the source code. Mainly is about the database API which was relocated and you have to update the include path.
The add the line: DEFS+=-DSER_MOD_INTERFACE
to your module Makefile (see for example the modules_s/domain/Makefile). If you have db, then add also: SERLIBPATH=../../lib SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
Actually if you have a very old ser version (0.9.x), it may require a bit more changes to upgrade since ser did some internal changes couple of years ago (for version 2.0, 2.1)...
Cheers, Daniel
2010/5/11 Bruno Bresciani <bruno.bresciani@gmail.com mailto:bruno.bresciani@gmail.com>
Daniel eu já estava baixando a versão 3.0 porque inclui tanto kamailio e módulos de ser. Deixe-me ver se entendi: Para incluir o módulo de rota no kamailio 3,0 basta apenas copiá-lo para modules_s diretório e depois compilar? 2010/5/11 Daniel-Constantin Mierla <miconda@gmail.com <mailto:miconda@gmail.com>> Hello, On 5/11/10 3:19 PM, Bruno Bresciani wrote: How to insert modules in kamailio? Hi people, I worked with ser but now I'm migrating to kamailio... I'd like to know how to insert a ser module in the kamailio? Example: In the ser modules exist the route module and I want to use it in the kamailio. It's possible? to shed some light, version 3.0 includes both kamailio and ser modules. It is practically the same source code, just different default modules used for auth, rr, a.s.o. Here is an picture trying to detail the source code structure: http://sip-router.org/releases/ In this context, you can say you upgraded to 3.0 and it is up to you if you want to compile as kamailio or as ser :-). The kamailio_3.0 branch has disabled the compilation of duplicated ser modules (those located in modules_s directory). To enable, do: make modules_dirs="modules modules_k modules_s" cfg then compile and install. Cheers, Daniel -- Daniel-Constantin Mierla * http://www.asipto.com/ * http://twitter.com/miconda * http://www.linkedin.com/in/danielconstantinmierla
Is an existing module but I adapted to make route with regular expressions...
2010/5/11 Daniel-Constantin Mierla miconda@gmail.com
On 5/11/10 4:00 PM, Bruno Bresciani wrote:
Daniel I was now downloading the version 3.0 because includes both kamailio and ser modules. Let me see if I understand: To include the route module in the kamailio 3.0 just only copy it to modules_s directory and then compile?
is it a module you wrote? Or is an existing ser module? I couldn't spot a route module in directory modules_s, but a prefix_route...
If it is a private module you wrote, then you may need to do some changes in the source code. Mainly is about the database API which was relocated and you have to update the include path.
The add the line: DEFS+=-DSER_MOD_INTERFACE
to your module Makefile (see for example the modules_s/domain/Makefile). If you have db, then add also: SERLIBPATH=../../lib SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
Actually if you have a very old ser version (0.9.x), it may require a bit more changes to upgrade since ser did some internal changes couple of years ago (for version 2.0, 2.1)...
Cheers, Daniel
2010/5/11 Bruno Bresciani bruno.bresciani@gmail.com
Daniel eu já estava baixando a versão 3.0 porque inclui tanto kamailio e módulos de ser. Deixe-me ver se entendi: Para incluir o módulo de rota no kamailio 3,0 basta apenas copiá-lo para modules_s diretório e depois compilar?
2010/5/11 Daniel-Constantin Mierla miconda@gmail.com
Hello,
On 5/11/10 3:19 PM, Bruno Bresciani wrote:
How to insert modules in kamailio?
Hi people, I worked with ser but now I'm migrating to kamailio... I'd like to know how to insert a ser module in the kamailio? Example: In the ser modules exist the route module and I want to use it in the kamailio. It's possible?
to shed some light, version 3.0 includes both kamailio and ser
modules. It is practically the same source code, just different default modules used for auth, rr, a.s.o.
Here is an picture trying to detail the source code structure: http://sip-router.org/releases/
In this context, you can say you upgraded to 3.0 and it is up to you if you want to compile as kamailio or as ser :-).
The kamailio_3.0 branch has disabled the compilation of duplicated ser modules (those located in modules_s directory). To enable, do:
make modules_dirs="modules modules_k modules_s" cfg
then compile and install.
Cheers, Daniel
-- Daniel-Constantin Mierla
-- Daniel-Constantin Mierla
On Tuesday 11 May 2010, Bruno Bresciani wrote:
Is an existing module but I adapted to make route with regular expressions...
Hi Bruno,
if its an existing module for an older version of kamailio or ser, then you probably need to do some adaptions before it could work with sr/k 3.0. Its not possible to just copy the binary file ($module.so) to the proper directory, you need to compile it again against the new core.
Cheers,
Henning
Yes Henning, I intend to copy the source code module to the proper directory and then compile the kamailio modules. Am I thinking of the correct way or I must realize other procedure? Remember that this module belonged to the ser and I did some modifications in it.
Cheers,
Bruno
2010/5/11 Henning Westerholt henning.westerholt@1und1.de
On Tuesday 11 May 2010, Bruno Bresciani wrote:
Is an existing module but I adapted to make route with regular expressions...
Hi Bruno,
if its an existing module for an older version of kamailio or ser, then you probably need to do some adaptions before it could work with sr/k 3.0. Its not possible to just copy the binary file ($module.so) to the proper directory, you need to compile it again against the new core.
Cheers,
Henning
On Tuesday 11 May 2010, Bruno Bresciani wrote:
Yes Henning, I intend to copy the source code module to the proper directory and then compile the kamailio modules. Am I thinking of the correct way or I must realize other procedure? Remember that this module belonged to the ser and I did some modifications in it.
Hi Bruno,
in theory your approach sounds ok. :) But probably some internal API details needs to be fixed. Just try it this way, if you encounter some difficulties report on the sr-dev list.
Cheers,
Henning
Hi Henning,
thank's for your help, I'll try this way and if I encounter some difficulties report on the sr-dev list.
Cheers,
Bruno
2010/5/12 Henning Westerholt henning.westerholt@1und1.de
On Tuesday 11 May 2010, Bruno Bresciani wrote:
Yes Henning, I intend to copy the source code module to the proper directory and then compile the kamailio modules. Am I thinking of the correct way or I must realize other procedure? Remember that this module belonged to the ser and I did some modifications in it.
Hi Bruno,
in theory your approach sounds ok. :) But probably some internal API details needs to be fixed. Just try it this way, if you encounter some difficulties report on the sr-dev list.
Cheers,
Henning