johnkiniston at gmail.com Guest
|
Posted: Tue Mar 11, 2014 1:07 pm Post subject: [asterisk-users] Pass Sound files as Argument to Macro Aster |
|
|
It should be.
I'd write something like the below:
[macro-test]
exten => s,1,NoOp
exten => s,n,GotoIf($[${STAT(e,/var/lib/asterisk/sounds/${ARG1}.ulaw)} = 0]?NOPROMPT:PLAYBACK)
exten => s,n(NOPROMPT),Background(nothing-recorded&for&pm-prompt-number)
exten => s,n,SayPhonetic(${ARG1})
exten => s,n,Goto(EXIT)
exten => s,n(PLAYBACK),NoOP
exten => s,n,BACKGROUND(${ARG1})
exten => s,n,(EXIT)MacroExit
exten => 1234,1,Macro(macro-test,tt-monkeys)
On Sat, Mar 8, 2014 at 11:39 AM, Daniel van den Berg <asterisk@suretel.co.za (asterisk@suretel.co.za)> wrote:
--
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.
---Heinlein |
|