On 10/29/21 2:28 AM, Brooks Bridges wrote:
That was my understanding of how it should work as
well, however in my
testing it does not appear to be working that way.
e.g. if there is a key of "+18884441111” in my dataset and I do
$shtcn(htablename=>~%8884441111) I get a count of 0.
As far as regex, I am trying to avoid that as I was told many years ago
that regex is inherently slow when compared to other operations in
Kamailio. I was told this by someone I trust as an authority, and since
this is a quite high volume system (greater than 1500 requests per
second at peak load), every millisecond matters.
What version are you running?
My test with 5.5:
$sht(a=>+18884441111) = 1;
xlog("L_INFO","match right 111 $shtcn(a=>~%111)");
xlog("L_INFO","match left 111 $shtcn(a=>%~111)");
xlog("L_INFO","match left +1 $shtcn(a=>%~+1)");
xlog("L_INFO","match right 444111 $shtcn(a=>~%4441111)");
kamailio[12832]: INFO: match right 111 1
kamailio[12832]: INFO: match left 111 0
kamailio[12832]: INFO: match left +1 1
kamailio[12832]: INFO: match right 444111 1
Fred Posner |
palner.com
Matrix: @fred:matrix.lod.com
o: +1 (212) 937-7844