OperationError: Failed to set local answer sdp

SIPml-api.js:1 OperationError: Failed to set local answer sdp: Failed to push down transport description: Offerer must use actpass value for setup attribute.

This error only occur at the WSS client if the call is originated through Asterisk Manager interface. My intention was to automatically setup calls between the WebSocket client (WSS) and UDP client. Asterisk calls to the WSS client and after it picks, it initiate call to the UDP client but the WSS client immediately drops the call after the handshake with the error above.

Note: this error dose not surface if the WSS client manually initiates the call via the browser.

====Originate Command=====

Username: username
Secret: password

Action: originate
Channel: PJSIP/1015
WaitTime: 60
CallerId: Paul <1015>
Exten: 1003
Context: the_context
Priority: 1

=====Chrome Log=======

(index):3753 /call/center/click/to/call/1003
(index):3754 —
SIPml-api.js:1 __tsip_transport_ws_onmessage
SIPml-api.js:1 recv=INVITE sips:1015@wss.client.com:64060;transport=WSS;rtcweb-breaker=no SIP/2.0
Via: SIP/2.0/WSS wss.client.com:64060;rport;branch=z9hG4bKPj5ec73fc3-ed34-44f3-976e-b5838b164da1;alias
From: "Paul"sip:1015@asterisk.service.com;tag=9764158e-9f8b-488d-9daa-1034dda4120a
To: sips:1015@wss.client.com;rtcweb-breaker=no
Contact: sips:asterisk@asterisk.service.com:5061;transport=TLS
Call-ID: f259c41e-8359-4fc9-9c70-d0ddf182fe71
CSeq: 12415 INVITE
Content-Type: application/sdp
Content-Length: 686
Allow: OPTIONS,SUBSCRIBE,NOTIFY,PUBLISH,INVITE,ACK,BYE,CANCEL,UPDATE,PRACK,REGISTER,MESSAGE,REFER
Supported: 100rel,timer,replaces,norefersub
Session-Expires: 1800;refresher=uac
Min-SE: 90
P-Asserted-Identity: "Paul"sip:1015@asterisk.service.com
Max-Forwards: 70
User-Agent: Asterisk Server

v=0
o=- 735988014 735988014 IN IP4 asterisk.service.com
s=Asterisk
c=IN IP4 asterisk.service.com
t=0 0
m=audio 14570 UDP/TLS/RTP/SAVPF 0 8 3 9 101
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 30:0F:54:6C:FE:DD:EB:1F:86:6F:78:73:6B:BC:A2:18:06:F6:96:9D:13:F7:3A:6E:58:AA:B9:5B:59:00:94:D9
a=ice-ufrag:4e778362025247351613acd837710030
a=ice-pwd:441be35c2eebf9396aaa2c855f88c0d5
a=candidate:Ha000166 1 UDP 2130706431 asterisk.service.com 14570 typ host
a=candidate:Ha000166 2 UDP 2130706430 asterisk.service.com 14571 typ host
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

SIPml-api.js:1 State machine: tsip_transac_ist_Started_2_Proceeding_X_INVITE
SIPml-api.js:1 SEND: SIP/2.0 100 Trying (sent from the Transaction Layer)
Via: SIP/2.0/WSS wss.client.com:64060;rport=64060;branch=z9hG4bKPj5ec73fc3-ed34-44f3-976e-b5838b164da1;alias
From: "Paul"sip:1015@asterisk.service.com;tag=9764158e-9f8b-488d-9daa-1034dda4120a
To: sips:1015@wss.client.com;rtcweb-breaker=no
Call-ID: f259c41e-8359-4fc9-9c70-d0ddf182fe71
CSeq: 12415 INVITE
Content-Length: 0

SIPml-api.js:1 ICE servers:[{“url”:“stun:stun.l.google.com:19302”},{“url”:“stun:stun.counterpath.net:3478”},{“url”:“stun:numb.viagenie.ca:3478”}]
SIPml-api.js:1 setRemoteDescription(offer)
v=0
o=- 735988014 735988014 IN IP4 asterisk.service.com
s=Asterisk
c=IN IP4 asterisk.service.com
t=0 0
m=audio 14570 RTP/SAVPF 0 8 3 9 101
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 30:0F:54:6C:FE:DD:EB:1F:86:6F:78:73:6B:BC:A2:18:06:F6:96:9D:13:F7:3A:6E:58:AA:B9:5B:59:00:94:D9
a=ice-ufrag:4e778362025247351613acd837710030
a=ice-pwd:441be35c2eebf9396aaa2c855f88c0d5
a=candidate:Ha000166 1 UDP 2130706431 asterisk.service.com 14570 typ host
a=candidate:Ha000166 2 UDP 2130706430 asterisk.service.com 14571 typ host
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

SIPml-api.js:1 State machine: s0000_Started_2_Ringing_X_iINVITE
SIPml-api.js:1 onSetRemoteDescriptionSuccess
SIPml-api.js:1 ***************Stack Event = m_permission_requested
SIPml-api.js:1 onSignalingstateChange:have-remote-offer
SIPml-api.js:1 __on_add_stream
SIPml-api.js:1 State machine: tsip_transac_ist_Proceeding_2_Proceeding_X_1xx
SIPml-api.js:1 SEND: SIP/2.0 180 Ringing
Via: SIP/2.0/WSS wss.client.com:64060;rport=64060;branch=z9hG4bKPj5ec73fc3-ed34-44f3-976e-b5838b164da1;alias
From: "Paul"sip:1015@asterisk.service.com;tag=9764158e-9f8b-488d-9daa-1034dda4120a
To: sips:1015@wss.client.com;rtcweb-breaker=no;tag=yd4zdN66SrzCKfSNdW9e
Contact: sips:1015@df7jal23ls0d.invalid;transport=wss
Call-ID: f259c41e-8359-4fc9-9c70-d0ddf182fe71
CSeq: 12415 INVITE
Content-Length: 0
Allow: ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, UPDATE

SIPml-api.js:1 ***************Stack Event = i_new_call
softdongle-call.js:862 2: Incoming but maybe answered: 1015 sip:1015@asterisk.service.com
softdongle-call.js:961 m_stream_audio_remote_added
SIPml-api.js:1 ==session event = m_stream_audio_remote_added
softdongle-call.js:645 undefined
softdongle-call.js:901 1015 …Stop here no need showing dialog caller is a local caller
softdongle-call.js:961 m_stream_audio_remote_added
SIPml-api.js:1 ==session event = m_stream_audio_remote_added
SIPml-api.js:1 onGetUserMediaSuccess
SIPml-api.js:1 createAnswer
SIPml-api.js:1 onCreateSdpSuccess
SIPml-api.js:1 ***************Stack Event = m_permission_accepted
SIPml-api.js:1 onNegotiationNeeded
SIPml-api.js:1 onSignalingstateChange:stable
SIPml-api.js:1 onSetLocalDescriptionSuccess
6SIPml-api.js:1 onIceCandidate = gathering
(index):3761 ----Failed----
(index):3762 Object {readyState: 0, status: 0, statusText: “timeout”}
SIPml-api.js:1 onIceCandidate = gathering
SIPml-api.js:1 onIceCandidate = complete
SIPml-api.js:1 ICE GATHERING COMPLETED!
SIPml-api.js:1 onIceGatheringCompleted
SIPml-api.js:1 onIceCandidate = complete
SIPml-api.js:1 ICE GATHERING COMPLETED!
SIPml-api.js:1 onIceGatheringCompleted
SIPml-api.js:1 onIceGatheringCompleted but no local sdp request is pending
tsk_utils_log_warn @ SIPml-api.js:1
tmedia_session_jsep01.onIceGatheringCompleted @ SIPml-api.js:1
tmedia_session_jsep01.onIceCandidate @ SIPml-api.js:1
o_pc.onicecandidate @ SIPml-api.js:1
SIPml-api.js:1 onIceCandidate = complete
SIPml-api.js:1 ICE GATHERING COMPLETED!
SIPml-api.js:1 onIceGatheringCompleted
SIPml-api.js:1 onIceGatheringCompleted but no local sdp request is pending
tsk_utils_log_warn @ SIPml-api.js:1
tmedia_session_jsep01.onIceGatheringCompleted @ SIPml-api.js:1
tmedia_session_jsep01.onIceCandidate @ SIPml-api.js:1
o_pc.onicecandidate @ SIPml-api.js:1
SIPml-api.js:1 onIceCandidate = complete
SIPml-api.js:1 ICE GATHERING COMPLETED!
SIPml-api.js:1 onIceGatheringCompleted
SIPml-api.js:1 onIceGatheringCompleted but no local sdp request is pending
tsk_utils_log_warn @ SIPml-api.js:1
tmedia_session_jsep01.onIceGatheringCompleted @ SIPml-api.js:1
tmedia_session_jsep01.onIceCandidate @ SIPml-api.js:1
o_pc.onicecandidate @ SIPml-api.js:1
softdongle-call.js:961 m_stream_audio_remote_added
SIPml-api.js:1 ==session event = m_stream_audio_remote_added
SIPml-api.js:1 State machine: s0000_Ringing_2_Connected_X_Accept
softdongle-call.js:410 ------no no no
SIPml-api.js:1 State machine: tsip_transac_ist_Proceeding_2_Accepted_X_2xx
SIPml-api.js:1 SEND: SIP/2.0 200 OK
Via: SIP/2.0/WSS wss.client.com:64060;rport=64060;branch=z9hG4bKPj5ec73fc3-ed34-44f3-976e-b5838b164da1;alias
From: "Paul"sip:1015@asterisk.service.com;tag=9764158e-9f8b-488d-9daa-1034dda4120a
To: sips:1015@wss.client.com;rtcweb-breaker=no;tag=yd4zdN66SrzCKfSNdW9e
Contact: sips:1015@df7jal23ls0d.invalid;transport=wss
Call-ID: f259c41e-8359-4fc9-9c70-d0ddf182fe71
CSeq: 12415 INVITE
Content-Type: application/sdp
Content-Length: 2131
Allow: ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, UPDATE

v=0
o=- 7163415993324428000 2 IN IP4 127.0.0.1
s=Doubango Telecom - chrome
t=0 0
a=msid-semantic: WMS 5TNQuKeyR6jDIme7f2Ec2sWx4LinenwRV1ae
m=audio 8749 UDP/TLS/RTP/SAVPF 0 8 9 101
c=IN IP4 197.211.61.13
a=rtcp:8750 IN IP4 197.211.61.13
a=candidate:717293401 1 udp 2122260223 wss.client.com 65512 typ host generation 0 network-id 1 network-cost 10
a=candidate:717293401 2 udp 2122260222 wss.client.com 54477 typ host generation 0 network-id 1 network-cost 10
a=candidate:1682111401 1 tcp 1518280447 wss.client.com 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=candidate:1682111401 2 tcp 1518280446 wss.client.com 9 typ host tcptype active generation 0 network-id 1 network-cost 10
a=candidate:3386933685 1 udp 1686052607 197.211.61.13 8749 typ srflx raddr wss.client.com rport 65512 generation 0 network-id 1 network-cost 10
a=candidate:3386933685 2 udp 1686052606 197.211.61.13 8750 typ srflx raddr wss.client.com rport 54477 generation 0 network-id 1 network-cost 10
a=candidate:3386933685 2 udp 1686052606 197.211.61.13 27658 typ srflx raddr wss.client.com rport 54477 generation 0 network-id 1 network-cost 10
a=candidate:3386933685 1 udp 1686052607 197.211.61.13 27657 typ srflx raddr wss.client.com rport 65512 generation 0 network-id 1 network-cost 10
a=candidate:3386933685 1 udp 1686052607 197.211.61.13 29453 typ srflx raddr wss.client.com rport 65512 generation 0 network-id 1 network-cost 10
a=candidate:3386933685 2 udp 1686052606 197.211.61.13 29454 typ srflx raddr wss.client.com rport 54477 generation 0 network-id 1 network-cost 10
a=ice-ufrag:NLWP
a=ice-pwd:iuWyh87qBJhLsRNp7ZRPxuci
a=fingerprint:sha-256 CF:37:B0:71:5E:CB:1C:08:58:C2:62:FE:B7:14:77:1B:A2:8A:7E:7F:7D:CE:79:A3:75:7E:D3:01:4B:FE:27:4A
a=setup:active
a=mid:audio
a=sendrecv
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=ssrc:1090882139 cname:PF0fNCxtacpLjRiV
a=ssrc:1090882139 msid:5TNQuKeyR6jDIme7f2Ec2sWx4LinenwRV1ae dd92bc45-239e-413e-b679-7fc7d520e1c7
a=ssrc:1090882139 mslabel:5TNQuKeyR6jDIme7f2Ec2sWx4LinenwRV1ae
a=ssrc:1090882139 label:dd92bc45-239e-413e-b679-7fc7d520e1c7

softdongle-call.js:961 connected
SIPml-api.js:1 ==session event = connected
softdongle-call.js:1467 -------in------
SIPml-api.js:1 __tsip_transport_ws_onmessage
SIPml-api.js:1 recv=ACK sips:1015@wss.client.com:64060;transport=WSS SIP/2.0
Via: SIP/2.0/WSS wss.client.com:64060;rport;branch=z9hG4bKPjfc858cb1-948e-46d5-9718-ac261ba6ec3b;alias
From: "Paul"sip:1015@asterisk.service.com;tag=9764158e-9f8b-488d-9daa-1034dda4120a
To: sips:1015@wss.client.com;rtcweb-breaker=no;tag=yd4zdN66SrzCKfSNdW9e
Call-ID: f259c41e-8359-4fc9-9c70-d0ddf182fe71
CSeq: 12415 ACK
Content-Length: 0
Max-Forwards: 70
User-Agent: Asterisk Server

SIPml-api.js:1 State machine: tsip_transac_ist_Accepted_2_Accepted_iACK
SIPml-api.js:1 State machine: x0000_Connected_2_Connected_X_iACK
SIPml-api.js:1 __tsip_transport_ws_onmessage
SIPml-api.js:1 recv=OPTIONS sips:1015@wss.client.com:64060;transport=WSS;rtcweb-breaker=no SIP/2.0
Via: SIP/2.0/WSS wss.client.com:64060;rport;branch=z9hG4bKPj16517bc1-9fbb-427f-89ff-ddec62bd8ac7;alias
From: sip:1015@asterisk.service.com;tag=c49a00ea-5e6e-4abd-ba61-32da542cba88
To: sips:1015@wss.client.com;rtcweb-breaker=no
Contact: sips:1015@asterisk.service.com:5061;transport=TLS
Call-ID: 706588bc-a7ff-4536-8ec7-8bf9b7010dd4
CSeq: 7889 OPTIONS
Content-Length: 0
Max-Forwards: 70
User-Agent: Asterisk Server

SIPml-api.js:1 OPTIONS: Not implemented
tsk_utils_log_error @ SIPml-api.js:1
tsip_dialog_layer.handle_incoming_message @ SIPml-api.js:1
tsip_transport_layer.handle_incoming_message @ SIPml-api.js:1
__tsip_transport_ws_onmessage @ SIPml-api.js:1
SIPml-api.js:1 SEND: SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/WSS wss.client.com:64060;rport=64060;branch=z9hG4bKPj16517bc1-9fbb-427f-89ff-ddec62bd8ac7;alias
From: sip:1015@asterisk.service.com;tag=c49a00ea-5e6e-4abd-ba61-32da542cba88
To: sips:1015@wss.client.com;rtcweb-breaker=no
Call-ID: 706588bc-a7ff-4536-8ec7-8bf9b7010dd4
CSeq: 7889 OPTIONS
Content-Length: 0

SIPml-api.js:1 __tsip_transport_ws_onmessage
SIPml-api.js:1 recv=INVITE sips:1015@wss.client.com:64060;transport=WSS SIP/2.0
Via: SIP/2.0/WSS wss.client.com:64060;rport;branch=z9hG4bKPj27683299-faf2-4da1-8459-071d853bfa47;alias
From: "Paul"sip:1015@asterisk.service.com;tag=9764158e-9f8b-488d-9daa-1034dda4120a
To: sips:1015@wss.client.com;rtcweb-breaker=no;tag=yd4zdN66SrzCKfSNdW9e
Contact: sips:asterisk@asterisk.service.com:5061;transport=TLS
Call-ID: f259c41e-8359-4fc9-9c70-d0ddf182fe71
CSeq: 12416 INVITE
Content-Type: application/sdp
Content-Length: 668
Allow: OPTIONS,SUBSCRIBE,NOTIFY,PUBLISH,INVITE,ACK,BYE,CANCEL,UPDATE,PRACK,REGISTER,MESSAGE,REFER
Supported: 100rel,timer,replaces,norefersub
Session-Expires: 1800;refresher=uac
Min-SE: 90
P-Asserted-Identity: "Dare Okeyemi"sip:1003@asterisk.service.com
Max-Forwards: 70
User-Agent: Asterisk Server

v=0
o=- 735988014 735988015 IN IP4 asterisk.service.com
s=Asterisk
c=IN IP4 asterisk.service.com
t=0 0
m=audio 14570 UDP/TLS/RTP/SAVPF 0 8 9 101
a=connection:existing
a=setup:passive
a=fingerprint:SHA-256 30:0F:54:6C:FE:DD:EB:1F:86:6F:78:73:6B:BC:A2:18:06:F6:96:9D:13:F7:3A:6E:58:AA:B9:5B:59:00:94:D9
a=ice-ufrag:4e778362025247351613acd837710030
a=ice-pwd:441be35c2eebf9396aaa2c855f88c0d5
a=candidate:Ha000166 1 UDP 2130706431 asterisk.service.com 14570 typ host
a=candidate:Ha000166 2 UDP 2130706430 asterisk.service.com 14571 typ host
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

SIPml-api.js:1 State machine: tsip_transac_ist_Started_2_Proceeding_X_INVITE
SIPml-api.js:1 SEND: SIP/2.0 100 Trying (sent from the Transaction Layer)
Via: SIP/2.0/WSS wss.client.com:64060;rport=64060;branch=z9hG4bKPj27683299-faf2-4da1-8459-071d853bfa47;alias
From: "Paul"sip:1015@asterisk.service.com;tag=9764158e-9f8b-488d-9daa-1034dda4120a
To: sips:1015@wss.client.com;rtcweb-breaker=no;tag=yd4zdN66SrzCKfSNdW9e
Call-ID: f259c41e-8359-4fc9-9c70-d0ddf182fe71
CSeq: 12416 INVITE
Content-Length: 0

SIPml-api.js:1 State machine: x0000_Connected_2_Connected_X_iINVITE
SIPml-api.js:1 setRemoteDescription(offer)
v=0
o=- 735988014 735988015 IN IP4 asterisk.service.com
s=Asterisk
c=IN IP4 asterisk.service.com
t=0 0
m=audio 14570 RTP/SAVPF 0 8 9 101
a=connection:existing
a=setup:passive
a=fingerprint:SHA-256 30:0F:54:6C:FE:DD:EB:1F:86:6F:78:73:6B:BC:A2:18:06:F6:96:9D:13:F7:3A:6E:58:AA:B9:5B:59:00:94:D9
a=ice-ufrag:4e778362025247351613acd837710030
a=ice-pwd:441be35c2eebf9396aaa2c855f88c0d5
a=candidate:Ha000166 1 UDP 2130706431 asterisk.service.com 14570 typ host
a=candidate:Ha000166 2 UDP 2130706430 asterisk.service.com 14571 typ host
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

SIPml-api.js:1 onSignalingstateChange:have-remote-offer
SIPml-api.js:1 onGetUserMediaSuccess
SIPml-api.js:1 createAnswer
SIPml-api.js:1 onSetRemoteDescriptionSuccess
SIPml-api.js:1 onCreateSdpSuccess
SIPml-api.js:1 onSetLocalDescriptionError
SIPml-api.js:1 OperationError: Failed to set local answer sdp: Failed to push down transport description: Offerer must use actpass value for setup attribute.
tsk_utils_log_error @ SIPml-api.js:1
tmedia_session_jsep01.onSetLocalDescriptionError @ SIPml-api.js:1
(anonymous) @ SIPml-api.js:1
SIPml-api.js:1 State machine: x0000_Any_2_Trying_X_oBYE
SIPml-api.js:1 SEND: BYE sips:asterisk@asterisk.service.com:5061;transport=TLS SIP/2.0
Via: SIP/2.0/WSS df7jal23ls0d.invalid;branch=z9hG4bKSlwB233lo4f2ZLPrtBuOilkxN9TQAXk3;rport
From: sips:1015@wss.client.com;tag=yd4zdN66SrzCKfSNdW9e
To: "Paul"sip:1015@asterisk.service.com;tag=9764158e-9f8b-488d-9daa-1034dda4120a
Call-ID: f259c41e-8359-4fc9-9c70-d0ddf182fe71
CSeq: 28191 BYE
Content-Length: 0
Route: sip:asterisk.service.com:5060;lr;sipml5-outbound;transport=udp
Max-Forwards: 70
Accept-Contact: *;+g.oma.sip-im
Accept-Contact: *;language="en,fr"
Accept-Contact: *;+g.oma.sip-im
Accept-Contact: *;language="en,fr"
User-Agent: IM-client/OMA1.0 sipML5-v1.2016.03.04
Organization: Asterisk

SIPml-api.js:1 PeerConnection::stop()
SIPml-api.js:1 __tsip_transport_ws_onmessage
SIPml-api.js:1 recv=SIP/2.0 200 OK
Via: SIP/2.0/WSS df7jal23ls0d.invalid;rport=64060;received=wss.client.com;branch=z9hG4bKSlwB233lo4f2ZLPrtBuOilkxN9TQAXk3
From: sips:1015@wss.client.com;tag=yd4zdN66SrzCKfSNdW9e
To: "Paul"sip:1015@asterisk.service.com;tag=9764158e-9f8b-488d-9daa-1034dda4120a
Call-ID: f259c41e-8359-4fc9-9c70-d0ddf182fe71
CSeq: 28191 BYE
Content-Length: 0
Server: Asterisk Server