[SR-Users] kamailio presence server using db_mongodb as database

Daniel-Constantin Mierla miconda at gmail.com
Tue Aug 18 13:03:16 CEST 2015


Hello,

can you run with debug=3 and see what is printed in syslog?

Cheers,
Daniel

On 18/08/15 11:36, José Seabra wrote:
> Hi Daniel,
>
> Thank you for your reply,
>
> I did what you suggested in your last email, but the issue remains,
> maybe i did something wrong, so in order we try understand if i did or
> not something wrong please have a look at the mongodb commands to
> create db, collection and document.
>
> > use kamailio
> switched to db kamailio
> > 
> > db
> kamailio
> > db.createCollection("version")
> > show collections
> system.indexes
> version
> > 
> > db.getCollection("version").insert({table_name: "presentity",
> table_version: 4 })
> WriteResult({ "nInserted" : 1 })
> > db.getCollection("version").find({})
> { "_id" : ObjectId("55d2fb67b04c015195aee4b1"), "table_name" :
> "presentity", "table_version" : 4 }
>
> Best Regards
> José Seabra
>
>
>
>
> 2015-08-18 7:09 GMT+01:00 Daniel-Constantin Mierla <miconda at gmail.com
> <mailto:miconda at gmail.com>>:
>
>     Indeed the issue is related to checking the version table. You
>     have to create a collection named "version" in kamailio database,
>     then add the records for the tables you are using with the fields:
>
>       - table_name corresponding to the table name (e.g., presentity)
>       - table_version value as in lib/srdb1/schema/* (e.g., 4)
>
>     If you have kamailio database created in mysql (or other sql
>     server), you can simply look at the content of table "version".
>
>     If I get to better internet connection while traveling these days,
>     I will try to put together proper guidelines.
>
>     Cheers,
>     Daniel
>
>
>     On 17/08/15 19:10, José Seabra wrote:
>>     This shouldn't check the table version in mongodb or i'm wrong?
>>     Best regards
>>
>>     2015-08-17 16:45 GMT+01:00 José Seabra <joseseabra4 at gmail.com
>>     <mailto:joseseabra4 at gmail.com>>:
>>
>>         I have tried that but kamailio gave me the following error:
>>
>>          0(2344) ERROR: <core> [db.c:435]: db_check_table_version():
>>         invalid version 0 for table presentity found, expected 4
>>         (check table structure and table "version")
>>          0(2344) ERROR: presence [presence.c:358]: mod_init(): error
>>         during table version check
>>          0(2344) ERROR: <core> [sr_module.c:945]: init_mod(): Error
>>         while initializing module presence
>>         (/usr/local/lib64/kamailio/modules/presence.so)
>>         ERROR: error while initializing modules
>>
>>
>>
>>         Presence module configuration:
>>
>>         modparam("presence", "server_address", "sip:10.0.20.100:5080
>>         <http://10.0.20.100:5080>")
>>         modparam("presence", "subs_db_mode", 3)
>>         modparam("presence", "expires_offset", 60)
>>         modparam("presence", "send_fast_notify", 0)
>>         modparam("presence", "clean_period", 30)
>>         modparam("presence", "publ_cache", 0)
>>         modparam("presence", "sip_uri_match", 1)
>>         modparam("presence", "waitn_time", 1)
>>         modparam("presence", "notifier_processes", 0)
>>         modparam("presence", "db_url", "mongodb://localhost/kamailio")
>>
>>         Best Regards
>>         José Seabra
>>
>>
>>         2015-08-17 16:33 GMT+01:00 Daniel-Constantin Mierla
>>         <miconda at gmail.com <mailto:miconda at gmail.com>>:
>>
>>             Hello,
>>
>>             do not remember exactly if you need to create an empty
>>             collection, anyhow, the main idea is that there is no
>>             table definition, because mongo is a document-storage
>>             like engine. The records store all the details about all
>>             the fields.
>>
>>             In other words, you should be ready to go after basic
>>             setup of mongodb collection and configuring kamailio
>>             modules to use the server.
>>
>>             Cheers,
>>             Daniel
>>
>>
>>             On 17/08/15 16:51, José Seabra wrote:
>>>             Hello all,
>>>             I would like to test my presence server using db_mongodb
>>>             as database server instead of using mysql, but i don't
>>>             find any documentation explaining how i can configure
>>>             mongodb database(data structure) for presence or even
>>>             for the other kamailio modules.
>>>
>>>             Can someone  guide me in this setup?
>>>
>>>             Best Regards
>>>
>>>             -- 
>>>             Cumprimentos
>>>             José Seabra
>>>
>>>
>>>             _______________________________________________
>>>             SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>>             sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>>>             http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>             -- 
>>             Daniel-Constantin Mierla
>>             http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda
>>             Book: SIP Routing With Kamailio - http://www.asipto.com
>>
>>
>>             _______________________________________________
>>             SIP Express Router (SER) and Kamailio (OpenSER) -
>>             sr-users mailing list
>>             sr-users at lists.sip-router.org
>>             <mailto:sr-users at lists.sip-router.org>
>>             http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>>
>>         -- 
>>         Cumprimentos
>>         José Seabra
>>
>>
>>
>>
>>     -- 
>>     Cumprimentos
>>     José Seabra
>
>     -- 
>     Daniel-Constantin Mierla
>     http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda
>     Book: SIP Routing With Kamailio - http://www.asipto.com
>
>
>
>
> -- 
> Cumprimentos
> José Seabra

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Book: SIP Routing With Kamailio - http://www.asipto.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150818/1de98f9d/attachment.html>


More information about the sr-users mailing list