Pass Sound Files As Argument To Macro Asterisk 1.8

Home » Asterisk Users » Pass Sound Files As Argument To Macro Asterisk 1.8
Asterisk Users 1 Comment

Hi All,

I was wondering if it is possible to pass sound files to a macro as an argument in Asterisk 1.8?

Thanks!

Regards,

Daniel van den Berg SureTel South Africa
087-944-7873

One thought on - Pass Sound Files As Argument To Macro Asterisk 1.8

  • 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