[Asterisk-Users] include a file ?
Sean Cheesman
scheesman at gdsworks.com
Tue Dec 30 15:29:02 MST 2003
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 at arbuckle.org]
Sent: Tuesday, December 30, 2003 4:54 PM
To: asterisk-users at 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 at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list