<html><head></head><body bgcolor="#FFFFFF"><div>Sure!</div><div><br></div><div>I'll let you know&nbsp;</div><div><br><br>Sent from the future</div><div><br>On 2012-07-23, at 7:11 PM, Michael Collins &lt;<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>Excellent! Do you mind finding a spot up on the wiki for this?<br>-MC<br><br><div class="gmail_quote">On Mon, Jul 23, 2012 at 4:01 PM, Alexandre Fiori <span dir="ltr">&lt;<a href="mailto:fiorix@gmail.com" target="_blank">fiorix@gmail.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 style="word-wrap:break-word"><div><br></div><div>Amazing. This is exactly what I was looking for, and couldn't figure out how to do.</div>
<div>Thank you!</div><div><div class="h5"><div><br></div><br><div><div>On 2012-07-23, at 6:55 PM, Michael Collins &lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt; wrote:</div><br><blockquote type="cite">
Well, if you have soxi installed (Linux, of course) then you could always use a system call to grab the file length. For kicks I whipped up a proof of concept dial plan to demonstrate how it could work. If anyone finds it useful please let me know and I'll wikify it.<br>

-MC<br><br><span style="font-family:courier new,monospace">&nbsp; &lt;extension name="soxi sound file length"&gt;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp; &lt;condition field="destination_number" expression="^(9904)$"&gt;</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="answer"/&gt;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="sleep" data="500"/&gt;</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data="sound_file=${sounds_dir}/music/8000/danza-espanola-op-37-h-142-xii-arabesca.wav"/&gt;</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set"</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; data="file_length=${system soxi -D ${sound_file} | tr -d '\\n' }"/&gt;</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="log" data="INFO Sound file length is '${file_length}'"/&gt;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="set" data="file_length=${expr(ceil(${file_length}))}"/&gt;</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="log" data="INFO Sound file length is '${file_length}'"/&gt;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="say" data="en number pronounced ${file_length}"/&gt;</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;action application="playback" data="time/seconds.wav"/&gt;</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">&nbsp;&nbsp;&nbsp; &lt;/condition&gt;</span><br style="font-family:courier new,monospace">

<span style="font-family:courier new,monospace">&nbsp; &lt;/extension&gt;</span><br style="font-family:courier new,monospace"><br>
</blockquote></div></div></div></div></blockquote></div><br>
</div></blockquote><blockquote type="cite"><div><span>_________________________________________________________________________</span><br><span>Professional FreeSWITCH Consulting Services:</span><br><span><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a></span><br><span><a href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a></span><br><span></span><br><span>FreeSWITCH-powered IP PBX: The CudaTel Communication Server</span><br><span><a href="http://www.cudatel.com">http://www.cudatel.com</a></span><br><span></span><br><span>Official FreeSWITCH Sites</span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span><br><span><a href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a></span><br><span><a href="http://www.cluecon.com">http://www.cluecon.com</a></span><br><span></span><br><span>Join Us At ClueCon - Aug 7-9, 2012</span><br><span></span><br><span>FreeSWITCH-users mailing list</span><br><span><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a></span><br><span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users</span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span><br></div></blockquote></body></html>