[OpenSIPS-Devel] [OpenSIPS/opensips] 2824a3: [tm] t_uac() gets a preferred socket too
Bogdan Andrei IANCU
noreply at github.com
Fri Sep 15 07:44:49 UTC 2023
Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: 2824a3818bcb40a980b795aaece69545eb963397
https://github.com/OpenSIPS/opensips/commit/2824a3818bcb40a980b795aaece69545eb963397
Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
Date: 2023-09-15 (Fri, 15 Sep 2023)
Changed paths:
M modules/tm/dlg.h
M modules/tm/uac.c
Log Message:
-----------
[tm] t_uac() gets a preferred socket too
The function already receives a send_socket (a forced socket) which overrides the protocol given by the destination URI. But are cases were we need a milder approach, like a preffered socket to be used if not conflicting with the protocol given by the RURI.
What we have now:
* send_socket - it is a forced socket, overrides the proto given by RURI, it will be used for sure
* pref_socket - a preferred socket, to be used if no send_socket is given and if there is no conflict with the proto given by RURI (in case of a conflict, the pref_socket is discarded and a new socket is looked up based on the RURI info).
First part fix for #3138
Commit: 4244c286e19e85f10f2873e1c4f1deee2661eb50
https://github.com/OpenSIPS/opensips/commit/4244c286e19e85f10f2873e1c4f1deee2661eb50
Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
Date: 2023-09-15 (Fri, 15 Sep 2023)
Changed paths:
M modules/b2b_entities/b2be_load.h
M modules/b2b_entities/client.c
M modules/b2b_logic/logic.c
Log Message:
-----------
[b2b_entities/logic] use the newly added pref_socket
When creating a new B2B client, avoid using the UAS side incoming socket as a forced socket. By doing that we override the proto given by the UAC RURI (and forcing to use the same proto as the UAS side - of course, unless we do not do a force send socket from script to manually indicate a new socket/proto). Shortly, th dynamic selection of the correct UAC socket is broken.
With this change, we do:
* if the UAS/msg side has a forced socket (from script), we will push it as forced socket to the UAC too (as before this change).
* if there is no forcing, the current UAS/msg incoming socket is passed as "preferred" socket to the UAC - like use it as time as it fits the RURI proto. This helps in preserving (during the whole b2b logic) the same socket when having multiple sockets serving the same protocol.
Fixes #3138
Compare: https://github.com/OpenSIPS/opensips/compare/4fe2fb6f5cf1...4244c286e19e
More information about the Devel
mailing list