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

Daniel-Constantin Mierla miconda at gmail.com
Mon Jul 24 08:39:38 CEST 2017


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 at 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




More information about the sr-users mailing list