Good evening,
I am using the Outbound Websocket for ARI.
It successful connects to my Spring application and some basic RESTRequest over the websocket seems to work find such as listing bridges.
One issue I am having is with creating an external media websocket.
I am following the docs on the ARI over Websocket and I am wanting to get media via a websocket that the asterisk server initiates to my spring application.
I have added the registery WS handler in spring but to be honest asterisk is refusing the request with a 405 before that regardless.
I am using the docs here to form the request over the websocket:
{
“type” : “RESTRequest”,
“transaction_id” : “0_2”,
“request_id” : “0_2”,
“uri” : “/channels/externalMedia”,
“message_body” : “{"app":"my_java_app:PJSIP/6001-00000004","external_host":"ws://localhost:8080/ws/media?callId=0","format":"slin16","transport":"websocket","encapsulation":"none","connection_type":"server","direction":"both","channel":"PJSIP/6001-00000004"}”,
“method” : “POST”,
“content_type” : “application/json”
}
I get the response:
{
“type” : “RESTResponse”,
“transaction_id” : “0_2”,
“request_id” : “0_2”,
“status_code” : 405,
“reason_phrase” : “Method Not Allowed”,
“uri” : “/channels/externalMedia”,
“content_type” : “application/json”,
“message_body” : “{"message":"Invalid method"}”,
“application” : “my_java_app:PJSIP/6001-00000004”,
“timestamp” : “2025-12-05T17:00:31.317+0000”,
“asterisk_id” : “20:2b:20:bf:42:3b”
}
I believe I have formed the request properly and included the required JSON body so I am unsure why I get a 405 (POST does seem to be allowed according to the REST docs).
Thank you for any pointers!

