Re: [SR-Users] storing vars in htable

2019-10-05 Thread David Villasmil
Perfect, thanks Alex!

On Sat, 5 Oct 2019 at 03:20, Alex Balashov 
wrote:

> Kamailio has inconsistent interpolation behaviour; static string
> assignment values are not interpolated.
>
> So, this won’t work:
>
> $var(x) = “$var(y)abc”;
>
> But this will:
>
> $var(x) = $var(y) + “abc”;
>
> Also see:
>
>
> https://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#s_format_-_evaluate_dynamic_format
>
> — Alex
>
> —
> Sent from mobile, with due apologies for brevity and errors.
>
> On Oct 4, 2019, at 9:45 PM, David Villasmil <
> david.villasmil.w...@gmail.com> wrote:
>
> 
>
> Hello guys,
>
> I'm storing some data in an htable, like so:
>
> $var(http_query) =
> "/default/en_US/send.html?u=user=pass=$var(next_channel)=$var(to)=$var(message)";
>
> then i need to store it:
>
> $sht(http_requests=>$http_req_id) = $var(http_query);
>
> But what's stored is the actual vars, not the the values, it's stored like:
>
> sh store:
> /default/en_US/send.html?u=user=pass=$var(next_channel)=$var(to)=$var(message)
>
> Why is that? shouldn't the vars be parsed?
>
> Thanks
>
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] storing vars in htable

2019-10-04 Thread Alex Balashov
Kamailio has inconsistent interpolation behaviour; static string assignment 
values are not interpolated.

So, this won’t work:

$var(x) = “$var(y)abc”;

But this will:

$var(x) = $var(y) + “abc”;

Also see:

https://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#s_format_-_evaluate_dynamic_format

— Alex

—
Sent from mobile, with due apologies for brevity and errors.

> On Oct 4, 2019, at 9:45 PM, David Villasmil  
> wrote:
> 
> 
> Hello guys,
> 
> I'm storing some data in an htable, like so:
> 
> $var(http_query) = 
> "/default/en_US/send.html?u=user=pass=$var(next_channel)=$var(to)=$var(message)";
> 
> then i need to store it:
> 
> $sht(http_requests=>$http_req_id) = $var(http_query);
> 
> But what's stored is the actual vars, not the the values, it's stored like:
> 
> sh store: 
> /default/en_US/send.html?u=user=pass=$var(next_channel)=$var(to)=$var(message)
> 
> Why is that? shouldn't the vars be parsed?
> 
> Thanks
> 
> Regards,
> 
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users