added lang /lib pkgs
[librewrt/.git] / packages / xwrt / webif-asterisk / lib / asterisk / agi_bin / getnvramvars.sh
1 #!/bin/sh
2
3 # Set a variable called stdin to help us
4 # get the variables from Asterisk
5 stdin="0"
6
7 # Read in the variables from Asterisk,
8 # and write them to a log file
9 while [ "$stdin" != "" ]
10 do
11 read stdin
12 # if [ "$stdin" != EOF ]
13 # then
14 # echo $stdin >> /tmp/logfile.txt
15 # fi
16 done
17
18 nvram show | grep AST_* | sort | while read ast_nvram; do
19 # Send AGI Cmd to asterisk
20 echo "EXEC SetGlobalVar '$ast_nvram'"
21 #done
22
23 # Now read the response back from Asterisk,
24 read response
25 # echo $response >> /tmp/logfile.txt
26 done
27
28 exit 0