I have been learning AGI, and have got to grips with most of it, one thing just confuses me. I have written a PHP class that does input and outs stuff to the AGI. It all seems to work. However on a stream file command. It's a bit different. If I have a php file that just plays a file and hangs up, the dial and hang up are in the dialplan, so the php proggie looks alittle like this. $ast->out("STREAM FILE home \"\""); $ast->in(); If I run this, with AGI DEBUGGING on I get something like this. AGI Tx >> 200 result=1 // last line of the variables passed in. AGI Rx << STREAM FILE home "" -- AGI Script callhandle.php completed, returning 0 -- Executing Hangup("SIP/blah", "") in new stack The program does not play the file, it simple hangs up. If I place a delay in PHP program $ast->out("STREAM FILE home \"\""); sleep(20); $ast->in(); I get.. AGI Tx >> 200 result=1 AGI Rx << STREAM FILE home "" AGI Tx >> 200 result=0 endpos=62407 -- AGI Script callhandle.php completed, returning 0 -- Executing Hangup("SIP/blah", "") in new stack Surely the stream file function, should play the file and wait until a key press or finish before the script continues. ??? Is this what it's supposed to do or I have done something wrong? Mark