Asterisk 20+ – Can't enable External Media / ARI returning 404 on externalMedia call

Hi everyone,

I’m new to Asterisk and very excited to start learning. I’m currently trying to build a project where I redirect real-time audio from Asterisk to a Java server using the externalMedia feature via ARI.

However, I’ve run into a problem:

What’s going wrong

I’m getting the following response when making the ARI call:

POST /ari/channels/1752743123.4/externalMedia → 404 Not Found
Response body:
{
  "message": "Resource not found"
}

And when accessing the ARI endpoint from the browser, I get a page that just says:

Upgrade Required
Asterisk

My setup

  • Asterisk version: GIT-20-55f4294e82M
  • Ubuntu version: 22.04.5 LTS
  • ARI port: http://<ip>:8088

My configuration files:

http.conf

[general]
servername=Asterisk
enabled = yes
bindaddr = 0.0.0.0
bindport = 8088

ari.conf

[general]
enabled = yes
pretty = yes

[ari_user]
type = user
read_only = no
password = ari_password

extensions.conf

*code*...
exten => 999,1,Answer()
 same => n,Stasis(your_ari_app)
 same => n,Hangup()
*more code*...

What I’ve tried

  • I’ve read that external media is built-in and should just be enabled through menuselect, but I don’t see any “external media” option in there.
  • I ran find . -name '*external*' in the Asterisk source folder and found nothing like res_stasis_external_media.
  • I’ve recompiled and reinstalled Asterisk multiple times with different versions (including release and GIT), but still no luck.

My assumptions

  1. Maybe my install didn’t include the external media module correctly.
  2. Maybe it’s not called external media internally (so I’m missing it in menuselect).
  3. Maybe I’m calling it wrong through ARI.

What I need

I’d really appreciate if someone could clarify:

  • How to properly enable externalMedia in Asterisk 20+?
  • How can I make sure the required module is actually compiled and loaded?
  • Is there anything else I might be missing?

Also, since I’m new to the community, I’d love to know where I can find good tutorials or learning resources for working with Asterisk and especially with ARI and media handling.

Thanks a lot in advance for your help.

This is not valid[1].

You tried to access the Websocket as a normal HTTP request, which won’t work.

The documentation on the routes, their arguments, and such is on the docs site. Otherwise you need to be specific on what programming language you’d like information in.

Additionally if you opt to use ARI to try to write things, be aware that it will lie. This is a certainty.

[1] Channels - Asterisk Documentation

Thank you so much for the clarification

I really appreciate the quick and clear explanation.
I’ll start looking into how to properly handle the WebSocket connection from my Java server. If you have any recommended resources or examples, I’d be grateful.

Thanks again for your help!