New Page for download call Recording

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

New Page for download call Recording

Postby sohaib » Wed May 23, 2012 10:23 am

Hi everyone,

I was facing issue while download recording from vicidial search for lead option, the problem was if the lead set get deleted we couldn't search recording for the numbers which got deleted with the lead set. So, i was searching for the option which extract recording directly from recording_log table from database.

So, i wanted to share it with everyone, this is my first development with vicidial, please share your comment regarding my work

html and php code are below:

----------------------------
HTML PAGE:
=========================
<html>
<body>
<table align='center'>
<tr>
<td><h1>Search Your Recording</h1></td>
</tr>
<title>Recording Search</title>
</br>
</br>
<table bgcolor='0099ff' align='center' border='1'>
<tr>
<form action='search.php'>
<td>Enter Recording Number<input type='text' name='filename' /> </td>

<td>
Select Month <select name='month'>
<option value='01'>Jan</option>
<option value='02'>Feb</option>
<option value='03'>Mar</option>
<option value='04'>Apr</option>
<option value='05'>May</option>
<option value='06'>Jun</option>
<option value='07'>Jul</option>
<option value='08'>Aug</option>
<option value='09'>Sep</option>
<option value='10'>Oct</option>
<option value='11'>Nov</option>
<option value='12'>Dec</option>
</select>
Select Year<select name='year'>
<!--<option value='2011'>2011</option>-->
<option value='2012'>2012</option>
</select>
</td>
</tr>

<tr>
<td colspan='2' align='center'> <input type='submit' name='search' /> </td>
</tr>
</form>
</table>
</br>
</br>
</br>
</br>
</br>
</br>
<table align='center'>
<tr><td><i style='color:666666'>
<p align='center'>Created By Sohaib Khan</p>
<p align='center'>In case of any issue, please email to <a href='mailto:mk.sohaib@gmail.com'>Sohaib Khan</a></p>
</i></td></tr>
</table>

</body>
</html>

---------------------------------------

============================
PhP code
-----------------------------------

<?php
//getting Variable from html
$num=$_GET["filename"];
$mon=$_GET["month"];
$year=$_GET["year"];

//connecting to my sql
$con=mysql_connect("192.168.0.22","cron","ess1234");
if (!$con)
{
die('could not connect: ' .mysql_error());
}
else
//echo $num;
//echo "</br>";

//concatenation both year and month to find recording
$ym = $year.$mon;

//echo $ym;

if ($num == "")
{
echo "You have not entered any number, please go back and enter any number";
echo "</br>";
echo "<a href=http://192.168.0.18/rec/index.html>Go Back </a>";
}
else
//selecting Database
{
mysql_select_db("asterisk_old", $con);
$qr = "select location,filename from recording_log where filename like '$ym%$num%'";
//echo $qr;
$result = mysql_query($qr);
$num_rows = mysql_num_rows($result);
if ($num_rows == 0)
{
echo "No Result Found";
echo "</br>";
echo "<a href=http://192.168.0.18/rec/index.html>Go Back </a>";
}
else
{
while ($row=mysql_fetch_array($result))
{
echo "<table>";
echo "<tr>";
echo "<td>";
echo "<a href=".$row['location'].">".$row['filename']."</a>";
echo "</td></tr></table>";
echo "<br />";
}
echo "<a href='http://192.168.0.18/rec'>Search another recording</a>";
}
}

?>
sohaib
 
Posts: 57
Joined: Wed Feb 23, 2011 3:59 pm

Re: New Page for download call Recording

Postby mflorell » Wed May 23, 2012 2:15 pm

Please post to the Issue Tracker and link to the issue here.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: New Page for download call Recording

Postby sohaib » Wed May 23, 2012 3:27 pm

hi,

I dont have any issue tracker, i never posted this issue anywhere, i was just facing that issue and developed a page and post it here, so if anyone would face same issue they can take help with this.

:-)

--
Regards,

Sohaib Khan
sohaib
 
Posts: 57
Joined: Wed Feb 23, 2011 3:59 pm

Re: New Page for download call Recording

Postby mflorell » Thu May 24, 2012 11:32 am

This is exactly what the Issue Tracker is for, even non-bugs can go there, it is a place to look for new patches as well as reported problems.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: New Page for download call Recording

Postby sohaib » Thu May 24, 2012 1:09 pm

okay... so where i can post my development related to vicidial?
sohaib
 
Posts: 57
Joined: Wed Feb 23, 2011 3:59 pm

Re: New Page for download call Recording

Postby mflorell » Thu May 24, 2012 3:07 pm

There is a link to the "Vicidial Issue Tracker" at the top of every page on the forums, and here is another link to it:

http://www.vicidial.org/VICIDIALmantis
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida


Return to Development

Who is online

Users browsing this forum: No registered users and 5 guests