Hello Volker, have you tried with the prefix "s" as suggested on the list:
kamcmd mtree.match siteId s:49241531075212 0 Cheers, Henning -- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://gilawa.com<https://gilawa.com/> From: Volker Denneberg <v.denneb...@m3connect.de> Sent: Wednesday, June 3, 2020 8:56 PM To: Henning Westerholt <h...@skalatan.de>; Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org> Subject: Re: kamcmd mtree.match Hello Henning, I can't get any result different from "500 - Invalid Parameters", no matter what (nonsense) I enter kamcmd mtree.match siteId 49241531075212 0 kamcmd mtree.match siteId 49241531075212 2 kamcmd mtree.match siteId 49241531075212 77 kamcmd mtree.match siteId 4924153 77 kamcmd mtree.match siteId kamcmd mtree.match kamcmd mtree.match 1 2 3 Looking at mtree_mod.c void rpc_mtree_match(rpc_t* rpc, void* ctx) { str tname = STR_NULL; str tomatch = STR_NULL; int mode = -1; m_tree_t *tr; if(!mt_defined_trees()) { rpc->fault(ctx, 500, "Empty tree list."); return; } if (rpc->scan(ctx, ".SSd", &tname, &tomatch, &mode) < 3) { rpc->fault(ctx, 500, "Invalid Parameters"); return; } if (mode !=0 && mode != 2) { rpc->fault(ctx, 500, "Invalid parameter 'mode'"); return; } .... I would guess that something is going wrong in rpc->scan() but so far I had no time to dig in. Debug log (-dddd) doesnt help me 6(25280) DEBUG: ctl [../../core/io_wait.h:377]: io_watch_add(): DBG: io_watch_add(0x7f4fbaba82a0, 15, 3, 0x55f396f76000), fd_no=1 6(25280) DEBUG: ctl [io_listener.c:442]: handle_new_connect(): handle_stream read: new connection (1) on /var/run/kamailio//kamailio_ctl 6(25280) DEBUG: ctl [io_listener.c:495]: handle_stream_read(): handle_stream read: eof on /var/run/kamailio//kamailio_ctl 6(25280) DEBUG: ctl [../../core/io_wait.h:599]: io_watch_del(): DBG: io_watch_del (0x7f4fbaba82a0, 15, -1, 0x10) fd_no=2 called Regards, Volker ________________________________ From: Henning Westerholt <h...@skalatan.de<mailto:h...@skalatan.de>> Sent: Tuesday, June 2, 2020 16:15 To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>> Cc: Volker Denneberg <v.denneb...@m3connect.de<mailto:v.denneb...@m3connect.de>> Subject: RE: kamcmd mtree.match Hello Volker, the error message you've got from the command looks like the generic error that is returned if the number or type of parameters do not match. Did you managed to get a match from the kamcmd command at all? Further hints might be also visible in the kamailio log file. Cheers, Henning -- Henning Westerholt - https://skalatan.de/blog/ Kamailio services - https://gilawa.com<https://gilawa.com/> From: sr-users <sr-users-boun...@lists.kamailio.org<mailto:sr-users-boun...@lists.kamailio.org>> On Behalf Of Volker Denneberg Sent: Sunday, May 31, 2020 12:03 AM To: sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org> Subject: [SR-Users] kamcmd mtree.match Hi, given this mtree kamcmd mtree.list siteId { tname: siteId tprefix: 00492419697994 tvalue: { 00492419697994 2388 } } { tname: siteId tprefix: 492415310752 tvalue: { 492415310752 2388 } } i wonder why this lookup fails: kamcmd mtree.match siteId 49241531075212 0 error: 500 - Invalid Parameters My expectation was that 2nd tprefix should match. I am using modparam("mtree", "db_table", "mtrees") modparam("mtree", "char_list", "0123456789+") modparam("mtree", "mt_tree_type", 0) # payload type for tree data : string Thanks in advance, Volker
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users