Hi Sergiu,

 

I did not try it by myself so far, maybe others can comment on it. Normally you should be able to use the htable module on all usual database modules (that offer the needed capabilities).

What are the error messages that you get, maybe there are some hints in it?

 

Cheers,

 

Henning

 

--

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com

 

From: sr-users <sr-users-bounces@lists.kamailio.org> On Behalf Of Sergiu Pojoga
Sent: Tuesday, March 2, 2021 4:39 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: [SR-Users] Load htable from MongoDB

 

Hi there,

 

Question: is it possible to load a htable, defined by columns, from a MongoDB collection, when a certain "column" is an object with multiple elements?

 

For example:

modparam("htable", "htable", "users=>size=10;dbtable=users;cols='FirstName,LastName,Location:Prefix';")

 

Fails when trying to load the value of Location.Prefix

 

{
    "FirstName": "John",
    "LastName": "Doe",
    "Language" : "en",
    "Location" : {
        "Country" : "USA",
        "City" : "New York",
        "Prefix" : "+1"
    }
}

 

Thanks in advance.