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

Vasiliy Ganchev vancecezar at gmail.com
Mon Jul 24 08:47:39 CEST 2017


Hi, Daniel!

I expected to use it per transaction. We are also actively using htables for
different cases, and I am aware of them.

My question about xavps - was "in general" - is it a limitation of the
initial design, and is it planned to be changed.

For now, instead of using xavp with variables, I am using AVPs with complex
names (name consists of 2 vars)  - and it does what I needed.

Thanks for your answers!

Best regards, Vasiliy


Daniel-Constantin Mierla-6 wrote
> 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 .kamailio

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

> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users





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



More information about the sr-users mailing list