From bkk@ednt.de Mon Nov 21 11:41:16 2022 From: Bernd Krueger-Knauber To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Problem with update/retrigger a htable Date: Mon, 21 Nov 2022 11:41:06 +0100 Message-ID: <9d2655ff-08f6-5001-5bcf-dc67d363071e@ednt.de> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0951038485==" --===============0951038485== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Hi Daniel-Constantin, I just found this parameter too. I set it now to 10 seconds, but for example a 30 second expire is only executed every 40 seconds. It looks, that I'm not able to set the same entry again inside of the event_route. Maybe it is deleted after the event_route is executed. There should be a check afterards if the entry is still expired before deleting it. I found an ugly solution: I use 2 identical htables and toggle between them: event_route[htable:expired:userpush1] {     xinfo("[event_route] userpush1 Record expired $shtrecord(key) => $shtrecord(value)");     $sht(userpush2=>$shtrecord(key)) = $shtrecord(value); } event_route[htable:expired:userpush2] {     xinfo("[event_route] userpush2 Record expired $shtrecord(key) => $shtrecord(value)");     $sht(userpush1=>$shtrecord(key)) = $shtrecord(value); } It works, but it is ugly. Thank you for your response. Bernd Am 21.11.2022 um 11:34 schrieb Daniel-Constantin Mierla: > Hello, > > check the docs of the module, there is a modparam to set the timer > interval, which by default is 20 secods. > > Then, to troubleshoot, run with debug=3 and watch the log messages for > hints of what happens. Also, dump the htable via rpc to see its content. > > Cheers, > Daniel > > On 21.11.22 08:50, Bernd Krueger-Knauber wrote: >> Hi members, >> >> I run into a problemm with htable. >> For user push notifications I need a loop. >> >> So I did the following for a first test: >> >> modparam("htable", "htable", "user=>size=3;autoexpire=5") >> >> ... >> >> >> event_route[htable:mod-init] { >>     xinfo("htable init"); >>     $sht(user=>testkey) = "testvalue"; >> } >> >> event_route[htable:expired:user] { >>     xinfo("Record expired $shtrecord(key) => $shtrecord(value)"); >>     $sht(user=>$shtrecord(key)) = $shtrecord(value); >> } >> >> >> I see the htable init, and I reach Record expired, but only once. >> The 'new' entry >> $sht(user=>$shtrecord(key)) = $shtrecord(value); >> seams not to be re-added, because I never reach the expired event again. >> >> I expected to see cyclic expired events. >> Also strange: >> expire is set to 5 seconds I get: >> >> Nov 21 08:34:50 xxx /usr/sbin/kamailio[254662]: INFO: