<div dir="ltr">Hi again,<div><br></div><div>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.</div><div>modparam("tm", "contacts_avp", "tm_contacts");<br></div><div><br></div><div>Question is: how to delete Contact[x] from
$xavp(tm_contacts) ?</div><div><br></div><div>Hope this clarifies it.</div><div><br></div><div>Thanks.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 11, 2020 at 8:03 AM Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hello,</p>
<p>I am not sure I get the issue here, maybe you can give some
explicite examples with assignments operations to be able to
replicate.</p>
<p>Just be aware, that when you delete an xavp, the list is shifted
and another xavp can come in the same place (same index).</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div>On 03.05.20 05:56, Sergiu Pojoga wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hi there,<br>
<div><br>
</div>
<div>For some reason I can't figure this seemingly simple Subj,
may be someone can help.</div>
<div><br>
</div>
<div>In my particular case, trying to delete Contact[0] from the
xavp storing Contacts after t_load_contacts()</div>
<div><br>
</div>
<div>$xavp(tm_contacts[0]) = $null;<br>
</div>
<div><br>
</div>
<div>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.<br>
</div>
<div><br>
</div>
<div>Thanks.</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre cols="72">--
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank">https://www.paypal.me/dcmierla</a></pre>
</div>
</blockquote></div>