<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>I haven't implemented the t_load_contacts() to be familiar with
how it stored data internally, because it should be more fields
than the address. That's why I asked if you can provide some
example with assignments, so one can reproduce the issue and
eventually give a solution or fix the code.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 11.05.20 16:17, Sergiu Pojoga wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAJZsGC=0_fzvxWLv+xrqdD11_hrbjrbt7SOHgsms+-B0AcxYNA@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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" moz-do-not-send="true">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" moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" moz-do-not-send="true">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" moz-do-not-send="true">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank" moz-do-not-send="true">https://www.paypal.me/dcmierla</a></pre>
</div>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Funding: <a class="moz-txt-link-freetext" href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a></pre>
</body>
</html>