<div dir="ltr">Hi Alex,<div>you're right, that's not a pleasant experience.<div>Beside your proposal of having a module function to count the transactions (which could be useful), we could set the ts_append log to DEBUG and make the function return a specific return code for this case so that it can be intercepted in the routing script.</div></div><div>Would this be acceptable for you?</div><div><br></div><div>Federico</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Oct 13, 2022 at 2:00 PM Alex Balashov <<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.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">If you’re asking if ts_append() has a documented return value, it does not.<br>
<br>
A function to count transactions stored for a given <domain, RURI> seems like a logical need. Then, one could do something like:<br>
<br>
if(ts_trans_count(“location”, “$tu”) > 0) <br>
ts_append(“location”, “$tu”);<br>
<br>
— Alex<br>
<br>
> On Oct 13, 2022, at 7:56 AM, Olle E. Johansson <<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>> wrote:<br>
> <br>
> <br>
> <br>
>> On 13 Oct 2022, at 13:50, Alex Balashov <<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>> wrote:<br>
>> <br>
>> Hi,<br>
>> <br>
>> When there are no stored transactions for an AOR, it logs this error:<br>
>> <br>
>> Oct 13 07:48:18 gw1 /usr/sbin/kamailio[14758]: ERROR: tsilo [ts_append.c:64]: ts_append(): failed to retrieve record for <a href="mailto:sip%3Aabalashov@sip.evaristesys.com" target="_blank">sip:abalashov@sip.evaristesys.com</a><br>
>> <br>
>> But not having transactions ts_store()’d is a rather normal occurrence, right? It is the expected case the vast majority of the time that someone registers. <br>
>> <br>
>> Does that mean one is simply destined to have this scary-looking error, to the syslog ERROR facility, for a normal runtime condition? Is there not some principle against using attention-grabbing error messages this way? Would a patch to fix be welcome?<br>
> <br>
> I think that’s a bad sysadm experience… Could be a WARNING or a DEBUG. <br>
> <br>
> Do you get an error code indicating that your silo is empty?<br>
> <br>
> /O<br>
> __________________________________________________________<br>
> Kamailio - Users Mailing List - Non Commercial Discussions<br>
> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
> Edit mailing list options or unsubscribe:<br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br>
-- <br>
Alex Balashov | Principal | Evariste Systems LLC<br>
<br>
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)<br>
Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br>
<br>
<br>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>