Understanding __VARIABLES__ in FreePBX

OK, I’m a relative noob when it comes to FreePBX and I’m having a hard time trying to understand variables.

Here is the issue. Backup templates use a lot of variable references, such as ASTSPOOLDIR. If I google around, I can usually find where it is going, but this is rather time consuming and doesn’t always help me do what I’m trying to do. Can someone give me a general overview of how to find these variables, how to use them in the CLI and any additional information that might be useful?

In general, the Wiki is helpful, but I have a hard time if I’m trying to find more detailed information. For instance, the ? icon for the DIAL field on a FreePBX extension simply says “How to dial this device, only change this setting if you know what you’re doing”. The Wiki doesn’t have much more information and I was wondering if there is an Admin or Developers guide which would give more information.

Any help is much appreciated. Thanks.

asterisk -x "dialplan show globals" | grep -i ASTSPOOLDIR

There is no more docs other than what is in the Wiki. You can interact with those more experienced here.

1 Like

They are to be found in /etc/asterisk/asterIsk.conf, they can be set in the advanced settongs, But if you needed to chamge them you wouldn’t be asking here :slight_smile:

Is a very good reference source and is also available on-line


Thanks for the command. It is exactly what I was looking for. I still don’t know how to use them in the CLI/Scripts. I’ve tried typing it in as I see with with the double underscore and with a dollar sign, but I haven’t been able to make it work.

As for additional information, the forums has proven to be fairly helpful. I just want to make sure I’m working hard on my end to understand information before I go and ask questions.

Thanks for you help.


I appreciate your help as well. I’m definitely not planning on making changes to those, but just knowing where stuff is at is very helpful.

I think I have a good idea of the overall picture, that FreePBX is a GUI wrapper for an Asterisk (which is a communications framework) which runs on top of Linux (usually CentOS). MySQL and PHP are used by FreePBX/Asterisk for database and display information. The problem I think I run into is I get lost in what part is doing what. If I could find it, I would like some more information on which elements of this stack do what jobs and how to find that if I don’t know. Any suggestions on where to start there would be much appreciated.

Again, you guys are awesome and I appreciate your time.

These are not bash variables, they are Asterisk variables. If you are scripting in PHP you need this resource:


Ah, that makes sense. I appreciate your help with this.

1 Like