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

2015-08-27 Thread José Seabra
Hello Daniel, Ok, let me know when you get a solution. Thank you for your reply, Best Regards 2015-08-27 10:58 GMT+01:00 Daniel-Constantin Mierla : > Hello, > > it looks like the presence modules rely on default values that can be > specified with sql table definition. Iirc, that is not possib

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

2015-08-27 Thread Daniel-Constantin Mierla
Hello, it looks like the presence modules rely on default values that can be specified with sql table definition. Iirc, that is not possible with mongodb. I will think of a solution for it. Cheers, Daniel On 18/08/15 16:02, José Seabra wrote: > Hello, > > Now after kamailio startup seems that pr

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

2015-08-18 Thread José Seabra
Hello, It is working now, so summarizing about what we need to do in mongodb to kamailio starts up is: Access to Mongodb cli Create databases kamailio > use kamailio switched to db kamailio > > db kamailio create collection named version > db.createCollection("version") > show collections s

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

2015-08-18 Thread Daniel-Constantin Mierla
Hello, if I remember correctly, the default type for numbers is float/double. You have to use a special form/function in mongo client when inserting a record to force the type of the value to be integer. Perhaps searching on the web of how to insert an integer value in mongodb will give you the p

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

2015-08-18 Thread José Seabra
Hi, Well i didn't noticed before, but after create a document in mongodb the error that kamailio gives now is different but it still related with table version check. Seems that kamailio can query the document successfully and get the table_version field. 0(3068) DEBUG: db_mongodb [mongodb_dbas

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

2015-08-18 Thread Daniel-Constantin Mierla
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

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

2015-08-18 Thread José Seabra
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 swi

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

2015-08-17 Thread Daniel-Constantin Mierla
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/sr

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

2015-08-17 Thread José Seabra
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 : > I have tried that but kamailio gave me the following error: > > 0(2344) ERROR: [db.c:435]: db_check_table_version(): invalid > version 0 for table presentity found, expected 4

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

2015-08-17 Thread José Seabra
I have tried that but kamailio gave me the following error: 0(2344) ERROR: [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

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

2015-08-17 Thread Daniel-Constantin Mierla
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 setu

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

2015-08-17 Thread José Seabra
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