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

Igor Solovyov igor at choochee.com
Fri Feb 25 13:40:37 CET 2011


Hi Vlad,

Thanks for info.
Yes, I already have 1.6.4 built, works perfectly.

Regards,
Igor.

On Fri, Feb 25, 2011 at 12:42 PM, Vlad Paiu <vladpaiu at opensips.org> wrote:

>  Hello,
>
> The IP transformations are only available in 1.6.4 source code. I have
> updated the documentation in 1.6.x on the website to also document the IP,
> CSV and SDP transformations. Thanks for the help, Dave.
>
> Igor, the IP transformations are not available in 1.6.3, you would have to
> update to 1.6.4 to be able to use them.
>
> Regards,
>
> --
> Vlad Paiu
> OpenSIPS Developer
>
>
>
>
>
> On 02/24/2011 11:50 PM, Dave Singer wrote:
>
> 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
>>>>
>>>>
>>>
>>
>
> _______________________________________________
> Users mailing listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110225/ce588062/attachment.htm>


More information about the Users mailing list