User Tools

Site Tools


tutorials:kamailio-and-mongodb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:kamailio-and-mongodb [2015/09/08 21:36]
miconda [Other Tables]
tutorials:kamailio-and-mongodb [2019/01/07 09:24] (current)
henningw small addtion
Line 1: Line 1:
 ====== Kamailio and MongoDB ====== ====== Kamailio and MongoDB ======
  
 +Details about how to use Kamailio with a MongoDB backend.
 ===== Kamailio Database ===== ===== Kamailio Database =====
  
Line 51: Line 52:
 > db.getCollection("​version"​).insert({table_name:​ "​watchers",​ table_version:​ NumberInt(3) }) > db.getCollection("​version"​).insert({table_name:​ "​watchers",​ table_version:​ NumberInt(3) })
  
-db.getCollection("​version"​).insert({table_name:​ "​active_watchers",​ table_version:​ NumberInt(11) })+db.getCollection("​version"​).insert({table_name:​ "​active_watchers",​ table_version:​ NumberInt(11) })
  
 </​code>​ </​code>​
Line 66: Line 67:
 > db.createCollection("​tablename"​) > db.createCollection("​tablename"​)
 </​code>​ </​code>​
-===== DB URL in Kamailio Config =====+===== Kamailio Config ===== 
 + 
 +==== DB URL ==== 
 + 
 +You need to load the "​db_mongodb"​ module in the configuration.
  
 The corresponding database URL in kamailio.cfg:​ The corresponding database URL in kamailio.cfg:​
Line 80: Line 85:
 <​code>​ <​code>​
 #!define DBURL "​mongodb://​username:​password@localhost/​kamailio"​ #!define DBURL "​mongodb://​username:​password@localhost/​kamailio"​
 +</​code>​
 +
 +==== Other Parameters ====
 +
 +If you store location records in MongoDB, set the following parameter for usrloc modules:
 +
 +<​code>​
 +modparam("​usrloc",​ "​db_insert_null",​ 1)
 </​code>​ </​code>​
tutorials/kamailio-and-mongodb.1441741008.txt.gz · Last modified: 2015/09/08 21:36 by miconda