<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 HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><title>Re: [asterisk-users] dialplan announcements</title><style><!--
/* Font Definitions */
@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:0in;
        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;}
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";}
p.avgcert, li.avgcert, div.avgcert
        {mso-style-name:avgcert;
        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";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for the insight.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Although your logic works absolutely fine, I couldn&#8217;t get it to work the way I wanted so I simplified it.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I could post the script if anyone is interested.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] <b>On Behalf Of </b>Doug Lytle<br><b>Sent:</b> Friday, February 11, 2011 12:48 PM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> Re: [asterisk-users] dialplan announcements<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p><span style='font-size:10.0pt'>ERIC HERRON wrote:<br>&gt; The conditions are that I want the recorder to dial a feature code<br>&gt; that prompts him to record the message. He then presses 1 to accept.<br>&gt; This gets saved as announcement.wav.<br><br>You'll need to supply some of your own audio prompts, I recorded my own,<br>here is the code I have:<br><br>[recordings]<br><br>;****************************<br>;* Voice Prompt recording menu<br>;****************************<br><br>exten =&gt; 50*,1,Set(COUNT=0)<br>exten =&gt; 50*,n,Playback(local/extension-recording-menu)<br>exten =&gt; 50*,n,Playback(local/please-record-msg)<br>exten =&gt; 50*,n,Record(mymessage:gsm|5|60)<br>exten =&gt; 50*,n,Playback(local/you-said)<br>exten =&gt; 50*,n,Playback(mymessage)<br><br>;**************************<br>;* Press 1 to continue or<br>;* 2 to change your message<br>;**************************<br><br>exten =&gt; 50*,n,Background(local/press1-or-2)<br>exten =&gt; 50*,n,Set(TIMEOUT(digit)=2)<br>exten =&gt; 50*,n,WaitExten(5)<br><br>exten =&gt; 1,1,System(/bin/mv /var/lib/asterisk/sounds/mymessage.gsm<br>/var/lib/asterisk/sounds/local/`date +%s`.gsm)<br>exten =&gt; 1,2,Playback(local/recording-saved)<br>exten =&gt; 1,3,Background(local/press3-torecord-4tohang)<br><br>exten =&gt; 2,1,Goto(recordings,50*,4)<br>exten =&gt; 3,1,Goto(recordings,50*,4)<br><br>exten =&gt; 4,1,Playback(vm-goodbye)<br>exten =&gt; 4,2,Hangup()<br><br>exten =&gt; t,1,GotoIf($[ ${COUNT} &gt; 2 ]?4,1)<br>exten =&gt; t,n,Playback(local/sorry-didnot-getthat)<br>exten =&gt; t,n,Set(COUNT=$[${COUNT} + 1])<br>exten =&gt; t,n,Goto(recordings,50*,8)<br><br>exten =&gt; i,1,Playback(local/sorry-invalid-choice)<br>exten =&gt; i,2,Goto(recordings,50*,4)<br><br>Doug<br><br><br>--<br><br>Ben Franklin quote:<br><br>&quot;Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety.&quot;<br><br><br>--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a> --<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://www.asterisk.org/hello">http://www.asterisk.org/hello</a><br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br>&nbsp;&nbsp; <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a></span><o:p></o:p></p><div class=MsoNormal align=center style='text-align:center'><hr size=1 width="100%" noshade style='color:#ACA899' align=center></div><p class=avgcert>No virus found in this message.<br>Checked by AVG - <a href="http://www.avg.com">www.avg.com</a><br>Version: 10.0.1204 / Virus Database: 1435/3436 - Release Date: 02/11/11<o:p></o:p></p></div></body></html>