There are several posts indicating that this is not easy, for example Adding a custom brand in Endpoint Manager .
However, given that you are replacing high-port-count FXS gateways (I assume that this is for a hotel, hospital, school, etc.), I would guess that the configs are all the same except for extension number and password.
So, create one config file manually and get it to work. Then, write a simple script that replicates the files, substituting only the two lines with credentials, naming them appropriately by MAC address.