[asterisk-users] dialplan contexts syntax and terminology

thufir hawat.thufir at gmail.com
Sat Feb 21 20:55:44 CST 2015

I'm looking into the dialplan specifics:

tleilax:~ # 
tleilax:~ # cat /etc/asterisk/extensions.conf

CONSOLE=Console/dsp                             ; Console interface for 
TRUNK=DAHDI/r1                                    ; Trunk interface
TRUNKX=DAHDI/r2					; 2nd trunk interface
TRUNKIAX=IAX2/ASTtest1:test at	; IAX trunk interface
TRUNKIAX1=IAX2/ASTtest1:test at	; IAX trunk interface
TRUNKBINFONE=IAX2/1112223333:PASSWORD at iax.binfone.com	; IAX trunk 
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 

exten => h,1,AGI(agi://

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" 

More information about the asterisk-users mailing list