Naturally if there are a lot of phones that belong in the same context (a set of programming rules that defines how a dialed number behaves) there will be significant redundancy. Which is why Asterisk supports templates. By declaring a template at the beginning of the file, each individual phone record only needs to indicate it is building off the template. The only new lines are the lines that indicate how it is different from the template.
This is only the beginning of my Asterisk VB fun. I plan to improve this more and create some other automatic generation files. It currently doesn't support SIP declarations that are not numbers (you can name a phone "Phil" and dial it that way too) or values with leading zeroes.
No comments:
Post a Comment