When I'm using a htable in Kamailio, I can get the htable:expired:<htable> route to be executed if I include in my htable name a _ character (meaning my_htable does not work whereas myHable works). Is it a known restriction or limitation the htable module or of Kamailio or is it a bug? I'm using Kamailio on Ubuntu.
If it is underscore '_' it should work. Can you attach here the logs with debug=3 in kamailio.cfg when an item expires in the the my_htable?
Actually it is the underscore. When I look at the logs I think we can see a problem:
- When using a htable name without underscore myTable1: _modparam("htable","htable","myTable1=>size=1024;autoexpire=86400");_ and _event_route[htable:expired:myTable1] { ...}_ I get the following logs at starting time: **Oct 6 13:48:16 torso1 kamailio-0[14834]: DEBUG: htable [ht_api.c:360]: ht_init_tables(): initializing htable [myTable1] with nr. of slots: 1024 Oct 6 13:48:16 torso1 kamailio-0[14834]: DEBUG: htable [ht_api.c:375]: ht_init_tables(): event route for expired items in [myTable1] exists**
- When using a hatable with an underscore my_table_1: _modparam("htable","htable","my_table_1=>size=1024;autoexpire=86400");_ and _event_route[htable:expired:] { ...}_ **Oct 6 13:51:20 torso1 kamailio-0[16020]: DEBUG: <core> [route.c:129]: route_add(): mapping routing block (0xb01140)[htable:expired:my_table_1] to 15 Oct 6 13:51:20 torso1 kamailio-0[16020]: DEBUG: htable [ht_api.c:372]: ht_init_tables(): event route for expired items in [my_table_1] does not exist**
Can you write the config snippets and logs in code blocks to be able to read them properly, like:
``` Code text here ``` Because it is not easy to spot what are the parts pasted there and which are the formatting characters. For example, you put above that you have:
``` event_route[htable:expired:] ```
So the table name is not present in the event route name.
You can edit the above comment.
Sorry, I'm not yet use to the formating of messages here and I did a mistake by removing the table name...
I discovered that '_' was not considered for being part of event route name. I pushed a fix in master and 4.4 branches. If the issue is still there, reopen.
Closed #811.