Hello Stefan,
On 17/04/15 10:38, smititelu wrote:
Hi,
My name is Stefan and I am a new member of the 1&1 VoIP team.
glad to see you on the list, completing the team from 1&1!
I have noticed that parsing support is not implemented for the dns_cache_rec_pref core parameter although this parameter is documented in doc/cfg_list/docbook/cfg_core.xml. Thus, one can not set the parameter's value in kamailio config file.
I haven't implemented the dns cache, typically most of the attributes to configure it are exposed as global parameters. But maybe some of them can be changed only via RPC. There is a module cfg_db which was supposed to allow loading values from database as well, but somehow the developer (which was in the SER project) left and is rather undocumented.
The parameters available in so called cfg reload framework can be set via kamcmd, like:
kamcmd cfg.set_now_int core cache_rec_pref 1
On the other hand, can you try adding in config file:
core.cache_rec_pref=1
at the beginning, in the part with global parameters?
I had noticed the problem due to an an increase in the real_used_size memory when "kamctl stats shmem" was issued, after DNS SRV queries were made (when SRV are not added manually using kamctl). The SRV (0 ttl) and resulting A (3600 ttl) records are added in kamailio's memory even if the same entries already exist; the existing entries are _not_ overwritten even if they are the same and are kept in memory until the ttl expires. This is because dns_cache_rec_pref is 0 by default which means that it won't check for duplicates. This can be also seen using "kamcmd dns.view" and "kamcmd dns.mem_info".
In my opinion, this core parameter should be supported. We have a little patch for this.
I want to ask you if there is an explicit reason for not being implemented yet?
If you have a patch, send it here or make a pull request on github. It will be accepted.
Cheers, Daniel