[asterisk-users] File structure question

Peter Bowyer peter at bowyer.org
Mon Sep 4 13:25:49 MST 2006


On 04/09/06, Jay Moore <jaymoore at accu-com.com> wrote:
> Marco: Ah I see.  There's a [general] context.  I'm pretty new to this
> Asterisk stuff and I didn't realize there was a general context that you
> could do things like global includes.  Thanks, I'll give it a shot when
> I'm back in the office on Tuesday.
>
> Peter:  No need to be an ass about it, pal.  Not all of us are as adept
> at this as you are.

You've still not got it. #include is a general text include - can be
used anywhere. Well, perhaps it has to be at the start of a line.

Contexts, not even the [general] section which isn't actually a
context, has any relevance. It will insert the contents of the
included file as though it was in the main file, wherever you put it.

You could put the whole of the sip.conf file in an #include'd file.
The whole of one context. One and a half contexts. 2 lines out of the
[general] section. And so on.

All of which, to repeat, could be experienced with a small investment
of your time. It really does pay to experiment with the simple things,
you find your learning curve is so much flatter than if you ask
questions in a vacuum.

Peter


-- 
Peter Bowyer
Email: peter at bowyer.org



More information about the asterisk-users mailing list