[Asterisk-java-users] How to test a FastAGI script without any Asterisk server ?
Brought to you by:
srt
From: Olivier <oza...@my...> - 2006-06-28 09:55:40
|
Hi, (I'm new to the list and I couldn't find in the archive, anything answering my question. Please, forgive me if this question has already been answered) My question is "How can I test a FastAGI script without any Asterisk server ?". I would like to develop a CTI application. Ultimately, this CTI application will run on a dedicated server and exhange data with an Asterisk server and a database server on the same LAN. For the sake of simplicity, I would like to develop this CTI application independently from any Asterisk server : - I will develop a dummy call server - as long as the target CTI application receives from the dummy call server, the same input, it should reply to the dummy server, the same output, - I will just have to substitute the dummy server with a running Asterisk one to complete the setup. >From reading Asterisk, the Future of Telephony, I understood that an Asterisk server simply uses stdin, stdout and stderr files when calling an AGI script : - Asterisk sends line of text like : agi_request: test.py agi_channel: Zap/1-1 - Asterisk receives: SET EXTENTION 122 SET VARIABLE var1 150 So, from an AGI script perspective, a simple set of echo or cat commands behaves the same as a fully fledged Asterisk : echo "agi_request: test.py\nagi_channel: Zap/1-1\n\n" | myagiscript will print "SET EXTENTION 122\nSET VARIABLE var1 150\n\n" on stdout I'm searching the FastAGI equivalent. >From Asterisk the Future of Telephony, I know FastAGI uses TCP instead of stdin, stdout. Which program shall I use to simply output AGI data from a server through TCP ? Something like : mycmd "agi_request: test.py\nagi_channel: Zap/1-1\n\n" | myagiscript which would print "SET EXTENTION 122\nSET VARIABLE var1 150\n\n" somewhere. Regards |