Re: [SR-Users] xavp questions (variables in root/branch)

2017-07-25 Thread Vasiliy Ganchev
Hi, Daniel!

I will play with exploding/evaluating, but on the first glance, seems AVPs
with the complex name is preferable way.

If have free time may look in PV module, but it will be another discussion.

For now thanks for the detailed answers!

best regards, Vasiliy



--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/xavp-questions-variables-in-root-branch-tp160357p160480.html
Sent from the Users mailing list archive at Nabble.com.

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] xavp questions (variables in root/branch)

2017-07-24 Thread Daniel-Constantin Mierla
Hello,

do you need to store per transaction or just global scope? If the later,
you can use hash table variables with dynamic name.

Cheers,
Daniel


On 19.07.17 11:09, Vasiliy Ganchev wrote:
> Hi, community!
>
> I have a question regarding xavp usage.
>
> according to docs, xavp has format:
> $xavp(root=>branch)="value";
>
> I want to use "root" and "branch" - variables. (as it is implemented with
> AVPs - the id there, can be variable)
> e.g.:
>
> ...
> $var(root_key) = "root_1";
> $var(branch_key1) = "key_value1";
> ...
> $xavp($var(root_key)[0]=>$var(branch_key1)) = "some_value";
> ... 
>
> Playing around with the script - I found that it is currently impossible
> (tested with 4.2.5 and 5.2.0 versions).
> Kamailio interprets variables in "root" and "branch" as static strings.
>
>
> Walking through the mailing list history, I have an impression that xavp are
> originally designed to operate only with constant keys.
>
> The question is: is it planned to add functionality with variables as "root"
> and "branch" components?
>
> Thanks in advance for the answers!
>
> Best regards
>
>
>
> --
> View this message in context: 
> http://sip-router.1086192.n5.nabble.com/xavp-questions-variables-in-root-branch-tp160357.html
> Sent from the Users mailing list archive at Nabble.com.
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] xavp questions (variables in root/branch)

2017-07-19 Thread Vasiliy Ganchev
Hi, community!

I have a question regarding xavp usage.

according to docs, xavp has format:
$xavp(root=>branch)="value";

I want to use "root" and "branch" - variables. (as it is implemented with
AVPs - the id there, can be variable)
e.g.:

...
$var(root_key) = "root_1";
$var(branch_key1) = "key_value1";
...
$xavp($var(root_key)[0]=>$var(branch_key1)) = "some_value";
... 

Playing around with the script - I found that it is currently impossible
(tested with 4.2.5 and 5.2.0 versions).
Kamailio interprets variables in "root" and "branch" as static strings.


Walking through the mailing list history, I have an impression that xavp are
originally designed to operate only with constant keys.

The question is: is it planned to add functionality with variables as "root"
and "branch" components?

Thanks in advance for the answers!

Best regards



--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/xavp-questions-variables-in-root-branch-tp160357.html
Sent from the Users mailing list archive at Nabble.com.

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users