[SR-Users] Permissions module with Mongodb

H Yavari hyavari at rocketmail.com
Sat Feb 6 21:12:16 CET 2021


 Thanks Henning.
The problem is "version" checking.I created a collection "version" in Mongo for address, trusted, and permissions with value=6
but Kamailio doesn't start:Feb  6 19:41:36 kamailio-sip kamailio[12400]:  0(12402) ERROR: <core> [db.c:466]: db_check_table_version(): invalid version 0 for table address found, expected 6 (check table structure and table "version")Feb  6 19:41:36 kamailio-sip kamailio[12400]:  0(12402) ERROR: permissions [address.c:484]: init_addresses(): Error during version check for db table: address, check database structure.Feb  6 19:41:36 kamailio-sip kamailio[12400]:  0(12402) ERROR: permissions [permissions.c:645]: mod_init(): failed to initialize the allow_address functionFeb  6 19:41:36 kamailio-sip kamailio[12400]:  0(12402) ERROR: <core> [core/sr_module.c:849]: init_mod(): Error while initializing module permissions (/opt/kamailio/lib64/kamailio/modules/permissions.so)
and this is cfg file:
..modparam("permissions", "db_url", "mongodb://X.Y.W.Z/kamailio")
..
Any idea what is wrong in configs? 


BR,Hossein

----
    On Saturday, February 6, 2021, 02:28:27 AM PST, Henning Westerholt <hw at skalatan.de> wrote: 
Hello,
 
  
 
This should work, yes. With a few exceptions you can use all existing modules that needs a database with the mongodb backend. (Some special module functions might need certain capabilities that not all database drivers are able to provide. Usually, you will get a message during Kamailio startup with an error message if something is not supported).
 
Cheers,
 
Henning
 
-- 
 
Henning Westerholt –https://skalatan.de/blog/
 
Kamailio services –https://gilawa.com
 
  
 
From: sr-users <sr-users-bounces at lists.kamailio.org>On Behalf Of H Yavari
Sent: Saturday, February 6, 2021 6:25 AM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: [SR-Users] Permissions module with Mongodb
 
  
 
Hi to all,
 
  
 
It's mentioned in the Permissions module doc, we can set DB driver:
 
https://kamailio.org/docs/modules/3.1.x/modules_k/permissions.html#id2511783
 
  
 
So we can use MongoDB as a DB backend? 
 
All the modules that use DB, support Mongo?
 
  
 
Thanks.
 
  
 
Regards,
 
Hossein
   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210206/2310c325/attachment.htm>


More information about the sr-users mailing list