liblinphone icon indicating copy to clipboard operation
liblinphone copied to clipboard

STUN server ignored when re-inviting after remote INVITE without SDP

Open anders9ustafsson opened this issue 5 years ago • 0 comments

If a remote part makes an INVITE without ICE, it is still possible to enforce ICE including STUN candidates by sending a re-INVITE to the remote part, if ICE and STUN are enabled in the NAT policy and the configuration flag allow_late_ice is set.

However, if the remote part sends an empty SDP, this workaround only partially works. ICE is included in the re-INVITE, but the defined STUN server is ignored, resulting in only one ICE candidate to the local IP address:

a=ice-pwd:433e841cb86b7c34f8c52410 a=ice-ufrag:4b51e889 a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics m=audio 7078 RTP/SAVP 96 0 8 9 101 97 a=rtpmap:96 opus/48000/2 a=fmtp:96 useinbandfec=1 a=rtpmap:101 telephone-event/48000 a=rtpmap:97 telephone-event/8000 a=candidate:1 1 UDP 2130706303 10.22.205.123 7078 typ host a=candidate:1 2 UDP 2130706302 10.22.205.123 7079 typ host

According to the log, STUN server is deliberately ignored:

[liblinphone] WARNING ICE is used without STUN server [liblinphone] MESSAGE ICE: bypass candidates gathering

Please consider accounting for the STUN server in allow_late_ice mode, even when the initial remote INVITE does not contain an SDP.

anders9ustafsson avatar Mar 22 '19 07:03 anders9ustafsson