Asterisk 1.8 on Ubuntu

We store the configuration files in CVS. We have a development, QA and production environments. 90% of the config files are the same across all 3 environments, but there are some differences in sip.conf and extensions.conf (environment specific voip providers and/or analog/digital lines). I'd like to be able to use the same config files in CVS and have the differences resolved at run time, based on host name of the asterisk server.

Any ideas how to do this?

I looked at STS, but it appears to be Mac only.

One idea would be to use something like

#include sip-$$$hostname$$$.conf

and then use sed or similar in the startup script to replace $$$hostname$$$ with the actual host name. Then each host/environment would have it's own include file as needed.

Another idea would be to write a simple perl or other program to pre-process the files and put some markers in the files themselves.
; onlyif host=abc
; /onlyif
The pre-processor would delete lines between the tags that didn't match the currently running host.




--

Mitch


--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
              http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to