[SR-Users] How to delete all values for a certain xavp index
Sergiu Pojoga
pojogas at gmail.com
Mon May 11 18:24:31 CEST 2020
@Federico
Just to clarify, noticed a small diff in your suggested expression:
$(xavp(tm_contacts)[0]) = $null; # results in error in cfg "Can't get from
cache: $(xavp(tm_contacts)[0])"
$xavp(tm_contacts[0]) = $null; # no errors, but still unexpected values
Thanks.
On Mon, May 11, 2020 at 11:41 AM Sergiu Pojoga <pojogas at gmail.com> wrote:
> Hi Federico,
>
> So I thought too, mentioned in my 1st post.
>
> But after assigning $null, the xavp contains the following Contact
> (reference to only the RUIDs):
>
> $xavp(tm_contacts[0]) = $null => ulcx-5e88a468-587c-3
> $xavp(tm_contacts[1]) = $null => ulcx-5e88a468-587c-3 &
> ulcx-5e88a468-587c-2
> $xavp(tm_contacts[3]) = $null => empty
>
> On Mon, May 11, 2020 at 11:34 AM Federico Cabiddu <
> federico.cabiddu at gmail.com> wrote:
>
>> Hi,
>> shouldn't it be
>> $(xavp(tm_contacts)[0]) = $null; ?
>>
>> Cheers,
>>
>> Federico
>>
>> On Sun, May 3, 2020 at 5:57 AM Sergiu Pojoga <pojogas at gmail.com> 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 List
>>> sr-users at lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200511/d1fc1172/attachment.html>
More information about the sr-users
mailing list