[Asterisk-code-review] res pjsip WebRTC/websockets: Fix usage of WS vs WSS. (asterisk[14])

Richard Mudgett asteriskteam at digium.com
Mon Feb 27 17:41:05 CST 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/4972 )

Change subject: res_pjsip WebRTC/websockets: Fix usage of WS vs WSS.
......................................................................


Patch Set 4:

(1 comment)

https://gerrit.asterisk.org/#/c/4972/4/res/res_pjsip_transport_websocket.c
File res/res_pjsip_transport_websocket.c:

Line 193: 	newtransport->transport.type_name = ast_websocket_is_secure(newtransport->ws_session)
> Asterisk seems to ask for transport name WSS with this change.
Please supply a log showing what you are saying on the Asterisk issue.  I only have the https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5 instructions for a websocket connection and the patch was working fine with that demo.

The RFC[1] in section 5.1 says the Via header must be sending WSS for the transport on a secure websocket and in section 5.2 for a URI to send WS.  Setting the newtransport->transport.type_name to WSS here is the only way I can see in the code to have pjproject build the Via header with WSS.

pjproject must always find and reuse the websocket connection to send replies and new requests.  Remember Asterisk cannot initiate a websocket connection.

[1] https://tools.ietf.org/html/rfc7118


-- 
To view, visit https://gerrit.asterisk.org/4972
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie3a0fb1a41101a4c1e49d875a8aa87b189e7ab12
Gerrit-PatchSet: 4
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Jørgen H <asterisk.org at hovland.cx>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list