Displaying 1 result from an estimated 1 matches for "avantnix".
Did you mean:
avanti
2003 Jul 12
1
AGI script sample using bash shell script
...using bash shell. No need to invoke a 10MB perl engine to
process simple asterisk agi scripts.
I found it to be very useful in learning the AGI interface. For example,
I learn that AGI won't execute the next command until you read the
results from STDIN.
Enjoy,
Sunny Woo
Solution Consultant
Avantnix
=========================== agi-test-bash.agi ======================
#!/bin/bash
declare -a array
while read -e ARG && [ "$ARG" ] ; do
array=(` echo $ARG | sed -e 's/://'`)
export ${array[0]}=${array[1]}
done
# following variables are available from asterisk
echo $agi...