### Description
ndb_redis is treating MOVED reply from redis cluster as error and breaking out even before the cluster handling code gets a chance to process this.
```
if(rpl->rplRedis->type == REDIS_REPLY_ERROR) {
LM_ERR("Redis error:%.*s\n",
(int)rpl->rplRedis->len, rpl->rplRedis->str);
goto error_exec;
}
if (check_cluster_reply(rpl->rplRedis, &rsrv)) {
...
}
```
### Troubleshooting
#### Reproduction
Setup a redis cluster with at least 2 nodes.
Set modparam cluster=1 and allow_dynamic_nodes=1
fire redis get commands
#### Log Messages
```
ERROR: ndb_redis [redis_client.c:1037]: redisc_exec(): Redis error:MOVED 1090 10.4.20.69:6379
```
### Possible Solutions
revert https://github.com/kamailio/kamailio/commit/d00b14704805d728f5a845a6af900ef…
or
Add another check to ignore the above logic if cluster support is enabled.
or
Do not treat MOVED replies as of type REDIS_REPLY_ERROR
### Additional Information
```
kamailio built from branch 5.4.1
```
--
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/2461
Dear all
we have been testing this module with the following setup
kamailio 5.3.2
evapi params
modparam("evapi", "workers", 4)
modparam("evapi", "netstring_format", 0)
modparam("evapi", "bind_addr", "127.0.0.1:8448")
modparam("evapi", "max_clients", 32)
then in the configuration we do evapi_relay of avp including a json data
(which can be quite long), like this
{"key" : "aarp2q0tcpqhs0cpucuhukjs2ah2j00q(a)10.18.5.64" , "msg" :
{"rg_in":"701","ani_init":{"ani_source":"pai", ....... }}}
We have an application listening on the tcp socket and writing those
messages to a kafka cluster, and this works ok, and in the previous manual
tests we have done no issue was found.
But when making some load tests, and passing some live traffic we see some
issues
seems like some times, when there are messages to be sent to the tcp socket
at the same time, they are sent in the same message, when normally each
data sent using evapi_relay is sent in 1 message
We do sometimes see something like this on the application consuming from
the tcp socket
2020-11-25 15:20:01.744 UTC [error]
<0.706.0>@evapi_kafka_listener:handle_info:167 body "{\"key\" : \"
6142651aa63616c6c04a783cd(a)72.21.24.130\" , \"msg\" :
{\"rg_in\":\"677\",\"ani_init\":{\"ani_source\":\"fro\",.......}}}{\"key\"
: \"isbc7caT4001915251VabcGhEfHdNiF0i(a)172.16.120.1\" , \"msg\" :
{\"rg_in\":\"22\",\"ani_init\":{\"ani_source\":\"pai\", .......
,\"translate" not valid json; error = {691,invalid_trailing_data}
2020-11-25 15:20:01.745 UTC [error]
<0.706.0>@evapi_kafka_listener:handle_info:167 body
"dPartition\":\"-1\",......}}}" not valid json; error = {1,invalid_json}
and we do see that the application cannot parse the json message fine,
because we have like 2 json objects together
......{\"ani_source\":\"fro\",.......}}}{\"key\" :
\"isbc7caT4001915251Vabc............
This happens with 2 different UDP receivers processing messages and calling
evapi_relay at the same time. But i don't think this happens all the time.
Seems like some issue when several processes try to use evapi workers at
the same time.
We tried to increase evapi workers and it's the same
We also saw another issue I think. Seems when the avp sent to evapi socket
is bigger than ~1680 char, the json is also truncated, and also happens
when we use the socket in Lo interface which has an MTU of 65535.
Could you please take a look to see if there is any problem or limitation,
or if we are using something wrong?
thanks and best regards
david
--
[image: Logo]
David Escartín Almudévar
VoIP/Switch Engineer
descartin(a)sonoc.io
*SONOC*
C/ Josefa Amar y Borbón, 10, 4ª · 50001 Zaragoza, España
Tlf: +34 917019888 · www.sonoc.io
<!--
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:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
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
Kamailio crashes on launch with TLS enabled on both Ubuntu 20.04 and Debian Buster.
### Troubleshooting
#### Reproduction
<!--
If the issue can be reproduced, describe how it can be done.
-->
1. cloned `https://github.com/kamailio/kamailio`
2. checked out `5.4`
3. make cfg
4. include_modules=app_python3 crypto db_mongodb
db_postgres dialplan http_async_client
http_client jansson json jsonrpcc log_systemd
outbound regex tls utils xcap_client xhttp_pi
uuid
5. make all
6. make install
7. make install-systemd-debian
8. turn on TLS (WITH_TLS), copy certs & keys.
9. sudo systemctl start kamailio
#### Log Messages
```
Nov 20 00:20:06 kamailio-stage-3 /usr/local/sbin/kamailio[12570]: INFO: tls [tls_mod.c:389]: mod_init(): With ECDH-Support!
Nov 20 00:20:06 kamailio-stage-3 /usr/local/sbin/kamailio[12570]: INFO: tls [tls_mod.c:392]: mod_init(): With Diffie Hellman
Nov 20 00:20:06 kamailio-stage-3 kamailio[12569]: DIGEST-MD5 common mech free
Nov 20 00:20:06 kamailio-stage-3 /usr/local/sbin/kamailio[12570]: INFO: auth [auth_mod.c:345]: mod_init(): qop set, but nonce-count (nonce_count) support disabled
Nov 20 00:20:06 kamailio-stage-3 /usr/local/sbin/kamailio[12570]: INFO: rr [../outbound/api.h:52]: ob_load_api(): unable to import bind_ob - maybe module is not loaded
Nov 20 00:20:06 kamailio-stage-3 /usr/local/sbin/kamailio[12570]: INFO: rr [rr_mod.c:185]: mod_init(): outbound module not available
Nov 20 00:20:06 kamailio-stage-3 kamailio[12568]: ERROR: <core> [core/daemonize.c:303]: daemonize(): Main process exited before writing to pipe
Nov 20 00:20:06 kamailio-stage-3 kamailio[12568]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f09fdb43de8), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_free(323) - ignoring
Nov 20 00:20:06 kamailio-stage-3 kamailio[12568]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f09fdb44098), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring
Nov 20 00:20:06 kamailio-stage-3 kamailio[12568]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f09fdb94230), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_free(323) - ignoring
Nov 20 00:20:06 kamailio-stage-3 kamailio[12568]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f09fdb41890), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_free(323) - ignoring
Nov 20 00:20:06 kamailio-stage-3 kamailio[12568]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f09fdb34998), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_free(323) - ignoring
Nov 20 00:20:06 kamailio-stage-3 kamailio[12568]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f09fdb347b8), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_free(323) - ignoring
Nov 20 00:20:06 kamailio-stage-3 kamailio[12568]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f09fdb34858), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring
Nov 20 00:20:06 kamailio-stage-3 kamailio[12568]: CRITICAL: <core> [core/mem/q_malloc.c:519]: qm_free(): BUG: freeing already freed pointer (0x7f09fdb348f8), called from tls: tls_init.c: ser_free(323), first free tls: tls_init.c: ser_malloc(293) - ignoring
Nov 20 00:20:06 kamailio-stage-3 systemd[1]: kamailio.service: Control process exited, code=killed, status=11/SEGV
Nov 20 00:20:06 kamailio-stage-3 systemd[1]: kamailio.service: Failed with result 'signal'.
Nov 20 00:20:06 kamailio-stage-3 systemd[1]: Failed to start kamailio (OpenSER) - the Open Source SIP Server.
Nov 20 00:20:06 kamailio-stage-3 systemd[1]: kamailio.service: Service RestartSec=100ms expired, scheduling restart.
Nov 20 00:20:06 kamailio-stage-3 systemd[1]: kamailio.service: Scheduled restart job, restart counter is at 57.
Nov 20 00:20:06 kamailio-stage-3 systemd[1]: Stopped kamailio (OpenSER) - the Open Source SIP Server.
Nov 20 00:20:06 kamailio-stage-3 systemd[1]: kamailio.service: Start request repeated too quickly.
Nov 20 00:20:06 kamailio-stage-3 systemd[1]: kamailio.service: Failed with result 'signal'.
Nov 20 00:20:06 kamailio-stage-3 systemd[1]: Failed to start kamailio (OpenSER) - the Open Source SIP Server.
```
### Possible Solutions
As a hack, we manually downgraded to https://www.openssl.org/source/openssl-1.0.2r.tar.gz and that seemed to allow the system to launch, but this is obviously not a stable, long-term solution.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.2 (x86_64/linux) 2d733e
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: 2d733e
compiled on 23:01:51 Nov 19 2020 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`)
-->
```
root@kamailio-stage-3:/home/admin# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
root@kamailio-stage-3:/home/admin# uname -a
Linux kamailio-stage-3 4.19.0-12-cloud-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux
ubuntu@kamailio-stage-2:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
ubuntu@kamailio-stage-2:~$ uname -a
Linux kamailio-stage-2 5.4.0-1029-aws #30-Ubuntu SMP Tue Oct 20 10:06:38 UTC 2020 x86_64 x86_64 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/2560
### Description
When using Kamailio in a multi-homed configuration to register with another device using the uac module, it does not retrieve the custom or default socket information for timed registration attempts. It does, however, use the custom/default socket data for the initial registration.
#### Reproduction
The network is configured for two addresses: 10.9.9.121/24 and 10.9.7.121/24.
Two floating IP addresses are also assigned (via Pacemaker/Corosync): 10.9.9.120/24 and 10.9.7.120/24. For testing, all addresses can be assigned permanently, so it is not necessary to have Pacemaker/Corosync installed.
MySQL database has a user in the uacreg table with the socket column set to udp:10.9.7.120:5060.
kamailio.cfg includes the following to enable sending of REGISTER messages:
mhomed = 1
listen=udp:10.9.9.120
listen=udp:10.9.7.120
#!define DBURL "mysql://kamailio:kamailiorw@10.9.9.101/kamailio"
modparam("rr", "append_fromtag", 1);
modparam("uac", "reg_db_url", DBURL);
modparam("uac", "reg_contact_addr", "10.9.7.120:5060");
modparam("uac", "reg_keep_callid", 1);
modparam("uac", "default_socket", "udp:10.9.7.120:5060");
modparam("uac", "reg_timer_interval", 30);
#### Log Messages
The initial REGISTER outputs the following log data. The registration completes successfully.
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: uac [uac.c:407]: child_init(): run initial uac registration routine
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: uac [uac_reg.c:1172]: uac_reg_update(): using custom socket udp:10.9.7.120:5060 to send request
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/socket_info.c:628]: grep_sock_info(): checking if host==us: 10==10 && [10.9.7.120] == [10.9.9.120]
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/socket_info.c:635]: grep_sock_info(): checking if port 5060 (advertise 0) matches port 5060
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/socket_info.c:628]: grep_sock_info(): checking if host==us: 10==10 && [10.9.7.120] == [10.9.7.120]
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/socket_info.c:635]: grep_sock_info(): checking if port 5060 (advertise 0) matches port 5060
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: tm [uac.c:435]: t_uac_prepare(): next_hop=<sip:10.9.7.102>
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: tm [uac.c:158]: dlg2hash(): hashid 3846
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: tm [uac.c:244]: t_run_local_req(): executing event_route[tm:local-request]
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/parser/msg_parser.c:610]: parse_msg(): SIP Request:
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/parser/msg_parser.c:612]: parse_msg(): method: <REGISTER>
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/parser/msg_parser.c:614]: parse_msg(): uri: <sip:10.9.7.102>
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/parser/msg_parser.c:616]: parse_msg(): version: <SIP/2.0>
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/parser/parse_via.c:1303]: parse_via_param(): Found param type 232, <branch> = <z9hG4bK60f.6fd7c907000000000000000000000000.0>; state=16
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/parser/parse_via.c:2639]: parse_via(): end of header reached, state=5
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/parser/msg_parser.c:498]: parse_headers(): Via found, flags=2
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <core> [core/parser/msg_parser.c:500]: parse_headers(): this is the first via
Mar 24 19:09:27 kam_test kamailio[8425]: exec: *** cfgtrace:local_route=[tm:local-request] c=[/usr/local/etc/kamailio/kamailio.cfg] l=229 a=26 n=xlog
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: <script>: In event_route(tm:local-request)
Mar 24 19:09:27 kam_test kamailio[8425]: DEBUG: tm [uac.c:664]: send_prepared_request_impl(): uac: 0x7268e184 branch: 0 to 10.9.7.102:5060
When the timer expires, the following is logged. Since the socket is not found, the registration fails:
Mar 24 19:09:57 kam_test kamailio[8425]: DEBUG: tm [uac.c:435]: t_uac_prepare(): next_hop=<sip:10.9.7.102>
Mar 24 19:09:57 kam_test kamailio[8425]: ERROR: <core> [core/forward.c:181]: get_out_socket(): no socket found
Mar 24 19:09:57 kam_test kamailio[8425]: ERROR: <core> [core/forward.c:183]: get_out_socket(): no corresponding socket found for(udp:10.9.7.102:5060)
Mar 24 19:09:57 kam_test kamailio[8425]: ERROR: tm [ut.h:316]: uri2dst2(): no corresponding socket found for "10.9.7.102" af 2 (udp:10.9.7.102:5060)
Mar 24 19:09:57 kam_test kamailio[8425]: ERROR: tm [uac.c:463]: t_uac_prepare(): no socket found
Mar 24 19:09:57 kam_test kamailio[8425]: DEBUG: tm [h_table.c:132]: free_cell_helper(): freeing transaction 0x7268de10 from uac.c:604
Mar 24 19:09:57 kam_test kamailio[8425]: ERROR: uac [uac_reg.c:1196]: uac_reg_update(): failed to send request for [kamailioha]
### Additional Information
version: kamailio 5.3.2 (arm6/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 on 17:22:05 Mar 18 2020 with gcc 8.3.0
* **Operating System**:
Linux kam_test 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l 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/2262
<!-- 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)
- [x ] 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)
- [x ] 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
- [x ] Tested changes locally -- tested at 5.1.6
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Problem:
Forwarding of 200 OK while sent 488 waits for ACK, destroys the UAS send buffer
Scenario:
During suspension of 200 OK by ims_qos module function Rx_AAR() at terminating PCSCF,
The PCRF sends an AA Answer with result code DIAMETER_TOO_BUSY (3004), which triggers
the PCSCF to send a 488 ‘Sorry no QoS available’ to the originating side (ims_dialog
module function dlg_terminate()).
Afterwards neither the 200 OK nor the ACK(488) is processed correctly by the PCSCF.
Solution:
The UAS send buffer should not be overwritten during processing of 200 OK,
because non-2xx is needed to associate the ACK message in a correct way.
200 OK must be forwarded statelessly.
Side-Effect (potentially breaks existing function):
Some callbacks cannot be called for the 200 OK, to avoid messing the stored 488.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2590
-- Commit Summary --
* tm: 200 OK not processed correctly by Proxy after final non-2xx
-- File Changes --
M src/modules/tm/t_reply.c (72)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2590.patchhttps://github.com/kamailio/kamailio/pull/2590.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/2590
<!--
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:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
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
Kamailio not updating record-route value stored in redis (topos module) during re-invite
config:
modparam("ndb_redis", "server", "name=srv1;addr=localhost;port=6379;db=1")
modparam("topos", "storage", "redis")
modparam("topos_redis", "serverid", "srv1")
modparam("topos", "branch_expire", 300)
modparam("topos", "dialog_expire", 10800)
modparam("topos", "sanity_checks", 1)
modparam("topos", "clean_interval", 20)
<!--
Explain what you did, what you expected to happen, and what actually happened.
-->
### Troubleshooting
#### Reproduction
1. Initial Invite from Kamailio to Server1 (Transaction complete)
2. Server1 is down
3. Re-invite from Kamailio to Server2
4. 200 OK contains record-route of Server2
5. ACK is forwarded to Server1 (record-route stored in dialog Key still has old record-route)
<!--
If the issue can be reproduced, describe how it can be done.
-->
#### Debugging Data
b_rr value remains same even after 200 OK for re-invite has a different record-route
```
**redis data after Initial Invite:**
127.0.0.1:6379[1]> hgetall d:z:atpsh-5fb50084-5b44-1
1) "b_rr"
2) "<sip:10.130.74.130;lr;ftag=11368SIPpTag091;did=07f.8fa;nat=yes>"
3) "as_contact"
4) "<sip:atpsh-5fb50084-5b44-1@3.225.0.56>"
5) "s_rr"
6) "<sip:3.225.0.56;lr;ftag=11368SIPpTag091;nat=yes>"
7) "b_tag"
8) "2"
9) "bs_contact"
10) "<sip:btpsh-5fb50084-5b44-1@3.225.0.56>"
11) "rectime"
12) "1605698163"
13) "a_tag"
14) "11368SIPpTag091"
15) "s_cseq"
16) "1"
17) "s_method"
18) "INVITE"
19) "b_contact"
20) "sip:atpsh-5fb3efba-4a95-1@52.55.224.188;alias=10.130.72.128~5060~1"
21) "a_callid"
22) "1-11368(a)10.130.74.171"
23) "a_uuid"
24) "atpsh-5fb50084-5b44-1"
25) "b_uuid"
26) "btpsh-5fb50084-5b44-1"
27) "a_contact"
28) "sip:sipp@10.130.74.171:5060;alias=10.130.74.171~5060~1"
29) "iflags"
30) "2"
**redis data after re-Invite:**
127.0.0.1:6379[1]> hgetall d:z:atpsh-5fb50084-5b44-1
1) "b_rr"
2) "<sip:10.130.74.130;lr;ftag=11368SIPpTag091;did=07f.8fa;nat=yes>"
3) "as_contact"
4) "<sip:atpsh-5fb50084-5b44-1@3.225.0.56>"
5) "s_rr"
6) "<sip:3.225.0.56;lr;ftag=11368SIPpTag091;nat=yes>"
7) "b_tag"
8) "2"
9) "bs_contact"
10) "<sip:btpsh-5fb50084-5b44-1@3.225.0.56>"
11) "rectime"
12) "1605698163"
13) "a_tag"
14) "11368SIPpTag091"
15) "s_cseq"
16) "1"
17) "s_method"
18) "INVITE"
19) "b_contact"
20) "sip:atpsh-5fb3efba-4a95-1@52.55.224.188;alias=10.130.72.128~5060~1;alias=10.130.72.145~5060~1"
21) "a_callid"
22) "1-11368(a)10.130.74.171"
23) "a_uuid"
24) "atpsh-5fb50084-5b44-1"
25) "b_uuid"
26) "btpsh-5fb50084-5b44-1"
27) "a_contact"
28) "sip:sipp@10.130.74.171:5060;alias=10.130.74.171~5060~1"
29) "iflags"
30) "2"
```
same issue seen for a_rr value in redis.
<!--
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.
-->
#### 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).
-->
```
(paste your log messages here)
```
#### SIP Traffic
```
**Initial Invite Incoming:**
INVITE sip:+919535346001@10.130.72.228:5060 SIP/2.0
Via: SIP/2.0/UDP 10.130.74.171:5060;branch=z9hG4bK-11368-1-0
From: sipp <sip:9535346001@10.130.72.228>;tag=11368SIPpTag091
To: sut <sip:9535346001@10.130.72.228>
Call-ID: 1-11368(a)10.130.74.171
CSeq: 1 INVITE
Contact: sip:sipp@10.130.74.171:5060
Supported: timer, 100rel , replaces
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: 208
**Initial Invite outgoing:**
INVITE sip:919535346001@10.130.74.130:5060 SIP/2.0
Via: SIP/2.0/UDP 3.225.0.56:5060;branch=z9hG4bK7afa.d2d1cbb7e8c7a99adf854ba4d854a467.0
From: sipp <sip:9535346001@10.130.72.228>;tag=11368SIPpTag091
To: sut <sip:9535346001@10.130.72.228>
Call-ID: 1-11368(a)10.130.74.171
CSeq: 1 INVITE
Supported: timer, 100rel , replaces
Max-Forwards: 69
Subject: Performance Test
Content-Type: application/sdp
Content-Length: 208
Contact: <sip:btpsh-5fb50084-5b44-1@3.225.0.56>
**response incoming**
SIP/2.0 200 OK
From: sipp <sip:+9535346001@10.130.72.228>;tag=11368SIPpTag091
To: sut <sip:9535346001@10.130.72.228>;tag=2
Call-ID: 1-11368(a)10.130.74.171
CSeq: 1 INVITE
Content-Type: application/sdp
Content-Length: 162
Via: SIP/2.0/UDP 3.225.0.56:5060;rport=5060;received=10.130.72.228;branch=z9hG4bK7afa.d2d1cbb7e8c7a99adf854ba4d854a467.0
Contact: <sip:atpsh-5fb3efba-4a95-1@52.55.224.188;alias=10.130.72.128~5060~1>
Record-Route: <sip:10.130.74.130;lr;ftag=11368SIPpTag091;did=07f.8fa;nat=yes>
Accept: application/sdp
Allow: INVITE,ACK,CANCEL,BYE,UPDATE
**response outgoing**
SIP/2.0 200 OK
From: sipp <sip:+9535346001@10.130.72.228>;tag=11368SIPpTag091
To: sut <sip:9535346001@10.130.72.228>;tag=2
Call-ID: 1-11368(a)10.130.74.171
CSeq: 1 INVITE
Content-Type: application/sdp
Content-Length: 162
Accept: application/sdp
Allow: INVITE,ACK,CANCEL,BYE,UPDATE
Via: SIP/2.0/UDP 10.130.74.171:5060;rport=5060;branch=z9hG4bK-11368-1-0
Contact: <sip:atpsh-5fb50084-5b44-1@3.225.0.56>
**ACK Incoming**
ACK sip:atpsh-5fb50084-5b44-1@3.225.0.56 SIP/2.0
Via: SIP/2.0/UDP 10.130.74.171:5060;branch=z9hG4bK-11368-1-5
From: sipp <sip:sipp@10.130.74.171:5060>;tag=11368SIPpTag091
To: sut <sip:service@10.130.72.228:5060>;tag=2
Call-ID: 1-11368(a)10.130.74.171
CSeq: 1 ACK
Contact: sip:sipp@10.130.74.171:5060
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
**ACK outgoing**
ACK sip:atpsh-5fb3efba-4a95-1@52.55.224.188;alias=10.130.72.128~5060~1 SIP/2.0
Via: SIP/2.0/UDP 3.225.0.56:5060;branch=z9hG4bK7afa.5b31cae6abf9db84bc4197496dd24951.0
From: sipp <sip:sipp@10.130.74.171:5060>;tag=11368SIPpTag091
To: sut <sip:service@10.130.72.228:5060>;tag=2
Call-ID: 1-11368(a)10.130.74.171
CSeq: 1 ACK
Max-Forwards: 69
Subject: Performance Test
Content-Length: 0
Route: <sip:10.130.74.130;lr;ftag=11368SIPpTag091;did=07f.8fa;nat=yes>
Contact: <sip:btpsh-5fb50084-5b44-1@3.225.0.56>
**re-invite incoimg**
INVITE sip:atpsh-5fb50084-5b44-1@3.225.0.56 SIP/2.0
Via: SIP/2.0/UDP 10.130.74.171:5060;branch=z9hG4bK-11368-1-7
From: sipp <sip:9535346001@10.130.72.228>;tag=11368SIPpTag091
To: sut <sip:9535346001@10.130.72.228>;tag=2
Call-ID: 1-11368(a)10.130.74.171
CSeq: 2 INVITE
Contact: sip:sipp@10.130.74.171:5060
Supported: timer, 100rel , replaces
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length: 208
**re-invite outgoing**
INVITE sip:atpsh-5fb3efba-4a95-1@52.55.224.188;alias=10.130.72.128~5060~1 SIP/2.0
Via: SIP/2.0/UDP 3.225.0.56:5060;branch=z9hG4bK4afa.168b5e5898c0e5586bbbe73c71d2f089.1
From: sipp <sip:9535346001@10.130.72.228>;tag=11368SIPpTag091
To: sut <sip:9535346001@10.130.72.228>;tag=2
Call-ID: 1-11368(a)10.130.74.171
CSeq: 2 INVITE
Supported: timer, 100rel , replaces
Max-Forwards: 69
Subject: Performance Test
Content-Type: application/sdp
Content-Length: 208
Route: <sip:10.130.72.145;lr;ftag=11368SIPpTag091;did=07f.8fa;nat=yes>
Contact: <sip:btpsh-5fb50084-5b44-1@3.225.0.56>
**response incoming**
SIP/2.0 200 OK
From: sipp <sip:+9535346001@10.130.72.228>;tag=11368SIPpTag091
To: sut <sip:9535346001@10.130.72.228>;tag=2
Call-ID: 1-11368(a)10.130.74.171
CSeq: 2 INVITE
Content-Type: application/sdp
Content-Length: 162
Via: SIP/2.0/UDP 3.225.0.56:5060;rport=5060;received=10.130.72.228;branch=z9hG4bK4afa.168b5e5898c0e5586bbbe73c71d2f089.1
Contact: <sip:atpsh-5fb3efba-4a95-1@52.55.224.188;alias=10.130.72.128~5060~1>
Record-Route: <sip:10.130.72.145;lr;ftag=11368SIPpTag091;did=07f.8fa>
Accept: application/sdp
Allow: INVITE,ACK,CANCEL,BYE,UPDATE
**response outgoing**
SIP/2.0 200 OK
From: sipp <sip:+9535346001@10.130.72.228>;tag=11368SIPpTag091
To: sut <sip:9535346001@10.130.72.228>;tag=2
Call-ID: 1-11368(a)10.130.74.171
CSeq: 2 INVITE
Content-Type: application/sdp
Content-Length: 162
Accept: application/sdp
Allow: INVITE,ACK,CANCEL,BYE,UPDATE
Via: SIP/2.0/UDP 10.130.74.171:5060;rport=5060;branch=z9hG4bK-11368-1-7
Contact: <sip:atpsh-5fb50084-5b44-1@3.225.0.56>
**ACK Incoming**
ACK sip:atpsh-5fb50084-5b44-1@3.225.0.56 SIP/2.0
Via: SIP/2.0/UDP 10.130.74.171:5060;branch=z9hG4bK-11368-1-11
From: sipp <sip:sipp@10.130.74.171:5060>;tag=11368SIPpTag091
To: sut <sip:service@10.130.72.228:5060>;tag=2
Call-ID: 1-11368(a)10.130.74.171
CSeq: 2 ACK
Contact: sip:sipp@10.130.74.171:5060
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
**ACK outgoing**
ACK sip:atpsh-5fb3efba-4a95-1@52.55.224.188;alias=10.130.72.128~5060~1 SIP/2.0
Via: SIP/2.0/UDP 3.225.0.56:5060;branch=z9hG4bK4afa.773266b9ff87b7e02982aef7cafa13e7.0
From: sipp <sip:sipp@10.130.74.171:5060>;tag=11368SIPpTag091
To: sut <sip:service@10.130.72.228:5060>;tag=2
Call-ID: 1-11368(a)10.130.74.171
CSeq: 2 ACK
Max-Forwards: 69
Subject: Performance Test
Content-Length: 0
Route: <sip:10.130.74.130;lr;ftag=11368SIPpTag091;did=07f.8fa;nat=yes>
Contact: <sip:btpsh-5fb50084-5b44-1@3.225.0.56>
```
<!--
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).
-->
### Possible Solutions
I checked code for topos_redis module, looks like only duiring initial transaction b_rr and a_rr values are stored
https://github.com/kamailio/kamailio/blob/master/src/modules/topos_redis/to…
<!--
If you found a solution or workaround for the issue, describe it. Ideally, provide a pull request with a fix.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.2.8 (x86_64/linux) 5a7f5b
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, 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: 5a7f5b
compiled on 09:15:42 Nov 16 2020 with gcc 7.5.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`)
-->
```
(paste your output here)
```
--
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/2554
<!--
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:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
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
When invoking dialog tracking by flag instead of dlg_manage(), dialog doesn't store uac_replace_* variables. As a result, uac restore functionality doesn't work.
### Troubleshooting
#### Reproduction
#!define FLT_DIALOG 4
...
modparam("dialog", "dlg_flag", FLT_DIALOG)
...
request_route {
if (is_method("INVITE"))
setflag(FLT_DIALOG);
...
}
Make a call.
List dialogs (kamcmd dlg.list)
You'll notice the dialog has no _uac_ variables
<!--
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).
-->
```
(paste your log messages here)
```
#### 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.
-->
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.3.8 (x86_64/linux) a58155
```
* **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`)
-->
```
NAME="Debian GNU/Linux"
VERSION="8 (jessie)"
```
--
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/2593
<!-- Kamailio Pull Request Template -->
This patch fix wrong parsing the pair of IPv6 addr:port in rtpengine module, when loading node information from database.
<!--
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
- [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 -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2592
-- Commit Summary --
* Fix in parsing IPv6 address:port
-- File Changes --
M src/modules/rtpengine/rtpengine.c (9)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2592.patchhttps://github.com/kamailio/kamailio/pull/2592.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/2592
Module: kamailio
Branch: master
Commit: dd717b80be6f8e9519aa4b3d627cb88267b81146
URL: https://github.com/kamailio/kamailio/commit/dd717b80be6f8e9519aa4b3d627cb88…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2020-12-28T14:08:16+01:00
core: new core directive modparamx(mod, param, val)
- alternative to modparam() where all its parameters are evaluated for
config script variables
- note that only variables that do not depend on SIP message processing
should be used at this stage
- example - set a module parameter using the value of an evironment
variable:
modparamx("dispatcher", "db_url", "$env(DBURL)")
---
Modified: src/core/cfg.lex
Modified: src/core/cfg.y
Modified: src/core/modparam.c
Modified: src/core/modparam.h
Modified: src/core/sr_module.h
---
Diff: https://github.com/kamailio/kamailio/commit/dd717b80be6f8e9519aa4b3d627cb88…
Patch: https://github.com/kamailio/kamailio/commit/dd717b80be6f8e9519aa4b3d627cb88…