[asterisk-users] dialplan contexts syntax and terminology

thufir
2015-02-22T02:55:44Z

I'm looking into the dialplan specifics:

tleilax:~ #
tleilax:~ # cat /etc/asterisk/extensions.conf
[general]
static=yes
writeprotect=no

[globals]
CONSOLE=Console/dsp                             ; Console interface for
demo
TRUNK=DAHDI/r1                                    ; Trunk interface
TRUNKX=DAHDI/r2					; 2nd trunk interface
TRUNKIAX=IAX2/ASTtest1:test at 10.10.10.16:4569	; IAX trunk interface
TRUNKIAX1=IAX2/ASTtest1:test at 10.10.10.16:4569	; IAX trunk interface
TRUNKBINFONE=IAX2/1112223333:PASSWORD at iax.binfone.com	; IAX trunk
interface
SIPtrunk=SIP/1234:PASSWORD at sip.provider.net	; SIP trunk

#include extensions-vicidial.conf



Firstly, what language or format is this? Bash script?

the line "#include ..." what is this called? An include statement?

The "[globals]" -- what's the terminology for this? It's a
context?  And
a context is a logical separation in the dialplan?  Is that, in any way,
analogous to a function or method?

Once you create your this logical separation, what's the syntax
surrounding invoking a specific context?  For example:

tleilax:~ #
tleilax:~ # tail /etc/asterisk/extensions-vicidial.conf

[vicidial-auto]
exten => h,1,AGI(agi://127.0.0.1:4577/call_log--HVcauses--PRI-----
NODEBUG-----${HANGUPCAUSE}-----${DIALSTATUS}-----${DIALEDTIME}-----
${ANSWEREDTIME})

include => vicidial-auto-internal
include => vicidial-auto-phones
include => vicidial-auto-external


; END OF FILE    Last Forced System Reload: 2015-02-20 16:49:28
tleilax:~ #


when the above contexts are included, these contexts are declared within
the extensions-vicidial.conf, meaning that when they're declared,
they're
not actually used/invoked/called **until** the actual "include =>
foo"
syntax?