[OpenSIPS-Users] {ip.resolve} script transformation trouble
Dave Singer
dave.singer at wideideas.com
Thu Feb 24 22:50:59 CET 2011
Igor,
Only documentation I see it in is for development
version<http://www.opensips.org/Resources/DocsCoreTran#toc47> implying
trunk what will be 1.6.5. However a little while back I was looking at the
source code of 1.6.4 for transformations and noticed some IP transformation
stuff. I can't tell you ip.resolve is there but it is a place to start.
Dave
On Thu, Feb 24, 2011 at 1:39 PM, Igor Solovyov <igor at choochee.com> wrote:
> 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/c8f08025/attachment.htm>
More information about the Users
mailing list