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&#39;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&#39;ll wikify it.<br>

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

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

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

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

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

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

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

<span style="font-family:courier new,monospace">  &lt;/extension&gt;</span><br style="font-family:courier new,monospace"><br>
</blockquote></div></div></div></div></blockquote></div><br>