Hello,

 

the function dns_query(..) just uses getaddrinfo() function, so it does not use the internal Kamailio cache. It would do a DNS resolution to the configured resolver for each call. The TTL will be irrelevant in this scenario for Kamailio.

 

Cheers,

 

Henning

 

From: harneet singh <hbilling@gmail.com>
Sent: Sonntag, 21. Mai 2023 13:35
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>
Subject: [SR-Users] DNS resolution with ipops

 

Hi Experts,

 

I am planning to use dns_query() API from the ipops module, which I understand from some documentation that it internally uses getaddrinfo(). 

I wanted to check if someone can comment on the DNS Cache mechanism in this case. 

 

* Does Kamailio retain any dns cache while using this API, or would it be actually doing the resolution for each call.

 

* In light of the above, does Kamailio honour the TTL value in response to the DNS Query?

 

Regards,

Harneet Singh

--

"Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth" - Sir Arthur Conan Doyle