<div dir="ltr"><font class="Apple-style-span" color="#663366" face="&#39;trebuchet ms&#39;, sans-serif"><br></font><div class="gmail_quote">On Mon, May 2, 2011 at 2:30 PM, Danny Nicholas <span dir="ltr">&lt;<a href="mailto:danny@debsinc.com">danny@debsinc.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">










<div lang="EN-US" link="blue" vlink="purple">

<div>

<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">

<div>

<div class="MsoNormal" align="center" style="text-align:center"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">

<hr size="2" width="100%" align="center">

</span></font></div>

<p class="MsoNormal"><b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma;font-weight:bold">From:</span></font></b><font size="2" face="Tahoma"><span style="font-size:10.0pt;font-family:Tahoma"> <a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>
[mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com" target="_blank">asterisk-users-bounces@lists.digium.com</a>] <b><span style="font-weight:bold">On Behalf Of </span></b>A E [Gmail]<br>
<b><span style="font-weight:bold">Sent:</span></b> Monday, May 02, 2011 1:23 PM<br>
<b><span style="font-weight:bold">To:</span></b> Asterisk
 Users Mailing List - Non-Commercial Discussion<br>
<b><span style="font-weight:bold">Subject:</span></b> Re: [asterisk-users]
Retrieving/Streaming audio/video files from DBusing over AGI</span></font></p>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

<div><div><div></div><div class="h5">

<div>

<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">

<div>

<div>

<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">

<div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

</div>

</blockquote>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Just realised that this can better be described another way:</span></font></p>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">What we&#39;re essentially trying to do is be able to do any one of these</span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">a) stream an audio/video file stored in the DB via AGI into the current
channel so that it plays on the phone</span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">OR </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">b) Do something like what Realtime Voicemail does, where it gets the
file from the DB, saves as a temp file in the user mailbox directory and then
plays it to the caller but this needs to happen through AGI, something along
the lines of readsql (a la func_odbc) inside of AGI</span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">OR </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">c) Anything else that&#39;s better than a) and b) above that someone can
suggest. </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">P.S&gt; I do know about the AGI AddOn of PUT SOUNDFILE and GET
SOUNDFILE which seems to be the only solution we can think of right now, other
than of course having the DB machine exporting the SAN volume as an NFS share
for the Asterisk server to mount, but that sounds like it&#39;ll be bad for
performance?</span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt">Thanks again</span></font></p>

</div>

<div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div>

</div>

</blockquote>

</div>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:12.0pt"> </span></font></p>

</div></div><div>

<p class="MsoNormal"><font size="3" color="#000099" face="sans-serif"><span style="font-size:12.0pt;font-family:sans-serif;color:#000099">No takers? :(</span></font><font face="sans-serif"><span style="font-family:sans-serif"></span></font></p>



<p class="MsoNormal"><b><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-weight:bold;font-style:italic">[Danny Nicholas] </span></font></i></b></p>

<p class="MsoNormal"><b><i><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy;font-weight:bold;font-style:italic">In your original scenario you were opening yourself to
probable latency issues – I would personally pursue something along the
line of option B where I put the DB data into a temp file and ran a daemon to
clear the temp files hourly or daily as needed.  If the delivery worked
well across most LAN’s/WAN’s, some gung-ho developer would have
hosed another part of Asterisk trying to get that “bell and whistle”
into the trunk.</span></font></i></b><font size="2" color="navy" face="Arial"><span style="font-size:10.0pt;font-family:Arial;color:navy"></span></font></p>

</div>

</div>

</div>

</div>

</div>


<br></blockquote><div><font class="Apple-style-span" face="&#39;trebuchet ms&#39;, sans-serif" color="#000099">Thanks Danny. I&#39;m not so sure, that latency will be that much of an issue being on the same physical GbE switch as the DB server without any other traffic on it but sure, I know that a long time ago when I implemented Realtime Voicemail, it worked pretty good, so I&#39;ll be happy with b). I guess we do need to use that AGI AddOn of PUT SOUNDFILE after all. </font></div>

<div><font class="Apple-style-span" face="&#39;trebuchet ms&#39;, sans-serif" color="#000099"><br></font></div><div><font class="Apple-style-span" face="&#39;trebuchet ms&#39;, sans-serif" color="#000099">Would be good if more people can throw a few ideas around to see if there&#39;s a smarter way to do it. Another idea we had was to dumb these files (since they&#39;ll be very small in duration and thus in size) into a directory, run a web-server and have AGI retrieve them using curl and just use &quot;Background&quot; to play it. Thoughts?</font></div>

</div></div>