Slapin is on the right track. Trouble is, you can't export the Telephone Directory Assignment form. The only release I've seen that allowed you to export the entire TelDir was 7.1UR3. User Config might work, but that will only give you data for physical devices.
As far as an interface to program the directory from a 3rd party app, the import route would be easiest. For something automated, you'd have to play around with the MiXML interface.