Could not be accepted - did not request WebSocket

Console error:
res_http_websocket.c:799 __ast_websocket_uri_cb: WebSocket connection from ‘10.39.56.127:58128’ could not be accepted - did not request WebSocket.

Actually I am using self assigned SSL and i am trying to run the sipml5 poject usung asterisk 15 but alays ge the error could not be accpted -did not request websocket. I dont have clue how to find this solutions I searched a lot to find the solution and I almost wasted 15 days to find this error althouht was not able solve the probelm. Please I help me to solve my pronlem I would be verx apreciated for your help.

What have you precisely done? What values have you put in the fields? Have you used the guide on the wiki[1]?

[1] https://wiki.asterisk.org/wiki/display/AST/WebRTC+tutorial+using+SIPML5

1 Like

yes I exactly Follow the that documentations:

pjsip:
[transport-udp]

type=transport

protocol=udp

bind=0.0.0.0

[6001]

type=endpoint

allow=all

auth=6001

context=default

aors=6001

[6001]

type=auth

auth_type=userpass

password=6001

username=6001

[6001]

type=aor

max_contacts=5

remove_existing=yes

[transport-tls]

type=transport

protocol=tls

bind=0.0.0.0

[6002]

type=endpoint

allow=all

auth=6002

aors=6002

context=default

[6002]

type=auth

auth_type=userpass

username=6002

password=6002

[6002]

type=aor

max_contacts=5

remove_existing=yes

[transport-wss]

type=transport

protocol=wss

bind=0.0.0.0

[6003]

type=endpoint

aors=6003

auth=6003

dtls_auto_generate_cert=yes

webrtc=yes

; Setting webrtc=yes is a shortcut for setting the following options:

; use_avpf=yes

; media_encryption=dtls

; dtls_verify=fingerprint

; dtls_setup=actpass

; ice_support=yes

; media_use_received_transport=yes

; rtcp_mux=yes

context=default

disallow=all

allow=ulaw

[6003]

type=auth

auth_type=userpass

password=6003

username=6003

[6003]

type=aor

max_contacts=5

remove_existing=yes

http.cong

[general]

enabled=yes

bindaddr=0.0.0.0

binport=8088

servername=asterisk

tlsenable=yes

tlsbinaddr=0.0.0.0:8089

tlscertfile=/etc/asterisk/keys/asterisk.pem

tlsprivatekey=/etc/asterisk/keys/asterisk.key

tlscafile=/etc/asterisk/keys/ca.crt

extensions.conf
[default]

exten=>6001,1,Dial(pjsip/6001,20)

exten=>6002,1,Dial(pjsip/6002,20)

exten=>6003,1,Dial(pjsip/6003,20)

for the ssl I run the ast_tls_cert script in the directory of asterisk then it generate the file and copy the file in etc/asterisk/keys folder

I run did ssl configure on browser using https://domainname:8089/ws
then open the application domain
follow the docs and I type in the expert setting wss://10.39.1.3:8089/ws

and

Display Name:

6003
Private Identity*:

6003
Public Identity*:

sip:6003@10.39.1.3
Password:

••••
Realm* 10.39.1.3

somehing like that but always getting problem disconnected : failed to connect to the server

Hello, i’m facing the same problem…did you solve this?