Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: menuconfig -> menuselect

...

The built-in Asterisk HTTP server is used to provide the WebSocket support. This can be enabled using the following in the general section of the http.conf configuration file.

Code Block

enabled=yes

If you would like to change the port from the default value of 8088 this can also be done in the general section.

Code Block

bindport=8088

The res_http_websocket must also be built and loaded by Asterisk. For most individuals this is done by default.

Note

Ensure that res_http_websocket.so is selected in menuconfig menuselect prior to building Asterisk. Also ensure that res_http_websocket.so is loaded prior to chan_sip.so if you are not using autoload in modules.conf

...

To allow a peer, user, or friend access using the WebSocket transport it must be added to their transport options like the following.

Code Block

transport=ws,wss

To restrict access to clients using only an HTTPS connection allow the 'wss' transport only.

The WebRTC standard has selected AVPF as the audio video profile to use for media streams. This is not the default profile in use by chan_sip. As a result the following must be added to the peer, user, or friend.

Code Block

avpf=yes

This will cause AVPF and SAVPF to be used and the media streams to be accepted.

Note

Asterisk 11.0.0-beta1 has an issue in it where registering over WebSocket may not work properly. The work around is to use a newer version of Asterisk that has been released, or check out the Asterisk 11 branch from SVN. You can also set

Code Block

nat=yes,force_rport

on the peer, user, or friend to work around the issue.

The issue report for this problem is viewable at https://issues.asterisk.org/jira/browse/ASTERISK-20238

As media encryption is a requirement of rtcweb the following must be added to the peer, user, or friend to enable it.

Code Block

encryption=yes

Using WebSocket

...