baresip: Cannot register to IPv6 server with no IPv4 address on client

If the machine running baresip has no IPv4 address, it cannot register to an IPv6 server.

kjotte@daedalus:~$ baresip -6
baresip v0.6.1 Copyright (C) 2010 - 2019 Alfred E. Heggestad et al.
Local network address:  IPv4=:127.0.0.1  IPv6=enp0s25:2606:a000:a442:9800:4492:3c87:193a:def
aucodec: opus/48000/2
aucodec: G722/16000/1
aucodec: PCMU/8000/1
aucodec: PCMA/8000/1
aufilt: vumeter
auplay: pulse
ausrc: pulse
vidcodec: H264
vidcodec: H263
vidcodec: MP4V-ES
medianat: stun
medianat: turn
medianat: ice
ua: SIP register failed: Address family not supported by protocol
account: failed to register ua 'sip:nivex@pbx-int.home.nivex.net' (Address family not supported by protocol)
Populated 1 account
Populated 1 contacts
Populated 4 audio codecs
Populated 1 audio filter
Populated 3 video codecs
Populated 0 video filters
baresip is ready.

Thinking this might be a problem with determining which interface to use, I specified it explicitly:

kjotte@daedalus:~$ baresip -6 -n enp0s25
baresip v0.6.1 Copyright (C) 2010 - 2019 Alfred E. Heggestad et al.
Binding to interface or IP address 'enp0s25'
net: enp0s25: could not get IPv4 address (No such device)
Local network address:  IPv4=enp0s25:127.0.0.1  IPv6=enp0s25:2606:a000:a442:9800:4492:3c87:193a:def
aucodec: opus/48000/2
aucodec: G722/16000/1
aucodec: PCMU/8000/1
aucodec: PCMA/8000/1
aufilt: vumeter
auplay: pulse
ausrc: pulse
vidcodec: H264
vidcodec: H263
vidcodec: MP4V-ES
medianat: stun
medianat: turn
medianat: ice
ua: SIP register failed: Address family not supported by protocol
account: failed to register ua 'sip:nivex@pbx-int.home.nivex.net' (Address family not supported by protocol)
Populated 1 account
Populated 1 contacts
Populated 4 audio codecs
Populated 1 audio filter
Populated 3 video codecs
Populated 0 video filters
baresip is ready.

And finally, what a working registration when the client has both a v4 and a v6 address:

kjotte@daedalus:~$ baresip -6
baresip v0.6.1 Copyright (C) 2010 - 2019 Alfred E. Heggestad et al.
Local network address:  IPv4=enp0s25:172.31.3.11  IPv6=enp0s25:2606:a000:a442:9800:4492:3c87:193a:def
aucodec: opus/48000/2
aucodec: G722/16000/1
aucodec: PCMU/8000/1
aucodec: PCMA/8000/1
aufilt: vumeter
auplay: pulse
ausrc: pulse
vidcodec: H264
vidcodec: H263
vidcodec: MP4V-ES
medianat: stun
medianat: turn
medianat: ice
Populated 1 account
Populated 1 contacts
Populated 4 audio codecs
Populated 1 audio filter
Populated 3 video codecs
Populated 0 video filters
baresip is ready.
nivex@pbx-int.home.nivex.net: {0/TCP/v6} 200 OK (Asterisk PBX 16.2.1~dfsg-1+deb10u1) [1 binding]
All 1 useragent registered successfully! (7 ms)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

Yes, the whole reason I filed the issue in the first place was so that it could be fixed for the benefit of everyone.