[OpenSIPS-Users] {ip.resolve} script transformation trouble

Igor Solovyov igor at choochee.com
Thu Feb 24 22:39:37 CET 2011


Thanks Dave for prompt help.

Now I get

Feb 24 23:32:32 os1 opensips: ERROR:core:parse_transformation: unknown
transformation: [ip] in [{ip.resolve}]
Feb 24 23:32:32 os1 opensips: ERROR:core:parse_transformation: error parsing
[{ip.resolve}]
Feb 24 23:32:32 os1 opensips: ERROR:core:pv_parse_spec: ERROR:bad tr in pvar
name "var"
Feb 24 23:32:32 os1 opensips: ERROR:core:pv_parse_spec: invalid parsing in
[$(var(fs_addr_s){ip.resolve})] at (4)
Feb 24 23:32:32 os1 opensips: CRITICAL:core:yyerror: parse error in config
file, line 144, column 49-78: unknown script variable

which leads me to though that my OpenSIPS version 1.6.3 doesn't support "ip"
transformation.
Am I correct? And so, from which version "ip" is supported?
Or may be is there another method to get resolved ip by string?

Igor.

On Thu, Feb 24, 2011 at 11:06 PM, Dave Singer <dave.singer at wideideas.com>wrote:

> Igor,
>
> Very close. Notice the ( between $ and var and ) after var name:
>
> $var(fs_addr) = $(var(fs_addr_s){ip.resolve}{ip.ntop});
>
> see syntax near top of http://www.opensips.org/Resources/DocsCoreVar16
>
> Dave
>
> On Thu, Feb 24, 2011 at 10:36 AM, Igor Solovyov <igor at choochee.com> wrote:
>
>> Hi All,
>>
>> I try to execute in the script
>> $var(fs_addr_s) = "opensips.org"; # just for test
>> $var(fs_addr) = $var(fs_addr_s{ip.resolve}{ip.ntop});
>> xlog("L_ERR", "fs_addr = $var(fs_addr)");
>> but in log I can see only 0 instead of resolved ip address.
>> What I do wrongly?
>>
>> Thanks,
>> Igor.
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110224/8165ed53/attachment-0001.htm>


More information about the Users mailing list