[Asterisk-Users] Variables issue

Eric Wieling eric at fnords.org
Thu Apr 29 10:49:40 MST 2004


Jero wrote:

> Hi all.
> i've got this extension
> exten => 1,5,AGI,pepe.agi
> and i need to get the ${DATETIME} variable (of course i could get it using
> the normal perl's modules) ,
> i'm tring with $AGI->get_variable('DATETIME') and
> with
> exten => 1,5,AGI,pepe.agi,${DATETIME]
> ------pepe.agi
> $date=$ARGV[0];
>  but in both samples i couldn't get the variable...
> am i doing somethin wrong?
> greetings

The automatically created variables in extensions.conf are not available 
in AGI.  SetVar and SetGlovalVar variables are.  You could call a 
SetVar(MY_DATETIME=${DATETIME} in the dialplan before calling your AGI. 
  This is a workaround, of course.



More information about the asterisk-users mailing list