Iax2 getting ipv4 and ipv6 working together

Hi list,

I opened following bug report

and have to find a solution. I set up 2 asterisk 20.8.1,

*1 configured as

bindport 4570
bindaddr [fd88:a:b:c::12]

*2 configured as

bindport 4569
bindaddr 192.168.1.47
bindaddr [fd88:d:e:f::ff47]:4570

There is no firewall on *2, both having the peer with qualify=yes and
ā€œdebug onā€ in cli.

What I observe:

*1 to *2 is perfect, Status=OK

On *2, *1 Status=UNREACHABLE despite the fact that, from *2:

nc -u [fd88:a:b:c::12] 4570
goes connected, entering a character shows on *1 cli

[2024-07-04 12:55:02] WARNING[1053189]: chan_iax2.c:10267
socket_process_helper: midget packet received (2 of 4 min)

which is confirmed by tcpdump -ni any udp and port 4570 on *1

Always on *2, I run
tcpdump -vni any src or dst fd88:d:e:f::ff47 and udp

I see the 3 POKE PONG ACK packets sended from *1 for qualify but nothing
more! In *2 cli I see that POKE packets are sended but WHERE ???

If I do a tcpdump -vni any port 4570 and udp I still only see the 3
packets sended from *1 to qualify. Same if I only dump the 4570 port (eg
w/o protocol)

I also tried a capture from 4569 port knowing that there shouldnā€™t be
any traffic, and there is not.

So question is: where are going the POKE packets from *2 ?!?

ā€“
Daniel

ā€“
Daniel

It might help to see more of your iax.conf

Also the output of ā€˜netstat -pan | grep asteriskā€™ could be useful.

I continued my tests and definitely the problems is when iax.conf is listening on a mix of ipv4/ipv6 IPs

*1
[general]
bindport=4569
bindaddr=fd99:1234:beef:cafe::ff47 ; no ipv4

*2
[general]
bindport=4569
bindaddr=fd99:a:b:70::12 ; no ipv4

*3
[general]
bindport=4569
bindaddr=10.1.58.11 ; more than once to bind to multiple
bindaddr=fd99:a:b:58::11

*1 and *2 have no problem to discuss together, evrything is OK.

Now *3 with *2:
Tx-Frame Retry[002] ā€“ OSeqno: 000 ISeqno: 000 Type: IAX Subclass: POKE
Timestamp: 00011ms SCall: 02779 DCall: 00000 [fd99:a:b:70::12]:4569
CALLTOKEN : Present

On *2
Tx-Frame Retry[001] ā€“ OSeqno: 000 ISeqno: 000 Type: IAX Subclass: POKE
Timestamp: 00005ms SCall: 14222 DCall: 00000 [fd99:a:b:58::11]:4569
CALLTOKEN : Present

In both cases, on the other asterisk, there is nothing in the *CLI.

Now tcpdump:
in *3 -remember, ipv4 AND ipv6- I see the iax packets coming in

18:32:56.448450 ens1 In IP6 fd99:a:b:70::12.4569 > fd99:a:b:58::11.4569: UDP, length 14
18:32:56.947908 ens1 In IP6 fd99:a:b:70::12.4569 > fd99:a:b:58::11.4569: UDP, length 14
18:33:01.947190 ens1 In IP6 fd99:a:b:70::12.4569 > fd99:a:b:58::11.4569: UDP, length 14

But they never get answered and doensā€™nt appears in the cli, as well as POKE packets sended from *3 are NEVER showed in tcpdump !

Keeping this same configuration and using socat to bind ipv6 fd99:a:b:70::12 to an ipv4 address does the job, all is good. I even tested with a brand new asterisk install which is *1, same behavior.

Output of netstat -pan|grep asterisk on *3

tcp 0 0 0.0.0.0:36038 0.0.0.0:* LISTEN 590/asterisk
tcp 0 0 0.0.0.0:5061 0.0.0.0:* LISTEN 590/asterisk
tcp 0 0 10.1.58.11:40701 95.XXX.YYY.ZZZ:5061 ESTABLISHED 590/asterisk
tcp6 0 0 :::5061 :::* LISTEN 590/asterisk
tcp6 0 0 2001:db8:1234::ee:42195 2001:db8:1234::aa1:5061 ESTABLISHED 590/asterisk
tcp6 0 0 2001:db8:1234::aa1:5061 2001:db8:1234::ee:53195 ESTABLISHED 590/asterisk
tcp6 0 0 2001:db8:b1:932c::47065 2001:db8:230:1205::5061 ESTABLISHED 590/asterisk
tcp6 0 0 fd99:a:b:58::11:45069 fd99:a:b:70::12:5061 ESTABLISHED 590/asterisk
udp 0 0 0.0.0.0:4520 0.0.0.0:* 590/asterisk
udp 0 0 10.1.58.11:4569 0.0.0.0:* 590/asterisk
udp 0 0 0.0.0.0:5000 0.0.0.0:* 590/asterisk
udp 0 0 0.0.0.0:5060 0.0.0.0:* 590/asterisk
udp 0 0 0.0.0.0:46855 0.0.0.0:* 590/asterisk
udp6 0 0 fd99:a:b:58::11:4569 :::* 590/asterisk
udp6 0 0 2001:db8:b1:932c:::4569 :::* 590/asterisk
udp6 0 0 :::5060 :::* 590/asterisk
udp6 0 0 :::59188 :::* 590/asterisk
unix 3 STREAM CONNECTE 25887 590/asterisk
unix 3 STREAM CONNECTE 25888 590/asterisk
unix 3 STREAM CONNECTE 25886 590/asterisk /var/run/asterisk/asterisk.ctl
unix 3 STREAM CONNECTE 24693 3318/rasterisk
unix 2 [ ACC ] STREAM LISTENING 18520 590/asterisk /var/run/asterisk/asterisk.ctl
unix 3 STREAM CONNECTE 16923 590/asterisk
unix 3 STREAM CONNECTE 16922 590/asterisk
unix 3 STREAM CONNECTE 16924 590/asterisk
unix 3 STREAM CONNECTE 16925 590/asterisk

Thanks for your support

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.