[SR-Users] htable - unable to update entry when event_route[htable:expired:<table>] is executed

David Heath mrdrheath at gmail.com
Tue May 22 12:55:23 CEST 2018


Looking for some help/ advice on updating the expiration timer/ values in a hash table when when [htable:expired:<table>] occurs.

On startup my script successfully reads in a set of entries from a DB; I also know from testing/ tracing that I can add new entries to the hash table in request_route.  My issue occurs when the expiration timer kicks in - my goal was to re-read from the DB to ensure either the entry still exists or hasn’t changed and either delete, update or refresh the value until the next time the expiration event occurs.  This way entries in the DB could be modified overtime.

At the moment all that’s occurring is that in the event_route[htable:expired:cli] block the entries are being drained one-by-one.  I re-read the row from the from the DB and I reset the value using $sht(cli=>$shtrecord(key)) = $xavp(cli=>MAPPED_CLI); I’ve also tried updating the expiration timer against the key.  I’ve tried both $shtex(cli=>$shtrecord(key)) = 60 and $shtex(cli=>$shtrecord(key)) = $TS+60 [the latter based on the values shown from sht_print()]  but the entries still get deleted.

I’ve tried this against both 5.1.0 & 5.1.2.

Any help appreciated.

David Heath

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180522/e7b6b8ca/attachment.html>

More information about the sr-users mailing list