<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:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Microsoft Theme 2.00" content="Ice 011">
<meta name="Generator" content="Microsoft Word 15 (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:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Verdana","sans-serif";
        color:#003572;}
h1
        {mso-style-priority:9;
        mso-style-link:"Heading 1 Char";
        margin-top:12.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:16.0pt;
        font-family:"Verdana","sans-serif";
        color:#003572;
        font-weight:bold;}
h2
        {mso-style-priority:9;
        mso-style-link:"Heading 2 Char";
        margin-top:2.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Verdana","sans-serif";
        color:#003572;
        font-weight:normal;}
h3
        {mso-style-priority:9;
        mso-style-link:"Heading 3 Char";
        margin-top:2.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Verdana","sans-serif";
        color:#003572;
        font-weight:normal;}
h4
        {mso-style-priority:9;
        mso-style-link:"Heading 4 Char";
        margin-top:2.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:"Verdana","sans-serif";
        color:#003572;
        font-weight:normal;}
h5
        {mso-style-priority:9;
        mso-style-link:"Heading 5 Char";
        margin-top:2.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:"Verdana","sans-serif";
        color:#003572;
        font-weight:normal;}
h6
        {mso-style-priority:9;
        mso-style-link:"Heading 6 Char";
        margin-top:2.0pt;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:0in;
        margin-bottom:.0001pt;
        page-break-after:avoid;
        font-size:11.0pt;
        font-family:"Verdana","sans-serif";
        color:#003572;
        font-weight:normal;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#1F86FF;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#005DC9;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Verdana","sans-serif";
        color:#44546A;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.Heading1Char
        {mso-style-name:"Heading 1 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 1";
        font-family:"Verdana","sans-serif";
        color:#003572;
        font-weight:bold;}
span.Heading2Char
        {mso-style-name:"Heading 2 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 2";
        font-family:"Verdana","sans-serif";
        color:#003572;}
span.Heading3Char
        {mso-style-name:"Heading 3 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 3";
        font-family:"Verdana","sans-serif";
        color:#003572;}
span.Heading4Char
        {mso-style-name:"Heading 4 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 4";
        font-family:"Verdana","sans-serif";
        color:#003572;}
span.Heading5Char
        {mso-style-name:"Heading 5 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 5";
        font-family:"Verdana","sans-serif";
        color:#003572;}
span.Heading6Char
        {mso-style-name:"Heading 6 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 6";
        font-family:"Verdana","sans-serif";
        color:#003572;}
span.mw-headline
        {mso-style-name:mw-headline;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1927222171;
        mso-list-template-ids:-880229544;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;
        mso-ansi-font-size:10.0pt;
        font-family:Symbol;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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 bgcolor="white" background="cid:image001.gif@01CF3E33.1B62AEA0" lang="EN-US" link="#1F86FF" vlink="#005DC9">
<img src="cid:image001.gif@01CF3E33.1B62AEA0" v:src="cid:image001.gif@01CF3E33.1B62AEA0" v:shapes="_x0000_Mail" width="0" height="0" class="shape" style="display:none;width:0;height:0"><!--[if gte mso 9]><xml>
<v:background id="_x0000_s1025" o:bwmode="white" o:targetscreensize="1024,768">
<v:fill src="cid:image001.gif@01CF3E33.1B62AEA0" o:title="background_ice" type="frame" />
</v:background></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#44546A">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">I am trying to run a bash shell script when a recording completes. I tried it like I do for fax completion, but it either does not trigger or fails to run.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">For faxes I have:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#A31515">action</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">
</span><span style="font-size:9.5pt;font-family:Consolas;color:red">application</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span style="font-size:9.5pt;font-family:Consolas;color:windowtext">"</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">set</span><span style="font-size:9.5pt;font-family:Consolas;color:windowtext">"</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">
</span><span style="font-size:9.5pt;font-family:Consolas;color:red">data</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span style="font-size:9.5pt;font-family:Consolas;color:windowtext">"</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">api_hangup_hook=system
/usr/local/freeswitch/scripts/emailfax.sh 410-420-7778 /tmp/${uuid}.rxfax.tiff sdevoy@bizfocused.com</span><span style="font-size:9.5pt;font-family:Consolas;color:windowtext">"</span><span style="font-size:9.5pt;font-family:Consolas;color:blue"> /></span><span style="font-size:9.5pt;font-family:Consolas;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">So I guessed recordings would work like:<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue"><</span><span style="font-size:9.5pt;font-family:Consolas;color:#A31515">action</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">
</span><span style="font-size:9.5pt;font-family:Consolas;color:red">application</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span style="font-size:9.5pt;font-family:Consolas;color:windowtext">"</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">set</span><span style="font-size:9.5pt;font-family:Consolas;color:windowtext">"</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">
</span><span style="font-size:9.5pt;font-family:Consolas;color:red">data</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">=</span><span style="font-size:9.5pt;font-family:Consolas;color:windowtext">"</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">record_post_process_exec_api=system
/usr/local/freeswitch/scripts/emailwav.sh 410-420-7777 /tmp/recordings/${destination_number}.wav sdevoy@bizfocused.com</span><span style="font-size:9.5pt;font-family:Consolas;color:windowtext">"</span><span style="font-size:9.5pt;font-family:Consolas;color:blue">
/></span><span style="font-size:9.5pt;font-family:Consolas;color:windowtext"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:windowtext">I tried with a space and with a “:” following the “system” api name.<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:windowtext"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">How can I run achieve this? I will update the wiki if someone will explain it.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">The complete wiki contents are currently:<o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:none;border-bottom:solid #AAAAAA 1.0pt;padding:0in 0in 2.0pt 0in;background:white;margin-left:24.0pt;margin-right:0in">
<h2 style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.1in;margin-left:0in;mso-line-height-alt:14.4pt;background:white;border:none;padding:0in">
<span class="mw-headline"><b><span style="font-size:14.5pt;font-family:"Arial","sans-serif";color:black">Post Processing Recordings in the Dialplan</span></b></span><span style="font-size:14.5pt;font-family:"Arial","sans-serif";color:black"><o:p></o:p></span></h2>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:1.2pt;margin-left:.6in;text-indent:-.25in;line-height:14.4pt;mso-list:l0 level1 lfo1;background:white">
<![if !supportLists]><span style="font-size:10.0pt;font-family:Symbol;color:black"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">record_post_process_exec_api<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:1.2pt;margin-left:.6in;text-indent:-.25in;line-height:14.4pt;mso-list:l0 level1 lfo1;background:white">
<![if !supportLists]><span style="font-size:10.0pt;font-family:Symbol;color:black"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">record_post_process_exec_app<o:p></o:p></span></p>
<p style="mso-margin-top-alt:4.8pt;margin-right:0in;margin-bottom:6.0pt;margin-left:24.0pt;line-height:14.4pt;background:white;orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">These two variables allow the postprocessing of recorded audio. The reason this is required is if the A leg hangs up first in a call, the dialplan stops being processed, and then you
aren't able to take action on the file that was recorded. These variables take the form of:<o:p></o:p></span></p>
<div style="mso-element:para-border-div;border:dashed #2F6FAB 1.0pt;padding:12.0pt 12.0pt 12.0pt 12.0pt;background:#F9F9F9;margin-left:24.0pt;margin-right:0in">
<pre style="line-height:15.6pt;background:#F9F9F9;border:none;padding:0in;orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px"><span style="color:black"><action application="set" data="record_post_process_exec_api=some_api_app:api_app args" /><o:p></o:p></span></pre>
<pre style="line-height:15.6pt;background:#F9F9F9;border:none;padding:0in"><span style="color:black"><action application="set" data="record_post_process_exec_app=some_app:app args" /><o:p></o:p></span></pre>
</div>
<p class="MsoNormal"><span style="color:#44546A"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#44546A">Sean<o:p></o:p></span></p>
</div>
</body>
</html>