VoIP over EoIP

I have several branch offices connected back to HQ using MikroTik Routers. They are all connected over the public internet back to HQ using Mikrotiks propriety EoIP tunnel.

At HQ I host an Asterisk softswitch as a VoIP PBX and POTS gateway. At the remote locations (and at HQ) are VoIP/SIP Telephone handsets, all configured to register with the Asterisk server at HQ

All the SIP signalling seems to work, and calls can be established, i.e internally any SIP extension can call another SIP extension thorough the Asterisk PBX. Calls can be established out to the public networks, and incoming calls ring the correct handset.

However ALL calls that are required to Jump through the EoIP tunnel, do not establish their voice paths correctly. In this case the audio channel FROM the Asterisk TO the remote VoIP/SIP handset is absent. The return voice channel FROM the remote VoIP/SIP handset is present.

I notice that Asterisk is seeing IP packets arriving from the remote VoIP/SIP handset with the source address set to the 172.16.1.2 address I had used as the intermediate address for use by the EoIP tunnel and not the 10.1.5.X address of the remote VoIP/SIP handset, whilst local handsests at HQ are presenting the correct source address of 10.1.5.x

I have not had any issues with any other protocols on the EoIP tunnel - anybody have any pointers for using VoIP/SIP over EoIP tunnels.

What is the reason for using EoIP? Do you need L2 connectivity between all the sites?

If the source addresses change, then you are probably doing some NAT somewhere, and SIP with NAT is always problems.

The issue has noting to do with EoIP as EoIP doesn’t touch the payload of the the Ethernet frames it forwards. So it must be a routing problem or a NAT one (or both). Post the export of both the HQ router and one of the problematic BO ones (see my automatic signature below for an anonymisation hint), plus the IP address and mask of the SIP phone connected to the respective BO router which doesn’t receive the audio, as well as the internal IP address of the Asterisk.

The issue may be caused by wrong address mask assigned to the phone or used in firewall src-address matching, multiple DHCP servers each indicating a different default gateway…

Also bear in mind that if you have multiple IP addresses on the Asterisk, the Asterisk may ask the phones to send RTP to a different address than the one to which they are configured to register, so the packets may take a different route than you expect. tcpdump -vnn on the Asterisk machine will visualize the SDP from the Asterisk to the phone, the IP address on the c= line is relevant.