Jump to content

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.

Why do you need to store the files outside the public directory? I think the only solution would be to make PHP read the file from the /var directory, make a temporary file in the public directory, and delete it after viewing.

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/

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.