Under what circumstances would this happen, practically? A previously allocated port for a recently shutdown connection is not immediately recycled.
> On Dec 19, 2022, at 4:22 PM, Benjamín Visón <[email protected]> wrote: > > Hello! > > I'm examining the WebSocket module and I am wondering how it handles multiple > connections from the same port. > > For context, imagine the following scenario: > > UA1 ==> Load Balancer:41914 ==> Kamailio (WS) > UA2 ==> Load Balancer:41914 ==> Kamailio (WS) > > Now, imagine Kamailio perceives UA1 from port 41914. What happens if that UA1 > suddenly drops and another UA2 comes in from the same port? (before the > connection closed event is fired for UA1) > > I understand by looking at the source code that `wsconn_add` is called and > that this new connection is added to the list. But what happens with the > previous UA entry? does it gets overwritten or does it stays there? > > The reason for my question is: I am perceiving the above scenario like this: > > Let's say UA1 is sip:[email protected];transport=ws SIP/2.0 > and UA2 is sip:[email protected];transport=ws. If UA2 comes in > and takes over the port that UA1 was using, and I send an INVITE to UA1 UA2 > ends up receiving the invite (obviously because it now has that port > allocated). > > So what I am thinking is that both [email protected] and > [email protected] are mapped to the same port for a short period > of time. > > Thoughts? > > > Saludos, > > > Benjamín Visón / IT Engineer / Software Developer > [email protected] / (829)-664-5163 > https://www.linkedin.com/in/bvisonl/ > > > __________________________________________________________ > Kamailio - Users Mailing List - Non Commercial Discussions > To unsubscribe send an email to [email protected] > Important: keep the mailing list in the recipients, do not reply only to the > sender! > Edit mailing list options or unsubscribe: -- Alex Balashov | Principal | Evariste Systems LLC Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe:
