Asterisk PBXFEATUREDLatestVOIPWebRTC

488 Not Acceptable Here: Conrad de Wet on Asterisk WebRTC

“488 Not Acceptable Here” is the error that greets almost everyone the first time they point a browser phone at Asterisk. To get past the folklore, we put our questions to Conrad de Wet. He builds Siperb, a WebRTC-to-SIP platform that spends all day negotiating exactly these calls. He also wrote the Innovate Asterisk walk-through of a PJSIP WebRTC set-up. His answers on the 488 Not Acceptable Here error follow. For what every other code means, see our SIP response codes lookup. If a call fails with a 403 instead, see our SIP 403 Forbidden guide.

What causes a 488 Not Acceptable Here on a browser call to Asterisk?

You see a lot of these. When a browser call to Asterisk comes back with a 488, what is actually going wrong? And in what order of likelihood?

Honestly, it’s nearly always one of two things, and then a long tail. Top of the list, by a mile, is codecs. The browser offers Opus, and usually only Opus for audio. Nobody told the Asterisk endpoint to allow it, so there’s no codec in common, and Asterisk throws back “no joint capabilities.” That’s your 488. I’d say half of them are nothing more exotic than Opus missing from the allow= list.

The second big one is what I think of as the WebRTC bundle. A browser offers secure media: UDP/TLS/RTP/SAVPF. That’s DTLS-SRTP plus AVPF. If your endpoint is still sitting there expecting plain old RTP/AVP, the whole media line is unacceptable and the call dies. The thing people miss is that this isn’t one setting, it’s four or five (encryption, AVPF, ICE, rtcp-mux), all failing at the same time. On Asterisk a single option, webrtc=yes, flips them all together. So when someone hasn’t set it, they trip every one of them at once and it looks like chaos.

After that you get the individual flags showing up on their own, rtcp-mux and ICE, but those are really just members of that same bundle. And then there’s the sneaky one I’d put last: Opus transcoding. Say the browser is on Opus and the other leg needs G.711, such as a PSTN trunk or an old desk phone. Asterisk then has to transcode, and that needs the codec_opus module on the server. If it isn’t, you get a codec failure that looks identical to the first case. That one catches the people who were diligent enough to allow Opus but never installed the module.

Is webrtc=yes enough on a PJSIP endpoint?

So what’s the minimum you actually need on a PJSIP endpoint? Is webrtc=yes enough on its own?

webrtc=yes does a lot of the heavy lifting, and I’d tell anyone to lean on it rather than hand-configure the flags. On current Asterisk it quietly sets use_avpf=yes, media_encryption=dtls, dtls_setup=actpass, ice_support=yes, media_use_received_transport=yes and rtcp_mux=yes: all the media-negotiation plumbing, in one line.

But no, it’s not the whole job. That’s where people come unstuck. It doesn’t give you a transport, it doesn’t give you certificates, and it doesn’t touch your codecs. You still need a WSS transport. WebRTC signalling is SIP over a secure WebSocket, usually on 8089. That transport needs a valid TLS certificate, because a browser simply won’t open a WSS to a self-signed cert. That’s not technically a 488, but it’s the wall people hit the moment before one. You need a DTLS certificate for the media too: either let Asterisk auto-generate it or point it at your own. And you need codecs, which webrtc=yes deliberately leaves alone: disallow=all, then allow=opus,ulaw. Opus for the browser, ulaw so there’s something sensible to bridge to.

Stripped right down, it’s about this:

[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

Add the matching AOR and auth, and a wss transport with a real cert behind it. So the formula is webrtc=yes + a WSS transport + a valid certificate + Opus allowed. Drop any one of the four and the browser falls over, usually as that 488.

Editor’s note: the Asterisk documentation confirms this list. With webrtc=yes, Asterisk also sets dtls_verify=fingerprint. It generates the DTLS certificate itself when you give no dtls_cert_file.

How to tell which fix a 488 Not Acceptable Here needs

When an admin is staring at a failed call, what’s the fastest way to tell which of these it is?

Turn on the SIP logger with pjsip set logger on, and place the call. Then read just two things: the SDP in the INVITE, and the 488 that comes back. The log usually hands you the answer. If you see “no joint capabilities,” it’s codecs, full stop. When Asterisk refuses a UDP/TLS/RTP/SAVPF media line, you’re in the DTLS/AVPF/webrtc=yes family. DTLS or crypto errors point to your certificate or encryption setup.

sngrep is even quicker for this: pull up the INVITE and just eyeball the m= and a= lines against what your endpoint expects. The mismatch is almost always visible at a glance.

Is “RTCP-MUX is not enabled” the same problem?

And that “RTCP-MUX is not enabled” error people run into: is that the same family of problem?

Yes, completely. It’s not a separate beast; rtcp-mux is just one of those WebRTC media flags. The browser always asks for it with a=rtcp-mux; if the endpoint has rtcp_mux=no, Asterisk tells you flat out in the log and rejects the call. Set webrtc=yes, or rtcp_mux=yes on its own, and it’s gone. If you’re seeing that line, you’ve basically been handed a diagnosis.

How FreePBX users run into the 488

You mentioned FreePBX people hitting this. Does it trip them up differently?

It does, mostly because the settings sit in a few different places. It’s easy to get one without the others. On the extension itself, under the PJSIP advanced settings, there’s a WebRTC = Yes dropdown. That’s the big one. It flips the whole bundle for you, and people enable a browser phone and forget it. Then there’s codecs. The extension’s codec list almost never includes Opus by default, so you have to add it. Again, you need the module on the server if you want Opus transcoded. And there’s the transport and certificate side. The extension has to use the WSS transport, and you have to switch on the Asterisk HTTP server and TLS. The classic FreePBX WebRTC mistake is a self-signed certificate in the Certificate Manager. The browser quietly refuses the WSS, and you never even reach a clean 488 to debug.

So for FreePBX the running order is: WebRTC=Yes not set, then Opus missing from the codec list, then the wrong or self-signed certificate. Get those three right and the vast majority of 488 Not Acceptable Here errors just evaporate.

Where Siperb fits

Last one. For readers who’d honestly rather never open pjsip.conf, where does Siperb fit?

That’s the whole point of us, really. With Siperb you don’t touch Asterisk’s WebRTC config at all. The browser speaks full WebRTC to our proxy: Opus, DTLS-SRTP, ICE, rtcp-mux and all. We hand your PBX a perfectly ordinary SIP/RTP leg in G.711, transcoding the media and the encryption on the way through. You point Siperb at Asterisk like any normal SIP connection. There’s no webrtc=yes, no certificates and no Opus module, and the 488 simply never comes up.

For faults after the call connects, such as one-way audio, see our Asterisk WebRTC troubleshooting guide.

The team behind Siperb publishes SoftPage.