[SR-Users] How to delete all values for a certain xavp index

Sergiu Pojoga pojogas at gmail.com
Mon May 11 16:17:32 CEST 2020


Hi again,

After calling t_load_contacts(), all Contacts are stored in
$xavp(tm_contacts). Then, some evaluation of Contacts is done and some of
them may need to be dropped so that branches aren't created.
modparam("tm", "contacts_avp", "tm_contacts");

Question is: how to delete Contact[x] from $xavp(tm_contacts) ?

Hope this clarifies it.

Thanks.

On Mon, May 11, 2020 at 8:03 AM Daniel-Constantin Mierla <miconda at gmail.com>
wrote:

> Hello,
>
> I am not sure I get the issue here, maybe you can give some explicite
> examples with assignments operations to be able to replicate.
>
> Just be aware, that when you delete an xavp, the list is shifted and
> another xavp can come in the same place (same index).
>
> Cheers,
> Daniel
> On 03.05.20 05:56, Sergiu Pojoga wrote:
>
> Hi there,
>
> For some reason I can't figure this seemingly simple Subj, may be someone
> can help.
>
> In my particular case, trying to delete Contact[0] from the xavp storing
> Contacts after t_load_contacts()
>
> $xavp(tm_contacts[0]) = $null;
>
> Above results in all but the latest added value being deleted. Assigning
> $null to index[1] results in all but the latest 2 being delete and so on.
>
> Thanks.
>
> _______________________________________________
> Kamailio (SER) - Users Mailing Listsr-users at lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.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/20200511/ddf067f0/attachment.html>


More information about the sr-users mailing list