Hello,

I added several functions and a new pseudo-variable class to ipops module that allow to do operations with dns directly from configuration file.

One functionality is related to matching an IP address to a hostname. The hostname is resolved via a DNS query and then the IP is matched against the result set. There are two versions of this function, one using the system resolver and the other using the internal dns resolver, see: - http://kamailio.org/docs/modules/devel/modules/ipops.html#ipops.f.dns_sys_match_ip - http://kamailio.org/docs/modules/devel/modules/ipops.html#ipops.f.dns_int_match_ip

Another enhancement is the possibility to store the result of a system dns query in a variable container and access the values from the config file - the function for the query is dns_query(hostname, pvid): - http://kamailio.org/docs/modules/devel/modules/ipops.html#ipops.f.dns_query

The result is stored in $dns(pvid=>key) variable - you can see details about what keys can be used as well as an example at: - http://www.kamailio.org/wiki/cookbooks/devel/pseudovariables#dns_pvid_key_-_dns_query_result

The system dns queries use getaddrinfo() C function, resolving both to IPv4 and IPv6.

Cheers,
Daniel

--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to