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

Tue, 22 May 2018 03:57:51 -0700

Hi,

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.


Thanks
David Heath

_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to