[sr-dev] use key dynamic for xavp

Luis Azedo luis at 2600hz.com
Thu Sep 28 22:32:22 CEST 2017


HI Daniel,


ended up using xavp_params_explode.


thanks

________________________________
From: Daniel-Constantin Mierla <miconda at gmail.com>
Sent: Thursday, September 28, 2017 7:45:17 AM
To: Kamailio (SER) - Development Mailing List; Luis Azedo; sr-dev at lists.sip-router.org
Subject: Re: [sr-dev] use key dynamic for xavp


Hello,


iirc, xavp specs do not support variables in their name, it would require some C coding.


Getting the value might be possible using pv_evalx(), the result should be string, but then using {s.int} can get it to int.


If you need an workaround, you can probably do it with using sqlops with sql_xquery and some temporary tables, but it can look strange in config.

Cheers,
Daniel

On 28.09.17 05:46, Luis Azedo wrote:

Hi List,


shouldn't this be possible ?


$xavp(ulattrs=>first) = 33;

$var(ccv) = "whatever";
$xavp(ulattrs[0]=>$var(ccv)) = "some value";

when using in the particular case of usrloc attrs, i see the value of the attr created as "first" (correct) and "$var(ccv)" which i believe is incorrect, it should be "whatever".

thoughts ?






_______________________________________________
Kamailio (SER) - Development Mailing List
sr-dev at lists.kamailio.org<mailto:sr-dev at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev



--
Daniel-Constantin Mierla
www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda<http://www.linkedin.com/in/miconda>
Kamailio Advanced Training - www.asipto.com<http://www.asipto.com>
Kamailio World Conference - www.kamailioworld.com<http://www.kamailioworld.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20170928/2560796b/attachment-0003.html>


More information about the sr-dev mailing list