[Home]

Summary:ASTERISK-27120: Unsupported transport (PJSIP_EUNSUPTRANSPORT)' sending OPTIONS request to endpoint
Reporter:Andreas Krüger (woopstar)Labels:
Date Opened:2017-07-11 00:48:03Date Closed:2017-10-24 14:55:37
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:14.5.0 Frequency of
Occurrence
Related
Issues:
Environment:Ubuntu 16.04, dedicated servers, non nat'edAttachments:
Description:We have upgraded to Asterisk 14.5.0 from 13.10 in hopes this error would be gone, but we are still seeing it. As we have upgraded I now suspect it might be a configuration error.

All clients are connected with WSS (WebRTC). The following errors are in the logs:

{code}
Jul 11 02:11:22 osl1-voip-cluster01-asterisk04 nice[4156]: [2017-07-11 02:11:22] #033[1;31mERROR#033[0m[12712]: #033[1;37mres_pjsip.c#033[0m:#033[1;37m3745#033[0m #033[1;37mendpt_send_request#033[0m: Error 171060 'Unsupported transport (PJSIP_EUNSUPTRANSPORT)' sending OPTIONS request to endpoint 10015-OF3GAJFHL
Jul 11 02:11:23 osl1-voip-cluster01-asterisk04 nice[4156]: [2017-07-11 02:11:23] #033[1;31mERROR#033[0m[5505]: #033[1;37mres_pjsip.c#033[0m:#033[1;37m3745#033[0m #033[1;37mendpt_send_request#033[0m: Error 171060 'Unsupported transport (PJSIP_EUNSUPTRANSPORT)' sending OPTIONS request to endpoint 10009-L8YK4PECM
Jul 11 02:11:28 osl1-voip-cluster01-asterisk04 nice[4156]: [2017-07-11 02:11:28] #033[1;31mERROR#033[0m[31981]: #033[1;37mres_pjsip.c#033[0m:#033[1;37m3745#033[0m #033[1;37mendpt_send_request#033[0m: Error 171060 'Unsupported transport (PJSIP_EUNSUPTRANSPORT)' sending OPTIONS request to endpoint 10009-YXWSX8LZ5
{code}


Here is the configuration:

pjsip.conf:
{code}
[system]
; From https://wiki.asterisk.org/wiki/display/AST/Performance+Tuning
timer_t1=150
timer_b=9600
threadpool_initial_size=20
threadpool_auto_increment=5
threadpool_idle_timeout=120
threadpool_max_size=100

[global]
keep_alive_interval=20
contact_expiration_check_interval=10

[udp5060]
type=transport
protocol=udp
bind=0.0.0.0:5060
local_net=185.161.127.70/255.255.255.240
external_media_address=185.161.127.70
external_signaling_address=185.161.127.70
tos=af11
cos=5


[wss]
type=transport
protocol=wss
bind=0.0.0.0:15060
local_net=185.161.127.70/255.255.255.240
external_media_address=185.161.127.70
external_signaling_address=185.161.127.70

[tls]
type=transport
protocol=tls
bind=0.0.0.0:15061
cert_file=/etc/sslmate/certs/star.publicdns.zone.chained.crt
priv_key_file=/etc/sslmate/keys/star.publicdns.zone.key
local_net=185.161.127.70/255.255.255.240
external_media_address=185.161.127.70
external_signaling_address=185.161.127.70
method=sslv23
tos=af11
cos=5
{code}

{code}
osl1-voip-cluster01-asterisk04*CLI> pjsip show endpoint 10004-AV8V6SSI5

Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
   I/OAuth:  <AuthId/UserName...........................................................>
       Aor:  <Aor............................................>  <MaxContact>
     Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
 Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
  Identify:  <Identify/Endpoint.........................................................>
       Match:  <criteria.........................>
   Channel:  <ChannelId......................................>  <State.....>  <Time.....>
       Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

Endpoint:  10004-AV8V6SSI5                                      Unavailable   0 of inf
    InAuth:  10004-AV8V6SSI5/10004-AV8V6SSI5
       Aor:  10004-AV8V6SSI5                                    2
 Transport:  wss                       wss      0      0  0.0.0.0:15060


ParameterName                      : ParameterValue
===============================================================================================================================================================================================================================
100rel                             : yes
accountcode                        : AV8V6SSI5
acl                                :
aggregate_mwi                      : true
allow                              : (ulaw|alaw)
allow_overlap                      : true
allow_subscribe                    : true
allow_transfer                     : true
aors                               : 10004-AV8V6SSI5
asymmetric_rtp_codec               : false
auth                               : 10004-AV8V6SSI5
bind_rtp_to_media_address          : false
call_group                         :
callerid                           : 10004-AV8V6SSI5
callerid_privacy                   : allowed_not_screened
callerid_tag                       : 10004-AV8V6SSI5
connected_line_method              : invite
contact_acl                        :
context                            : internal
cos_audio                          : 5
cos_video                          : 3
device_state_busy_at               : 0
direct_media                       : false
direct_media_glare_mitigation      : none
direct_media_method                : invite
disable_direct_media_on_nat        : false
dtls_ca_file                       :
dtls_ca_path                       :
dtls_cert_file                     : /etc/sslmate/certs/star.publicdns.zone.chained.crt
dtls_cipher                        : ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA
dtls_fingerprint                   : SHA-256
dtls_private_key                   : /etc/sslmate/keys/star.publicdns.zone.key
dtls_rekey                         : 0
dtls_setup                         : actpass
dtls_verify                        : No
dtmf_mode                          : rfc4733
fax_detect                         : false
fax_detect_timeout                 : 0
force_avp                          : false
force_rport                        : true
from_domain                        :
from_user                          :
g726_non_standard                  : false
ice_support                        : true
identify_by                        : username
inband_progress                    : false
language                           :
mailboxes                          :
media_address                      :
media_encryption                   : dtls
media_encryption_optimistic        : false
media_use_received_transport       : true
message_context                    :
moh_passthrough                    : false
moh_suggest                        : default
mwi_from_user                      :
mwi_subscribe_replaces_unsolicited : false
named_call_group                   :
named_pickup_group                 :
one_touch_recording                : false
outbound_auth                      :
outbound_proxy                     :
pickup_group                       :
record_off_feature                 : automixmon
record_on_feature                  : automixmon
rewrite_contact                    : true
rpid_immediate                     : false
rtcp_mux                           : true
rtp_engine                         : asterisk
rtp_ipv6                           : false
rtp_keepalive                      : 20
rtp_symmetric                      : true
rtp_timeout                        : 0
rtp_timeout_hold                   : 0
sdp_owner                          : -
sdp_session                        : Asterisk
send_diversion                     : true
send_pai                           : false
send_rpid                          : false
set_var                            :
srtp_tag_32                        : false
sub_min_expiry                     : 0
subscribe_context                  :
t38_udptl                          : false
t38_udptl_ec                       : none
t38_udptl_ipv6                     : false
t38_udptl_maxdatagram              : 0
t38_udptl_nat                      : false
timers                             : yes
timers_min_se                      : 90
timers_sess_expires                : 1800
tone_zone                          :
tos_audio                          : 40
tos_video                          : 136
transport                          : wss
trust_id_inbound                   : false
trust_id_outbound                  : true
use_avpf                           : true
use_ptime                          : false
user_eq_phone                      : false
voicemail_extension                :
{code}

And the real-time configuration of one of the endpoints:

{code}
INSERT INTO `ps_aors` (`id`, `contact`, `default_expiration`, `mailboxes`, `max_contacts`, `minimum_expiration`, `remove_existing`, `qualify_frequency`, `authenticate_qualify`, `maximum_expiration`, `outbound_proxy`, `support_path`, `qualify_timeout`, `voicemail_extension`)
VALUES
('10004-AV8V6SSI5', NULL, NULL, NULL, 2, NULL, 'yes', 110, NULL, 160, NULL, NULL, NULL, NULL);

INSERT INTO `ps_contacts` (`id`, `uri`, `expiration_time`, `qualify_frequency`, `outbound_proxy`, `path`, `user_agent`, `qualify_timeout`, `regserver`, `insert_id`, `reg_server`, `authenticate_qualify`, `via_addr`, `via_port`, `call_id`, `endpoint`)
VALUES
('10004-AV8V6SSI5^3B@17beb9528af63118c13810c004a2826b', 'sip:8puacic4@185.161.124.172:54576^3Btransport=ws', 1499751903, 0, '', '', 'SIP.js/0.7.7', 3, '*******', 693065, 'osl1-voip-cluster01-asterisk04', 'no', '192.0.2.175', 0, 'rcdmgg305odojqsvprbfuo', '10004-AV8V6SSI5');

INSERT INTO `ps_endpoints` (`id`, `tenants_id`, `transport`, `aors`, `auth`, `context`, `disallow`, `allow`, `direct_media`, `connected_line_method`, `direct_media_method`, `direct_media_glare_mitigation`, `disable_direct_media_on_nat`, `dtmf_mode`, `external_media_address`, `force_rport`, `ice_support`, `identify_by`, `mailboxes`, `moh_suggest`, `outbound_auth`, `outbound_proxy`, `rewrite_contact`, `rtp_ipv6`, `rtp_symmetric`, `send_diversion`, `send_pai`, `send_rpid`, `timers_min_se`, `timers`, `timers_sess_expires`, `callerid`, `callerid_privacy`, `callerid_tag`, `100rel`, `aggregate_mwi`, `trust_id_inbound`, `trust_id_outbound`, `use_ptime`, `use_avpf`, `media_encryption`, `inband_progress`, `call_group`, `pickup_group`, `named_call_group`, `named_pickup_group`, `device_state_busy_at`, `fax_detect`, `t38_udptl`, `t38_udptl_ec`, `t38_udptl_maxdatagram`, `t38_udptl_nat`, `t38_udptl_ipv6`, `tone_zone`, `language`, `one_touch_recording`, `record_on_feature`, `record_off_feature`, `rtp_engine`, `allow_transfer`, `allow_subscribe`, `sdp_owner`, `sdp_session`, `tos_audio`, `tos_video`, `sub_min_expiry`, `from_domain`, `from_user`, `mwi_from_user`, `dtls_verify`, `dtls_rekey`, `dtls_cert_file`, `dtls_private_key`, `dtls_cipher`, `dtls_ca_file`, `dtls_ca_path`, `dtls_setup`, `srtp_tag_32`, `media_address`, `redirect_method`, `set_var`, `cos_audio`, `cos_video`, `message_context`, `force_avp`, `media_use_received_transport`, `accountcode`, `media_encryption_optimistic`, `user_eq_phone`, `rpid_immediate`, `g726_non_standard`, `rtp_keepalive`, `rtp_timeout`, `rtp_timeout_hold`, `state`, `autopark_incoming`, `offline_forward_to`, `bind_rtp_to_media_address`, `allow_multiple_upstreams`, `default_outbound_trunk_numbers_id`, `voicemail_extension`, `mwi_subscribe_replaces_unsolicited`, `record`, `deny`, `permit`, `acl`, `contact_deny`, `contact_permit`, `contact_acl`, `subscribe_context`, `fax_detect_timeout`, `contact_user`, `asymmetric_rtp_codec`, `rtcp_mux`, `allow_overlap`)
VALUES
('10004-AV8V6SSI5', 379, 'wss', '10004-AV8V6SSI5', '10004-AV8V6SSI5', 'internal', 'all', 'ulaw,alaw', 'no', NULL, NULL, NULL, NULL, NULL, NULL, 'yes', 'yes', NULL, NULL, NULL, NULL, NULL, 'yes', NULL, 'yes', NULL, NULL, NULL, NULL, NULL, NULL, '10004-AV8V6SSI5', NULL, '10004-AV8V6SSI5', NULL, NULL, NULL, 'yes', NULL, 'yes', 'dtls', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'af11', 'af41', NULL, NULL, NULL, NULL, 'no', NULL, '/etc/sslmate/certs/****', '/etc/sslmate/keys/****', 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES256-SHA', NULL, NULL, 'actpass', NULL, NULL, NULL, NULL, 5, 3, NULL, NULL, 'yes', 'AV8V6SSI5', NULL, NULL, NULL, NULL, 20, NULL, NULL, 'offline', 'yes', NULL, NULL, 'no', NULL, NULL, NULL, 'no', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'yes', NULL);
{code}

Transport is set to "wss" on the endpoint.
Comments:By: Asterisk Team (asteriskteam) 2017-07-11 00:48:04.972-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Andreas Krüger (woopstar) 2017-07-11 00:54:06.060-0500

I noticed that after upgrading to 14.5.0 the transport part of the URI in the contacts table is always set to WS even though the client sends "wss"

By: Rusty Newton (rnewton) 2017-07-12 14:25:25.799-0500

Does the error occur with every OPTIONS request or only sometimes?

Can you include a full debug log around the time the issue occurs?

https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

Make sure the attached debug log includes the pjsip logger output as well as error,notice,warning,verbose and debug channels.

By: Asterisk Team (asteriskteam) 2017-07-27 12:00:01.685-0500

Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1].

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines

By: Andreas Krüger (woopstar) 2017-10-24 14:31:12.171-0500

Hi Rusty,

Here is the debug log:

{code}
[2017-10-24 21:25:47] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [3] in [0, 4294967295] gives [3](0)
[2017-10-24 21:25:47] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 4294967295] gives [0](0)
[2017-10-24 21:25:47] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [2] in [0, 4294967295] gives [2](0)
[2017-10-24 21:25:47] DEBUG[16446]: res_odbc.c:869 _ast_odbc_request_obj2: Reusing ODBC handle 0x2ad7268 from class 'asterisk_write'
[2017-10-24 21:25:47] DEBUG[16446]: res_config_odbc.c:116 custom_prepare: Skip: 0; SQL: SELECT * FROM ps_domain_aliases WHERE id LIKE ? ORDER BY id
[2017-10-24 21:25:47] DEBUG[16446]: res_config_odbc.c:132 custom_prepare: Parameter 1 ('id LIKE') = '%'
[2017-10-24 21:25:47] DEBUG[16446]: res_odbc.c:718 ast_odbc_release_obj: Releasing ODBC handle 0x2ad7268 into pool
[2017-10-24 21:25:47] DEBUG[16446]: res_odbc.c:869 _ast_odbc_request_obj2: Reusing ODBC handle 0x2ad7268 from class 'asterisk_write'
[2017-10-24 21:25:47] DEBUG[16446]: res_config_odbc.c:116 custom_prepare: Skip: 0; SQL: SELECT * FROM ps_domain_aliases WHERE id = ?
[2017-10-24 21:25:47] DEBUG[16446]: res_config_odbc.c:132 custom_prepare: Parameter 1 ('id') = '217.61.221.146'
[2017-10-24 21:25:47] DEBUG[16446]: res_odbc.c:718 ast_odbc_release_obj: Releasing ODBC handle 0x2ad7268 into pool
[2017-10-24 21:25:47] DEBUG[16446]: res_pjsip.c:3717 endpt_send_request: 0x7ff4d80d5518: Wrapper created
[2017-10-24 21:25:47] DEBUG[16446]: res_pjsip.c:3732 endpt_send_request: 0x7ff4d80d5518: Set timer to 3000 msec
[2017-10-24 21:25:47] DEBUG[16446]: res_pjsip/pjsip_resolver.c:477 sip_resolve: Performing SIP DNS resolution of target '217.61.221.146'
[2017-10-24 21:25:47] DEBUG[16446]: res_pjsip/pjsip_resolver.c:504 sip_resolve: Transport type for target '217.61.221.146' is 'ws'
[2017-10-24 21:25:47] DEBUG[16446]: res_pjsip/pjsip_resolver.c:525 sip_resolve: Target '217.61.221.146' is an IP address, skipping resolution
[2017-10-24 21:25:47] DEBUG[16446]: res_pjsip.c:3595 endpt_send_request_cb: 0x7ff4d80d5518: PJSIP tsx response received
[2017-10-24 21:25:47] DEBUG[16446]: res_pjsip.c:3608 endpt_send_request_cb: 0x7ff4d80d5518: Cancelling timer
[2017-10-24 21:25:47] DEBUG[16446]: res_pjsip.c:3617 endpt_send_request_cb: 0x7ff4d80d5518: Timer cancelled
[2017-10-24 21:25:47] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [3] in [0, 4294967295] gives [3](0)
[2017-10-24 21:25:47] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 4294967295] gives [0](0)
[2017-10-24 21:25:47] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [2] in [0, 4294967295] gives [2](0)
[2017-10-24 21:25:47] DEBUG[16446]: res_pjsip.c:3638 endpt_send_request_cb: 0x7ff4d80d5518: Callbacks executed
[2017-10-24 21:25:47] ERROR[16446]: res_pjsip.c:3770 endpt_send_request: Error 171060 'Unsupported transport (PJSIP_EUNSUPTRANSPORT)' sending OPTIONS request to endpoint 10031-TT6I3SR5X
[2017-10-24 21:25:47] DEBUG[16446]: res_pjsip.c:3694 send_request_wrapper_destructor: 0x7ff4d80d5518: wrapper destroyed
{code}

{code}
[2017-10-24 21:27:37] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [3] in [0, 4294967295] gives [3](0)
[2017-10-24 21:27:37] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 4294967295] gives [0](0)
[2017-10-24 21:27:37] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [2] in [0, 4294967295] gives [2](0)
[2017-10-24 21:27:37] DEBUG[16446]: res_odbc.c:869 _ast_odbc_request_obj2: Reusing ODBC handle 0x2ad7268 from class 'asterisk_write'
[2017-10-24 21:27:37] DEBUG[16446]: res_config_odbc.c:116 custom_prepare: Skip: 0; SQL: SELECT * FROM ps_domain_aliases WHERE id LIKE ? ORDER BY id
[2017-10-24 21:27:37] DEBUG[16446]: res_config_odbc.c:132 custom_prepare: Parameter 1 ('id LIKE') = '%'
[2017-10-24 21:27:37] DEBUG[16446]: res_odbc.c:718 ast_odbc_release_obj: Releasing ODBC handle 0x2ad7268 into pool
[2017-10-24 21:27:37] DEBUG[16446]: res_odbc.c:869 _ast_odbc_request_obj2: Reusing ODBC handle 0x2ad7268 from class 'asterisk_write'
[2017-10-24 21:27:37] DEBUG[16446]: res_config_odbc.c:116 custom_prepare: Skip: 0; SQL: SELECT * FROM ps_domain_aliases WHERE id = ?
[2017-10-24 21:27:37] DEBUG[16446]: res_config_odbc.c:132 custom_prepare: Parameter 1 ('id') = '217.61.221.146'
[2017-10-24 21:27:37] DEBUG[16446]: res_odbc.c:718 ast_odbc_release_obj: Releasing ODBC handle 0x2ad7268 into pool
[2017-10-24 21:27:37] DEBUG[16446]: res_pjsip.c:3717 endpt_send_request: 0x7ff4d8004e58: Wrapper created
[2017-10-24 21:27:37] DEBUG[16446]: res_pjsip.c:3732 endpt_send_request: 0x7ff4d8004e58: Set timer to 3000 msec
[2017-10-24 21:27:37] DEBUG[16446]: res_pjsip/pjsip_resolver.c:477 sip_resolve: Performing SIP DNS resolution of target '217.61.221.146'
[2017-10-24 21:27:37] DEBUG[16446]: res_pjsip/pjsip_resolver.c:504 sip_resolve: Transport type for target '217.61.221.146' is 'ws'
[2017-10-24 21:27:37] DEBUG[16446]: res_pjsip/pjsip_resolver.c:525 sip_resolve: Target '217.61.221.146' is an IP address, skipping resolution
[2017-10-24 21:27:37] DEBUG[16446]: res_pjsip.c:3595 endpt_send_request_cb: 0x7ff4d8004e58: PJSIP tsx response received
[2017-10-24 21:27:37] DEBUG[16446]: res_pjsip.c:3608 endpt_send_request_cb: 0x7ff4d8004e58: Cancelling timer
[2017-10-24 21:27:37] DEBUG[16446]: res_pjsip.c:3617 endpt_send_request_cb: 0x7ff4d8004e58: Timer cancelled
[2017-10-24 21:27:37] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [3] in [0, 4294967295] gives [3](0)
[2017-10-24 21:27:37] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [0] in [0, 4294967295] gives [0](0)
[2017-10-24 21:27:37] DEBUG[16446]: config.c:3742 ast_parse_arg: extract uint from [2] in [0, 4294967295] gives [2](0)
[2017-10-24 21:27:37] DEBUG[16446]: res_pjsip.c:3638 endpt_send_request_cb: 0x7ff4d8004e58: Callbacks executed
[2017-10-24 21:27:37] ERROR[16446]: res_pjsip.c:3770 endpt_send_request: Error 171060 'Unsupported transport (PJSIP_EUNSUPTRANSPORT)' sending OPTIONS request to endpoint 10031-TT6I3SR5X
[2017-10-24 21:27:37] DEBUG[16446]: res_pjsip.c:3694 send_request_wrapper_destructor: 0x7ff4d8004e58: wrapper destroyed
{code}

I am unsure if the transport type is correct. It says "ws", but it is "wss" ?

By: Asterisk Team (asteriskteam) 2017-10-24 14:31:13.397-0500

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Andreas Krüger (woopstar) 2017-10-24 14:35:15.286-0500

Doing an endpoint lookup, it does indeed say WSS

{code}
osl1-voip-cluster01-asterisk04*CLI> pjsip show endpoint 10031-TT6I3SR5X

Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
   I/OAuth:  <AuthId/UserName...........................................................>
       Aor:  <Aor............................................>  <MaxContact>
     Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
 Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
  Identify:  <Identify/Endpoint.........................................................>
       Match:  <criteria.........................>
   Channel:  <ChannelId......................................>  <State.....>  <Time.....>
       Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

Endpoint:  10031-TT6I3SR5X                                      Unavailable   0 of inf
    InAuth:  10031-TT6I3SR5X/10031-TT6I3SR5X
       Aor:  10031-TT6I3SR5X                                    2
 Transport:  wss                       wss      0      0  0.0.0.0:15060
{code}

The only thing i can see, is that ps_contacts contains transport=ws and not wss:

{code}
sip:415urh6h@217.61.221.146:56309^3Btransport=ws
{code}

By: Andreas Krüger (woopstar) 2017-10-24 14:38:58.528-0500

Could that be due the client sending wrong transport? Just saw this when the client re-connected:

{code}
 == WebSocket connection from '217.61.221.146:56886' for protocol 'sip' accepted using version '13'
   -- Added contact 'sip:7u27e4tn@217.61.221.146:56886;transport=ws' to AOR '10031-TT6I3SR5X' with expiration of 120 seconds
 == Contact 10031-TT6I3SR5X/sip:7u27e4tn@217.61.221.146:56886;transport=ws has been created
   -- Added extension '10031-TT6I3SR5X' priority 1 to sipregistrations
 == Endpoint 10031-TT6I3SR5X is now Reachable
   -- Contact 10031-TT6I3SR5X/sip:7u27e4tn@217.61.221.146:56886;transport=ws is now Reachable.  RTT: 356.479 msec
{code}

By: Joshua C. Colp (jcolp) 2017-10-24 14:39:28.311-0500

"ws" is the correct transport name in that case.

You'll need to clarify more - when does this occur? Is the websocket connection still active when it occurs?

By: Andreas Krüger (woopstar) 2017-10-24 14:44:16.192-0500

It happens on all endpoints when they close their browser. I suspect it happens when people just close their browser and thereby not letting the client disconnect correctly. The websocket is no longer alive then.

By: Andreas Krüger (woopstar) 2017-10-24 14:45:27.036-0500

Could it be, that I should rename the transport in pjsip.conf from wss to ws:

{code}
[wss]
type=transport
protocol=wss
bind=0.0.0.0:15060
{code}

By: Joshua C. Colp (jcolp) 2017-10-24 14:49:20.991-0500

That is expected and harmless then. Changes[1] for ASTERISK-27147 did go in as of 13.18.0 (which is not yet released) though which should cause the contact to be removed when the Websocket disconnects.

[1] https://gerrit.asterisk.org/#/c/6193/

By: Andreas Krüger (woopstar) 2017-10-24 14:52:51.576-0500

Nice. Will it go for the 14 branch to? Currently running 14.6.2

By: Joshua C. Colp (jcolp) 2017-10-24 14:55:32.204-0500

The change did go into 14, but 14 itself will receive no further bug fixes or features. It is in security fix only status going forward.