李君
2007-Mar-01 19:53 UTC
[asterisk-users] How can I use the "GET VARIABLE variablename" in AGI
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"; 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@163.com ??????????2007-03-02
Lee Jenkins
2007-Mar-01 20:27 UTC
[asterisk-users] How can I use the "GET VARIABLE variablename" in AGI
?? wrote:> 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"; > my $result = <STDIN>; > &checkresult($result); > > ...... >I don't know perl, but try either taking the escaped quotes out or surrounding EXTEN with them. -- Warm Regards, Lee
Yuan LIU
2007-Mar-01 21:50 UTC
[asterisk-users] How can I use the "GET VARIABLE variablename" inAGI
>From: "Àî¾ý" <lijun820311@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@163.com >¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2007-03-02
Possibly Parallel Threads
- why there havn't "app_meetme.so" file about asterisk1.4.0?
- blank division after update
- AMD: HANGUP
- AGI: "Get variable" returns variable VALUE vs "Get full variable" returns variable NAME - bug or my misunderstanding?
- Using an additional modem to get CallerID information