Local Variables

To begin with the local configuration of Asterisk, we like to define a few local variables in a separate file so that the other local configuration files can be made more generic. These variables define an extension pattern, an optional virtual extension pattern, special extensions, the digits to use for outbound dialing, the code to use for accessing special features, and a LATA to be used for local area dialing.

/etc/asterisk/local/variables.conf:

     ; local/variables.conf - Local variables.
     ;
     ; This module is included at the appropriate spot in the dialplan (defined
     ; by extensions.conf).  It defines the local global variables that are used
     ; to describe the local configuration.
     ;
     ;
     ; We are (hopefully) already in the global context where any variables that
     ; we define are global.
     ;
     ; We'll define all of the variables (constants) that describe the local
     ; configuration, so that the other files can be generic.
     ;
     ; Pattern used to match extensions.  Set this to match the kind of extension
     ; numbers you wish to use.  For example "6XX" or "5XXX".
     EXTPATTERN=6XX
     ; Pattern used to match any virtual extensions.  This pattern should be
     ; defined whether you use virtual extensions or not.  You can pick some
     ; bogus pattern (such as 999) if you don't use virtual extensions, but it
     ; should be OK the way it is.
     ;
     ; Optional switch that turns on virtual extensions from inside (i.e. local
     ; extensions).
     ;
     ; Optional switch used to let outside callers through to the inside so
     ; that they can dial the virtual extensions too.  You may or may not want
     ; to do this, depending on what the virtual extensions do.
     VIRTPATTERN=8[0-8]X
     VIRTINSIDE=1
     VIRTOUTSIDE=1
     ; Special extensions used to get special services.
     EXTVMAIL=898                            ; Extension used to get voicemail
                                             ; from an outside call
     EXTRECORDIVR=899                        ; Extension used to record an IVR
                                             ; prompt
     ; Dial code used to grab an outbound trunk from one of the internal
     ; extensions.  Typically, this is a single digit, such as "9", but it
     ; can be any sequence you like.
     OUTBOUNDCODE=9
     ; Dial code used for special features (e.g. for turning on DoNotDisturb
     ; or CallWaiting or grabbing a specific outside line).  This must be a
     ; single digit, such as "".
     SPECIALCODE=
     ; Local LATA used to allow 7-digit dialing, even in the era of overlay
     ; plans.  If the user dials the OUTBOUNDCODE, followed by a 7-digit number,
     ; we can whack this LATA on the front to get the overlay plan number.
     LOCALLATA=416