[SR-Users] removing xavp from the stack.

Daniel-Constantin Mierla miconda at gmail.com
Thu Jun 18 15:13:31 CEST 2020


Hello,

On 18.06.20 14:43, David Villasmil wrote:
> Hello guys,
>
> if i do something like:
>
> $(xavp(my_var)) = "1";
> $(xavp(my_var)) = "2";
> $(xavp(my_var)) = "3";
>
> it is store like:
>
> $(xavp(my_var)) = "1"; -> index 2
> $(xavp(my_var)) = "2"; -> index 1
> $(xavp(my_var)) = "3"; -> index 0
>
> and later i need to use and remove from the stack, like this:
>
> use and remove: $(xavp(my_var)) --> would remove index 0
> Then the stack would remain like:
>
> $(xavp(my_var)) = "1"; -> index 1
> $(xavp(my_var)) = "2"; -> index 0
>
> Simply popping the index 0 and reindex the remaining...
>
> is this possible?
What do you mean exactly? The remaining is reindexed from 0 ...

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200618/c2c33bf6/attachment.html>


More information about the sr-users mailing list