BT Digital Voice and 3rd party routers

Dropping a thread here for this as I've just spend the afternoon trying to sort DV out. I forgot rule 1 for dealing with sales droids. NEVER trust their information. Always double check yourself. ("they are wifi phones!")

  • BT Smart Hub2 has a DECT basestation built in. While the phones they send you do connect via WPS, they are DECT phones and NEED a basestation. What I was told is they are wifi phones and self configure. I foolishly thought they would be SIP phones and thus would work over wifi. They Are NOT wifi. They just use wifi and WPS to configure from the SH2.

  • The BT SmartHub2 EXPECTS to be master router and Digital Voice will NOT work if you piggyback it off another 3rd party router. (encrypted PPPoE connection grabs SIP data from BT and configures the DECT station)

  • You can double nat and use the BT router and then use your existing equipment behind it. Not ideal.

Solution 1:

I used the BT Hub with DV with a third party router running off it with no problems. Although technically "double natting" with both devices issuing network devices, I had no issues. All devices I connected to my router (wifi and ethernet). So if you wish to keep DV without getting under the bonnet too much you could try that.

ONT->SH->My Router

However I have since done away with the SH and set all "land line" calls to be forwarded to my mobile. Works a treat. https://www.bt.com/help/landline/all-about-call-diversion-for-digital-voice

Solution 2:

BT forums claim its BT way or take a hike. The alternative is to port your existing landline number to a SIP service and then take broadband only line. https://www.bt.com/broadband/broadband-without-landline

Solution 3:

Then I found this post by a guy called chrisu

Due to being locked down over the Christmas and New Year period, I've had a lot of spare time to continue this, and I have eventually made it work. My Asus router is now connected to the ONT and is acting as the router and the SH2 is connected to one of the LAN ports on the Asus router and is only used for Digital Voice phone and I am able to make phone calls.

I worked out that the SH2 makes a call to https://linediscovery.hub.bt.com/ and passes the PPPoE Host-Uniq tag value and the PPPoE Session ID and it is returned the SIP details which it then uses to initiate the SIP connection for phone calls. The local and remote IP addresses and MAC addresses, and the AC Name are not important. The SH2 changes the Host-Uniq value every time it makes a new connection which makes it more difficult to get this to work.

The Asus router is running a version of linux, the source code is freely available on the Asus web site, and it is possible to configure SSH access in order to run commands on the Asus router in order to reconfigure things.

I downloaded a copy of the open source PPPoE server https://dianne.skoll.ca/projects/rp-pppoe/ I changed it so that on receipt of the PADI message, it extracts the Host-Uniq tag, and reconfigures the Asus router to use this value on it's external PPPoE connection, and then makes the Asus router re-establish the PPPoE session. Once it is re-established, it gets the PPPoE Session ID and uses that later in the PADS message sent back to the SH2 so that the SH2 will use that, along with the host-Uniq value, when making a call to https://linediscovery.hub.bt.com/

In order to change the Host-Uniq tag on the Asus router and cause it to reconnect the following commands can be run on the Asus router:
nvram set wan0_pppoe_hostuniq=20EF000
nvram set rc_service="restart_wan_if 0"
kill -SIGUSR1 1

In order to get the PPPoE session ID on the Asus router, the following command can be run:
cat /proc/net/pppoe|cut -d" " -f1

A linux server (Raspberry Pi or other), needs to be running on the same LAN as the SH2. On this server, the changed RP-PPPOE needs to be installed and the file /etc/ppp/pppoe-server-options needs to contain the following (192.168.0.1 is the Asus LAN IP Address):
noauth
noproxyarp
ms-dns 192.168.0.1
lcp-echo-interval 10
lcp-echo-failure 2

IP forwarding needs to be enabled on the linux server :
echo 1 > /proc/sys/net/ipv4/ip_forward

A NAT rule needs to be added on the linux server to NAT the data coming from the SH2 to the internet. I use a bridge interface br0, but for most servers it will be eth0 or similar:
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o br0 -j MASQUERADE

The Asus router needs to be configured to forward UDP traffic on port 5050 to an additional IP address which will be assigned to the linux server. The linux server will have 2 IP addresses - it's main one and the one used for PPP. I assigned 192.168.0.11 for this purpose.
A NAT rule needs to be added to the linux server to forward the voice data from the internet through the PPP connection to the SH2:
iptables -t nat -A PREROUTING -d 192.168.0.11 -p udp --dport 5050 -j DNAT --to-destination 192.168.1.1:5050

The hacked PPPoE server needs to be run (the -o 1 is ignored in my hacked server and be replaced with the Session ID):
pppoe-server -C acc-aln2.l-zzz -I br0 -L 192.168.0.11 -R 192.168.1.1 -o 1 -N 1 -k

The SH2 will then think it's connected to the ONT and connect the Digital Voice even though it's running on the LAN.

He later posted the code and more info.

I described the way I got Digital Voice on the SH2 to work on the lan behind my Asus router on page 7 of this thread, but I didn't post the source code for my hack to the code of rp-pppoe (version 3.14). I have uploaded it here https://drive.google.com/file/d/1Uq1oKBGCtChEvv1H9Ut... This is specific to Asus routers as it needs to change the Host_Uniq tag on the router and restart the PPPoE session. Something similar should be possible with OpenWRT and other routers.

I have now automated everything and so I can restart the SH2, my Asus router or the linux server that pppoe-server is running on and everything automatically reconnects. It's all been working without issue since 1st Jan.

He obviously has FTTP while I'm still FTTC.

Now the question I have is can this be done on openwrt. (I'm not a programmer)

Current setup uses a HG612 modem in bridge mode for my VDSL that my NanoPi R4S then gets a DHCP over.

I understand enough to know that it essentially proxy's the requests and impersonates the SH2 but its how to implement it.

luci-app-rp-pppoe-server git-20.108.38431-8f34e10 2.1 KB Roaring Penguin PPPoE Server is available in the package database but looking at the code he posted it may require a custom build with modifications.

Putting the SH2 in bridge mode and replacing my HG612 VDSL with it would be better but apparently only the business SH2's allow you to do that. In theory that would let me not have to proxy the SIP requests. But with it in bridge mode it wouldn't have the ip layer to so the phones work. I need to explore that more fully and see if its possible.

Anyway I've posted all this info incase it helps anyone else and to see what others think.

Reference Threads :

https://forums.thinkbroadband.com/fibre/t/4670157-bt-fttp-with-digital-voice-alternative-to-smart-hub-2.html - Technical writeup of the DV system.

https://forums.thinkbroadband.com/fibre/t/4672773-bt-fttp-with-digital-voice-alternative-to-smart-hub-2.html - Code link for the ppoe server.

https://drive.google.com/file/d/1Uq1oKBGCtChEvv1H9UtTq_76WyaMP02v/view?usp=sharing - Code snippet.

https://community.bt.com/t5/Home-phone-including-Digital/Digital-Voice-with-different-Router/td-p/2095493 - BT forum thread about DV and 3rd party routers.

1 Like

Where did you land with this?