Hi, I have used your script successfully a couple of times, and I'm happy with the results, nice work.
With the advent of the Pi5 with its PCIe interface, Dahdi hardware can now be used, and in fact I'm using RasPBX with a Channel Bank.
I know that installing Dahdi can be a PITA, but its optional inclusion would, I believe be a worthwhile enhancement.