Discussion: Asterisk Dialplan Globals


 
Comments Filter

globals from another file

To include global variables from another file, remove any [globals] heading from that file.  Then in the [globals] section of extensions.conf, add #include my-other-file-with-just-globals.conf


by cmaj, Wednesday 02 of May, 2012 (23:42:31 UTC)
Problem solved

In version 1.2.10 it is possible to access global variables using the AGI. My problem was unrelated to this. Thanks for everyones help.

by seestheday, Monday 04 of September, 2006 (22:14:25 UTC)
Re: How to reference global variables from AGI?

I haven't tried that $__GLOBAL_foo thing yet, but it's an interesting idea. I think those underscores are more for setting variables that are inherited by the following contexts, as opposed to actual global variables that are really constants and defined at in the |globals| section of the dialplan. They are really two different things.

I have asked this question on the asterisk-users mailing list and it appears to be a bug. I submitted a ticket and a developer there quickly provided a patch. The bug and patch are here: http://bugs.digium.com/view.php?id=7609

- Simon

by seestheday, Saturday 29 of July, 2006 (20:03:59 UTC)
Re: How to reference global variables from AGI?

I haven't tested it myself, but have you tried to access the Global variable with 2 underlines charaters prefixed to the variable name? I.E. $GLOBAL_foo as $__GLOBAL_foo.

See ya...

d.c.

by chandave, Friday 28 of July, 2006 (05:33:53 UTC)
How to reference global variables from AGI?

Does anyone know how to handle referencing global variables from the AGI? Is this possible?

by seestheday, Thursday 27 of July, 2006 (23:46:21 UTC)
How about include?

What if I want to include another context in the [global] context?

For Instance, based on a global, I want to include one set of global vars, or another.

include => foo
just sets the variable ${include} to "foo".


by kniveton, Friday 14 of September, 2012 (19:03:49 UTC)

Page Changes | Comments

 

Featured -

Search: