Sip.js: Peer connection left open when invite canceled

Created on 20 Mar 2018  ·  1Comment  ·  Source: onsip/SIP.js

Calling terminate() on a session immediately after an invite has begun will leave you in a state where the session description handler still has an open peer connection. If you're running in chrome, you can see a visible artifact of this: the "red dot" indicating mic access will still be up on the tab after termination.

Sample trace:

sip.invitecontext.sessionDescriptionHandler | initPeerConnection
sip.invitecontext.sessionDescriptionHandler | New peer connection created 
sip.invitecontext.sessionDescriptionHandler | acquiring local media
sip.invitecontext.sessionDescriptionHandler | acquired local media streams
sip.invitecontext.sessionDescriptionHandler | RTCIceGatheringState changed: gathering
sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:374261915 1 udp 2122260223 192.168.13.1 53697 typ host generation 0 ufrag qWW2 network-id 3 network-cost 50
sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:3256280924 1 udp 2122194687 10.40.9.41 62363 typ host generation 0 ufrag qWW2 network-id 2
sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:1746874327 1 udp 2122129151 10.40.9.43 60961 typ host generation 0 ufrag qWW2 network-id 1 network-cost 10
sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:557277616 1 udp 1685987071 74.85.92.138 62363 typ srflx raddr 10.40.9.41 rport 62363 generation 0 ufrag qWW2 network-id 2
sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2336139579 1 udp 1685921535 74.85.92.138 60961 typ srflx raddr 10.40.9.43 rport 60961 generation 0 ufrag qWW2 network-id 1 network-cost 10
sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:1489843307 1 tcp 1518280447 192.168.13.1 9 typ host tcptype active generation 0 ufrag qWW2 network-id 3 network-cost 50
sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:2358582188 1 tcp 1518214911 10.40.9.41 9 typ host tcptype active generation 0 ufrag qWW2 network-id 2
sip.invitecontext.sessionDescriptionHandler | ICE candidate received: candidate:647811879 1 tcp 1518149375 10.40.9.43 9 typ host tcptype active generation 0 ufrag qWW2 network-id 1 network-cost 10
sip.inviteclientcontext | canceling RTCSession
sip.invitecontext.sessionDescriptionHandler | RTCIceChecking Timeout Triggered after 5000 milliseconds
sip.invitecontext.sessionDescriptionHandler | RTCIceGatheringState changed: complete
bug

Most helpful comment

Hi @seth-outreach,
This looks legitimate, we'll look to get it fixed for the next release. In the meantime, you can lower your icecheckingtimeout, which seems to avoid this problem (as long as that fires or is unnecessary before terminating).

Thanks,
James

>All comments

Hi @seth-outreach,
This looks legitimate, we'll look to get it fixed for the next release. In the meantime, you can lower your icecheckingtimeout, which seems to avoid this problem (as long as that fires or is unnecessary before terminating).

Thanks,
James

Was this page helpful?
0 / 5 - 0 ratings