<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-postmall17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=SV link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Is this a delayed email? I think this was resolved yesterday, right?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>/Peter<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></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;font-family:"Tahoma","sans-serif"'>Från:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>För </b>Sidharth Kshatriya<br><b>Skickat:</b> den 10 mars 2011 21:22<br><b>Till:</b> freeswitch-users@lists.freeswitch.org<br><b>Ämne:</b> [Freeswitch-users] Strange Behavior with Channel Variable [session:setVariable() vs &lt;action application=&quot;set&quot; ... /&gt; ]<o:p></o:p></span></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>Dear All,<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><p class=MsoNormal>I am using a little known but very useful channel variable called &quot;playback_timeout_sec&quot;<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>In Lua if I do:&nbsp;session:setVariable(&quot;playback_timeout_sec&quot;, &quot;10&quot;)<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>and subsequently in a macro I have:<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>&lt;action function=&quot;play-file&quot; date=&quot;/some/filename.mp3&quot; /&gt;<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></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.<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>But if I do:<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><div><p class=MsoNormal>&lt;action application=&quot;set&quot; date=&quot;playback_timeout_sec=10&quot; /&gt;<o:p></o:p></p></div><div><div><p class=MsoNormal>&lt;action function=&quot;play-file&quot; date=&quot;/some/filename.mp3&quot; /&gt;<o:p></o:p></p></div></div><div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div><div><p class=MsoNormal>My file does NOT stop playing after 10 seconds. This is&nbsp;weird&nbsp;given that &lt;action application=&quot;set&quot; .. /&gt; is doing exactly the same thing as session:setVariable() ... right?<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>My question<o:p></o:p></p></div><div><p class=MsoNormal>1. What could be the problem with application set?<o:p></o:p></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.)<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Thanks,<o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal>Sidharth<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>-- <br>Sidharth Kshatriya<br><a href="http://www.sidk.info">www.sidk.info</a><o:p></o:p></p></div><p class=MsoNormal>!DSPAM:4d7a03ab32764871212382! <o:p></o:p></p></div></body></html>