[arm-allstar] agi vs allstar -rx commands
Doug Crompton
wa3dsp at gmail.com
Sat Apr 8 02:40:40 EST 2017
Lowell,
AGI is an interface not a language. See
https://www.voip-info.org/wiki-Asterisk+AGI
You need to call Asterisk however you would call any system command in the
scripting language you are using. What scripting language are you using?
Bash, Perl, Python? Each has a method to pass variable to/from Asterisk
via AGI. Here is a simple bash example showing the passing of a filename
but it could be anything passed to a bash script and a value returned.
In extensions.conf
exten => 772,n,AGI(testit.sh|"node-id")
exten => 772,n,NoOp(Received answer: ${answer})
exten => 772,n,SayDigits(${answer})
script called testit.sh
#!/bin/bash
# Arguments from AGI call passed as $1, $2, $3, etc.
/usr/bin/asterisk -rx "rpt localplay 40000 $1"
# Return value example
VALUE=1234
echo -e "SET VARIABLE answer $VALUE"
*73 Doug*
*WA3DSP*
*http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
On Sat, Apr 8, 2017 at 2:41 AM, "Lowell via arm-allstar" <
arm-allstar at hamvoip.org> wrote:
> I guess I don't have agi figured out yet.
>
> I can execute
> allstar -rx "rpt localplay 1999 rpt/down"
> successfully.
>
> I thought I could do something similar in my agi script like
> echo "exec rpt localplay 1999 rpt/down" but no amount of grouping with
> quotes satisfies the agi interface. I usually see a message like:
>
> Apr 7 23:39:10] WARNING[1995]: app_rpt.c:20759 rpt_exec: Cannot find
> specified system node localplay
>
> How do I find out what rpt commands are available from the agi interface?
>
> Lowell
> _______________________________________________
>
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org
>
>
More information about the arm-allstar
mailing list