<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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><br></div><br><div><div>On 2012-07-23, at 6:55 PM, Michael Collins &lt;<a href="mailto:msc@freeswitch.org">msc@freeswitch.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><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><br><div class="gmail_quote">On Mon, Jul 23, 2012 at 9:09 AM, 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>that's the problem, I don't know the length, but playback does :)</div>
<div><br></div><div>thanks anyway</div><br><div><div>On 2012-07-23, at 11:53 AM, Michael Collins &lt;<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>&gt; wrote:</div><br><blockquote type="cite">If you know the length of the file then you could use sched_api to schedule something. For example, if you know that your file is 12 seconds long you could do something like this:<br>
<br>sched_api +9 none uuid_broadcast &lt;uuid&gt; &lt;app&gt;::&lt;args&gt; bleg<br>
<br>Check out both of these on the wiki - there's a lot that these can do.<br>-MC<br><br><a href="http://wiki.freeswitch.org/wiki/Mod_commands#uuid_broadcast" target="_blank">http://wiki.freeswitch.org/wiki/Mod_commands#uuid_broadcast</a><br>

<a href="http://wiki.freeswitch.org/wiki/Mod_commands#sched_api" target="_blank">http://wiki.freeswitch.org/wiki/Mod_commands#sched_api</a><br>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br><a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br><a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br><br>Join Us At ClueCon - Aug 7-9, 2012<br><br>FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><div>
<div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-wrap:break-word;word-spacing:0px">
<br><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;display:inline!important;font-weight:normal;float:none;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">- af</span></div>

</div>
<br></font></span></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com/" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org/" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com</a><br>
<br>
Join Us At ClueCon - Aug 7-9, 2012<br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Michael S Collins<br>Twitter: @mercutioviz<br><a href="http://www.freeswitch.org/" target="_blank">http://www.FreeSWITCH.org</a><br><a href="http://www.cluecon.com/" target="_blank">http://www.ClueCon.com</a><br>
<a href="http://www.ostag.org/" target="_blank">http://www.OSTAG.org</a><br><br><br>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>http://www.freeswitchsolutions.com<br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>http://www.cudatel.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://wiki.freeswitch.org<br>http://www.cluecon.com<br><br>Join Us At ClueCon - Aug 7-9, 2012<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br><div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br class="Apple-interchange-newline"><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">- af</span></div>
</div>
<br></body></html>