Genlemen,
I'll be quick: is there any way to perform a DNS lookup within the .cfg?
The example would be:
avp(s:server_name) = "kamailio.org"; avp(s:server_ip) = "192.168.1.100";
if (DNS_LOOKUP_FUNCTION(avp(s:server_name)) == avp(s:server_ip)) { ... do something ... } else { ... do something else ... }
Thanks in advance, Uriel
2009/3/11 Uriel Rozenbaum uriel.rozenbaum@gmail.com:
Genlemen,
I'll be quick: is there any way to perform a DNS lookup within the .cfg?
The example would be:
avp(s:server_name) = "kamailio.org"; avp(s:server_ip) = "192.168.1.100";
if (DNS_LOOKUP_FUNCTION(avp(s:server_name)) == avp(s:server_ip)) { ... do something ... } else { ... do something else ... }
No, you can't. No idea of ho to achieve it?
[?] I just didn't want to make some magic moves with perl or exec...
On Wed, Mar 11, 2009 at 12:08 PM, Iñaki Baz Castillo ibc@aliax.net wrote:
2009/3/11 Uriel Rozenbaum uriel.rozenbaum@gmail.com:
Genlemen,
I'll be quick: is there any way to perform a DNS lookup within the .cfg?
The example would be:
avp(s:server_name) = "kamailio.org"; avp(s:server_ip) = "192.168.1.100";
if (DNS_LOOKUP_FUNCTION(avp(s:server_name)) == avp(s:server_ip)) { ... do something ... } else { ... do something else ... }
No, you can't. No idea of ho to achieve it?
-- Iñaki Baz Castillo ibc@aliax.net
Hello,
On 03/11/2009 04:10 PM, Uriel Rozenbaum wrote:
I just didn't want to make some magic moves with perl or exec...
indeed these are some options to get it for the moment.
Please add it to the feature requests tracker to be on the list for next release:
http://sourceforge.net/tracker/?atid=743023&group_id=139143&func=bro...
The code is available inside, just not exported to config.
Cheers, Daniel
On Wed, Mar 11, 2009 at 12:08 PM, Iñaki Baz Castillo <ibc@aliax.net mailto:ibc@aliax.net> wrote:
2009/3/11 Uriel Rozenbaum <uriel.rozenbaum@gmail.com <mailto:uriel.rozenbaum@gmail.com>>: > Genlemen, > > I'll be quick: is there any way to perform a DNS lookup within the .cfg? > > The example would be: > > avp(s:server_name) = "kamailio.org <http://kamailio.org>"; > avp(s:server_ip) = "192.168.1.100"; > > if (DNS_LOOKUP_FUNCTION(avp(s:server_name)) == avp(s:server_ip)) > { > ... do something ... > } > else > { > ... do something else ... > } No, you can't. No idea of ho to achieve it? -- Iñaki Baz Castillo <ibc@aliax.net <mailto:ibc@aliax.net>>
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Hello Henning,
On 03/11/2009 06:03 PM, Henning Westerholt wrote:
On Wednesday 11 March 2009, Daniel-Constantin Mierla wrote:
indeed these are some options to get it for the moment. [..] The code is available inside, just not exported to config.
Hi Daniel,
a good place for this functionality could be the cfgutils module.
yes, that is good place. If someone wants to implement it, I can give some guidance.
Cheers, Daniel