[SR-Users] sr-users Digest, Vol 202, Issue 25

韩小仿 13715209697 at 139.com
Thu Mar 24 15:17:53 CET 2022


Hi, Henning Westerholt

Pls close case1

Thanks!
 


hanxiaofang
 
From: sr-users-request
Date: 2022-03-24 19:00
To: sr-users
Subject: sr-users Digest, Vol 202, Issue 25
Send sr-users mailing list submissions to
sr-users at lists.kamailio.org
 
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
or, via email, send a message with subject or body 'help' to
sr-users-request at lists.kamailio.org
 
You can reach the person managing the list at
sr-users-owner at lists.kamailio.org
 
When replying, please edit your Subject line so it is more specific
than "Re: Contents of sr-users digest..."
 
 
Today's Topics:
 
   1. Re: {param.in, name[, delimiter]} error when delimiter is
      comma (Henning Westerholt)
   2. TOPOH is generating new Call-ID for BYE (Marrold)
   3. Re: SIPS Errors on Kamailio (Christopher Vincent)
   4. bug in tm module? (Daniel Paape)
   5. Re: bug in tm module? (Henning Westerholt)
   6. carrierroute with non-numeric characters (Arek ?azarczyk)
   7. Re: carrierroute with non-numeric characters (Henning Westerholt)
   8. Re: carrierroute with non-numeric characters (Arek ?azarczyk)
   9. Re: carrierroute with non-numeric characters (Henning Westerholt)
 
 
----------------------------------------------------------------------
 
Message: 1
Date: Wed, 23 Mar 2022 12:49:40 +0000
From: Henning Westerholt <hw at gilawa.com>
To: "Kamailio (SER) - Users Mailing List"
<sr-users at lists.kamailio.org>
Cc: ??? <13715209697 at 139.com>
Subject: Re: [SR-Users] {param.in, name[, delimiter]} error when
delimiter is comma
Message-ID:
<PAXPR05MB855899124FF2FD96E43C7E7FBF189 at PAXPR05MB8558.eurprd05.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"
 
Hello,
 
Please have a look to the documentation, the issue is described there, and a workaround also suggested.
 
http://www.kamailio.org/wiki/cookbooks/devel/transformations#parameters_list_transformations
 
Cheers,
 
Henning
 
--
Henning Westerholt ? https://skalatan.de/blog/
Kamailio services ? https://gilawa.com<https://gilawa.com/>
 
From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of ???
Sent: Wednesday, March 23, 2022 11:12 AM
To: sr-users <sr-users at lists.kamailio.org>
Subject: [SR-Users] {param.in, name[, delimiter]} error when delimiter is comma
 
Hi, all
 
Kamailio5.5.4
 
$var(s) = "a=1;b=2;c=3";
$var(s1) = $(var(s){param.value,b}); // work well
 
$var(s) = "a=1|b=2|c=3";
$var(s1) = $(var(s){param.value,b,|}); // work well
 
// but
$var(s) = "a=1,b=2,c=3";
$var(s1) = $(var(s){param.value,b,,});
ERROR: <core> [core/pvapi.c:1131]: pv_parse_spec2(): invalid parsing in [$(var(s){param.value,b,,})] at (4)
CRITICAL: <core> [core/cfg.y:3683]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 366, column 13-38: Can't get from cache: $(var(s){param.value,b,,})
 
how to fix this?
Thanks!
________________________________
hanxiaofang
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220323/836492af/attachment-0001.htm>
 
------------------------------
 
Message: 2
Date: Wed, 23 Mar 2022 15:05:58 +0000
From: Marrold <kamailio at marrold.co.uk>
To: "Kamailio (SER) - Users Mailing List"
<sr-users at lists.kamailio.org>
Subject: [SR-Users] TOPOH is generating new Call-ID for BYE
Message-ID:
<CAC-Lcd8H5H=V4ua7y7Fv-t=LFoC=JZC9FZaKH5JtO+K1QJNxcw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
 
Hi,
 
I have enabled the TOPOH module  with mask_callid enabled, but it's
generating a new Call-ID for a BYE which gets rejected with a 481
downstream. If I disable the TOPOH module it works as expected.
 
Does anyone know where I should start looking? SIP-wise the initial BYE
seems compliant.
 
This is Kamailio 5.5.3 on Debian 11
 
Thanks
Matthew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220323/be811b10/attachment-0001.htm>
 
------------------------------
 
Message: 3
Date: Wed, 23 Mar 2022 18:13:54 +0000
From: Christopher Vincent <CDV at redwoodtech.com>
To: "Kamailio (SER) - Users Mailing List"
<sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] SIPS Errors on Kamailio
Message-ID:
<3C0E2FDC7BD2334492F46C0DA6E07428014E8D1BD0 at RTG-Exchange01.Redwood.com>
Content-Type: text/plain; charset="utf-8"
 
Recompiled Kamailio from source
kamailio -v
version: kamailio 5.5.4 (x86_64/linux) 4c8938
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 4c8938
compiled on 14:21:51 Mar 23 2022 with gcc 4.8.5
 
Compiled a newer version of OpenSSL
openssl version
OpenSSL 1.1.1m  14 Dec 2021
 
 
Then followed through this http://www.kamailio.org/wiki/tutorials/tls/howto-openssl-1-0
 
Errors changed slightly, but issue still persists
kamailio -c
loading modules under config path: /usr/local/lib64/kamailio/modules/
0(3878) ERROR: <core> [core/sr_module.c:570]: load_module(): could not open module </usr/local/lib64/kamailio/modules/tls.so>: /usr/local/lib64/kamailio/modules/tls.so: undefined symbol: OPENSSL_sk_num
0(3878) CRITICAL: <core> [core/cfg.y:3684]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 106, column 12-19: failed to load module
0(3878) INFO: pv [pv_shv.c:60]: shvar_init_locks(): locks array size 16
0(3878) ERROR: <core> [core/modparam.c:181]: set_mod_param_regex(): No module matching <tls> found
0(3878) CRITICAL: <core> [core/cfg.y:3687]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 253, column 72: Can't set module parameter
0(3878) ERROR: <core> [core/modparam.c:181]: set_mod_param_regex(): No module matching <tls> found
0(3878) CRITICAL: <core> [core/cfg.y:3687]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 254, column 72: Can't set module parameter
0(3878) ERROR: <core> [core/modparam.c:181]: set_mod_param_regex(): No module matching <tls> found
0(3878) CRITICAL: <core> [core/cfg.y:3687]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 255, column 68: Can't set module parameter
0(3878) ERROR: <core> [core/modparam.c:181]: set_mod_param_regex(): No module matching <tls> found
0(3878) CRITICAL: <core> [core/cfg.y:3687]: yyerror_at(): parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 260, column 39: Can't set module parameter
ERROR: bad config file (5 errors) (parsing code: 0)
0(3878) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
sed /usr/local/etc/kamailio/kamailio.cfg -n -e 106p -e 253p -e 254p -e 255p -e 260p
loadmodule "tls.so"
modparam("tls", "private_key", "/etc/kamailio/star.redwoodtest.com.pem")
modparam("tls", "certificate", "/etc/kamailio/star.redwoodtest.com.pem")
modparam("tls", "ca_list", "/etc/kamailio/star.redwoodtest.com.pem")
modparam("tls", "tls_method", "TLSv1+")
 
 
 
Thanks,
Chris
 
 
From: Christopher Vincent
Sent: 21 March 2022 09:41
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Cc: Christopher Vincent <CDV at redwoodtech.com>
Subject: RE: [SR-Users] SIPS Errors on Kamailio
 
Hi Karsten, Sergey,
 
Thank you for your responses.
 
Kamailio module appears to be installed
rpm -ql kamailio-tls
/usr/lib64/kamailio/modules/auth_identity.so
/usr/lib64/kamailio/modules/tls.so
/usr/lib64/kamailio/openssl_mutex_shared
/usr/lib64/kamailio/openssl_mutex_shared/openssl_mutex_shared.so
/usr/share/doc/kamailio/modules/README.auth_identity
/usr/share/doc/kamailio/modules/README.tl
Kamailio was installed from the repository using yum / dnf https://rpm.kamailio.org/centos/kamailio.repo
 
Load module order has been corrected to as below
loadmodule "sl.so"
loadmodule "tls.so"
loadmodule "jsonrpcs.so"
loadmodule "db_mysql.so"
loadmodule "kex.so"
...
 
Kamailio ?c still showed the same errors
 
 
Thanks,
Chris
 
From: sr-users <sr-users-bounces at lists.kamailio.org<mailto:sr-users-bounces at lists.kamailio.org>> On Behalf Of Safarov
Sent: 19 March 2022 07:38
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>>
Subject: Re: [SR-Users] SIPS Errors on Kamailio
 
 
SECURITY WARNING: This email is from an external source - do not open or click any attachments if you suspect the email is suspicious. Please report any suspicious emails to Information Security (InformationSecurity at redwoodtech.com<mailto:InformationSecurity at redwoodtech.com>)
In your config "tls" module after "sl" module.
 
loadmodule "sl.so"
loadmodule "tls.so"
 
you need load tls module before "jsonrpcs" module.
 
On Fri, Mar 18, 2022 at 9:59 PM Karsten Horsmann <khorsmann at gmail.com<mailto:khorsmann at gmail.com>> wrote:
Hi,
 
 
are you sure the Kamailio tls module is on your system? Check the module path for tls.so like this or if you have build it from source?
 
rpm -ql kamailio-tls
 
/usr/lib64/kamailio/modules/auth_identity.so
/usr/lib64/kamailio/modules/tls.so
/usr/lib64/kamailio/openssl_mutex_shared
/usr/lib64/kamailio/openssl_mutex_shared/openssl_mutex_shared.so
/usr/share/doc/kamailio/modules/README.auth_identity
/usr/share/doc/kamailio/modules/README.tls
 
Christopher Vincent <CDV at redwoodtech.com<mailto:CDV at redwoodtech.com>> schrieb am Fr., 18. M?rz 2022, 12:37:
Hi,
 
Kamailio / RTPEngine was set up on CentOS 8 running SIP to SIPS and RTP to SDES SRTP conversion. This worked as expected
 
Attempted to duplicate the setup on RHEL but errors were seen. These errors were present on both RHEL 7 / RHEL 8.
 
The errors seen were as below
 
kamailio -c
loading modules under config path: /usr/lib64/kamailio/modules/
0(9165) ERROR: tls [tls_init.c:611]: tls_pre_init(): Unable to set the memory allocation functions
0(9165) ERROR: tls [tls_init.c:613]: tls_pre_init(): libssl current mem functions - m: 0x7f7a77c367a0 r: 0x7f7a77c367f0 f: 0x7f7a77c36770
0(9165) ERROR: tls [tls_init.c:615]: tls_pre_init(): module mem functions - m: 0x7f7a72db7653 r: 0x7f7a72db769f f: 0x7f7a72db76fc
0(9165) ERROR: tls [tls_init.c:617]: tls_pre_init(): Be sure tls module is loaded before any other module using libssl (can be loaded first to be safe)
0(9165) ERROR: <core> [core/sr_module.c:590]: load_module(): /usr/lib64/kamailio/modules/tls.so: mod_register failed
0(9165) CRITICAL: <core> [core/cfg.y:3683]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 137, column 12-19: failed to load module
0(9165) INFO: pv [pv_shv.c:60]: shvar_init_locks(): locks array size 16
0(9165) ERROR: <core> [core/modparam.c:181]: set_mod_param_regex(): No module matching <tls> found
0(9165) CRITICAL: <core> [core/cfg.y:3686]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 249, column 72: Can't set module parameter
0(9165) ERROR: <core> [core/modparam.c:181]: set_mod_param_regex(): No module matching <tls> found
0(9165) CRITICAL: <core> [core/cfg.y:3686]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 250, column 72: Can't set module parameter
0(9165) ERROR: <core> [core/modparam.c:181]: set_mod_param_regex(): No module matching <tls> found
0(9165) CRITICAL: <core> [core/cfg.y:3686]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 251, column 68: Can't set module parameter
0(9165) ERROR: <core> [core/modparam.c:181]: set_mod_param_regex(): No module matching <tls> found
0(9165) CRITICAL: <core> [core/cfg.y:3686]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 256, column 39: Can't set module parameter
ERROR: bad config file (5 errors) (parsing code: 0)
0(9165) INFO: <core> [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
 
 
 
 
 
The kamailio config was exactly the same as on the CentOS systems and started as below
 
/* Server ports: */
#!substdef "!SIP_PORT!5060!g"
#!substdef "!SIPS_PORT!5061!g"
 
/* Listen addresses */
#!substdef "!UDP_LOCAL_ADDR!udp:SERVER_IP_ADDR:SIP_PORT!g"
#!substdef "!TCP_LOCAL_ADDR!tcp:SERVER_IP_ADDR:SIPS_PORT!g"
 
/* Server connections: */
#!ifndef MAX_CONNECTIONS
#!define MAX_CONNECTIONS 8192
#!endif
 
 
##!define WITH_DEBUG
 
/* Transaction and branch flags:
      FLT_ - per transaction (message) flags
      FLB_ - per branch flags
*/
#!define FLT_ACC 1
#!define FLT_ACCMISSED 2
#!define FLT_ACCFAILED 3
#!define FLT_NATS 5
#!define FLT_OUT 8
#!define FLB_NATB 6
#!define FLB_NATSIPPING 7
 
#!define KAMAILIODBURL1 "mysql://kamailio:kamailiorw@localhost/kamailio"
 
#!define WITH_TLS
enable_tls=1
listen=tls:<ipaddr>:5062
 
####### Global Parameters #########
### LOG Levels: ALERT=-5, BUG=-4, CRIT=-3, ERR=-1, WARN=0, NOTICE=1, INFO=2, DBG=3
#!ifdef WITH_DEBUG
debug=4
log_stderror=no
#!else
debug=2
log_stderror=no
#!endif
 
memdbg=5
memlog=5
 
log_facility=LOG_LOCAL0
 
/* display memory usage on exit */
mem_summary=15
 
/* join free memory fragments */
mem_join=1
 
/* proxy will fork and run in daemon mode */
/* one process will be created for each network interface the proxy listens to and for each protocol (TCP/UDP), multiplied with the value of 'children' parameter */
fork=yes
children=8
 
listen=TCP_LOCAL_ADDR
listen=UDP_LOCAL_ADDR
 
/* life time of TCP connection when there is no traffic
   - a bit higher than registration expires to cope with UA behind NAT */
tcp_connection_lifetime=3605
 
/* sip over websockets may not specify a content length header */
tcp_accept_no_cl=yes
 
/* buffer size used for tcp reads, limits the maximum message size (SIP, HTTP) that can be received over tcp */
tcp_rd_buf_size=65536
 
/* max number of tcp connections */
tcp_max_connections=MAX_CONNECTIONS
 
 
####### Modules Section ########
 
# set paths to location of modules
mpath="/usr/lib64/kamailio/modules/"
 
loadmodule "jsonrpcs.so"
loadmodule "db_mysql.so"
loadmodule "kex.so"
loadmodule "corex.so"
loadmodule "tm.so"
loadmodule "tmx.so"
loadmodule "rr.so"
loadmodule "pv.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "siputils.so"
loadmodule "xlog.so"
loadmodule "sanity.so"
loadmodule "ctl.so"
loadmodule "cfg_rpc.so"
loadmodule "acc.so"
loadmodule "dispatcher.so"
loadmodule "cfgutils.so"
loadmodule "textopsx.so"
loadmodule "nathelper.so"
 
loadmodule "uac.so"
loadmodule "ipops.so"
loadmodule "debugger.so"
loadmodule "exec.so"
loadmodule "avpops.so"
loadmodule "sqlops.so"
loadmodule "rtpengine.so"
 
loadmodule "sl.so"
loadmodule "tls.so"
 
 
 
# ----------------- setting module-specific parameters ---------------
 
# ----- usrloc params -----
# store contacts in memory only
modparam("usrloc", "db_mode", 0)
# hash size of 16,384
modparam("usrloc", "hash_size", 14)
# removes contact if ws disconnects
modparam("usrloc", "handle_lost_tcp", 1)
modparam("tm|usrloc", "xavp_contact", "ulattrs")
 
 
# ----- jsonrpcs params -----
modparam("jsonrpcs", "fifo_name", "/tmp/kamailio_jsonrpc.fifo")
modparam("jsonrpcs", "dgram_socket", "/tmp/kamailio_rpc.sock")
 
 
# ----- tm params -----
# auto-discard branches from previous serial forking leg
modparam("tm", "failure_reply_mode", 3)
# default retransmission timeout: 30sec
modparam("tm", "fr_timer", 30000)
#default invite retransmission timeout after 1xx: 120sec
modparam("tm", "fr_inv_timer", 120000)
 
 
# ----- rr params -----
# set next param to 1 to add value to ;lr param (helps with some UAs)
modparam("rr", "enable_full_lr", 0)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 0)
 
 
# ----- uac params -----
modparam("uac", "restore_mode", "none")
 
 
# ----- registrar params -----
modparam("registrar", "method_filtering", 1)
modparam("registrar", "max_contacts", 1)
# max value for expires of registrations
modparam("registrar", "max_expires", 3600)
# disable GRUU
modparam("registrar", "gruu_enabled", 0)
 
 
# ----- acc params -----
/* what special events should be accounted? */
modparam("acc", "early_media", 0)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 0)
/* by default ww do not adjust the direction of the sequential requests.
   if you enable this parameter, be sure the enable "append_fromtag"
   in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
modparam("acc", "log_flag", FLT_ACC)
modparam("acc", "log_missed_flag", FLT_ACCMISSED)
modparam("acc", "log_extra", "src_user=$fU;src_domain=$fd;src_ip=$si;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
 
 
# ----- dispatcher params -----
modparam("dispatcher", "db_url", KAMAILIODBURL1)
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_from", "sip:<address>.com<sip:%3caddress%3e.com>")
 
modparam("dispatcher", "ds_ping_interval", 5)
modparam("dispatcher", "ds_probing_threshold", 1)
modparam("dispatcher", "ds_inactive_threshold", 1)
modparam("dispatcher", "ds_probing_mode", 3)
 
 
# ----- pv params -----
modparam("pv", "shvset", "maintenance=i:0")
modparam("pv", "shvset", "virtualIP1=i:0")
modparam("pv", "shvset", "virtualIP2=i:0")
 
 
# ----- nathelper params -----
modparam("nathelper|registrar", "received_avp", "$avp(RECEIVED)")
# Note: leaving NAT pings turned off here as nathelper is only being used for
#       WebSocket connections. NAT pings are not needed as WebSockets have
#       their own keep-alives.
 
 
# ----- rtpengine params -----
modparam("rtpengine", "rtpengine_sock", "udp:localhost:2223")
 
modparam("rtpengine", "rtpengine_sock", "udp:localhost:2223")
#modparam("rtpengine", "write_sdp_pv", "$avp(sdp)")
 
 
#modparam("rtpengine", "force_send_interface", SERVER_IP_ADDR)
#modparam("rtpengine", "setid_default", -1)
#modparam("rtpengine", "rtp_inst_pvar", "$avp(RTPENGINE)")
#modparam("rtpengine", "rtpengine_retr", 5)
#modparam("rtpengine", "queried_nodes_limit", 5)
#modparam("rtpengine", "rtpengine_allow_op", 1)
#modparam("rtpengine", "hash_table_size", MAX_CONNECTIONS)
#modparam("rtpengine", "hash_table_tout", 7200)
 
 
modparam("tls", "private_key", "<cert path>")
modparam("tls", "certificate", "<cert path>")
modparam("tls", "ca_list", "<cert path>")
 
# modparam("tls", "ca_list", "<cert path>")
 
modparam("tls", "tls_method", "TLSv1+")
 
 
####### Routing Logic ########
 
 
 
If load module lines for TLS are move to near the top of the config file, config will parse and non-SIPS calls will work
loadmodule "sl.so"
loadmodule "tls.so"
 
But logs will show
WARNING: <core> [main.c:2985]: main(): tls support enabled, but no tls engine  available (forgot to load the tls module?)
WARNING: <core> [main.c:2987]: main(): disabling tls...
 
Presumably loading the module before configuring it just gives it default values so the latter config is ignored
 
 
 
Any advice on the matter would be appreciated
 
 
Thanks in advance,
Chris
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users at lists.kamailio.org<mailto:sr-users at 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
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users at lists.kamailio.org<mailto:sr-users at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220323/4d2d15a7/attachment-0001.htm>
 
------------------------------
 
Message: 4
Date: Wed, 23 Mar 2022 20:16:03 +0000
From: Daniel Paape <dpaape at amtelco.com>
To: "sr-users at lists.kamailio.org" <sr-users at lists.kamailio.org>
Subject: [SR-Users] bug in tm module?
Message-ID:
<CO6PR13MB5321D941E99DE2BA6702E24BC9189 at CO6PR13MB5321.namprd13.prod.outlook.com>
Content-Type: text/plain; charset="iso-8859-1"
 
Hello
I'm running K5.5.3 and have checked the 'issues' link in github and saw nothing regarding what I am seeing.  I think that there is a bug in the tm module with respect to the "tm:local-response" event route.  In the "t_reply.c" file, there is a static variable called '_tm_local_response_set_lookup'.  This variable is initialized at load time to zero.  It is checked in the '_reply_light()' routine and will initiate a local callback from the config script if "armed".  The problem as I see it is that if the callback is readied, the variable is set to one.  But it is never reset.
So the practical outworking is as follows.  A register is received and the request_route arms the callback.  The register requires an authorization (local database sqlite).  After the 401 is sent back, the callback via the module event route is called as expected.  All good except that the module event route script fragment is never executed again after the first call.
I'm no expert on the tm module but I would think that somewhere in there, the variable should be reset to zero so that subsequent transactions can initiate the event route again.
 
thanks for any help,
Dan
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220323/a0311764/attachment-0001.htm>
 
------------------------------
 
Message: 5
Date: Wed, 23 Mar 2022 20:21:26 +0000
From: Henning Westerholt <hw at gilawa.com>
To: "Kamailio (SER) - Users Mailing List"
<sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] bug in tm module?
Message-ID:
<PAXPR05MB8558B125061A99B7E6A3D352BF189 at PAXPR05MB8558.eurprd05.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"
 
Hello,
 
If you think there is a bug in the tm module, you could create an issue in our tracker here: https://github.com/kamailio/kamailio/issues/new?assignees=&labels=&template=bug_report.md
 
Please also add some description of the wrong behaviour that you are seeing in the server to it.
 
Thanks,
 
Henning
 
From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Daniel Paape
Sent: Wednesday, March 23, 2022 9:16 PM
To: sr-users at lists.kamailio.org
Subject: [SR-Users] bug in tm module?
 
Hello
I'm running K5.5.3 and have checked the 'issues' link in github and saw nothing regarding what I am seeing.  I think that there is a bug in the tm module with respect to the "tm:local-response" event route.  In the "t_reply.c" file, there is a static variable called '_tm_local_response_set_lookup'.  This variable is initialized at load time to zero.  It is checked in the '_reply_light()' routine and will initiate a local callback from the config script if "armed".  The problem as I see it is that if the callback is readied, the variable is set to one.  But it is never reset.
So the practical outworking is as follows.  A register is received and the request_route arms the callback.  The register requires an authorization (local database sqlite).  After the 401 is sent back, the callback via the module event route is called as expected.  All good except that the module event route script fragment is never executed again after the first call.
I'm no expert on the tm module but I would think that somewhere in there, the variable should be reset to zero so that subsequent transactions can initiate the event route again.
 
thanks for any help,
Dan
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220323/61051c0f/attachment-0001.htm>
 
------------------------------
 
Message: 6
Date: Thu, 24 Mar 2022 07:39:26 +0100
From: Arek ?azarczyk <arek at lazarczyk.org.pl>
To: sr-users at lists.kamailio.org
Subject: [SR-Users] carrierroute with non-numeric characters
Message-ID: <a20892cf-fa42-eefe-2bea-b75a74e3196d at lazarczyk.org.pl>
Content-Type: text/plain; charset=UTF-8; format=flowed
 
Hi,
 
I'm in a process of long overdue update of kamailio from 4.3 to 5.5, 
after update i can not start kamailio casue:
 
Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: INFO: 
carrierroute [cr_data.c:456]: add_route(): adding prefix TR, prob 1.000000
Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: INFO: 
carrierroute [cr_data.c:469]: add_route(): found carrier and domain, now 
adding route
Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: ERROR: 
carrierroute [cr_domain.c:166]: add_route_to_tree(): cannot insert route 
flags into d-trie
Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: ERROR: <core> 
[dtrie.c:138]: dtrie_insert(): cannot insert non-numerical character
Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: ERROR: 
carrierroute [cr_data.c:179]: reload_route_data(): could not load 
routing data
Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: ERROR: 
carrierroute [carrierroute.c:240]: mod_init(): could not prepare route data
 
I know that string TR is non-numeric data ;) but i have thoes routes 
deep in my infrastructure logic so i just can not change them to some 
numbers, is there any way i can resolve this without changeing routes in 
my whole infrastrucure (almost 50 servers)?
 
 
Please help :)
 
 
-- 
Arek ?azarczyk
 
 
 
 
------------------------------
 
Message: 7
Date: Thu, 24 Mar 2022 07:07:35 +0000
From: Henning Westerholt <hw at gilawa.com>
To: "Kamailio (SER) - Users Mailing List"
<sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] carrierroute with non-numeric characters
Message-ID:
<PAXPR05MB8558847862B2480F6CC9E2EABF199 at PAXPR05MB8558.eurprd05.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"
 
Hello,
 
give this parameter a try:
 
https://kamailio.org/docs/modules/5.5.x/modules/carrierroute.html#idm173
 
If it also not works with this parameter set to 128 and its used to work on 4.3, its probably a code regression. Please open an issue on our GitHub tracker about it then.
 
Cheers,
 
Henning
 
-- 
Henning Westerholt ? https://skalatan.de/blog/
Kamailio services ? https://gilawa.com
 
-----Original Message-----
From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Arek Lazarczyk
Sent: Thursday, March 24, 2022 7:39 AM
To: sr-users at lists.kamailio.org
Subject: [SR-Users] carrierroute with non-numeric characters
 
Hi,
 
I'm in a process of long overdue update of kamailio from 4.3 to 5.5, after update i can not start kamailio casue:
 
Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: INFO: 
carrierroute [cr_data.c:456]: add_route(): adding prefix TR, prob 1.000000 Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: INFO: 
carrierroute [cr_data.c:469]: add_route(): found carrier and domain, now adding route Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: ERROR: 
carrierroute [cr_domain.c:166]: add_route_to_tree(): cannot insert route flags into d-trie Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: ERROR: <core>
[dtrie.c:138]: dtrie_insert(): cannot insert non-numerical character Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: ERROR: 
carrierroute [cr_data.c:179]: reload_route_data(): could not load routing data Mar 24 07:30:13 DEV-SBC-FE1 /usr/sbin/kamailio[22768]: ERROR: 
carrierroute [carrierroute.c:240]: mod_init(): could not prepare route data
 
I know that string TR is non-numeric data ;) but i have thoes routes deep in my infrastructure logic so i just can not change them to some numbers, is there any way i can resolve this without changeing routes in my whole infrastrucure (almost 50 servers)?
 
 
Please help :)
 
 
--
Arek ?azarczyk
 
 
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users at 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
 
------------------------------
 
Message: 8
Date: Thu, 24 Mar 2022 08:42:20 +0100
From: Arek ?azarczyk <arek at lazarczyk.org.pl>
To: Henning Westerholt <hw at gilawa.com>, "Kamailio (SER) - Users
Mailing List" <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] carrierroute with non-numeric characters
Message-ID: <97be0b82-e083-673b-1e2b-f11a62692f34 at lazarczyk.org.pl>
Content-Type: text/plain; charset=UTF-8; format=flowed
 
Thanks, that worked :) , i've must missed that parameter during initial 
config.
 
BR,
A?.
 
W dniu 24.03.2022 o?08:07, Henning Westerholt pisze:
> Hello,
>
> give this parameter a try:
>
> https://kamailio.org/docs/modules/5.5.x/modules/carrierroute.html#idm173
>
> If it also not works with this parameter set to 128 and its used to work on 4.3, its probably a code regression. Please open an issue on our GitHub tracker about it then.
>
> Cheers,
>
> Henning
>
 
-- 
Arek ?azarczyk
 
 
 
 
------------------------------
 
Message: 9
Date: Thu, 24 Mar 2022 07:58:10 +0000
From: Henning Westerholt <hw at gilawa.com>
To: Arek ?azarczyk <arek at lazarczyk.org.pl>, "Kamailio (SER) - Users
Mailing List" <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] carrierroute with non-numeric characters
Message-ID:
<PAXPR05MB8558EA2CE9C0F379042C9DBABF199 at PAXPR05MB8558.eurprd05.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"
 
Great, thanks for the feedback.
 
Henning
 
-----Original Message-----
From: Arek ?azarczyk <arek at lazarczyk.org.pl> 
Sent: Thursday, March 24, 2022 8:42 AM
To: Henning Westerholt <hw at gilawa.com>; Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] carrierroute with non-numeric characters
 
Thanks, that worked :) , i've must missed that parameter during initial config.
 
BR,
A?.
 
W dniu 24.03.2022 o?08:07, Henning Westerholt pisze:
> Hello,
>
> give this parameter a try:
>
> https://kamailio.org/docs/modules/5.5.x/modules/carrierroute.html#idm1
> 73
>
> If it also not works with this parameter set to 128 and its used to work on 4.3, its probably a code regression. Please open an issue on our GitHub tracker about it then.
>
> Cheers,
>
> Henning
>
 
--
Arek ?azarczyk
 
 
------------------------------
 
Subject: Digest Footer
 
_______________________________________________
sr-users mailing list
sr-users at lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
 
 
------------------------------
 
End of sr-users Digest, Vol 202, Issue 25
*****************************************
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220324/c7d761dd/attachment.htm>


More information about the sr-users mailing list