Jump to content

[SOLVED] Wav file from out side web directory


projectxmatt

Recommended Posts

So im righting a script that plays recorded phone calls...well the phone calls are recorded to a directory "/var/spool/asterisk/monitor/" and i need them to be embeded on a page for us to listen to. I have never had to jump out of the web directory before to grab a file so i haven't the slightest idea of how to do it. Here is the code for the page won't be much help but here it is anyways

 

<?php
include("inc/mainfunc.php");
$UID = $_REQUEST['what'];
$DB->query("SELECT calldate FROM cdr WHERE uniqueid = '".$UID."'");
list($Calldate)=$DB->next_record();

echo "<embed src='/var/spool/asterisk/monitor/".date("Ymd-his",strtotime($Calldate))."-".$UID.".wav' width=300 height=20 autoplay=true loop=false></embed>";
php?>

im sure im missing a whole lot any help would be greatly appreciated.

i didn't just to store them there the box is a trix box which is a box set up for voip and it has its own interface but the coding on it sucks and i wanted some different things. So i wrote a quick little front end to view call logs and everything and wanted to be able to listen to the recordings. Im just trying to figure out how to get it to play. As right now it won't read cuz it tries to look in /var/www/html/var/spool/asterisk/monitor/ instead of just /var/spool/asterisk/monitor/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.