Per my understanding, the left prefix match means the name "starts with" given prefix, while the right prefix match means the name "ends with" given prefix.

$sht(a=>aac) = 1;
$sht(a=>abc) = 1;
$sht(a=>acc) = 1;
$sht(a=>adc) = 1;

...

// both will produce same output
xlog("$shtcn(a=>a.*)");
xlog("$shtcn(a=>%~a)");

// both will produce same output
xlog("$shtcn(a=>.*c)");
xlog("$shtcn(a=>~%c)");

I usually use regex whenever possible and avoid these fancy derivatives to keep things simple and easy to understand in kamailio config.

Hope this helps.

--
Muhammad Shahzad Shafi
Tel: +49 176 99 83 10 85


Sent from my Huawei P40 5G phone


-------- Original message --------
From: Brooks Bridges <bbridges@call48.com>
Date: Thu, 28 Oct 2021, 23:26
To: "Kamailio (SER) - Users Mailing List" <sr-users@lists.kamailio.org>
Subject: [SR-Users] htable shtcn expressions
Referring to the expressions outlined at http://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#shtcn_htable_exp , is there any additional documentation or examples floating around that further explains how the right and left prefix matching works?  The rest of them are pretty clear, but I'm having troubles with these and can't get them working like I would expect them to work.
Confidentiality Notice: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named on the e-mail. If the reader of this e-mail is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading this e-mail is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your system.

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users