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 ?
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@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
HI Daniel,
ended up using xavp_params_explode.
thanks
________________________________ From: Daniel-Constantin Mierla miconda@gmail.com Sent: Thursday, September 28, 2017 7:45:17 AM To: Kamailio (SER) - Development Mailing List; Luis Azedo; sr-dev@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@lists.kamailio.orgmailto:sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
-- Daniel-Constantin Mierla www.twitter.com/micondahttp://www.twitter.com/miconda -- www.linkedin.com/in/micondahttp://www.linkedin.com/in/miconda Kamailio Advanced Training - www.asipto.comhttp://www.asipto.com Kamailio World Conference - www.kamailioworld.comhttp://www.kamailioworld.com