Yes, this was resolved!<div><br><div class="gmail_quote">On Fri, Mar 11, 2011 at 4:53 PM, Peter Olsson <span dir="ltr"><<a href="mailto:peter.olsson@visionutveckling.se">peter.olsson@visionutveckling.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div lang="SV" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1F497D">Is this a delayed email? I think this was resolved yesterday, right?</span></p><p class="MsoNormal">
<span lang="EN-US" style="font-size:10.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;color:#1F497D">/Peter</span></p><p class="MsoNormal"><span style="font-size:10.0pt;color:#1F497D"> </span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span style="font-size:10.0pt">Från:</span></b><span style="font-size:10.0pt"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>För </b>Sidharth Kshatriya<br>
<b>Skickat:</b> den 10 mars 2011 21:22<br><b>Till:</b> <a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br><b>Ämne:</b> [Freeswitch-users] Strange Behavior with Channel Variable [session:setVariable() vs <action application="set" ... /> ]</span></p>
</div><div><div></div><div class="h5"><p class="MsoNormal"> </p><div><p class="MsoNormal">Dear All,</p></div><div><p class="MsoNormal"> </p></div><p class="MsoNormal">I am using a little known but very useful channel variable called "playback_timeout_sec"</p>
<div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">In Lua if I do: session:setVariable("playback_timeout_sec", "10")</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">
and subsequently in a macro I have:</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal"><action function="play-file" date="/some/filename.mp3" /></p></div><div><p class="MsoNormal">
</p></div><div><p class="MsoNormal">Then the filename.mp3 stops playing automatically after 10 seconds. This is very useful if you want to play short excerpts of a file that could be very long.</p></div><div><p class="MsoNormal">
</p></div><div><p class="MsoNormal">But if I do:</p></div><div><p class="MsoNormal"> </p></div><div><div><p class="MsoNormal"><action application="set" date="playback_timeout_sec=10" /></p></div>
<div><div><p class="MsoNormal"><action function="play-file" date="/some/filename.mp3" /></p></div></div><div><div><p class="MsoNormal"> </p></div></div><div><p class="MsoNormal">My file does NOT stop playing after 10 seconds. This is weird given that <action application="set" .. /> is doing exactly the same thing as session:setVariable() ... right?</p>
</div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">My question</p></div><div><p class="MsoNormal">1. What could be the problem with application set?</p></div><div><p class="MsoNormal">2. Is there a way to automatically stop playback after a certain number of seconds for a file? (without doing tedious things like create a separate 10second version of an mp3 using ffmpeg etc.)</p>
</div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Thanks,</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Sidharth</p></div><p class="MsoNormal" style="margin-bottom:12.0pt">-- <br>
Sidharth Kshatriya<br><a href="http://www.sidk.info" target="_blank">www.sidk.info</a></p></div></div></div><p class="MsoNormal">!DSPAM:4d7a03ab32764871212382! </p></div></div><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>Sidharth Kshatriya<br><a href="http://www.sidk.info">www.sidk.info</a><br><br>
</div>