Denis Galvão - iSolve
2006-Jun-09 10:18 UTC
[Asterisk-Users] Using "#include" on zaptel.conf
Hi all. Is this possible to use an include parameter on zaptel.conf file? I mean, I want to have a bunch of files with zaptel configurations, each one with the configuration of one kind of board(TDM, analog, and so on). Thanks, Denis Galv?o
----- Denis Galv?o - iSolve <denis@isolve.com.br> wrote:> Is this possible to use an include parameter on zaptel.conf file?All Asterisk .conf files support #include, it's handled at the file-reading level. It would have taken less time to just try it, though, and you'd already have your answer :-) -- Kevin P. Fleming Senior Software Engineer Digium, Inc.
----- Denis Galv?o - iSolve <denis@isolve.com.br> wrote:> But the zaptel.conf is an Asterisk file? > > Thanks for your reply and you're right about testing before. :)Of course you are right... sorry. No, zaptel.conf (read by ztcfg) does not support #include. I thought you were asking about zapata.conf and responded incorrectly. -- Kevin P. Fleming Senior Software Engineer Digium, Inc.
On Fri, Jun 09, 2006 at 02:18:19PM -0300, Denis Galv?o - iSolve wrote:> Hi all. > > Is this possible to use an include parameter on zaptel.conf file?Technically, no.> > I mean, I want to have a bunch of files with zaptel configurations, > each one with the configuration of one kind of board(TDM, analog, and > so on).Why exactly do you need this? Alternatively, change yourr init scripts to run: ztcfg -c <(cpp /etc/zaptel.conf) Note: that syntax is bash-specific . In fact (at least on Debian) when bash is run as /bin/sh it will not support that syntax. There are a bunch of other simple preprocessors. cpp won't support glob-including, and won't support "#exec", though. But I believe that such an approach won't get you very far, as zaptel.conf directives require knowing the exact span and channel numbers. -- Tzafrir Cohen sip:tzafrir@local.xorcom.com icq#16849755 iax:tzafrir@local.xorcom.com +972-50-7952406 tzafrir.cohen@xorcom.com http://www.xorcom.com