[Freeswitch-users] error creating IPv6 profile when corresponding IPv4 port in use

Jason White jason at jasonjgw.net
Tue Dec 16 21:07:01 PST 2008


Here's the scenario (FreeSWITCH revision 10725).

I have Asterisk listening on port 5060 under IPv4. This version of Asterisk
does not support IPv6, and netstat -6 -a | grep sip suggests that, as
expected, it isn't listening on port 5060 under IPv6.

If I set up FreeSWITCH profiles to listen on port 5070, for example, under
both IPv4 and IPv6 then it works fine.

However, if I create an IPv4 profile to listen on port 5070, and an IPv6
profile to listen on port 5060, Sofia fails with a "port already in use"
error, even though nothing should be using port 5060 under IPv6.

>From the logs:

tport_create(): 0x1b4d0e0
tport_bind_server(0x1b4d0e0) to */[2001:44b8:61::3b]:5060/sip
tport_bind_server(0x1b4d0e0): calling tport_listen for udp
tport_alloc_primary(0x1b4d0e0): new primary tport 0x1b4f010
tport_listen(0x1b4d0e0): bind(pf=10 udp/[2001:44b8:61::3b]:5060): Address already in use
tport_destroy(0x1b4d0e0)
nta: bind([2001:44b8:61::3b]:5060;transport=*): Address already in use
nua: initializing SIP stack failed

Obviously, I can easily use a different port, and hence this issue doesn't
affect me. However, if it's a bug, I think it should still go into the bug
list. I realize the problem might not be in Sofia or FreeSWITCH. Is Asterisk
really taking over the IPv6 port as well?

Environment: Debian Sid, kernel 2.6.26, x86_64 architecture.

Note: once I learn enough about FreeSWITCH to configure it properly and set it
up to meet my personal telephony needs, the Asterisk installation will be,
shall we say, redundant.





More information about the FreeSWITCH-users mailing list