[Asterisk-Users] Questions about contexts

Moises Silva moises.silva at gmail.com
Tue Jun 14 11:02:21 MST 2005


i guess in sip.conf, and iax.conf you can put a parameter
defaultcontext=somecontext in the [general] context, so all the users
and /or peers that does not have a defined context will get there.

about the includes, yes, all the extensions in context 'a' and 'b' are
available to 'c'. You can put overlapping extensions, but the first
match will be used. So, if you first include => a, and later include
=> b, 'a' will take precedence. Note that overlapping extensions
inside the same context, lets say

[overlapping]
exten => _XX,blah
exten => _.,blah

it doesnt matter that the XX extension appears firts, the matchin will
be the more generic one., so if you want XX first, you have to
separate the extensions and include them by include => xxcontext
include => theother

so the xx extension will be matched first

best regards

best regards

On 6/14/05, Jerry <jerry at voiptower.com> wrote:
> 
> 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.
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 


-- 
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"



More information about the asterisk-users mailing list