Building a Bridge to VoIP

I have a phone connected through the "Linksys" VoIP gateway. The gateway is connected to the LAN port of the router for which the bridge was created. All this is done on the TPLink router and it works. Screenshots of the settings are attached in the posts below.

How can I repeat these settings on OpenWrt (Xiaomi AX6)?

I have installed luci-proto-relay, relayd packages. Now I can make a "relay-bridge" interface. I tried to combine the existing VAN and the LAN2 created for VoIP in it. But it didn't work.

How is this related to OpenWrt?

I want to change my TPLink router to Xiaomi AX6
with OpenWrt firmware. But I don’t know how to set up OpenWrt so that it works the same way as my old router.

How well versed are you with Putty or WinSCP, or terminal SSH into your OpenWrt Router?

We are going to need to see output formatted by the results of the actions we need you to execute on against the Xiaomi AX6. It would also be helpful to know the brand/model of IP Phone.


This is what Preformatted text looks like. These are the commands you need to copy/paste/execute; and then copy/paste results back to us.

ubus call system board; uci export dhcp; uci export network; uci export firewall

No problem. But I can only do it tonight.

A simple phone is connected through the VoIP gateway "LinkSys", which was given to me by the Internet provider. The telephony service is provided by the Internet provider.
The TPLink router with its settings was also from the provider, but I want to change it to OpenWrt.

This sound like an ATA (analog telephone adapter)

So you are shelfing the TPLink router and bringing in the Xiaomi w/OpenWrt.

Members will be interested in the configs to determine your OpenWrt version to assist in assaying swconfig or dsa for mimicking your existing working config on the ISP provided router. Truly, I won't be of any more assistance from that point but will be watching leadership here assist you.

Welcome Aboard.

ubus call system board; uci export dhcp; uci export network; uci export firewall

The provider did not use special firmware for the router. He used the standard TPLink firmware options. As I understand it, only a separate bridge was made between the VAN and one of the LAN ports.
By the way, here is my VoIP gateway.

  "kernel": "5.15.35",
        "hostname": "OpenWrt",
        "system": "ARMv8 Processor rev 4",
        "model": "Redmi AX6",
        "board_name": "redmi,ax6",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "SNAPSHOT",
                "revision": "r19565-2355dff3ec",
                "target": "ipq807x/generic",
                "description": "OpenWrt SNAPSHOT r19565-2355dff3ec"

package dhcp

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
        option nonwildcard '1'
        option localservice '1'
        option ednspacket_max '1232'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'
        list ra_flags 'none'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

package network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd13:6453:ccb2::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1'
        list ports 'eth2'
        list ports 'eth3'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.0.1'

config interface 'wan'
        option device 'eth0'
        option proto 'pppoe'
        option username '*********'
        option password *********'
        option ipv6 'auto'

config interface 'wan6'
        option device 'eth0'
        option proto 'dhcpv6'

package firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone
        option name 'lan'
        list network 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'

config zone
        option name 'wan'
        list network 'wan'
        list network 'wan6'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option src_ip 'fc00::/6'
        option dest_ip 'fc00::/6'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

P.S. I removed now the relay-bridge interface.

Can anyone still help, please? I'm sure there are no special settings from the ISP. The fact is that if the cable with the Internet (from the WAN port) is inserted into the telephone gateway, then the phone WORKS. So I just need to pass the signal from the WAN port to one of the LAN ports "as is", without modification, using a bridge.
How to do it on OpenWrt?

I see evidence of that in the third screenshot, where LAN2 has been pulled out of the "default" "group" and assigned to a custom group called "tel". That probably means to switch it to a VLAN on the WAN port. You need to look through the other settings for mentions of what else is in the "tel group". It's likely on the "Grouping Interfaces" page.

This would be a hardware switch / DSA configuration-- there is no need for other packages or really any CPU involvement with the phone packets once the hardware switch has been configured.

Thanks for the answer. There are no more settings for the interfaces, I carefully checked everything. And VLAN is not involved. Screenshot 2 shows that the VLAN checkbox is not checked.

Maybe the other tabs under Grouping? I think that group is their concept of switching different lans, i.e. vlans. A group would have to have more than one port in it.

Or it could be a local network like a guest network.

Hey all! I had a DM with a member and the suggestion was to peek into the ATA and see what happening there.

I think ATA should work on every OpenWrt lan port, but OP should find out what is the assigned IP address by the OpenWrt DHCP server and connect to the device using its web interface to see what is happening.

Interesting offer. But there is no VoIP gateway in the lists of wired clients. Only my computer is listed.

Linksys SPA2102 has a web interface??

I has an ip address, the device has your SIP account setting. What's hard about peeking into the device?

It seems (based on the screenshots) that the only goal of the tel group is to isolate the VoIP traffic from the LAN. It has a dedicated DHCP server in the 192.168.2.0/24 network (addresses from 100 to 199). Check the IP settings when the device is connected to lan2 of the ISP router and directly connected to the Internet. You can do this by dialing different codes using your phone.

If the settings are the same, you may really need a bridge.

It will be difficult to explain how to do this using LuCI, so please post the network configuration again, but this time run uci show network.

If no one else helps you before me, I will do it tomorrow.

1 Like

I forgot about that feature... I only spent a month on the Grandstream ATA..

It's crazy, but the phone works on any LAN except LAN2!
On LAN1, we managed to hear the settings:
Connection Type: PPPoe
IP: 10.82.40.30
Gateway: 5.3.9.126
Port:80
Firmware: 5.2.5

Indeed, the "bridge" type WAN interface br_eth_0_1 is grouped with all ports except LAN2.