use "agi debug" command from the Asterisk CLI to see what is going on.
Also, the last time I checked, "\n" is needed at the end of any
command sent to Asterisk.
Regards.
On 12/29/06, Lee Jenkins <[EMAIL PROTECTED]> wrote:
Hi Everyone,
I'm wondering if anyone here write AGI's in compiled binaries. I'm
writing a small Cepstral AGI in Freepascal/Lazarus. I know there are
some other AGI's out there, but I wanted to add some more functionality
than what is available such as having the AGI determine if the "data"
argument is plain text or a path to a text file and act accordingly.
The problem that I'm having is that Asterisk is not sending back any
responses to commands. I'm using stdin/stdout through the ReadLn and
WriteLn commands in freepascal.
Reading in the initial env variables is no problem, but once I issue a
command like so:
// >>> Create wav file from swift here <<<
WriteLn('EXEC PLAYBACK /tmp/NewlyCreatedFile');
ReadLn(StringVar); // <========= Never returns
// >>> Clean up code to delete file, etc <<<
(The command STREAM FILES always comes back and complains the file is
not found when it really is there so I have settled for using the
Playback application.)
Am I mistaken in thinking that Asterisk is supposed to send back a
response over stdin?
Of course, if I do not attempt to read the response, I run into bigger
problem as the sound file will not be found because the next portion of
code deletes the file created for playback, but before asterisk has a
chance to play it!
I worked on this thing all day yesterday and tried everything that I can
think of, but this morning I figured I will ask for some help.
--
Warm Regards,
Lee
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
--
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users