Menu

stream_file

VoIPper
2011-04-18
2019-06-05
  • VoIPper

    VoIPper - 2011-04-18

    I can't seem to find my answer despite two days of searching the interwebs….

    If my php script has the stream file command it fails to play the file and the script exits as expected.  If I put the command in twice, I get the file played one….  such as

    $agi->stream_file('invalid','#');
    $agi->stream_file('invalid','#');

    Also $agi->exec("playback"……. will play the file.

    Is there something wrong with my environment or phpagi.php?

    I am very much a N00B and I am not really sure what to look for to diagnose the problem.

    Thanks.
    $agi->answer();

    $agi->stream_file('invalid','#');

    $agi->stream_file('invalid','#');

     
  • VoIPper

    VoIPper - 2011-04-18

    I don't know why but the following resolved the issue.

    I used….

    #!/usr/bin/php-cgi -q

    Instead of …..

    #!/usr/bin/php -q

    Which was originally in the script and it seemed to resolve the stream_file issue.

     
    • ANDRES GREGORI

      ANDRES GREGORI - 2019-06-05

      Thank you,

      !/usr/bin/php-cgi -q

      Instead of …..

      !/usr/bin/php -q

      it has worked for me...!!

       
  • Darren

    Darren - 2014-05-30

    I'm having this same issue, but the above doesn't seem to fix it...

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.