The latest information about browser support is available at http://en.wikipedia.org/wiki/WebRTC
Secure media is a requirement of WebRTC and as a result SRTP must be available. In order for Asterisk to build SRTP support the libsrtp library and development headers must be available. This can be installed using the distribution's package management system or from source. Failure to do this will result in the media offers being rejected.
Asterisk 11 comes with an embedded pjproject. When building Asterisk 11, to get ICE support you'll need the UUID development library (uuid-dev for Debian, libuuid-devel for CentOS) library. If you don't have ICE support, then you'll likely run into audio issues in several scenarios, specifically when attempting to traverse NAT, as WebRTC uses ICE,STUN,TURN to do this.
Starting with Asterisk 12 you need to have pjproject libraries installed, otherwise you most likely won't have audio in your WebRTC calls and no warning whatsoever!
See here for instructions on getting it installed: PJSIP-pjproject
Additionally on CentOS you may need to do "export LD_LIBRARY_PATH=/usr/lib". The alternative is passing the correct flags (usually --with-libdir) to all dependencies to install the libraries in /usr/lib64 instead of /usr/lib. You could possibily also play with the /etc/ld.so.conf.d configuration to achieve the same effect.
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.
If you would like to change the port from the default value of 8088 this can also be done in the general section.
The res_http_websocket must also be built and loaded by Asterisk. For most individuals this is done by default.
The secure calling tutorial viewable at https://wiki.asterisk.org/wiki/display/AST/Secure+Calling+Tutorial can be used as a basis to configure the built-in HTTP server with HTTPS (and secure WebSocket) support.
All configuration occurs in sip.conf, or a configuration file included by it.
To allow a peer, user, or friend access using the WebSocket transport it must be added to their transport options like the following.
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.
This will cause AVPF and SAVPF to be used and the media streams to be accepted.
As media encryption is a requirement of rtcweb the following must be added to the peer, user, or friend to enable it.
All SIP responses are sent from Asterisk to the client.
HTTP Response: 404 Not Found
SIP Response: 400 Bad Request received over SIP when registering using WebSocket
The version of chan_sip in use has a bug when registering. Update to a newer version.
SIP Response: 488 Not acceptable here received over SIP when placing a call to Asterisk
You have not enabled AVPF support in the peer, user, or friend entry using "avpf=yes" or have not allowed a codec that is supported by the caller.