Asterisk C AGI Toolkit Git
Brought to you by:
dcornewell
File | Date | Author | Commit |
---|---|---|---|
Makefile | 2006-10-04 |
![]() |
[56d3b8] Adding fastcagi to project for serving AGI apps... |
README | 2006-10-06 |
![]() |
[d98ea6] Updated README and REVISIONS for new v0.6 version. |
REVISIONS | 2006-11-13 |
![]() |
[431e05] Added comments for revision .7 |
cagi.c | 2006-11-13 |
![]() |
[a930a2] Fixed bug in AGITool_sendcmd(); when parsing da... |
cagi.h | 2006-10-04 |
![]() |
[52fdf7] Changed AGITool_ListAddItem() to malloc field a... |
cagisample.c | 2006-10-06 |
![]() |
[ddab49] fixed arg to AGITool_ListGetVal(). needed agi.a... |
fastcagi.c | 2006-10-06 |
![]() |
[7d3375] Added support for argv to be passed to the AGI ... |
If you have used PHPAGI, CAGI will hopefully be easy to use as it is based on it. The included cagisample.c is all you really need to do. Just add cagi.o to your compile and #include cagi.h to your program. There is a Makefile as well. If you want to use fast agi, there is a fastcagi binary that can execute any AGI app. Passing arguments to the command can be done using url formatted arguments. AGI(agi://192.168.1.5/cagisample?-first=1&-second=2) will execute cagisample -first 1 -second 2 Add this line to /etc/services on remote AGI server: fastagi 4573/tcp # Asterisk AGI Then make a file /etc/xinetd.d/fastagi on remote AGI server: (there is a file in tar fastagi.xinetd you can copy) # default: off # description: fastagi is a remote AGI interface # service fastagi { socket_type = stream user = root group = nobody server = /var/spool/asterisk/agi-bin/fastcagi server_args = --logfile /var/log/fastagi.log --agidir /var/spool/asterisk/agi-bin/ wait = no protocol = tcp bind = 127.0.0.01 disable = no }