<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C968F5.7F64F9D0">
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Courier New";
        mso-fareast-font-family:"Times New Roman";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:12.0pt;
        mso-bidi-font-size:12.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none;
        text-underline:none;
        text-decoration:none;
        text-line-through:none;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>

<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'>&nbsp; </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'>&nbsp; </span>I am just trying to convert the wav to mp3 and email it off. <span style='mso-spacerun:yes'>&nbsp;</span>So I have a bash script to do this. <span style='mso-spacerun:yes'>&nbsp;</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>&nbsp;</o:p></span></font></pre><pre><font
size=2 face="Courier New"><span style='font-size:10.0pt'><span
style='mso-tab-count:1'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='mso-spacerun:yes'>&nbsp; </span>&lt;action application=&quot;set&quot; data=&quot;RECORD_ANSWER_REQ=true&quot;/&gt;<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='mso-spacerun:yes'>&nbsp; </span>&lt;action application=&quot;set&quot; data=&quot;RECORD_STEREO=true&quot;/&gt;<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='mso-spacerun:yes'>&nbsp; </span>&lt;action application=&quot;<span
class=SpellE>record_session</span>&quot; data=&quot;$${<span class=SpellE>base_dir</span>}/recordings/3329000_1.wav&quot;/&gt;<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>&lt;action application=&quot;bridge&quot; data=&quot;${<span
class=SpellE>enum_auto_route</span>}&quot;/&gt;<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'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='mso-spacerun:yes'>&nbsp; </span>&lt;action application=&quot;<span
class=SpellE>hangup</span>&quot;/&gt;<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>&nbsp;</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>&nbsp;</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'>&nbsp; </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'>&nbsp; </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'>&nbsp; </span>Basically I get the same
problem if I use &#8216;system&#8217; 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>&nbsp;</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>&nbsp;</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'>&nbsp; </span>Is there something similar to the &#8216;h&#8217;
extension in asterisk maybe?<o:p></o:p></span></font></p>

</div>

</body>

</html>