Hello all,
I've come across the following issue with topos on Kamailio 5.1.0-rc2.
### Description
Kamailio acts as a proxy for asterisk instances residing in a private IP range. Asterisk's peers are configured with their public IP address or hostname, but asterisk will dispatch requests to them to kamailio instead (because kamailio's IP is set in outboundproxy option in peer definition).
This works fine for INVITEs, but if qualify=yes is set for the peer, asterisk will send out OPTIONs to monitor these peers. If the topos module is loaded, 200 OK replies to these OPTIONs will be malformed when forwarded from kamailio to asterisk (no Via header present). Disabling the topos module will resolve this.
### Troubleshooting
#### Reproduction
Configure a peer in asterisk with outboundproxy option set to kamailio's IP address. Set qualify=yes.
Adjust kamailio's default configuration so that OPTIONs to other hosts besides itself are routed. Change the following section in request_route:
```
if ($rU==$null) {
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}
```
to:
```
if ( ($rU==$null) && !(is_method("OPTIONS")) ) {
# request with no Username in RURI
sl_send_reply("484","Address Incomplete");
exit;
}
# Permit asterisk's monitoring using options
if(is_method("OPTIONS") && uri!=myself) {
route(RELAY);
}
```
Enable and configure the topos module with database.
#### SIP Traffic
asterisk:5060 -> kamailio:5060
```
OPTIONS sip:peer.domain.tld SIP/2.0
Via: SIP/2.0/UDP asterisk:5060;branch=z9hG4bK460330cf;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@domain.tld>;tag=as690c2406
To: <sip:peer.domain.tld>
Contact: <sip:asterisk@asterisk:5060>
Call-ID: 6548f43b2d8740122186bb0c6e72ac78(a)domain.tld
CSeq: 102 OPTIONS
User-Agent: myUA
Date: Sun, 03 Dec 2017 00:39:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
```
kamailio:5060 -> peer:5060
```
OPTIONS sip:peer.domain.tld SIP/2.0
Via: SIP/2.0/UDP kamailio:5060;branch=z9hG4bK460330cf;rport
Max-Forwards: 69
From: "asterisk" <sip:asterisk@domain.tld>;tag=as690c2406
To: <sip:peer.domain.tld>
Contact: <sip:asterisk@asterisk:5060>
Call-ID: 6548f43b2d8740122186bb0c6e72ac78(a)domain.tld
CSeq: 102 OPTIONS
User-Agent: myUA
Date: Sun, 03 Dec 2017 00:39:38 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
```
peer:5060 -> kamailio:5060
```
SIP/2.0 200 OK
Via: SIP/2.0/UDP kamailio;branch=z9hG4bKda8d.cc03bd2def8ad36e8c43f61ab31a636f.0;received=kamailio;rport=5060
From: "asterisk" <sip:asterisk@domain.tld>;tag=as690c2406
To: <sip:peer.domain.tld>;tag=as472874ee
Call-ID: 6548f43b2d8740122186bb0c6e72ac78(a)domain.tld
CSeq: 102 OPTIONS
Server: myUA
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:peer:5060>
Accept: application/sdp
Content-Length: 0
```
**kamailio:5060 -> asterisk:5060: Missing Via Header**
```
SIP/2.0 200 OK
From: "asterisk" <sip:asterisk@domain.tld>;tag=as690c2406
To: <sip:peer.domain.tld>;tag=as472874ee
Call-ID: 6548f43b2d8740122186bb0c6e72ac78(a)domain.tld
CSeq: 102 OPTIONS
Server: myUA
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Contact: <sip:peer:5060>
Accept: application/sdp
Content-Length: 0
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.1.0-rc2 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 6.3.0
```
* **Operating System**:
```
Debian 9.1
```
* **Other pertinent configuration information**:
This kamailio box has several network interfaces. mhomed is not used, instead force_send_socket is called where necessary. I'm mentioning this in case it's what might trigger this issue with topos.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1350
The db_redis module seems to only support connecting with a single redis instance. It is not evident from the documentation if it implements support for native redis cluster by honouring 'MOVED' replies.
ndb_redis seems to have support for native redis clusters, and supports both automatic (see allow_dynamic_nodes parameter of ndb_redis) and manual configuration of redis nodes.
Since both modules are based on the hiredis library, is it safe to assume this support could be easily implemented, with some code sharing between the two modules perhaps?
If db_redis supports clusters with automatic configuration only (by processing MOVED replies), perhaps the module's documentation should be updated to reflect that.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1997
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Removed not used variable "route_mode" in the tm module. This was discovered by @IvanRibakov when using a g++ compiler, which added more strict flags (Ivan's Github is [here](https://github.com/IvanRibakov))
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2406
-- Commit Summary --
* tm - remove not used route_mode var
-- File Changes --
M src/modules/tm/tm_load.h (1)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2406.patchhttps://github.com/kamailio/kamailio/pull/2406.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2406
### Description
<!--
On every startup of Kamailio I'm getting an error im my Log when Kamailio is going to load the globalblacklist table from MySQL Database
I tested this with version 5.4.1 build from git source.
With version 5.3.6 there are no errors like this. I diffed the source of userblacklist.c and saw some changes in the code. So there may be a bug.
-->
### Troubleshooting
#### Reproduction
<!--
Create a simple config an use check_blacklist()
Use db_mysql as database backend
-->
#### Debugging Data
#### Log Messages
```
Sep 17 07:56:36 voip-lab-proxy03 /usr/sbin/kamailio[553]: DEBUG: <core> [core/route.c:885]: fix_actions(): fixing check_blacklist()
Sep 17 07:56:36 voip-lab-proxy03 /usr/sbin/kamailio[553]: DEBUG: userblacklist [userblacklist.c:472]: add_source(): add table globalblacklist
Sep 17 07:56:36 voip-lab-proxy03 /usr/sbin/kamailio[553]: DEBUG: <core> [dtrie.c:57]: dtrie_init(): allocate 16 bytes for root at 0x7fc29efa4ab0
Sep 17 07:56:36 voip-lab-proxy03 /usr/sbin/kamailio[553]: DEBUG: <core> [dtrie.c:67]: dtrie_init(): allocate 80 bytes for 10 root children pointer at 0x7fc29efa4b28
Sep 17 07:56:36 voip-lab-proxy03 /usr/sbin/kamailio[553]: ERROR: <core> [db.c:481]: db_use_table(): invalid parameter value
Sep 17 07:56:36 voip-lab-proxy03 /usr/sbin/kamailio[553]: ERROR: userblacklist [db.c:123]: db_reload_source(): cannot use db table 'globalblacklist'
Sep 17 07:56:36 voip-lab-proxy03 /usr/sbin/kamailio[553]: ERROR: userblacklist [userblacklist.c:425]: load_source(): cannot load source from 'globalblacklist'
```
### Additional Information
```
Kamailio 5.4.1
```
* **Operating System**:
```
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Linux voip-lab-proxy03 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2480
### Description
According to design logic HELD request need to send a carrier LIS server. Now lost module sends this request to the preconfigured server via `http_client/httpcon` param.
I prefer to use dynamic LIS server discovery according to [rfc7216#section-4](https://tools.ietf.org/html/rfc7216#section-4) and [rfc5986#section-4](https://tools.ietf.org/html/rfc5986#section-4).
So dynamic LIS discovery works as:
1. Kamailio send reverse `.in-addr.arpa.` or `.ip6.arpa.` DNS request and caller host DNS name;
2. Kamailio send `LIS:HELD` NAPTR request for a resolved caller hostname and LIS server.
3. Kamailio send HELD request for resolved LIS address.
So do get working dynamic LIS discovery required to implement two DNS requests.
If any DNS request will fail, then `lost_held_query` function returns an error code.
To define required dynamic LIS discovery I suggest use an empty string ("") or NULL value ($null) as the first ("con") function param.
This feature request for discussion with lost module author (Wolfgang Kampichler @wkampich) and other interest devs.
The ticket may be closed at any time.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2574
**Description**
facing crashes the server, raised by qm_debug_check_frag().
**Troubleshooting**
The error message:
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbdc31f360, fd 31166
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbcbf232a8, fd 31326
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbd990b9e8, fd 31327
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbd89cd1d8, fd 31360
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbcf0bab28, fd 31434
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbc6e031b0, fd 31471
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbdb7fd598, fd 31472
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbdeb334c8, fd 31494
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbddee6de8, fd 31524
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbdb91ef70, fd 31576
Jan 23 12:27:26 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: ERROR: <core> [core/tcp_main.c:4451]: handle_tcpconn_ev(): io_watch_del(3) failed: for 0x7fdbc76a1da8, fd 31690
Jan 23 12:27:31 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: CRITICAL: <core> [core/io_wait.h:596]: io_watch_del(): invalid fd 31327, not in [0, 2054)
Jan 23 12:27:31 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: CRITICAL: <core> [core/io_wait.h:596]: io_watch_del(): invalid fd 31360, not in [0, 2054)
Jan 23 12:27:31 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2893]: CRITICAL: <core> [core/io_wait.h:596]: io_watch_del(): invalid fd 31434, not in [0, 2054)
Jan 23 12:28:09 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2809]: ALERT: <core> [main.c:777]: handle_sigs(): child process 2858 exited by a signal 6
Jan 23 12:28:09 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2809]: ALERT: <core> [main.c:780]: handle_sigs(): core was generated
Jan 23 12:28:09 fep-1 /usr/local/fep-kamailio/sbin/kamailio[2809]: CRITICAL: <core> [core/mem/q_malloc.c:138]: qm_debug_check_frag(): BUG: qm: fragm. 0x7fdbd7e8a0e8 (address 0x7fdbd7e8a120) end overwritten (5fd4cd2e, abcdefed)! Memory allocator was called from core: core/usr_avp.c:626. Fragment marked by core: core/usr_avp.c:175. Exec from core/mem/q_malloc.c:511.
The output from GDB:
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-110.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/local/fep-kamailio/sbin/kamailio...done.
[New LWP 2809]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `/usr/local/fep-kamailio/sbin/kamailio -f /usr/local/fep-kamailio/etc/kamailio/k'.
Program terminated with signal 6, Aborted.
#0 0x00007fde7acbf277 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install cyrus-sasl-lib-2.1.26-21.el7.x86_64 glibc-2.17-222.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-19.el7.x86_64 libcom_err-1.42.9-12.el7_5.x86_64 libcurl-7.29.0-54.el7.x86_64 libgcc-4.8.5-36.el7_6.1.x86_64 libidn-1.28-4.el7.x86_64 libselinux-2.5-12.el7.x86_64 libssh2-1.4.3-10.el7_2.1.x86_64 libstdc++-4.8.5-36.el7_6.1.x86_64 libunistring-0.9.3-9.el7.x86_64 nspr-4.21.0-1.el7.x86_64 nss-3.44.0-4.el7.x86_64 nss-softokn-freebl-3.44.0-5.el7.x86_64 nss-util-3.44.0-3.el7.x86_64 openldap-2.4.44-5.el7.x86_64 openssl-libs-1.0.2k-12.el7.x86_64 pcre-8.32-17.el7.x86_64 zlib-1.2.7-17.el7.x86_64
(gdb) bt
#0 0x00007fde7acbf277 in raise () from /lib64/libc.so.6
#1 0x00007fde7acc0968 in abort () from /lib64/libc.so.6
#2 0x00000000006d7c95 in qm_debug_check_frag (qm=0x7fdbc25ae000, f=0x7fdbd7e8a0e8, file=0x817155 "core: core/usr_avp.c", line=626, efile=0x83f7c5 "core/mem/q_malloc.c", eline=511) at core/mem/q_malloc.c:140
#3 0x00000000006db99e in qm_free (qmp=0x7fdbc25ae000, p=0x7fdbd7e8a120, file=0x817155 "core: core/usr_avp.c", func=0x8189a0 <__FUNCTION__.8526> "destroy_avp_list_unsafe", line=626, mname=0x817150 "core") at core/mem/q_malloc.c:511
#4 0x00000000005e7ede in destroy_avp_list_unsafe (list=0x7fdbd7e8a950) at core/usr_avp.c:626
#5 0x00007fde38d4bd8f in free_cell_helper (dead_cell=0x7fdbd7e8a750, silent=1, fname=0x7fde38e4267f "h_table.c", fline=466) at h_table.c:255
#6 0x00007fde38d4c9e1 in free_hash_table () at h_table.c:466
#7 0x00007fde38df9cd0 in tm_shutdown () at t_funcs.c:88
#8 0x0000000000581960 in destroy_modules () at core/sr_module.c:746
#9 0x000000000041cda7 in cleanup (show_status=1) at main.c:563
#10 0x000000000041e682 in shutdown_children (sig=15, show_status=1) at main.c:706
#11 0x0000000000421715 in handle_sigs () at main.c:806
#12 0x000000000042b9a7 in main_loop () at main.c:1817
#13 0x0000000000433b96 in main (argc=9, argv=0x7ffea05cd2c8) at main.c:2856
(gdb) bt full
#0 0x00007fde7acbf277 in raise () from /lib64/libc.so.6
No symbol table info available.
#1 0x00007fde7acc0968 in abort () from /lib64/libc.so.6
No symbol table info available.
#2 0x00000000006d7c95 in qm_debug_check_frag (qm=0x7fdbc25ae000, f=0x7fdbd7e8a0e8, file=0x817155 "core: core/usr_avp.c", line=626, efile=0x83f7c5 "core/mem/q_malloc.c", eline=511) at core/mem/q_malloc.c:140
p = 0x7ffea05cc3b0
__FUNCTION__ = "qm_debug_check_frag"
#3 0x00000000006db99e in qm_free (qmp=0x7fdbc25ae000, p=0x7fdbd7e8a120, file=0x817155 "core: core/usr_avp.c", func=0x8189a0 <__FUNCTION__.8526> "destroy_avp_list_unsafe", line=626, mname=0x817150 "core") at core/mem/q_malloc.c:511
qm = 0x7fdbc25ae000
f = 0x7fdbd7e8a0e8
size = 408
next = 0x7fdbd7e8a5c8
prev = 0x7fdbd7e8a1d8
__FUNCTION__ = "qm_free"
#4 0x00000000005e7ede in destroy_avp_list_unsafe (list=0x7fdbd7e8a950) at core/usr_avp.c:626
avp = 0x7fdbd7e8a080
foo = 0x7fdbd7e8a120
__FUNCTION__ = "destroy_avp_list_unsafe"
#5 0x00007fde38d4bd8f in free_cell_helper (dead_cell=0x7fdbd7e8a750, silent=1, fname=0x7fde38e4267f "h_table.c", fline=466) at h_table.c:255
b = 0x0
i = 1
rpl = 0x0
tt = 0x0
foo = 0x7fde34a5df80 <__FUNCTION__.7259>
cbs = 0x0
cbs_tmp = 0x7fde388fe570
__FUNCTION__ = "free_cell_helper"
#6 0x00007fde38d4c9e1 in free_hash_table () at h_table.c:466
p_cell = 0x7fdbd7e8a750
tmp_cell = 0x7fdbc27e3060
i = 40845
__FUNCTION__ = "free_hash_table"
#7 0x00007fde38df9cd0 in tm_shutdown () at t_funcs.c:88
__FUNCTION__ = "tm_shutdown"
#8 0x0000000000581960 in destroy_modules () at core/sr_module.c:746
t = 0x7fde3c51e4c0
foo = 0x7fde3c51e020
__FUNCTION__ = "destroy_modules"
#9 0x000000000041cda7 in cleanup (show_status=1) at main.c:563
memlog = 0
__FUNCTION__ = "cleanup"
#10 0x000000000041e682 in shutdown_children (sig=15, show_status=1) at main.c:706
__FUNCTION__ = "shutdown_children"
#11 0x0000000000421715 in handle_sigs () at main.c:806
chld = 0
chld_status = 134
any_chld_stopped = 1
memlog = -1027733624
__FUNCTION__ = "handle_sigs"
#12 0x000000000042b9a7 in main_loop () at main.c:1817
i = 10
pid = 2893
si = 0x0
si_desc = "udp receiver child=9 sock=10.50.7.18:5060\000:0:0:1]:5060\000:5060)\000\000\000\004\000\000\000\000\000\000\000\000\340Z\302\333\177\000\000\000\000\000\000\000\000\000\000 \006\276\302\333\177\000\000`\315\\\240\376\177\000\000\220\006\276\302\333\177\000\000r\fb3\336\177\000\000P\246\222<\336\177\000"
nrprocs = 10
woneinit = 1
__FUNCTION__ = "main_loop"
#13 0x0000000000433b96 in main (argc=9, argv=0x7ffea05cd2c8) at main.c:2856
**Additional Information**
Kamailio Version - output of Kamailio -v
version: kamailio 5.4.2 (x86_64/linux) f8885c
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_BLACKLIST, 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: f8885c
compiled on 04:30:53 Dec 16 2020 with gcc 4.8.5
**Operating System:**
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
**Note:**
It looks similar to the following issue
https://github.com/kamailio/kamailio/issues/2503
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2607
### Description
Kamailio server has two legs that are connected to different networks.
I'm using Kamailio v.5.2.3 and the "enable_double_rr" is implicitly set to "1".
The leg "A" IP address is 10.28.80.1
The leg "B" IP address is 192.168.9.103
The call is initiated from 10.28.80.47
According to the "rr" module documentation, function record_route()
should insert two "Record_Route" header fields when a request is
accepted on one leg is should go out via the second leg. This works as
expected in case of UDP protocol:
INVITE sip:2601@192.168.0.178:49162;transport=udp SIP/2.0
Record-Route: <sip:192.168.9.103;r2=on;lr;did=e2c.a191>
Record-Route: <sip:10.28.80.1;r2=on;lr;did=e2c.a191>
Via: SIP/2.0/UDP 192.168.9.103;branch=z9hG4bKcfa5.d64ecbd87d5315b5993c4ccf16f86537.0
Via: SIP/2.0/UDP 10.28.80.47:5060;rport=5060;branch=z9hG4bK3a9e9a4d
But when the TCP protocol is used AND "listen" parameters are defined:
listen=udp:10.28.80.1:5060
listen=tcp:10.28.80.1:5060
listen=udp:192.168.9.103:5060
listen=tcp:192.168.9.103:5060
then the outbound message looks like this:
INVITE sip:2601@192.168.0.178:48758;transport=tcp SIP/2.0
Record-Route: <sip:10.28.80.1;transport=tcp;lr;did=bcd.72f>
Via: SIP/2.0/TCP 10.28.80.1;branch=z9hG4bKb9ca.26ea08654c9dbc32bb0dc6e3b6f92d45.0;i=3
Via: SIP/2.0/TCP 10.28.80.47:5060;rport=33976;branch=z9hG4bK5291fab1
There are two problems there:
a) only one Record-Route with leg "A" is inserted
b) the added "Via" header field contains the leg "A" IP address instead of expected leg "B" IP address (192.168.9.103). In the LAN trace, I see that in reality the message was sent from leg "B".
IMPORTANT: The problem occurs only when the "listen" parameters are defined in the Kamailio configuration. When the "listens" are not configured then everything works correctly.
### Troubleshooting
#### Reproduction
#### Debugging Data
#### Log Messages
http://updates.xorcom.com/~xorcom/kam-tcp-problem.tar.gz
The archive contains the following files:
* syslog-bad.log and bad.cap - Kamailio log and tcpdump trace of a call when the problem occurs
* syslog-good.log and good.cap - Kamailio log and tcpdump trace of a call when the problem doesn't occur
#### SIP Traffic
### Possible Solutions
### Additional Information
kamailio -v
version: kamailio 5.2.3 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, 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_BLACKLIST, 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: unknown
compiled with gcc 7.3.0
***Operating System**:
Ubuntu 18.0.4
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2033
### Description
Could you extend `import_file` directive to support wildcards like
```
import_file "/run/kamailio/cfg/*"
```
This will allow place runtime config files with public IP of VM. Useful for cloud installation.
```
listen=udp:eth0 advertise 52.24.72.57:5060
listen=tcp:eth0 advertise 52.24.72.57:5060
```
### Expected behavior
All files matched to wildcard included into config
#### Actual observed behavior
wildcard ignored
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2125
### Description
We have some JS code looping over all P-Asserted-Identity headers removing some of the entries:
```
let headerIndex = 0;
const telUriMatcher = new RegExp("tel:");
let paiValue = ksr.pv
.gete("$(hdr(P-Asserted-Identity)[" + headerIndex + "])")
.toString();
while (paiValue.length > 0) {
ksr.info(
`${ksr.pv.getw("$ci")}: Found P-A-I header with content <${ksr.pv.getw(
"$(hdr(P-Asserted-Identity)[" + headerIndex + "])"
)}> at index ${headerIndex}\n`
);
if (telUriMatcher.test(paiValue)) {
ksr.info(
`${ksr.pv.getw("$ci")}: Removed P-A-I header ${ksr.pv.getw(
"$(hdr(P-Asserted-Identity)[" + headerIndex + "])"
)}\n`
);
ksr.textopsx.remove_hf_value(
"P-Asserted-Identity[" + headerIndex + "]"
);
}
headerIndex++;
paiValue = ksr.pv
.gete("$(hdr(P-Asserted-Identity)[" + headerIndex + "])")
.toString();
}
```
In our tests, we wanted to remove the second header, but the first one got removed instead. The pseudovars docs say, the index of a header is 0-based. In textopsx docs it doesn't explicitly say, it's 1-based, but the first example shows it actually is.
### Possible Solutions
Right now, we replaced the line
```
ksr.textopsx.remove_hf_value("P-Asserted-Identity[" + headerIndex + "]");
```
with this one:
```
ksr.textopsx.remove_hf_value("P-Asserted-Identity[" + (headerIndex + 1) + "]");
```
This solves the problem, but it is not what we would expect. Both header access methods should use the same index base.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.3.5 (x86_64/linux)
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_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
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: unknown
compiled with gcc 8.3.0
```
* **Operating System**:
<!--
Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...;
Kernel details (output of `uname -a`)
-->
```
Linux hostname 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2387
Is it possible to specify a specific server name/server id for dispatcher to use to send pings with (and in outgoing requests)
It seems I can't (or haven't noticed in the docs) an event route I could use to set the xavp, as tm:local-request happens to late to use there. As an aside why isn't there a "last chance before send" event route?
This is probably a feature request more than a bug, as the ideal solution from my point of view would be an additional dispatcher attrs value to be able to set it per destination in the underlying dispatcher data
Judging by the output from tls module dbg the tls xavps are checked, before the ping is sent..
I've had a cursery glance at dispatch.c and it seems easy enough to add an extra attr parameter but I'm ata loss as to how I would preset the server name/id xavp... (I'm no c dev, but can Google quick enough to follow along mostly, and happy to fiddle away if anyone can be kind enough to give me some pointers in the right direction)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2591