DEV Community

Cover image for 488 Not Acceptable Here on Asterisk WebRTC: causes and fixes
Justin Downes
Justin Downes

Posted on Originally published at softpagecms.com AI-assisted

488 Not Acceptable Here on Asterisk WebRTC: causes and fixes

"488 Not Acceptable Here" is the error almost everyone meets the first time they point a browser phone at Asterisk. We put the common causes to Conrad de Wet, who builds Siperb, a WebRTC-to-SIP platform, and wrote the Innovate Asterisk PJSIP WebRTC walk-through. This is the condensed version; the full Q&A, including the FreePBX specifics, is on SoftPage.

The causes, in order of likelihood

1. Codecs. The browser offers Opus, usually only Opus, for audio. If the endpoint does not allow it, there is no codec in common, Asterisk logs "no joint capabilities" and answers 488. Conrad puts about half of all cases down to Opus missing from allow=.

2. The WebRTC media bundle. A browser offers UDP/TLS/RTP/SAVPF: DTLS-SRTP plus AVPF. An endpoint expecting plain RTP/AVP rejects the whole media line. This is not one setting but four or five (encryption, AVPF, ICE, rtcp-mux) failing together, which is why it looks chaotic. webrtc=yes sets them all at once.

3. Individual flags. rtcp-mux or ICE on their own. They belong to the same bundle.

4. Opus transcoding. If the other leg needs G.711 (a PSTN trunk, an old desk phone), Asterisk must transcode, which needs the codec_opus module. Without it you get a codec failure that looks exactly like cause 1.

Is webrtc=yes enough?

It does most of the work. On current Asterisk it sets use_avpf=yes, media_encryption=dtls, dtls_setup=actpass, ice_support=yes, media_use_received_transport=yes and rtcp_mux=yes (and dtls_verify=fingerprint).

It does not give you a transport, certificates or codecs. You still need:

  • a WSS transport (SIP over a secure WebSocket, usually port 8089) with a valid TLS certificate, because browsers will not open WSS to a self-signed certificate;
  • a DTLS certificate for media (auto-generated or your own);
  • codecs: disallow=all, then allow=opus,ulaw.
[webphone]
type=endpoint
transport=transport-wss
webrtc=yes
dtls_auto_generate_cert=yes
disallow=all
allow=opus,ulaw
aors=webphone
auth=webphone
context=from-internal
Enter fullscreen mode Exit fullscreen mode

The formula: webrtc=yes + WSS transport + valid certificate + Opus allowed. Drop any one and the browser call fails, usually with a 488.

Diagnosing it quickly

Run pjsip set logger on, place the call, and read two things: the SDP in the INVITE and the 488 that comes back.

  • "no joint capabilities": codecs.
  • A refused UDP/TLS/RTP/SAVPF media line: the DTLS/AVPF/webrtc=yes family.
  • DTLS or crypto errors: certificate or encryption set-up.

sngrep is faster still: open the INVITE and compare the m= and a= lines with what the endpoint expects.

"RTCP-MUX is not enabled" is the same family. The browser always sends a=rtcp-mux; with rtcp_mux=no Asterisk rejects the call. Set webrtc=yes, or rtcp_mux=yes on its own.

FreePBX in one line

Check, in this order: WebRTC = Yes on the extension's PJSIP advanced settings, Opus added to the extension's codec list, and a valid (not self-signed) certificate on the WSS transport.


Originally published at SoftPage. The team behind Siperb publishes SoftPage.

Top comments (0)