Hello,
I am trying to connect phone WebRTC clients to Asterisk.
keep getting :
res_pjsip/pjsip_distributor.c: Request ‘REGISTER’ from ‘“200” sip:200@aabbcc’ failed for ‘<incomming ip + port>’ (callid: qjp62x5un9752856h111z5) - Failed to authenticate
Asterisk version:20
Configuration:
[transport-wss]
type=transport
protocol=wss
bind=
;=============TEMPLATES ===================
[endpoint-basic] (!)
type=endpoint
identify_by=auth_username
transport=transport-wss
from_user= true
webrtc=yes
context=webrtc_mo
allow=!all,g722,ulaw
[auth-userpass] (!)
type=auth
auth_type=userpass
realm=asterisk
[aor-single-reg] (!)
type=aor
max_contacts=1
;===============EXTENSION 100
[100] (endpoint-basic)
auth=auth100
aors=100
[auth100] (auth-userpass)
password=12345467
username=100
[100] (aor-single-reg)
contact=sip:100@aabbcc
;===============EXTENSION 200
[200] (endpoint-basic)
auth=auth200
aors=200
[auth200] (auth-userpass)
password=12345467
username=200
[200] (aor-single-reg)
contact=sip:200@aabbcc
DEBUG LOG:
[Jun 21 13:00:10] VERBOSE[2516826] res_http_websocket.c: WebSocket connection from ‘<incomming ip + port>’ for protocol ‘sip’ accepted using version ‘13’
[Jun 21 13:00:10] DEBUG[2516826] res_pjsip_transport_websocket.c: Found WSS transport with write timeout: 100
[Jun 21 13:00:10] DEBUG[2516826] res_pjsip_transport_websocket.c: Write timeout for WS/WSS transports: 100
[Jun 21 13:00:10] DEBUG[2393545] res_pjsip_transport_websocket.c: Creating websocket transport for WSS:<incomming ip + port>
[Jun 21 13:00:10] DEBUG[2393545] res_pjsip/pjsip_transport_events.c: Transport <incomming ip + port>(ws0x7fe9bc044208-96,WSS): RefCnt: 0 state:CONNECTED
[Jun 21 13:00:10] DEBUG[2393545] res_pjsip/pjsip_transport_events.c: Transport <incomming ip + port>(ws0x7fe9bc044208-96,WSS): RefCnt: 1 state:MONITOR_CREATED
[Jun 21 13:00:11] DEBUG[2409804] res_pjsip_transport_websocket.c: Saving contact ‘zyuikuxpkwnd.invalid:0’
[Jun 21 13:00:11] DEBUG[2409804] res_pjsip_transport_websocket.c: Request msg REGISTER/cseq=1 (rdata0x7fe9bc044358) re-writing Contact URI from zyuikuxpkwnd.invalid:0;transport=wss to <incomming ip + port>;transport=ws
[Jun 21 13:00:11] DEBUG[2409804] res_pjsip/pjsip_distributor.c: Could not find matching transaction for Request msg REGISTER/cseq=1 (rdata0x7fe9bc044358)
[Jun 21 13:00:11] DEBUG[2409804] res_pjsip/pjsip_distributor.c: Calculated serializer pjsip/distributor-0000002c to use for Request msg REGISTER/cseq=1 (rdata0x7fe9bc044358)
[Jun 21 13:00:11] DEBUG[2409804] res_pjsip_endpoint_identifier_user.c: Attempting identify by From username ‘200’ domain ‘aabbcc’
[Jun 21 13:00:11] DEBUG[2409804] res_pjsip_endpoint_identifier_user.c: Identified by From username ‘200’ domain ‘aabbcc’
[Jun 21 13:00:11] DEBUG[2409804] res_pjsip_authenticator_digest.c: Realm: asterisk Username: 200 Result: NOAUTH
[Jun 21 13:00:11] DEBUG[2409804] res_http_websocket.c: Writing websocket text frame, length 477
[Jun 21 13:00:11] DEBUG[2393545] res_pjsip_transport_websocket.c: Saving contact ‘zyuikuxpkwnd.invalid:0’
[Jun 21 13:00:11] DEBUG[2393545] res_pjsip_transport_websocket.c: Request msg REGISTER/cseq=2 (rdata0x7fe9bc044358) re-writing Contact URI from zyuikuxpkwnd.invalid:0;transport=wss to <incomming ip + port>;transport=ws
[Jun 21 13:00:11] DEBUG[2393545] res_pjsip/pjsip_distributor.c: Could not find matching transaction for Request msg REGISTER/cseq=2 (rdata0x7fe9bc044358)
[Jun 21 13:00:11] DEBUG[2393545] res_pjsip/pjsip_distributor.c: Calculated serializer pjsip/distributor-0000002c to use for Request msg REGISTER/cseq=2 (rdata0x7fe9bc044358)
[Jun 21 13:00:11] DEBUG[2393545] res_pjsip_endpoint_identifier_user.c: Attempting identify by Authorization username ‘200’ realm ‘asterisk’
[Jun 21 13:00:11] DEBUG[2393545] res_pjsip_endpoint_identifier_user.c: Identified by Authorization username ‘200’ realm ‘asterisk’
[Jun 21 13:00:11] DEBUG[2393545] res_pjsip_authenticator_digest.c: Calculated nonce 1687341611/6e129ba086c0aa7a7953af248857356c. Actual nonce is 1687341611/6e129ba086c0aa7a7953af248857356c
[Jun 21 13:00:11] DEBUG[2393545] res_pjsip_authenticator_digest.c: Realm: asterisk Username: 200 Result: FAIL
Regards,
Yohai