Websocket fail with PJSIP_EUNSUPTRANSPORT

Hello,

I upgraded from Asterisk 17.6.0 to 18.6.0 without changing config, and now websocket connections don’t work
Are there any changes done to 18.6.0 which is not compatible with 17.6 ?
I’m using pjproject 2.11.1

(had to strip logs since I wasnt allowed to post all of it)

[Aug 24 10:29:42] DEBUG[37261]: res_pjsip/pjsip_options.c:927 sip_options_qualify_aor: Qualifying all contacts on AOR ‘USER’
[Aug 24 10:29:42] DEBUG[37261]: res_pjsip/pjsip_options.c:856 sip_options_qualify_contact: Qualifying contact ‘USER;@2bb41265f86f58913c4fd6660c9a95ea’ on AOR ‘USER’
[Aug 24 10:29:42] DEBUG[37261]: res_pjsip.c:4775 endpt_send_request: 0x7f925c004b70: Wrapper created
[Aug 24 10:29:42] DEBUG[37261]: res_pjsip.c:4790 endpt_send_request: 0x7f925c004b70: Set timer to 3000 msec
[Aug 24 10:29:42] DEBUG[37261]: res_pjsip.c:4653 endpt_send_request_cb: 0x7f925c004b70: PJSIP tsx response received
[Aug 24 10:29:42] DEBUG[37261]: res_pjsip.c:4666 endpt_send_request_cb: 0x7f925c004b70: Cancelling timer
[Aug 24 10:29:42] DEBUG[37261]: res_pjsip.c:4675 endpt_send_request_cb: 0x7f925c004b70: Timer cancelled
[Aug 24 10:29:42] DEBUG[37261]: res_pjsip.c:4696 endpt_send_request_cb: 0x7f925c004b70: Callbacks executed
[Aug 24 10:29:42] ERROR[37261]: res_pjsip.c:4828 endpt_send_request: Error 171060 ‘Unsupported transport (PJSIP_EUNSUPTRANSPORT)’ sending OPTIONS request to endpoint USER
[Aug 24 10:29:42] DEBUG[37261]: res_pjsip.c:4752 send_request_wrapper_destructor: 0x7f925c004b70: wrapper destroyed

Any such changes would be in the UPGRADE.txt document.

What does “don’t work” mean? Is the connection established, the REGISTER sent, but then the qualify fails like you’ve shown? Do registrations not work? Did you restart after upgrade and it’s trying to qualify old connections that no longer exist?

I can make outbound calls with webrtc, but asterisk doesnt seem to want to register the user so incoming calls dont work.

The error seem to be PJSIP_EUNSUPTRANSPORT, but I can’t figure out why this is happening.

I didnt find any changes in UPGRADE.txt that should cause this.

You’ll need to provide actual Asterisk console output including SIP trace (pjsip set logger on) as well as the configuration.

The log is from asterisk console output with pjsip set logger on :slight_smile:
The webrtc endpoint is listed but gets marked as unavailable

pjsip show endpoint:

Endpoint: USER Unavailable 0 of 10
InAuth: sipUSER/USER
Aor: USER 1
Contact: USER/sip:dek1tmnh@1.2.3.4:34232;tr 1765e83a17 Unavail nan
Transport: transport-wss ws 0 0 0.0.0.0:443

Pjsip base config:
[transport-wss]
type = transport
protocol = ws
bind = 0.0.0.0:443
domain = oyatel.com

endpoint-user-wss
type = endpoint
transport = transport-wss
allow = !all,opus,alaw,ulaw,h264
direct_media = no
rtp_ipv6 = yes
trust_id_inbound = yes
dtmf_mode = info
identify_by = username
use_avpf = yes
send_pai = yes
media_encryption_optimistic = yes
media_encryption = dtls
ice_support = yes
dtls_cert_file = /etc/app/j/x509/cert.pem
dtls_private_key = /etc/app/j/x509/cert.key
dtls_setup = actpass
dtls_verify = fingerprint
context = calls_from_asterisk
message_context = message_from_user
rewrite_contact = yes
rtp_symmetric = yes
force_rport = yes
device_state_busy_at = 10
rtcp_mux = yes
bundle = yes
webrtc = yes
max_audio_streams=10
max_video_streams=10

Remove the explicit “transport=transport-wss” from all of your configuration and try again.

Same error.
The webrtc client is jssip-3.7 if that matters.

You could also just not qualify them, that would be an immediate solution. Websockets are persistent connection and have their own keep alive mechanism, and if the websocket goes away then the Contact does as well. This may be why noone else has run into such things - or it’s something about your configuration I’m not seeing.

When disabling qualify, it seems asterisk still marks the client as unavailable due to the transport error.

Incoming call log:

[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4393 __print_debug_details: The current inv state is DISCONNCTD
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4645 session_inv_on_state_changed: PJSIP/USER-00000005: Source of transaction state change is TRANSPORT_ERROR
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4693 session_inv_on_state_changed:
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4737 session_inv_on_tsx_state_changed: PJSIP/USER-00000005 TSX State: Terminated Inv State: DISCONNCTD
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4357 __print_debug_details: Function session_inv_on_tsx_state_changed called on event TSX_STATE
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4371 __print_debug_details: The state change pertains to the endpoint ‘USER(PJSIP/USER-00000005)’
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4379 __print_debug_details: The inv session does NOT have an invite_tsx
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4382 __print_debug_details: The UAC INVITE transaction involved in this state change is 0x7fe45c063628
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4386 __print_debug_details: The current transaction state is Terminated
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4388 __print_debug_details: The transaction state change event is TRANSPORT_ERROR
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4393 __print_debug_details: The current inv state is DISCONNCTD
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4759 session_inv_on_tsx_state_changed: Disconnected
[Aug 25 11:53:40] DEBUG[38223]: res_pjsip_session.c:4169 session_on_tsx_state: (null session) TSX State: Terminated Inv State: DISCONNCTD
[Aug 25 11:53:40] DEBUG[38278][C-00000002]: chan_pjsip.c:2521 chan_pjsip_hangup: PJSIP/USER-00000005
[Aug 25 11:53:40] DEBUG[38278][C-00000002]: chan_pjsip.c:2539 chan_pjsip_hangup: Cause: 503
== Everyone is busy/congested at this time (1:0/1/0)
[Aug 25 11:53:40] DEBUG[38223]: chan_pjsip.c:2488 hangup: PJSIP/USER-00000005
[Aug 25 11:53:40] DEBUG[38214]: cdr.c:1300 cdr_object_create_public_records: CDR for PJSIP/USER-00000005 is dialed and has no Party B; discarding
[Aug 25 11:53:40] DEBUG[38278][C-00000002]: pbx_variables.c:377 ast_str_retrieve_variable: Result of ‘HANGUPCAUSE’ is ‘34’
[Aug 25 11:53:40] DEBUG[38278][C-00000002]: pbx_variables.c:377 ast_str_retrieve_variable: Result of ‘DIALSTATUS’ is ‘CONGESTION’
[Aug 25 11:53:40] DEBUG[38278][C-00000002]: channel.c:2461 ast_softhangup_nolock: Soft-Hanging (0x10) up channel ‘PJSIP/sbc3-00000003’
[Aug 25 11:53:40] DEBUG[38278][C-00000002]: channel.c:2551 ast_hangup: Channel 0x7fe45c0afac0 ‘PJSIP/sbc3-00000003’ hanging up. Refs: 2
[Aug 25 11:53:40] DEBUG[38278][C-00000002]: chan_pjsip.c:2521 chan_pjsip_hangup: PJSIP/sbc3-00000003
[Aug 25 11:53:40] DEBUG[38278][C-00000002]: chan_pjsip.c:2441 hangup_cause2sip: AST hangup cause 16 (no match found in PJSIP)
[Aug 25 11:53:40] DEBUG[38278][C-00000002]: chan_pjsip.c:2539 chan_pjsip_hangup: Cause: 0

After removing every “transport=” line, did you reload or restart? Is the websocket connection actually still up?

I restarted asterisk
The websocket connection is unaffected (still up) by the incoming call.

Nothing else comes to mind then. Perhaps someone else has an idea.

I would just suggest you debug it with bundled pjproject before using pjproject 2.11

I tested using the same pjproject 2.10 that I used from 17.6 (recompiled though) but got the same error.
I will try the bundled and dig some more if still not working. Thanks for the help. :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.