login | register
Tue 09 of Feb, 2010 [21:01 UTC]

voip-info.org

Discuss [2] History

Asterisk cmd SetGlobalVar

Created by: oej,Last modification on Fri 12 of Oct, 2007 [12:19 UTC] by chandave

SetGlobalVar

Synopsis

Set variable to value in Asterisk v1.0.x and earlier

Description

 SetGlobalVar(foo=value)

Sets global variable foo to value.

Asterisk 1.2

Use Set instead with the 'g' option

extensions.conf:
; If clearglobalvars is not set, then global variables will persist
; through reloads, and even if deleted from the extensions.conf or
; one if its included files, will remain set to the previous value.
;
clearglobalvars=no

Examples

   SetGlobalVar(numRings=18)
   SetGlobalVar(defaultChannel=Zap/2)

See also



Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ



Comments

Comments Filter
222

333Re :possible mistake?

by , Friday 14 of May, 2004 [18:15:47 UTC]
For Setvar
they say : Setvar(variablename=value)

For SetGlobalVar
I would say : SetGlobalVar(variablename=value)

and it works ! Setvar don't keep the value global.
222

333possible mistake?

by , Sunday 11 of April, 2004 [17:48:44 UTC]
  1. Description:
  2. Ā Setvar(#n=value)

Shouldn't this be:

Description:
Ā Setglobalvar(#n=value)