IgorrG created an issue (kamailio/kamailio#4266)
### Description
While implementing mid-register inspired by pull request
(https://github.com/kamailio/kamailio/pull/3360) we found the case when it goes
impossible to handle responses for registrar servers. In case some of
registrars busy and respond with 401 after 200ok received - it is not possible
using any routes and configuration options to handle responses received in
branch transactions.
According to documentation I think that setting wt_timer should allow to
absorb and handle responses on failure-route while transaction kept in memory.
In fact wt_timer does not affect handling responses in any way.

### Troubleshooting
To reproduce this case we have configured sipp to response instant with 200ok
on registration request.
#### Reproduction
To reproduce issue SIPP could be setup as one of the dispatcher nodes with
instant 200ok reply to register. Kamailio should use following configuration
snippet:
https://github.com/ovoshlook/kamailio-mid-registrar-config-snippets/blob/master/shared_creds_at_scale/kamailio.cfg
#### Log Messages
REGISTER|401tm [t_lookup.c:912]: t_reply_matching(): t_reply_matching: hash
12337 label 0 branch 1
REGISTER|401tm [t_lookup.c:986]: t_reply_matching(): reply (0x7f1fc67f83a8)
matched an active transaction (T=0x7f1fc0f0f740)!
REGISTER|401tm [t_lookup.c:1122]: t_check_msg(): msg (0x7f1fc67f83a8)
id=13/1915035 global id=13/1915035 T end=0x7f1fc0f0f740
REGISTER|401tm [t_reply.c:2363]: reply_received(): transaction found -
T:0x7f1fc0f0f740 branch:1
REGISTER|401tm [t_reply.c:2376]: reply_received(): original status uas=200,
uac[1]=0 local=0 is_invite=0)
REGISTER|401tm [t_reply.c:1363]: t_should_relay_response(): ->>>>>>>>>
T_code=200, new_code=401
REGISTER|401tm [t_reply.c:1374]: t_should_relay_response(): final reply already
sent
REGISTER|401tm [t_reply.c:1625]: t_should_relay_response(): finished with rps
discarded - uas status: 200
### 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**
```
version: kamailio 5.6.4 (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_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 16:35:08 Jun 5 2023 with gcc 10.2.1
```
* **Operating System**:
```
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Linux pbxKamaTest 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64
GNU/Linux
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4266
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4...@github.com>
_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the
sender!