<html><body bgcolor="#FFFFFF"><div>I wonder if putting a sleep statement in your shell script might help. If it's a timing issue then possibly the shell script is trying to access the file before FS and/or the OS are done with it. You would need to tinker with how long to sleep in order to find a value that works in all cases. </div><div><br></div><div>-MC<br><br>Sent from my iPhone</div><div><br>On Dec 28, 2008, at 11:06 AM, "Frank @ Impact" <<a href="mailto:frank@impactfax.com">frank@impactfax.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div>
<div class="Section1"><pre><font size="2" face="Courier New"><span style="font-size:10.0pt">Maybe I am going about this all wrong.<span style="mso-spacerun:yes"> </span>All I am trying to do is process a recording file of a session after either one of the legs hangs up and the call is over.<span style="mso-spacerun:yes"> </span>I am just trying to convert the wav to mp3 and email it off. <span style="mso-spacerun:yes"> </span>So I have a bash script to do this. <span style="mso-spacerun:yes"> </span>The <span class="SpellE">dialplan</span> is simple <span class="SpellE">enought</span><o:p></o:p></span></font></pre><pre><font size="2" face="Courier New"><span style="font-size:10.0pt"><o:p> </o:p></span></font></pre><pre><font size="2" face="Courier New"><span style="font-size:10.0pt"><span style="mso-tab-count:1"> </span><span style="mso-spacerun:yes"> </span><action application="set" data="RECORD_ANSWER_REQ=true"/><o:p></o:p></span></font></pre><pre><font size="2" face="Courier New"><span style="font-size:10.0pt"><span style="mso-tab-count:1"> </span><span style="mso-spacerun:yes"> </span><action application="set" data="RECORD_STEREO=true"/><o:p></o:p></span></font></pre><pre><font size="2" face="Courier New"><span style="font-size:10.0pt"><span style="mso-tab-count:1"> </span><span style="mso-spacerun:yes"> </span><action application="<span class="SpellE">record_session</span>" data="$${<span class="SpellE">base_dir</span>}/recordings/3329000_1.wav"/><o:p></o:p></span></font></pre><pre><font size="2" face="Courier New"><span style="font-size:10.0pt"><span style="mso-spacerun:yes"> </span><action application="bridge" data="${<span class="SpellE">enum_auto_route</span>}"/><o:p></o:p></span></font></pre><pre><font size="2" face="Courier New"><span style="font-size:10.0pt"><span style="mso-tab-count:1"> </span><span style="mso-spacerun:yes"> </span><action application="<span class="SpellE">hangup</span>"/><o:p></o:p></span></font></pre>
<p class="MsoNormal"><font size="3" face="Arial"><span style="font-size:12.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><span class="GramE"><font size="3" face="Arial"><span style="font-size:12.0pt;font-family:Arial">using</span></font></span><font face="Arial"><span style="font-family:Arial"> FS <span class="SpellE">svn</span> 10960<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Arial"><span style="font-size:12.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Arial"><span style="font-size:12.0pt;
font-family:Arial">But nothing I have tried seems to get it done.<span style="mso-spacerun:yes"> </span>I have tried to use <span class="SpellE">api_hangup_hook</span>
to call a <span class="SpellE">lua</span> script.<span style="mso-spacerun:yes"> </span>But the wav file is not yet closed for
some reason yet and I cannot seem to close it in the <span class="SpellE">lua</span>
script.<span style="mso-spacerun:yes"> </span>Basically I get the same
problem if I use ‘system’ with the <span class="SpellE">api_hangup_hook</span>
to call the bash script to process the recording.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Arial"><span style="font-size:12.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Arial"><span style="font-size:12.0pt;
font-family:Arial">I have tried to use the transfer application with the <span class="SpellE">api_hangup_hook</span> to allow me to <span class="SpellE">stop_record_session</span>
and then a system call from another extension, but the transfer never happens
on <span class="SpellE">hangup</span>.<o:p></o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Arial"><span style="font-size:12.0pt;
font-family:Arial"><o:p> </o:p></span></font></p>
<p class="MsoNormal"><font size="3" face="Arial"><span style="font-size:12.0pt;
font-family:Arial">Am I missing a simple way to do this?<span style="mso-spacerun:yes"> </span>Is there something similar to the ‘h’
extension in asterisk maybe?<o:p></o:p></span></font></p>
</div>
</div></blockquote><blockquote type="cite"><div><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:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users"><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></a></span><br><span><a href="http://www.freeswitch.org">http://www.freeswitch.org</a></span><br></div></blockquote></body></html>