Hi,
I am trying to load db_perlvdb.so module using latest Kamailio branch v5.0.6 with git revision 49bd81ad7856dac9b2efd53597fb1c182de7440b on Debian Wheezy 32bit. The compilation and installation went successful however the module gives following error.
-- May 4 19:03:59 webrtc[8895]: INFO: app_perl [app_perl_mod.c:351]: mod_init(): perl interpreter has been initialized (1525453439.237584 => 1525453439.454432) May 4 19:03:59 webrtc[8895]: CRITICAL: db_perlvdb [db_perlvdb.c:79]: mod_init(): perl module not loaded. Exiting. May 4 19:03:59 webrtc[8895]: ERROR: <core> [core/sr_module.c:970]: init_mod(): Error while initializing module db_perlvdb (/usr/local/adx-webrtc/lib/kamailio/modules/db_perlvdb.so) --
I tried to find module perl.so in modules folder of kamailio installation but there is none. Then i looked through the source code but no success.
After some googling, i found following link which states that perl.so was remained to app_perl.so since v4.x.
I have created a small patch for db_perlvdb.c which corrects this error.
-- diff --git a/src/modules/db_perlvdb/db_perlvdb.c b/src/modules/db_perlvdb/db_perlvdb.c index 7a2b63e..266ece2 100644 --- a/src/modules/db_perlvdb/db_perlvdb.c +++ b/src/modules/db_perlvdb/db_perlvdb.c @@ -75,8 +75,8 @@ struct module_exports exports = {
static int mod_init(void) { - if (!module_loaded("perl")) { - LM_CRIT("perl module not loaded. Exiting.\n"); + if (!module_loaded("app_perl")) { + LM_CRIT("app_perl module not loaded. Exiting.\n"); return -1; }
Hi,
Seems there are some serious problems with db_perlvdb. It gives segmentation fault as soon as i set it as db url for any module e.g. acc, sip_trace, msilo and so on.
Here is back-trace of core dump,
-- #0 0xb57653dd in parseurl (url=0xaf41ba5c "\340\352\245\266\062") at perlvdbfunc.c:60 cn = 0x1 <Address 0x1 out of bounds> #1 0xb5765af6 in perlvdb_db_init (url=0xaf41ba5c "\340\352\245\266\062") at perlvdbfunc.c:123 res = 0x5 cn = 0xaf539cdb "\270" obj = 0x0 consize = 32 __FUNCTION__ = "perlvdb_db_init" #2 0xaf3f81c2 in mod_init () at msilo.c:335 avp_spec = {type = PVT_AVP, getf = 0xb5f86c50 <pv_get_avp>, setf = 0xb5f8a8a2 <pv_set_avp>, pvp = {pvn = {type = 0, nfree = 0, u = { isname = {type = 1, name = {n = -1230637607, s = {s = 0xb6a5f5d9 "msilo_extra_hdrs)", len = 16}, re = 0xb6a5f5d9}}, dname = 0x1}}, pvi = {type = 0, u = {ival = 0, dval = 0x0}}}, trans = 0x0} __FUNCTION__ = "mod_init" #3 0x081e6b7c in init_mod (m=0xb6a4d9b0) at core/sr_module.c:972 __FUNCTION__ = "init_mod" #4 0x081e6e82 in init_modules () at core/sr_module.c:1001 t = 0x544c1e2c i = -1 __FUNCTION__ = "init_modules" --
Thank you.
On Fri, May 4, 2018 at 7:29 PM, M S shaheryarkh@gmail.com wrote:
Hi,
I am trying to load db_perlvdb.so module using latest Kamailio branch v5.0.6 with git revision 49bd81ad7856dac9b2efd53597fb1c182de7440b on Debian Wheezy 32bit. The compilation and installation went successful however the module gives following error.
-- May 4 19:03:59 webrtc[8895]: INFO: app_perl [app_perl_mod.c:351]: mod_init(): perl interpreter has been initialized (1525453439.237584 => 1525453439.454432) May 4 19:03:59 webrtc[8895]: CRITICAL: db_perlvdb [db_perlvdb.c:79]: mod_init(): perl module not loaded. Exiting. May 4 19:03:59 webrtc[8895]: ERROR: <core> [core/sr_module.c:970]: init_mod(): Error while initializing module db_perlvdb (/usr/local/adx-webrtc/lib/kamailio/modules/db_perlvdb.so) --
I tried to find module perl.so in modules folder of kamailio installation but there is none. Then i looked through the source code but no success.
After some googling, i found following link which states that perl.so was remained to app_perl.so since v4.x.
I have created a small patch for db_perlvdb.c which corrects this error.
-- diff --git a/src/modules/db_perlvdb/db_perlvdb.c b/src/modules/db_perlvdb/db_perlvdb.c index 7a2b63e..266ece2 100644 --- a/src/modules/db_perlvdb/db_perlvdb.c +++ b/src/modules/db_perlvdb/db_perlvdb.c @@ -75,8 +75,8 @@ struct module_exports exports = {
static int mod_init(void) {
- if (!module_loaded("perl")) {
LM_CRIT("perl module not loaded. Exiting.\n");
- if (!module_loaded("app_perl")) {
}LM_CRIT("app_perl module not loaded. Exiting.\n"); return -1;
--
Kindly update Kamailio master and branch trunks.
Thank you.
Hello,
quite a surprise that someone is trying to use this module, I was considering to move it to obsolete repo, because nobody used it for so long and no developer updated it over the time.
The module was still compiling due to some casts, but the DB API was changed in the past and this module was left behind.
I did the update of the API (still some warnings that needs to be taken care), so you can try now with master branch. Maybe it goes on pretty well.
Otherwise I do not have to test or maintain the module, if you want to use it, you have to spend some time with it. I can help fixing bugs when they are obvious in the C code (like API changes) or a proper report is filled, but that's all I can do.
Cheers, Daniel
On 04.05.18 23:37, M S wrote:
Hi,
Seems there are some serious problems with db_perlvdb. It gives segmentation fault as soon as i set it as db url for any module e.g. acc, sip_trace, msilo and so on.
Here is back-trace of core dump,
-- #0 0xb57653dd in parseurl (url=0xaf41ba5c "\340\352\245\266\062") at perlvdbfunc.c:60 cn = 0x1 <Address 0x1 out of bounds> #1 0xb5765af6 in perlvdb_db_init (url=0xaf41ba5c "\340\352\245\266\062") at perlvdbfunc.c:123 res = 0x5 cn = 0xaf539cdb "\270" obj = 0x0 consize = 32 __FUNCTION__ = "perlvdb_db_init" #2 0xaf3f81c2 in mod_init () at msilo.c:335 avp_spec = {type = PVT_AVP, getf = 0xb5f86c50 <pv_get_avp>, setf = 0xb5f8a8a2 <pv_set_avp>, pvp = {pvn = {type = 0, nfree = 0, u = { isname = {type = 1, name = {n = -1230637607, s = {s = 0xb6a5f5d9 "msilo_extra_hdrs)", len = 16}, re = 0xb6a5f5d9}}, dname = 0x1}}, pvi = {type = 0, u = {ival = 0, dval = 0x0}}}, trans = 0x0} __FUNCTION__ = "mod_init" #3 0x081e6b7c in init_mod (m=0xb6a4d9b0) at core/sr_module.c:972 __FUNCTION__ = "init_mod" #4 0x081e6e82 in init_modules () at core/sr_module.c:1001 t = 0x544c1e2c i = -1 __FUNCTION__ = "init_modules" --
Thank you.
On Fri, May 4, 2018 at 7:29 PM, M S <shaheryarkh@gmail.com mailto:shaheryarkh@gmail.com> wrote:
Hi, I am trying to load db_perlvdb.so module using latest Kamailio branch v5.0.6 with git revision 49bd81ad7856dac9b2efd53597fb1c182de7440b on Debian Wheezy 32bit. The compilation and installation went successful however the module gives following error. -- May 4 19:03:59 webrtc[8895]: INFO: app_perl [app_perl_mod.c:351]: mod_init(): perl interpreter has been initialized (1525453439.237584 => 1525453439.454432) May 4 19:03:59 webrtc[8895]: CRITICAL: db_perlvdb [db_perlvdb.c:79]: mod_init(): perl module not loaded. Exiting. May 4 19:03:59 webrtc[8895]: ERROR: <core> [core/sr_module.c:970]: init_mod(): Error while initializing module db_perlvdb (/usr/local/adx-webrtc/lib/kamailio/modules/db_perlvdb.so) -- I tried to find module perl.so in modules folder of kamailio installation but there is none. Then i looked through the source code but no success. After some googling, i found following link which states that perl.so was remained to app_perl.so since v4.x. I have created a small patch for db_perlvdb.c which corrects this error. -- diff --git a/src/modules/db_perlvdb/db_perlvdb.c b/src/modules/db_perlvdb/db_perlvdb.c index 7a2b63e..266ece2 100644 --- a/src/modules/db_perlvdb/db_perlvdb.c +++ b/src/modules/db_perlvdb/db_perlvdb.c @@ -75,8 +75,8 @@ struct module_exports exports = { static int mod_init(void) { - if (!module_loaded("perl")) { - LM_CRIT("perl module not loaded. Exiting.\n"); + if (!module_loaded("app_perl")) { + LM_CRIT("app_perl module not loaded. Exiting.\n"); return -1; } -- Kindly update Kamailio master and branch trunks. Thank you.
Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Thank you very much for you help.
Actually I need to support Elastic Search Engine (ESE) for a large data mining project integrated with Kamailio. The easiest way i thought to achieve that was to use Perl VDB or else i have to write up ESE module for kamailio myself.
I am going to test the changes you did to PERL VDB module and will fix up any minor issues to make it working again. Kindly do not remove it from kamailio repo. I am not expert in Kamailio APIs but have good coding experience with C / C++, so I am willing to provide maintenance and bug fixes for the module with your help on API side if needed.
Also, the new DB API for Kamailio, is there any documentation related to it available online. I want to study it and may be add later on a separate kamailio module exclusively for ESE for better performance and features specific to ESE.
Thank you.
On Sat, May 5, 2018 at 9:27 AM, Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
quite a surprise that someone is trying to use this module, I was considering to move it to obsolete repo, because nobody used it for so long and no developer updated it over the time.
The module was still compiling due to some casts, but the DB API was changed in the past and this module was left behind.
I did the update of the API (still some warnings that needs to be taken care), so you can try now with master branch. Maybe it goes on pretty well.
Otherwise I do not have to test or maintain the module, if you want to use it, you have to spend some time with it. I can help fixing bugs when they are obvious in the C code (like API changes) or a proper report is filled, but that's all I can do. Cheers, Daniel
On 04.05.18 23:37, M S wrote:
Hi,
Seems there are some serious problems with db_perlvdb. It gives segmentation fault as soon as i set it as db url for any module e.g. acc, sip_trace, msilo and so on.
Here is back-trace of core dump,
-- #0 0xb57653dd in parseurl (url=0xaf41ba5c "\340\352\245\266\062") at perlvdbfunc.c:60 cn = 0x1 <Address 0x1 out of bounds> #1 0xb5765af6 in perlvdb_db_init (url=0xaf41ba5c "\340\352\245\266\062") at perlvdbfunc.c:123 res = 0x5 cn = 0xaf539cdb "\270" obj = 0x0 consize = 32 __FUNCTION__ = "perlvdb_db_init" #2 0xaf3f81c2 in mod_init () at msilo.c:335 avp_spec = {type = PVT_AVP, getf = 0xb5f86c50 <pv_get_avp>, setf = 0xb5f8a8a2 <pv_set_avp>, pvp = {pvn = {type = 0, nfree = 0, u = { isname = {type = 1, name = {n = -1230637607, s = {s = 0xb6a5f5d9 "msilo_extra_hdrs)", len = 16}, re = 0xb6a5f5d9}}, dname = 0x1}}, pvi = {type = 0, u = {ival = 0, dval = 0x0}}}, trans = 0x0} __FUNCTION__ = "mod_init" #3 0x081e6b7c in init_mod (m=0xb6a4d9b0) at core/sr_module.c:972 __FUNCTION__ = "init_mod" #4 0x081e6e82 in init_modules () at core/sr_module.c:1001 t = 0x544c1e2c i = -1 __FUNCTION__ = "init_modules" --
Thank you.
On Fri, May 4, 2018 at 7:29 PM, M S shaheryarkh@gmail.com wrote:
Hi,
I am trying to load db_perlvdb.so module using latest Kamailio branch v5.0.6 with git revision 49bd81ad7856dac9b2efd53597fb1c182de7440b on Debian Wheezy 32bit. The compilation and installation went successful however the module gives following error.
-- May 4 19:03:59 webrtc[8895]: INFO: app_perl [app_perl_mod.c:351]: mod_init(): perl interpreter has been initialized (1525453439.237584 => 1525453439.454432) May 4 19:03:59 webrtc[8895]: CRITICAL: db_perlvdb [db_perlvdb.c:79]: mod_init(): perl module not loaded. Exiting. May 4 19:03:59 webrtc[8895]: ERROR: <core> [core/sr_module.c:970]: init_mod(): Error while initializing module db_perlvdb (/usr/local/adx-webrtc/lib/kamailio/modules/db_perlvdb.so) --
I tried to find module perl.so in modules folder of kamailio installation but there is none. Then i looked through the source code but no success.
After some googling, i found following link which states that perl.so was remained to app_perl.so since v4.x.
I have created a small patch for db_perlvdb.c which corrects this error.
-- diff --git a/src/modules/db_perlvdb/db_perlvdb.c b/src/modules/db_perlvdb/db_perlvdb.c index 7a2b63e..266ece2 100644 --- a/src/modules/db_perlvdb/db_perlvdb.c +++ b/src/modules/db_perlvdb/db_perlvdb.c @@ -75,8 +75,8 @@ struct module_exports exports = {
static int mod_init(void) {
- if (!module_loaded("perl")) {
LM_CRIT("perl module not loaded. Exiting.\n");
- if (!module_loaded("app_perl")) {
}LM_CRIT("app_perl module not loaded. Exiting.\n"); return -1;
--
Kindly update Kamailio master and branch trunks.
Thank you.
Kamailio (SER) - Development Mailing Listsr-dev@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
Am Samstag, 5. Mai 2018, 09:54:53 CEST schrieb M S:
Actually I need to support Elastic Search Engine (ESE) for a large data mining project integrated with Kamailio. The easiest way i thought to achieve that was to use Perl VDB or else i have to write up ESE module for kamailio myself.
I am going to test the changes you did to PERL VDB module and will fix up any minor issues to make it working again. Kindly do not remove it from kamailio repo. I am not expert in Kamailio APIs but have good coding experience with C / C++, so I am willing to provide maintenance and bug fixes for the module with your help on API side if needed.
Also, the new DB API for Kamailio, is there any documentation related to it available online. I want to study it and may be add later on a separate kamailio module exclusively for ESE for better performance and features specific to ESE.
Hello,
for documentation related to the DB API have a look to the src/lib/srdb1 directory. There is a good doxygen documentation in the files available. If you install doxygen you can also generate the documentation HTML files locally which shows additional information about dependency trees etc..
Additionally have a look to the db_mysql module, here you can see how to interact with the generic DB API.
If you have specific questions, just ask here at the development list.
Best regards,
Henning
Great. Many thanks.
I have updated and tested db_perlvdb module (using Kamailio::VDB::Adapter::Describe) and it seems to work perfectly now.
Please find attached two patches which apply changes to both code and documentation of this module. Kindly review and merge them to appropriate branches as mentioned below,
The first patch "*db_perlvdb-kamailio-5x.patch*" is for Kamailio v5.0 and v5.1 branches. Theoretically this patch will work for kamailio v4.x branches too however, since directory structure of kamailio changed since v5.0, so some manual work is required to fix file paths mentioned in patch file.
The second patch "*db_perlvdb-kamailio-master.patch*" is for kamailio master branch.
Thank you.
On Sat, May 5, 2018 at 12:23 PM, Henning Westerholt hw@kamailio.org wrote:
Am Samstag, 5. Mai 2018, 09:54:53 CEST schrieb M S:
Actually I need to support Elastic Search Engine (ESE) for a large data
mining project integrated with Kamailio. The easiest way i thought to
achieve that was to use Perl VDB or else i have to write up ESE module
for
kamailio myself.
I am going to test the changes you did to PERL VDB module and will fix up
any minor issues to make it working again. Kindly do not remove it from
kamailio repo. I am not expert in Kamailio APIs but have good coding
experience with C / C++, so I am willing to provide maintenance and bug
fixes for the module with your help on API side if needed.
Also, the new DB API for Kamailio, is there any documentation related to
it
available online. I want to study it and may be add later on a separate
kamailio module exclusively for ESE for better performance and features
specific to ESE.
Hello,
for documentation related to the DB API have a look to the src/lib/srdb1 directory. There is a good doxygen documentation in the files available. If you install doxygen you can also generate the documentation HTML files locally which shows additional information about dependency trees etc..
Additionally have a look to the db_mysql module, here you can see how to interact with the generic DB API.
If you have specific questions, just ask here at the development list.
Best regards,
Henning
Am Samstag, 5. Mai 2018, 13:45:59 CEST schrieb M S:
I have updated and tested db_perlvdb module (using Kamailio::VDB::Adapter::Describe) and it seems to work perfectly now.
Please find attached two patches which apply changes to both code and documentation of this module. Kindly review and merge them to appropriate branches as mentioned below,
The first patch "*db_perlvdb-kamailio-5x.patch*" is for Kamailio v5.0 and v5.1 branches. Theoretically this patch will work for kamailio v4.x branches too however, since directory structure of kamailio changed since v5.0, so some manual work is required to fix file paths mentioned in patch file.
The second patch "*db_perlvdb-kamailio-master.patch*" is for kamailio master branch.
Hello,
thank you for the patch. Daniel applied in commit 6a152024 already some of the const compile warning changes. But some parts of your patch are still missing, you also improved some cleanup functions.
Could you please re-base your patch against current master and create an pull request at our kamailio github? Its rather easy, just a few clicks given you have a github account.
I noticed that you changed the module README as well - please change the module _admin.xml file instead. The README is autogenerated and should not be changed in a patch.
After that I will have a look to the pull request and can apply the changes.
Best regards,
Henning
Hello,
somehow I missed the email with patches -- I pushed in the morning the commit to fix the warnings I introduced with the patch over the weekend, as I had it in mind to finish those changes, before checking dev list, hopefully not breaking that much your work to avoid wasting too much time to redo patches.
As Henning said, better make a pull request with your improvements, it is easier to review and merge.
Cheers, Daniel
On 07.05.18 21:17, Henning Westerholt wrote:
Am Samstag, 5. Mai 2018, 13:45:59 CEST schrieb M S:
I have updated and tested db_perlvdb module
(using Kamailio::VDB::Adapter::Describe) and it seems to work
perfectly now.
Please find attached two patches which apply changes to both code and
documentation of this module. Kindly review and merge them to
appropriate
branches as mentioned below,
The first patch "*db_perlvdb-kamailio-5x.patch*" is for Kamailio
v5.0 and
v5.1 branches. Theoretically this patch will work for kamailio v4.x
branches too however, since directory structure of kamailio changed
since
v5.0, so some manual work is required to fix file paths mentioned in
patch
file.
The second patch "*db_perlvdb-kamailio-master.patch*" is for kamailio
master branch.
Hello,
thank you for the patch. Daniel applied in commit 6a152024 already some of the const compile warning changes. But some parts of your patch are still missing, you also improved some cleanup functions.
Could you please re-base your patch against current master and create an pull request at our kamailio github? Its rather easy, just a few clicks given you have a github account.
I noticed that you changed the module README as well - please change the module _admin.xml file instead. The README is autogenerated and should not be changed in a patch.
After that I will have a look to the pull request and can apply the changes.
Best regards,
Henning
Thank you both of you.
I already have github account (username: *mshary*) and i will proceed with updated patch as you guys have mentioned.
Thank you.
On Mon, May 7, 2018 at 10:23 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
Hello,
somehow I missed the email with patches -- I pushed in the morning the commit to fix the warnings I introduced with the patch over the weekend, as I had it in mind to finish those changes, before checking dev list, hopefully not breaking that much your work to avoid wasting too much time to redo patches.
As Henning said, better make a pull request with your improvements, it is easier to review and merge.
Cheers, Daniel
On 07.05.18 21:17, Henning Westerholt wrote:
Am Samstag, 5. Mai 2018, 13:45:59 CEST schrieb M S:
I have updated and tested db_perlvdb module
(using Kamailio::VDB::Adapter::Describe) and it seems to work perfectly
now.
Please find attached two patches which apply changes to both code and
documentation of this module. Kindly review and merge them to appropriate
branches as mentioned below,
The first patch "*db_perlvdb-kamailio-5x.patch*" is for Kamailio v5.0
and
v5.1 branches. Theoretically this patch will work for kamailio v4.x
branches too however, since directory structure of kamailio changed since
v5.0, so some manual work is required to fix file paths mentioned in
patch
file.
The second patch "*db_perlvdb-kamailio-master.patch*" is for kamailio
master branch.
Hello,
thank you for the patch. Daniel applied in commit 6a152024 already some of the const compile warning changes. But some parts of your patch are still missing, you also improved some cleanup functions.
Could you please re-base your patch against current master and create an pull request at our kamailio github? Its rather easy, just a few clicks given you have a github account.
I noticed that you changed the module README as well - please change the module _admin.xml file instead. The README is autogenerated and should not be changed in a patch.
After that I will have a look to the pull request and can apply the changes.
Best regards,
Henning
-- Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
Joining the development efforts and taking over the maintenance of db_perlvdb is more than welcome and appreciated!
As for this specific case, do you need to fetch data from Elastic that has to be used inside Kamailio (e.g., passwords for authentication), or just push data from Kamailio to Elastic stack? Maybe giving some specific example of what you need to pass from kamailio To elastic and the other way around would help us provide better hints about what can be used.
Cheers, Daniel
On 05.05.18 09:54, M S wrote:
Thank you very much for you help.
Actually I need to support Elastic Search Engine (ESE) for a large data mining project integrated with Kamailio. The easiest way i thought to achieve that was to use Perl VDB or else i have to write up ESE module for kamailio myself.
I am going to test the changes you did to PERL VDB module and will fix up any minor issues to make it working again. Kindly do not remove it from kamailio repo. I am not expert in Kamailio APIs but have good coding experience with C / C++, so I am willing to provide maintenance and bug fixes for the module with your help on API side if needed.
Also, the new DB API for Kamailio, is there any documentation related to it available online. I want to study it and may be add later on a separate kamailio module exclusively for ESE for better performance and features specific to ESE.
Thank you.
On Sat, May 5, 2018 at 9:27 AM, Daniel-Constantin Mierla <miconda@gmail.com mailto:miconda@gmail.com> wrote:
Hello, quite a surprise that someone is trying to use this module, I was considering to move it to obsolete repo, because nobody used it for so long and no developer updated it over the time. The module was still compiling due to some casts, but the DB API was changed in the past and this module was left behind. I did the update of the API (still some warnings that needs to be taken care), so you can try now with master branch. Maybe it goes on pretty well. Otherwise I do not have to test or maintain the module, if you want to use it, you have to spend some time with it. I can help fixing bugs when they are obvious in the C code (like API changes) or a proper report is filled, but that's all I can do. Cheers, Daniel On 04.05.18 23:37, M S wrote:
Hi, Seems there are some serious problems with db_perlvdb. It gives segmentation fault as soon as i set it as db url for any module e.g. acc, sip_trace, msilo and so on. Here is back-trace of core dump, -- #0 0xb57653dd in parseurl (url=0xaf41ba5c "\340\352\245\266\062") at perlvdbfunc.c:60 cn = 0x1 <Address 0x1 out of bounds> #1 0xb5765af6 in perlvdb_db_init (url=0xaf41ba5c "\340\352\245\266\062") at perlvdbfunc.c:123 res = 0x5 cn = 0xaf539cdb "\270" obj = 0x0 consize = 32 __FUNCTION__ = "perlvdb_db_init" #2 0xaf3f81c2 in mod_init () at msilo.c:335 avp_spec = {type = PVT_AVP, getf = 0xb5f86c50 <pv_get_avp>, setf = 0xb5f8a8a2 <pv_set_avp>, pvp = {pvn = {type = 0, nfree = 0, u = { isname = {type = 1, name = {n = -1230637607, s = {s = 0xb6a5f5d9 "msilo_extra_hdrs)", len = 16}, re = 0xb6a5f5d9}}, dname = 0x1}}, pvi = {type = 0, u = {ival = 0, dval = 0x0}}}, trans = 0x0} __FUNCTION__ = "mod_init" #3 0x081e6b7c in init_mod (m=0xb6a4d9b0) at core/sr_module.c:972 __FUNCTION__ = "init_mod" #4 0x081e6e82 in init_modules () at core/sr_module.c:1001 t = 0x544c1e2c i = -1 __FUNCTION__ = "init_modules" -- Thank you. On Fri, May 4, 2018 at 7:29 PM, M S <shaheryarkh@gmail.com <mailto:shaheryarkh@gmail.com>> wrote: Hi, I am trying to load db_perlvdb.so module using latest Kamailio branch v5.0.6 with git revision 49bd81ad7856dac9b2efd53597fb1c182de7440b on Debian Wheezy 32bit. The compilation and installation went successful however the module gives following error. -- May 4 19:03:59 webrtc[8895]: INFO: app_perl [app_perl_mod.c:351]: mod_init(): perl interpreter has been initialized (1525453439.237584 => 1525453439.454432) May 4 19:03:59 webrtc[8895]: CRITICAL: db_perlvdb [db_perlvdb.c:79]: mod_init(): perl module not loaded. Exiting. May 4 19:03:59 webrtc[8895]: ERROR: <core> [core/sr_module.c:970]: init_mod(): Error while initializing module db_perlvdb (/usr/local/adx-webrtc/lib/kamailio/modules/db_perlvdb.so) -- I tried to find module perl.so in modules folder of kamailio installation but there is none. Then i looked through the source code but no success. After some googling, i found following link which states that perl.so was remained to app_perl.so since v4.x. I have created a small patch for db_perlvdb.c which corrects this error. -- diff --git a/src/modules/db_perlvdb/db_perlvdb.c b/src/modules/db_perlvdb/db_perlvdb.c index 7a2b63e..266ece2 100644 --- a/src/modules/db_perlvdb/db_perlvdb.c +++ b/src/modules/db_perlvdb/db_perlvdb.c @@ -75,8 +75,8 @@ struct module_exports exports = { static int mod_init(void) { - if (!module_loaded("perl")) { - LM_CRIT("perl module not loaded. Exiting.\n"); + if (!module_loaded("app_perl")) { + LM_CRIT("app_perl module not loaded. Exiting.\n"); return -1; } -- Kindly update Kamailio master and branch trunks. Thank you. _______________________________________________ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org <mailto:sr-dev@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev>
-- Daniel-Constantin Mierla www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com <http://www.kamailioworld.com>
Hi,
Basically I want to do both. The main idea is to use Elastic Search as database back-end for msilo module and use its unique capabilities such as full text search over very very large data sets to implement chat history with search, update and delete operations etc.
In my view db_perlvdb module is a perfect test bed to create a prototype for this project and once I have that, i can concentrate on writing a dedicated kamailio module to deal directly with ES and take out the middle layer aka PERL from it.
Thank you.
On Mon, May 7, 2018 at 10:18 PM, Daniel-Constantin Mierla <miconda@gmail.com
wrote:
Joining the development efforts and taking over the maintenance of db_perlvdb is more than welcome and appreciated!
As for this specific case, do you need to fetch data from Elastic that has to be used inside Kamailio (e.g., passwords for authentication), or just push data from Kamailio to Elastic stack? Maybe giving some specific example of what you need to pass from kamailio To elastic and the other way around would help us provide better hints about what can be used.
Cheers, Daniel
On 05.05.18 09:54, M S wrote:
Thank you very much for you help.
Actually I need to support Elastic Search Engine (ESE) for a large data mining project integrated with Kamailio. The easiest way i thought to achieve that was to use Perl VDB or else i have to write up ESE module for kamailio myself.
I am going to test the changes you did to PERL VDB module and will fix up any minor issues to make it working again. Kindly do not remove it from kamailio repo. I am not expert in Kamailio APIs but have good coding experience with C / C++, so I am willing to provide maintenance and bug fixes for the module with your help on API side if needed.
Also, the new DB API for Kamailio, is there any documentation related to it available online. I want to study it and may be add later on a separate kamailio module exclusively for ESE for better performance and features specific to ESE.
Thank you.
On Sat, May 5, 2018 at 9:27 AM, Daniel-Constantin Mierla < miconda@gmail.com> wrote:
Hello,
quite a surprise that someone is trying to use this module, I was considering to move it to obsolete repo, because nobody used it for so long and no developer updated it over the time.
The module was still compiling due to some casts, but the DB API was changed in the past and this module was left behind.
I did the update of the API (still some warnings that needs to be taken care), so you can try now with master branch. Maybe it goes on pretty well.
Otherwise I do not have to test or maintain the module, if you want to use it, you have to spend some time with it. I can help fixing bugs when they are obvious in the C code (like API changes) or a proper report is filled, but that's all I can do. Cheers, Daniel
On 04.05.18 23:37, M S wrote:
Hi,
Seems there are some serious problems with db_perlvdb. It gives segmentation fault as soon as i set it as db url for any module e.g. acc, sip_trace, msilo and so on.
Here is back-trace of core dump,
-- #0 0xb57653dd in parseurl (url=0xaf41ba5c "\340\352\245\266\062") at perlvdbfunc.c:60 cn = 0x1 <Address 0x1 out of bounds> #1 0xb5765af6 in perlvdb_db_init (url=0xaf41ba5c "\340\352\245\266\062") at perlvdbfunc.c:123 res = 0x5 cn = 0xaf539cdb "\270" obj = 0x0 consize = 32 __FUNCTION__ = "perlvdb_db_init" #2 0xaf3f81c2 in mod_init () at msilo.c:335 avp_spec = {type = PVT_AVP, getf = 0xb5f86c50 <pv_get_avp>, setf = 0xb5f8a8a2 <pv_set_avp>, pvp = {pvn = {type = 0, nfree = 0, u = { isname = {type = 1, name = {n = -1230637607, s = {s = 0xb6a5f5d9 "msilo_extra_hdrs)", len = 16}, re = 0xb6a5f5d9}}, dname = 0x1}}, pvi = {type = 0, u = {ival = 0, dval = 0x0}}}, trans = 0x0} __FUNCTION__ = "mod_init" #3 0x081e6b7c in init_mod (m=0xb6a4d9b0) at core/sr_module.c:972 __FUNCTION__ = "init_mod" #4 0x081e6e82 in init_modules () at core/sr_module.c:1001 t = 0x544c1e2c i = -1 __FUNCTION__ = "init_modules" --
Thank you.
On Fri, May 4, 2018 at 7:29 PM, M S shaheryarkh@gmail.com wrote:
Hi,
I am trying to load db_perlvdb.so module using latest Kamailio branch v5.0.6 with git revision 49bd81ad7856dac9b2efd53597fb1c182de7440b on Debian Wheezy 32bit. The compilation and installation went successful however the module gives following error.
-- May 4 19:03:59 webrtc[8895]: INFO: app_perl [app_perl_mod.c:351]: mod_init(): perl interpreter has been initialized (1525453439.237584 => 1525453439.454432) May 4 19:03:59 webrtc[8895]: CRITICAL: db_perlvdb [db_perlvdb.c:79]: mod_init(): perl module not loaded. Exiting. May 4 19:03:59 webrtc[8895]: ERROR: <core> [core/sr_module.c:970]: init_mod(): Error while initializing module db_perlvdb (/usr/local/adx-webrtc/lib/kamailio/modules/db_perlvdb.so) --
I tried to find module perl.so in modules folder of kamailio installation but there is none. Then i looked through the source code but no success.
After some googling, i found following link which states that perl.so was remained to app_perl.so since v4.x.
I have created a small patch for db_perlvdb.c which corrects this error.
-- diff --git a/src/modules/db_perlvdb/db_perlvdb.c b/src/modules/db_perlvdb/db_perlvdb.c index 7a2b63e..266ece2 100644 --- a/src/modules/db_perlvdb/db_perlvdb.c +++ b/src/modules/db_perlvdb/db_perlvdb.c @@ -75,8 +75,8 @@ struct module_exports exports = {
static int mod_init(void) {
- if (!module_loaded("perl")) {
LM_CRIT("perl module not loaded. Exiting.\n");
- if (!module_loaded("app_perl")) {
}LM_CRIT("app_perl module not loaded. Exiting.\n"); return -1;
--
Kindly update Kamailio master and branch trunks.
Thank you.
Kamailio (SER) - Development Mailing Listsr-dev@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
-- Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com