Two-way tos

Hello there,

I’m trying to connect 2 asterisk servers using IAX through the Internet.

My issue is ensuring that VOIP packets are tagged properly so that they are given proper priority as they traverse the internet. Right now, when I do tcpdump on the LOCAL machine, I notice that tos is properly being set on outgoing packets, but incoming packets are arriving with a tos of 0x0 on the other end. On the REMOTE machine, I’m also doing tcpdump and notice that incoming packets are arriving with a tos of 0x0, while outgoing have tos set to 0xb8.

Is this normal behavior? I suspect something is going on on one of the nodes in my route to set the priority to 0. However, I just want to make sure that I’m right, before calling my ISP.

Here’s a sample tcpdump from my local machine:

tcpdump -v -v -i eth1 port 4569

01:32:30.519210 IP (tos 0xb8, ttl 64, id 32967, offset 0, flags [none], proto UDP (17), length 192) LOCAL.iax > REMOTE.iax: UDP, length 164
01:32:30.528823 IP (tos 0x0, ttl 37, id 39815, offset 0, flags [none], proto UDP (17), length 192) REMOTE.iax > LOCAL.iax: UDP, length 164
01:32:30.549663 IP (tos 0x0, ttl 37, id 39819, offset 0, flags [none], proto UDP (17), length 192) REMOTE.iax > LOCAL.iax: UDP, length 164
01:32:30.550102 IP (tos 0xb8, ttl 64, id 32968, offset 0, flags [none], proto UDP (17), length 192) LOCAL.iax > REMOTE.iax: UDP, length 164
01:32:30.550974 IP (tos 0xb8, ttl 64, id 32969, offset 0, flags [none], proto UDP (17), length 192) LOCAL.iax > REMOTE.iax: UDP, length 164
01:32:30.569015 IP (tos 0x0, ttl 37, id 39824, offset 0, flags [none], proto UDP (17), length 192) REMOTE.iax > LOCAL.iax: UDP, length 164
01:32:30.578716 IP (tos 0xb8, ttl 64, id 32970, offset 0, flags [none], proto UDP (17), length 192) LOCAL.iax > REMOTE.iax: UDP, length 164
01:32:30.590832 IP (tos 0x0, ttl 37, id 39827, offset 0, flags [none], proto UDP (17), length 192) REMOTE.iax > LOCAL.iax: UDP, length 164
01:32:30.609504 IP (tos 0xb8, ttl 64, id 32971, offset 0, flags [none], proto UDP (17), length 192) LOCAL.iax > REMOTE.iax: UDP, length 164
01:32:30.610369 IP (tos 0xb8, ttl 64, id 32972, offset 0, flags [none], proto UDP (17), length 192) LOCAL.iax > REMOTE.iax: UDP, length 164

I’m using Asterisk 1…4.19 on both ends and here is the tos line from iax.conf:

tos=ef

Thanks in advance for all your help.

Hi Hovik

Did you manage to resolve this? I am having difficulty with QoS. Packets are being sent from my server (hosted out on the internet) as 0xb8 but are arriving 0x0 on my local device (connected via broadband at home behind NAT).

I am experiencing choppy sound and wonder if this is why. My router shows QoS is only active in OUT direction and that appears to be because it’s only seeing EF packets locally and not incoming from the server.

Any help would really be appreciated.

Many thanks.

Chris

The public internet is very unlikely to respect QoS settings as it would lead to abuse.