<div dir="ltr"><div><div>It should be.<br><br></div><div>I'd write something like the below:<br></div><div><br></div>[macro-test]<br>exten => s,1,NoOp<br>exten => s,n,GotoIf($[${STAT(e,/var/lib/asterisk/sounds/${ARG1}.ulaw)} = 0]?NOPROMPT:PLAYBACK)<br>
exten => s,n(NOPROMPT),Background(nothing-recorded&for&pm-prompt-number)<br>exten => s,n,SayPhonetic(${ARG1})<br>exten => s,n,Goto(EXIT)<br>exten => s,n(PLAYBACK),NoOP<br>exten => s,n,BACKGROUND(${ARG1})<br>
exten => s,n,(EXIT)MacroExit<br><br></div>exten => 1234,1,Macro(macro-test,tt-monkeys)<br><br><div><br><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Mar 8, 2014 at 11:39 AM, Daniel van den Berg <span dir="ltr"><<a href="mailto:asterisk@suretel.co.za" target="_blank">asterisk@suretel.co.za</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
I was wondering if it is possible to pass sound files to a macro as an<br>
argument in Asterisk 1.8?<br>
<br>
Thanks!<br>
<br>
Regards,<br>
<br>
Daniel van den Berg<br>
SureTel<br>
South Africa<br>
087-944-7873<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.<br>
---Heinlein
</div>