I am using a SIP provider. There is no problem with that. My ARI connection is also good. I can call myself through it. But I can not establish websocket connection with my python application properly. This is the error I got once I run python application.
Handshake status 400 Bad Request
And also this is the error message I see through asterisk terminal once I run my application.
res_http_websocket.c:866 __ast_websocket_uri_cb: WebSocket connection from '127.0.0.1:53664' could not be accepted - no protocols out of 'ast.websocket.json' supported
This is how I start websocket connection in my appliacation
res_http_websocket.c:866 __ast_websocket_uri_cb: WebSocket connection from '127.0.0.1:35128' could not be accepted - no protocols out of 'ari' supported
I changed websocket url with the url you gave. But got another error. Here:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/dist-packages/websocket/_app.py", line 612, in run_forever
ping_timeout, dispatcher, parse_url(self.url)[3]
File "/usr/local/lib/python3.8/dist-packages/websocket/_url.py", line 63, in parse_url
raise ValueError("scheme %s is invalid" % scheme)
ValueError: scheme http is invalid