[asterisk-users] How can I use the "GET VARIABLE variablename"
inAGI
Yuan LIU
yliu11 at hotmail.com
Thu Mar 1 21:50:42 MST 2007
>From: "Àî¾ý" <lijun820311 at 163.com>
>Date: Fri, 2 Mar 2007 10:53:04 +0800
>
>Hi,All,
>
> I wang to use AGI in asterisk1.4.
> AGI file / myperl.agi
>
> #!/usr/bin/perl
>use strict;
>......
> print STDERR "7. Testing GET VARIABLE...";
> print "GET VARIABLE EXTEN \"\"\n";
Why do you want put "" after variable name? AGI is complaining about
syntax. Try
print "GET VARIABLE EXTEN\n";
Yuan Liu
> my $result = <STDIN>;
> &checkresult($result);
>
>......
>
>when the agi execute; asterisk conosle show that :
>
>AGI Rx << GET VARIABLE EXTEN ""
>AGI Tx >> 520-Invalid command syntax. Proper usage follows:
>
>AGI Tx >> Usage: GET VARIABLE <variablename>
> Returns 0 if <variablename> is not set. Returns 1 if
><variablename>
> is set and returns the variable in parentheses.
> example return code: 200 result=1 (testvariable)
>
>AGI Tx >> 520 End of proper usage.
>
>------------------------------------------------------------------------------------------
>
>I couldn't get the global variable ${EXTEN}, who can told me where is the
>wrong?
>
>Thanks a lot,
>Amy
>
>
>¡¡¡¡¡¡
>
>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Àî¾ý
>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡lijun820311 at 163.com
>¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2007-03-02
More information about the asterisk-users
mailing list