Summary:ASTERISK-21279: Allow WebSocket connections on URL's other than /ws
Reporter:David M. Lee (dlee)Labels:Asterisk12
Date Opened:2013-03-15 09:55:02Date Closed:2013-04-18 12:30:45
Status:Closed/CompleteComponents:Core/Stasis Resources/res_ari
Versions:Frequency of
Description:The current WebSocket support uses the WebSocket subprotocol for connection routing, and all requests funnel to the {{/ws}} URL.

This could be problematic for deploying Asterisk for use with WebRTC, since both WebRTC and Stasis-HTTP use WebSockets. This potentially exposes the Stasis-HTTP API's to the outside world, which would certainly give me the willies about deploying it.

The Stasis WebSocket should listen on a different URL, such as {{http://localhost:8088/stasis/api/events}}. (WebRTC can keep {{/ws}}, since it was there first.) An HTTP proxy in front of Asterisk can forward only {{/ws}} requests, leaving Stasis-HTTP on the trusted side of the firewall.