We use sangoma here. (Far more reliable than digium in our experience). We just set up a test bench with extra cards (a cisco 1720 with t1 wic for data and an asterisk box with another sangoma in master mode for simulating a telco). This allows us to test with any of the bazillion different line protocols you're likely to face on site (especially in a 3rd world setting).
Also when we face the inevitable problems on site, we can simulate Apollo 13 style at home base to work out solutions.