ovoshlook left a comment (kamailio/kamailio#4304)

The case is a little bit different (it is made in response to this issue #4266):

The case:

When Kamailio receives a REGISTER request, it makes a parallel forking to registrars ( mid-registrar case, let's say )
The Kamailio catches the Auth response (401/407) from Registrars at the branch-failure route.
If it authenticates and sends a REGISTER with an authentication header to the Registrar.

However, there are some cases where the first Registrar authenticates and sends a 200 OK response earlier than other Registrars send 401/407 responses.

existing logic doesn't give those responses being handled anyhow and discards them, as the transaction status already changed to 200, and logic hits this point: https://github.com/kamailio/kamailio/blob/master/src/modules/tm/t_reply.c#L1399

goto: discard;

Added code allows handling such responses within failure routes; however, it won't propagate failure replies to UAC, because the new code is >=300
https://github.com/kamailio/kamailio/blob/master/src/modules/tm/t_reply.c#L1430
and the status of the transaction is already 200
https://github.com/kamailio/kamailio/blob/master/src/modules/tm/t_reply.c#L1553
200 responses to late parallel registrations also won't be propagated to UAC because the transaction status 200 already exists.

The description of the added code might be indeed messy - I'll try to improve the clarity of the comment


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/pull/4304/c3036690320@github.com>