Hello,
On 29/04/15 19:01, Yufei Tao wrote:
Hi
I've hit a problem with sht_rm_name_re() in htable module. I was
calling it like this:
sht_rm_name_re("Dlg=>$var(callid)::tenant");
But when I used sipp to generate 600 concurrent calls for example, I
called this function when receiving BYE. But it removed more entries
than it should. Seems when removing removing some entry with callid
1-3798(a)192.168.60.80 <mailto:1-3798@192.168.60.80>, it also removed
entries for [1-9]1-3798(a)192.168.60.80 <mailto:1-3798@192.168.60.80>.
How do I add '^' in front and '$' at the end of the regexp string when
calling this function please? Here I don't really need regexp in fact,
just want to do an exact match. But I didn't find any other functions
for deleting entries.
The ^ has to be added after =>. For $, add $$ at the end,
because of
variable evaluation a single $ will not work.
Also, maybe you can try with the operators from $shtcn() -- there is one
for string comparison -- I don't recall if they are also for the
functions, but a test should be fast:
http://www.kamailio.org/wiki/cookbooks/4.2.x/pseudovariables#shtcn_htable_e…
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany -
http://www.kamailioworld.com