run a macro on dial cmd Asterisk 18

run a macro on dial cmd Asterisk 18

Problem Description:

i want run a macro on dial cmd,

this is my macro `

exten => s,1,AMD()
exten => s,n,Set(RAO=${AMDSTATUS})


this is my dialplan

 exten => _+33.,n,Set(FILENAME=${EXTEN}_${SIPCALLID})
 exten => _+33.,n,Monitor(wav,${FILENAME},b)
 exten => _+33.,n,Dial(${SIPTrunk}/${EXTEN},,M(subrao))


i get this error

[Dec  6 08:03:40] WARNING[27509][C-00000001]: app.c:297 ast_app_exec_macro: Cannot run 'Macro(subrao)'.  The application is not available.

Solution – 1

In asterisk above version 13 app_macro is depricated. You have build it manually if you need it using "make menuconfig" while compiling.

You can replace it by gosub application.

All samples was rewrited for use gosub.

Rate this post
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.