version: kamailio 5.5.6 (x86_64/linux) 21a9bc
Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.10.0-22-amd64
we see this core it has repeated some times in different days
```
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007fde2329f537 in __GI_abort () at abort.c:79
#2 0x000055d5fab45995 in sig_alarm_abort (signo=14) at main.c:699
#3 <signal handler called>
#4 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:37
#5 0x00007fde1c80a015 in futex_get (lock=0x7fdd9f9c9ca4) at ../../core/mem/../futexlock.h:108
#6 0x00007fde1c80c526 in destroy_linkers (linker=0x0) at dlg_profile.c:275
#7 0x00007fde1c7f87b3 in destroy_dlg (dlg=0x7fddad479ea0) at dlg_hash.c:377
#8 0x00007fde1c7f8ca0 in destroy_dlg_table () at dlg_hash.c:438
#9 0x00007fde1c790286 in mod_destroy () at dialog.c:809
#10 0x000055d5fad76dd8 in destroy_modules () at core/sr_module.c:842
#11 0x000055d5fab440e2 in cleanup (show_status=1) at main.c:575
#12 0x000055d5fab45d45 in shutdown_children (sig=15, show_status=1) at main.c:718
#13 0x000055d5fab49129 in handle_sigs () at main.c:816
#14 0x000055d5fab56959 in main_loop () at main.c:1903
#15 0x000055d5fab602e9 in main (argc=15, argv=0x7ffd9451bbb8) at main.c:3061
(gdb) bt full
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
set = {__val = {8192, 0 <repeats 15 times>}}
pid = <optimized out>
tid = <optimized out>
ret = <optimized out>
#1 0x00007fde2329f537 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0 <repeats 16 times>}}, sa_flags = 0, sa_restorer = 0x55d5faf6b088}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x000055d5fab45995 in sig_alarm_abort (signo=14) at main.c:699
__func__ = "sig_alarm_abort"
#3 <signal handler called>
No locals.
#4 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:37
No locals.
#5 0x00007fde1c80a015 in futex_get (lock=0x7fdd9f9c9ca4) at ../../core/mem/../futexlock.h:108
v = 2
i = 1024
#6 0x00007fde1c80c526 in destroy_linkers (linker=0x0) at dlg_profile.c:275
p_entry = 0x7fdd9f9c9d88
l = 0x7fddd2aca430
lh = 0x55d5faf81a03
__func__ = "destroy_linkers"
#7 0x00007fde1c7f87b3 in destroy_dlg (dlg=0x7fddad479ea0) at dlg_hash.c:377
ret = 1
var = 0x7fde1c719a44 <mod_destroy+859>
--Type <RET> for more, q to quit, c to continue without paging--
__func__ = "destroy_dlg"
#8 0x00007fde1c7f8ca0 in destroy_dlg_table () at dlg_hash.c:438
dlg = 0x0
l_dlg = 0x7fddad479ea0
i = 0
__func__ = "destroy_dlg_table"
#9 0x00007fde1c790286 in mod_destroy () at dialog.c:809
No locals.
#10 0x000055d5fad76dd8 in destroy_modules () at core/sr_module.c:842
t = 0x7fde1f328018
foo = 0x7fde1f327838
__func__ = "destroy_modules"
#11 0x000055d5fab440e2 in cleanup (show_status=1) at main.c:575
memlog = 0
__func__ = "cleanup"
#12 0x000055d5fab45d45 in shutdown_children (sig=15, show_status=1) at main.c:718
__func__ = "shutdown_children"
#13 0x000055d5fab49129 in handle_sigs () at main.c:816
chld = 0
chld_status = 139
any_chld_stopped = 1
memlog = 0
__func__ = "handle_sigs"
#14 0x000055d5fab56959 in main_loop () at main.c:1903
i = 14
pid = 3845341
--Type <RET> for more, q to quit, c to continue without paging--
si = 0x0
si_desc = "udp receiver child=13 sock=87.237.87.28:5060\000\000\000\000\300\272Q\224\375\177\000\000\000\000\000\000\000\000\000\000\003\032\370\372\325U\000\000-\000\000\000\000\000\000\000\200\003\062\037\336\177\000\000F\034\067#\336\177\000\000\060\000\000\000\060\000\000\000x\266Q\224\375\177\000\000\220\265Q\224\375\177\000\000\000\230\026︾\314\""
nrprocs = 14
woneinit = 1
__func__ = "main_loop"
#15 0x000055d5fab602e9 in main (argc=15, argv=0x7ffd9451bbb8) at main.c:3061
cfg_stream = 0x55d5fbd3f2e0
c = -1
r = 0
tmp = 0x7ffd9451ce7c ""
tmp_len = 832
port = 832
proto = 832
ahost = 0x0
aport = 0
options = 0x55d5faf6e0b8 ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 4110196155
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0x98000000980
p = 0xc2 <error: Cannot access memory at address 0xc2>
st = {st_dev = 23, st_ino = 946, st_nlink = 2, st_mode = 16832, st_uid = 0, st_gid = 998, __pad0 = 0, st_rdev = 0, st_size = 140, st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1696021490, tv_nsec = 675255852},
--Type <RET> for more, q to quit, c to continue without paging--
st_mtim = {tv_sec = 1696418622, tv_nsec = 168794592}, st_ctim = {tv_sec = 1696418622, tv_nsec = 168794592}, __glibc_reserved = {0, 0, 0}}
tbuf = "P\267Q\224\375\177\000\000\310e)#\336\177\000\000\020\204]#\336\177\000\000\000\000\000\000\000\000\000\000зQ\224\375\177\000\000\000\000\000\000\000\000\000\000зQ\224\375\177", '\000' <repeats 18 times>, "`g^#\336\177\000\000\350$a#\336\177\000\000\204i^#\336\177\000\000\060d^#\336\177\000\000H\020a#\336\177\000\000\000`^#\336\177\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000@\"(#\336\177", '\000' <repeats 66 times>...
option_index = 0
long_options = {{name = 0x55d5faf70526 "help", has_arg = 0, flag = 0x0, val = 104}, {name = 0x55d5faf6b51c "version", has_arg = 0, flag = 0x0, val = 118}, {name = 0x55d5faf7052b "alias", has_arg = 1, flag = 0x0,
val = 1024}, {name = 0x55d5faf70531 "subst", has_arg = 1, flag = 0x0, val = 1025}, {name = 0x55d5faf70537 "substdef", has_arg = 1, flag = 0x0, val = 1026}, {name = 0x55d5faf70540 "substdefs", has_arg = 1, flag = 0x0,
val = 1027}, {name = 0x55d5faf7054a "server-id", has_arg = 1, flag = 0x0, val = 1028}, {name = 0x55d5faf70554 "loadmodule", has_arg = 1, flag = 0x0, val = 1029}, {name = 0x55d5faf7055f "modparam", has_arg = 1,
flag = 0x0, val = 1030}, {name = 0x55d5faf70568 "log-engine", has_arg = 1, flag = 0x0, val = 1031}, {name = 0x55d5faf70573 "debug", has_arg = 1, flag = 0x0, val = 1032}, {name = 0x55d5faf70579 "cfg-print",
has_arg = 0, flag = 0x0, val = 1033}, {name = 0x55d5faf70583 "atexit", has_arg = 1, flag = 0x0, val = 1034}, {name = 0x0, has_arg = 0, flag = 0x0, val = 0}}
__func__ = "main"
(gdb)
```
could it be related to any type of message that is making the kamailio crush?
thanks a lot and regards
david
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3593
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3593(a)github.com>
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
I have 2 jsonrpc servers configured with different prio's. For testing, I have the servers configured to always delay the response to any request by more than the module's timout setting.
The (initial) request is sent to the first server. As this one times out, I would expect a retry to go to the second servers, but instead, all retries are sent to the same server. The backup server is never contacted. This makes the whole "prio" system seem a bit useless.
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
```
modparam("janssonrpcc", "server", "conn=test;addr=pc1;port=8081;priority=5;weight=10")
modparam("janssonrpcc", "server", "conn=test;addr=pc1;port=8082;priority=5;weight=10")
```
```
janssonrpc_request("test", "Test.Timeout", '[ { "Timout": 1000} ]', "route=JSONRPC_RESPONSE;retry=10;timeout=1000");
```
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Log Messages
No useful logs are produced. I verified the described behavior on the jsonrpc server.
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
2023-02-23T16:59:34.585346+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:361]: bev_connect(): Connecting to server pc1:8081 for conn rating.
2023-02-23T16:59:34.585420+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:361]: bev_connect(): Connecting to server pc1:8082 for conn rating.
2023-02-23T16:59:34.585446+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:290]: bev_connect_cb(): Connected to host pc1:8081
2023-02-23T16:59:34.585462+01:00 pc1 proxy1[340870]: INFO: janssonrpcc [janssonrpc_connect.c:290]: bev_connect_cb(): Connected to host pc1:8082
2023-02-23T17:05:10.903398+01:00 pc1 proxy1[340870]: WARNING: janssonrpcc [janssonrpc_request.c:247]: schedule_retry(): Number of retries exceeded. Failing request.
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
Retry in combination with a timeout and prio's is a bit tricky. When do what? Just retrying on the first prio makes the lower prio servers completely useless, while going to the next prio on every retry skips possibly useful high-prio servers and may exhaust the number of candidate servers very fast.
Best solution IMHO would be to first try every server in the highest prio, before going to the next prio. Do not do (exponential) backoff between these steps.
If there are still retries remaining after that, wrap around to the highest prio with the exponentional backoff delay.
With the above, failover considers all servers and failover between servers is fast while not overloading a single server.
BTW. If I configure multiple servers per prio, it seems to randomly select one of them for every (re)try. It never selects one form the next prio.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
5.6.1
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
(paste your output here)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3378
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3378(a)github.com>
Hi
I have a kimailio box that receives messages from one interface and send it from another interface and I use dispatcher module successfully.
Now I assigned an I range to Linux loopback interface through Linux kernel anyip feature. And I can ping the range.
ip -4 route add local 192.168.0.0/24 dev lo
I want to send messages from source of the ip in this range but kamailio cant do this in the right way.
I added this two directives to kamailio.cfg:
mhomed=yes
ip_free_bind = 1
and when I want to use an ip from the list I use
$fs=”udp:192.168.0.120:5060”;
With no luck
If I use
force_send_socket(udp:192.168.0.120:5060);
kamailio returns an error
bad force_send_socket argument: 192.168.0.120:5060 (kamailio doesn't listen on it)
and if I add listen directive for one ip like:
listen=udp:192.168.0.120:5060
everything works fine but I want to be able to use any ip from list not just one ip.
Thanks.
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3394
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3394(a)github.com>
### Description
PKG memory errors when configured mask_callid in TOPOS.
### Troubleshooting
The poblem in detail desribed in mailing lists:
https://www.mail-archive.com/sr-users@lists.kamailio.org/msg19997.html
### Possible Solutions
Right way to configure topos for callid masking is:
modparam("topoh", "use_mode", 1)
modparam("topos", "mask_callid", 1)
modparam("topoh", "mask_callid", 1)
We need to set mask_callid module parameter for topoh also. There is not a word about this in the documentation,
so docs correction needed.
### Additional Information
* **Kamailio Version** - 5.7.X
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3606
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3606(a)github.com>
0xffffffff00000000ULL mask does not take into consideration signed 32 bit
integers and as result 2147483648 will be stored as -2147483648.
Another mask should be used to correct the issue: 0xffffffff80000000ULL.
It processes correctly the case of integers that are greater than 2147483647.
There are several gdb tests below:
(gdb) p ((unsigned long long)2147483648 & 0xffffffff80000000ULL)
$1= 2147483648
(gdb) p ((unsigned long long)2147483647 & 0xffffffff80000000ULL)
$2 = 0
(gdb) p ((unsigned long long)2147483646 & 0xffffffff80000000ULL)
$3 = 0
(gdb) p ((unsigned long long)4147483646 & 0xffffffff80000000ULL)
$4 = 2147483648
<!-- 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 -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] 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
- [ ] 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 -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2106
-- Commit Summary --
* lib: big integers should not be treated as negative ones
-- File Changes --
M src/lib/srdb1/db_ut.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2106.patchhttps://github.com/kamailio/kamailio/pull/2106.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/2106
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-users.lists.kamailio…
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* https://lists.kamailio.org/mailman3/postorius/lists/sr-dev.lists.kamailio.o…
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
Kamailio does not properly release connected WebSocket TCP connections, leading to a situation where the maximum number of allowable connections is reached and new connection requests are rejected.
### Troubleshooting
When examining the logs, we identified an issue where Kamailio is failing to release connected WebSocket TCP connections, causing a backlog of TIME_WAIT connections. The logs show a warning message indicating that the maximum number of allowable sockets per IP has been reached, leading to the rejection of further WebSocket requests.
#### Reproduction
Establish WebSocket connections with Kamailio.
Monitor the number of TIME_WAIT connections using netstat.
Observe the warning message in Kamailio logs when the maximum allowable sockets per IP are reached.
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(paste your debugging data here)
```
#### Log Messages
<!--
Check the syslog file and if there are relevant log messages printed by Kamailio, add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
2023-10-03T13:19:33.699043+00:00 apps001 kamailio[23781]: WARNING: |<null>|websockets-role.cfg:224 (websocket_request) 223.233.86.93 is at the maximum 50 allowable sockets per IP, rejecting request for another websocket
netstat -punta | grep 223.233.86.93 | grep 5065
tcp 0 0 45.79.166.214:5065 223.233.86.93:52158 TIME_WAIT -
tcp 0 0 45.79.166.214:5065 223.233.86.93:52195 TIME_WAIT -
tcp 0 0 45.79.166.214:5065 223.233.86.93:52292 TIME_WAIT -
tcp 0 0 45.79.166.214:5065 223.233.86.93:52248 TIME_WAIT -
tcp 0 0 45.79.166.214:5065 223.233.86.93:52108 TIME_WAIT -
tcp 0 0 45.79.166.214:5065 223.233.86.93:52071 TIME_WAIT -
```
#### SIP Traffic
<!--
If the issue is exposed by processing specific SIP messages, grab them with ngrep or save in a pcap file, then add them next, or attach to issue, or provide a link to download them (e.g., to a pastebin site).
-->
```
(paste your sip traffic here)
```
### Possible Solutions
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
restarting kamailio solves the problem.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.7.2 (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, MEM_JOIN_FREE, 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, 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 on 14:39:54 Sep 27 2023 with gcc 7.3.1
```
* **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 `lsb_release -a` and `uname -a`)
-->
```
CentOS Linux release 7.9.2009 (Core)
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3589
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3589(a)github.com>
<!-- 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
- [ ] 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 -->
topoh: uses socket IP when no mask_ip is defined
If the parameter mask_ip is not defined the module finds the socket IP
and uses that as mask IP for the message.
If the socket has an advertised IP it is used, otherwise the socket IP is used.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/3341
-- Commit Summary --
* topoh: uses socket IP when no mask_ip is defined
* Merge remote-tracking branch 'upstream/master'
-- File Changes --
M src/modules/topoh/doc/topoh_admin.xml (4)
M src/modules/topoh/th_msg.c (55)
M src/modules/topoh/th_msg.h (16)
M src/modules/topoh/topoh_mod.c (309)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/3341.patchhttps://github.com/kamailio/kamailio/pull/3341.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3341
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/pull/3341(a)github.com>
### Description
We've got a Kamailio setup on Ubuntu 20.04 with multiple TLS sockets: 5061 for SIPS, 8088 for WSS. When checking the received socket or port in the `onreply_route` for a packet received on the SIPS port, `$Rn`, `$Rn`, and `$Rut` contain information taken from the socket defined first in the configuration file. Swapping the `listen` statements in the attached minimal configuration leads to the respective other set of information being contained in the variables. The issue is reproducable with at least 5.7.0 and 5.7.1.
#### Reproduction
I've attached a (very) stripped down version of our configuration. The outline is as follows:
* Two TLS listen ports: 5061, 8088
* No websockets module – our actual configuration uses it, but it's not necessary to reproduce the issue
* A `request_route` relaying everything to another hardcoded SIP server – I've attached a SIPp scenario for the UAS role
* A `reply_route` printing `$Rp`, `$Rn`, and `$Rut` – at this point the issue has already occured, no further processing is necessary
With the listen directive for the `wss` socket above the directive for the `tls` socket, all inbound packets on port 5061 are logged as being received on the `wss` socket.
In the setup to reproduce the issue, 192.168.100.2 is the kamailio server and 192.168.100.123 is the machine running the UAS on port 5061 and the UAC starting the call.
To reproduce, start Kamailio with the provided configuration file [minimal.cfg](https://github.com/kamailio/kamailio/files/12465577/minimal.tx…. I've used the following command line:
```
/usr/sbin/kamailio -P /tmp/kamailio.pid -f minimal.cfg -E -e -m 512 -M 128 --atexit=no -DD
```
Then, run the SIPp UAS scenario
[uas_tls.xml](https://github.com/kamailio/kamailio/files/12465587/uas_tls.tx… with
```
sipp -sf ~/ucware/sipp/scenarios/uas_tls.xml -trace_msg -trace_err -trace_logs -t l1 -i 192.168.100.123 -p 5061 -m 1
```
Lastly, start a call using the SIPp scenario
[wrong_port_call.xml](https://github.com/kamailio/kamailio/files/12465607/wr… with
```
sipp -sf wrong_port_call.xml -m 1 -trace_msg -trace_err 192.168.100.2:5060
```
### Additional Information
* **Kamailio version**:
```
version: kamailio 5.7.1 (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, MEM_JOIN_FREE, 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, 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 9.4.0
```
* **Operating System**:
```
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
$ uname -a
Linux kamailiotest 5.4.0-159-generic #176-Ubuntu SMP Mon Aug 14 12:04:20 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3553
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/3553(a)github.com>