Dave,
Thanks for idea.
I've done the test:
route[test]
{
$var(fqdn) = "google.com";
$avp(s:ips) = $(var(fqdn){ip.resolve});
xlog("L_ERR", "--TEST--:
$(avp(s:ips)[0])::$(avp(s:ips)[1])::$(avp(s:ips)[2])");
return(-11);
}
The results:
Mar 2 22:20:12 os1 opensips: --TEST--: 74.125.87.99::<null>::<null>
Mar 2 22:20:16 os1 opensips: --TEST--: 74.125.87.104::<null>::<null>
As you can see we have just a Round Robbin.
Regards,
Igor.
On Wed, Mar 2, 2011 at 7:49 PM, Dave Singer <[email protected]>wrote:
> Igor,
>
> I'm pretty sure that won't work at all. You would need to use the
> transformation ip.resolve.
> I don't know if it returns multiple IPs but if it does you would want to
> assign it to an avp that can handle multiple.
> An example to try:
> $var(fqdn) = "some.server.com"; # Not sure if you can do a transformation
> directly on a string. Never tried.
> $avp(s:ips) = $(var(fqdn){ip.resolve});
> xlog("INFO", "$(avp(s:ips)[0])::$(avp(s:ips)[1])::$(avp(s:ips)[2])\n");
> if ( avp_check("$avp(s:ips)", "eq/$si/") ) { .... }
>
> Let me know what you find.
> Dave
>
> On Wed, Mar 2, 2011 at 9:20 AM, Igor Solovyov <[email protected]> wrote:
>
>> Hi,
>>
>> If I use
>> if ($si=="some.server.com")
>> {
>> ...
>> }
>> and some.server.com has several A records,
>> are all of them used in upper comparison?
>> How does TTL influence on saved IPs?
>>
>> Regards,
>> Igor.
>>
>> _______________________________________________
>> Users mailing list
>> [email protected]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users