Some more investigation here and it looks like the kamctlrc value to set for db_text path is DBTEXT_PATH and not DB_PATH as listed in the default kamctlrc file.
[1] When I have DB_PATH set to the location of the db text files, the following happens (I cannot show the contents of the address table, but the memory dump works):
DB_PATH="/etc/kamailio/db_text"
# kamctl address dump 0 <10000, 10.7.0.0, 24, 0> [] 1 <10002, 10.7.0.0, 24, 0> [] # kamctl address show #
[2] When I have DBTEXT_PATH set to the location of the db text files, the following happens (I cannot reload contents of the address table, but the memory dump and table show works):
# kamctl address dump 0 <10000, 10.7.0.0, 24, 0> [] 1 <10002, 10.7.0.0, 24, 0> [] # kamctl address show [1, 10000, '10.7.0.0', 24, 0, ''] # kamctl address reload # kamctl address dump 0 <10000, 10.7.0.0, 24, 0> [] 1 <10002, 10.7.0.0, 24, 0> [] # kamctl address show [1, 10000, '10.7.0.0', 24, 0, '']
It also appears that the equivilent RPC commands dont work correctly too for the permissions module, the addressDump does not show in-memory values, and reload says it completed, but dump shows nothing too:
kamcmd> permissions.addressDump { } kamcmd> permissions.addressReload Reload OK kamcmd> permissions.addressDump { }
Am I missing something with my configuration, or have I come accross a bug?
Thanks for reading this far :)
Thanks
On 29/09/2015 13:07, Asgaroth wrote:
Hi,
Friendly "bump", any thoughts on this one?
I'm using kamailio v4.3.2
Thanks
On 28/09/2015 13:11, Asgaroth wrote:
Hi,
I am busy testing the db_text module for some modules who's configuration does not change that often.
If I set the db_mode for db_text to 0 (caching), it appears that if I modify the file directly (in this case the address dbtext file) and then issue a "kamctl address reload" the updated contents are *not* reloaded. However, if I set db_mode to 1, then the contents of the db_text file automatically reload when I change it on the file system.
Is it possible to run db_text in caching mode but to also force a reload if I manually update the underlying database file?
Additionally, in kamctlrc, I had to add the following variable:
DBTEXT_PATH="/etc/kamailio/db_text"
Whereas the original example for db_text path in kamctlrc is as follows:
# database path used by dbtext, db_berkeley or sqlite #DB_PATH="/etc/kamailio/db_text"
Is this just a typo in the kamctlrc distribution or is the variable meant to be DB_PATH or DBTEXT_PATH?
Thanks