Hi Xaled, First of all, you do not need b2b in order to do TCP conn reusage.
How the conns are managed in OpenSIPS : the conns are reused if the destination of the package matches the remote destination of an existing TCP conn. IF not, a new conn will be open.
In your case, the first tcp conns will be open when uac_registrant will fire the REGISTERs - if each registration/contact has a different destination, you will get one conn per contact.
In order to tunnel the INVITEs via the existing conns (open by registrations), you need to be sure to route/send the INVITE to the same destinations as the uac_registrant did for REGISTERs
Regards, Bogdan-Andrei Iancu OpenSIPS Founder and Developer https://www.opensips-solutions.com OpenSIPS Summit 2019 https://www.opensips.org/events/Summit-2019Amsterdam/ On 02/12/2019 03:02 PM, xaled wrote:
Hello, We have a use case with some specific requirements on the TCP connection usage by the outgoing register trunk. Requirements are imposed by the service provider and cannot be modified by us. a) Trunk must use TCP. b) There has to be a registration over an established TCP connection. c) INVITEs can be send only over established TCP connection that was previously used for successful registration. I managed to get around this limitations by using uac_registrant and b2b modules. I also set tcp_connection_lifetime=3600 to have the TCP connection open for a pretty long time between possible SIP communications. B2B module reuses TCP connection established by uac_registrant and it works so far. Now there is another limitation on this trunk and it is the number of parallel calls. We need more parallel calls then a single trunk is allowed to have. We can have additional trunks and multiply the capacity. I added additional trunk credentials to the uac_registrant DB and multiple registrations are successfully established. Here come the problems: 1) outgoing INVITE does not reuse any of the established TCP connection. Instead the new TCP connection is established. 2) Even if INVITE would reuse one of the established TCP connections the credentials used by INVITE have to match the ones that were used during the registration. Is there anything that can be done to correlate TCP connections and credentials between uac_registrant and B2B modules? In our case It would be enough to have a random pick of registered trunk with established TCP connection and relevant credentials for every forwarded INVITE to use additional capacity given by additional trunks. Thanks, Xaled _______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users