Skip to content

Conversation

@radioprotector
Copy link

This allows for transport protocols that are not based solely on Transport.server's URL scheme.

This provides a path for eliminating the deprecated UserAgentOptions.hackViaTcp configuration option, as the transport options can now have { headerProtocol: "TCP" } in its place.

This change is also useful when working with SIP endpoints that are behind a load balancer with SSL termination at the balancer. In that case, the transport protocol between the browser and the load balancer would use the SIPS/WSS/TLS protocol, but I believe the transport protocol indicated in the Via header would need to be SIP/WS/TCP when it reaches the SIP endpoints.

Potential Alternative

Instead of impacting Transport.protocol, I considered adding an alternate Transport.headerProtocol property that would be referenced in setViaHeader calls.

However, the core Transport.protocol property states that it is formatted "as defined for the Via header sent-protocol transport", and Transport.protocol is currently only referenced for the purposes of setViaHeader calls, so I felt this would be redundant.

thefinn93 added a commit to AccelerateNetworks/fusionpbx-webtexting that referenced this pull request May 5, 2023
@tal952
Copy link

tal952 commented Jul 7, 2023

As an hack, you can do: simpleUser.sessionManager.userAgent._transport._protocol = "WS";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants