[Asterisk-Users] Questions about contexts

Jerry jerry at voiptower.com
Tue Jun 14 09:08:54 MST 2005


I'm trying to clarify contexts and their uses. I do have a good
general understanding of them. My question is about "undeclared"
and "non-existant" contexts.

If I have a block somewhere (in sip.conf, for example), and it
has no "context=thiscontext" field, does it just automatically
use the "default" context? Or is this settable? (I see there is
an entry for context in the [general] block. I'm guessing this
can be used to set a global context for that file. But if this
is omitted, what context does the file get? Is "default" a
hardcoded fallback?)

Someone suggested that I could define a "non-existant" context,
being one that isn't actually declared, and set that in my
"context=" line, and calls so directed wouldn't go anywhere.
Would it be possible to do this with an empty definition (are
they equivalent?)

Lastly, I'm trying to get a good handle on "include" contexts.
If I have:
[contexta]
; commands omitted
[contextb]
; commands omitted

and I add:
[contextc]
include => contexta
include => contextb
; commands omitted

Then "contexta" and "contextb" are available to "contextc"'s
dialers, right?
Do I have to make sure there are no overlapping extensions in
all three contexts?

Thanks,
J.



More information about the asterisk-users mailing list