[SR-Users] Load htable from MongoDB

Henning Westerholt hw at skalatan.de
Tue Mar 2 18:11:47 CET 2021


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<https://gilawa.com/>

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Sergiu Pojoga
Sent: Tuesday, March 2, 2021 4:39 PM
To: Kamailio (SER) - Users Mailing List <sr-users at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20210302/0dc6c211/attachment.htm>


More information about the sr-users mailing list