There is a thing in Android called ConnectionServie. It basically allows apps to integrate with the system dialer. This integrates better with system calling. For example, you’ll get a message if you get an incoming call, beause you are already in a call.
In addition, CS (ConnectionService) greatly simplifies device management.
However, not all the glitter is gold. Manufacturers provide their own implementation of TelecomService, which is used under the hood by CS and sometimes there are bugs, pretty much like this one.
What the PR I made does (thanks a lot for validating the fix!) is fall-back to the non-CS case. If you ever put a SIM card on that device CS will start to work and you’ll not notice a thing, that’s the idea at least