ok, I've got yet another newbie question. My extensions.conf is getting rather longish and I'm getting dizzy moving back and forth editing this thing. Can I use the include command to include a file in order to break extensions.conf up into more manageable pieces ? Is breaking up the extension.conf file an OK thing to do ? Maybe something like this: include /etc/asterisk/includes/extension.conf.context -- .~. /V\ Lance C. Arbuckle // \\ /( )\ ^'~'^
On Monday 29 December 2003 15:10, Lance Arbuckle wrote:> ok, I've got yet another newbie question. > > My extensions.conf is getting rather longish and I'm getting dizzy > moving back and forth editing this thing. Can I use the include > command to include a file in order to break extensions.conf up into > more manageable pieces ? Is breaking up the extension.conf file an > OK thing to do ? > > Maybe something like this: > > include /etc/asterisk/includes/extension.conf.context#include filename.conf -Tilghman
its #include filename.conf On Mon, 29 Dec 2003, Lance Arbuckle wrote:> > > ok, I've got yet another newbie question. > > My extensions.conf is getting rather longish and I'm getting dizzy > moving back and forth editing this thing. Can I use the include command > to include a file in order to break extensions.conf up into more > manageable pieces ? Is breaking up the extension.conf file an OK thing > to do ? > > Maybe something like this: > > include /etc/asterisk/includes/extension.conf.context > > -- > .~. > /V\ Lance C. Arbuckle > // \\ > /( )\ > ^'~'^ > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users >
The # is needed. It's your standard programming syntax. My two cents on the date/time variable would be no. The includes are processed when * starts up, and are all grouped together. It's more of a way to keep everything clean than for a logic basis. Anyone else? Sean -----Original Message----- From: Lance Arbuckle [mailto:asterisk@arbuckle.org] Sent: Tuesday, December 30, 2003 4:17 PM To: asterisk-users@lists.digium.com Subject: Re: [Asterisk-Users] include a file ? Brian West wrote:> > its > > #include filename.conf >Does the synatx include the # at the beginning of the line ? And can this type of include be time/date dependant like the standard include ? include => filename.conf|<hours>|<weekdays>|<monthdays>|<months> -- .~. /V\ Lance C. Arbuckle // \\ /( )\ ^'~'^ _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users
>> > Brian West wrote: > > > > > > its > > > > > > #include filename.conf > > > > > > > Does the synatx include the # at the beginning of the line ? > > And can this type of include be time/date dependant like the > standard > include ? > > > > include => filename.conf|<hours>|<weekdays>|<monthdays>|<months> > > > > Check here: > http://www.voip-info.org/tiki-index.php?page=Asterisk%20tips%20openhours > > The wiki is a good place to start for these questions. > > -Bill#include and include => are different. #include includes a file (which is what his origional question was.) include => includes a context Kevin
include => context is for context inclusion #include filename.conf is for including other files that follow the standard config files (sip, extensions, etc) Don't let the two includes confuse you. They serve two completely different functions on two completely different levels. If you had 1000 extensions on your * box, having them all in one file would be all but impossible to administer. But if you broke those thousand extensions out by department and created separate files for each one, you could easily keep everything straight. #include accounting.conf #include support.conf #include shipping.conf Of course, this is only one of many ways you could use the #include function! Sean -----Original Message----- From: Lance Arbuckle [mailto:asterisk@arbuckle.org] Sent: Tuesday, December 30, 2003 4:54 PM To: asterisk-users@lists.digium.com Subject: Re: [Asterisk-Users] include a file ? Sean Cheesman wrote:> > The # is needed. It's your standard programming syntax. > > My two cents on the date/time variable would be no. The includes are > processed when * starts up, and are all grouped together. It's more of a > way to keep everything clean than for a logic basis. Anyone else? >> Brian West wrote: > > > > its > > > > #include filename.conf > > > > Does the synatx include the # at the beginning of the line ? > And can this type of include be time/date dependant like the standard > include ? > > include => filename.conf|<hours>|<weekdays>|<monthdays>|<months> >ok, Im a bit confused. I was refering to using includes within contexts. I've been doing things like this in extensions.conf : ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [local] -allow local area calling ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; include => outgoing-pstn-local include => outgoing-iax-peer include => outgoing-operator include => outgoing-911 include => outgoing-411 include => outgoing-611 and this ; check for holiday and play special message ; include => newyears|*|*|1|jan My original question was if I could break my extension.conf file up into seperate files and include the smaller pieces back into the main file like this. extensions.conf include => /etc/asterisk/extensions.conf.outgoing.contexts include => /etc/asterisk/extensions.conf.incoming.contexts include => /path/to/some/file|<hours>|<weekdays>|<monthdays>|<months> -- .~. /V\ Lance C. Arbuckle // \\ /( )\ ^'~'^ _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users