Ast_app_exec_macro: Cannot Run ‘Macro(atb)’. The Application Is Not Available.
Home » Asterisk Users » Ast_app_exec_macro: Cannot Run ‘Macro(atb)’. The Application Is Not Available.
Did execution of macro changed in Astersik-16.15 ?
When I try to dial an extension that call macro I get an error:
app.c:280 ast_app_exec_macro: Cannot run ‘Macro(atb)’. The application is not available.
Dial(SIP/718xxxxxxxxxx@pstn-5665,20,m(default)M(atb))
—
Thelma
—
9 thoughts on - Ast_app_exec_macro: Cannot Run ‘Macro(atb)’. The Application Is Not Available.
The Macro application is not built by default, it has to be explicitly selected in “make menuselect” when building Asterisk. Have you done so?
Macros are no longer built by default in Asterisk 16. This was documented in the UPGRADE.txt file
app_macro:
– The app_macro module is now deprecated and by default it is no longer
built. Users should migrate to app_stack (Gosub). A warning is logged
the first time any Macro is used.
Doug
—
Thanks, I was able to figure it out, replace the subroutine witht Gosub
How do you enable the phone speaker on the Gosub?
I had:
Dial(SIP/718xxxxxxxxx@pstn-5665,20,m(default)M(atb))
replace it with:
Dial(SIP/718xxxxxxxxxx@pstn-5665,20,U(atb-sub))
My macro used to execute sequence of numbers after it connects, when I replace the macro with Gosub I don’t hear phone dialing the numbers on the phone that macro used to execute (just silence). Is there a way to play these numbers on the phone (so I know it is working)?
—
On Gentoo we build Asterisk with emerge and use “flags” to enable or disable certain features:
Installed versions: 16.15.1-r1 (alsa bluetooth caps iconv ssl vorbis -calendar -cluster -curl -dahdi -debug -doc -freetds -gtalk -http -ilbc -ldap -libressl -lua -mysql -newt -odbc -oss -pjproject -portaudio -postgres -radius -selinux -snmp -span -speex -srtp -static -statsd -syslog -unbound -xmpp
Which one of the above (the one with “-” in front) are responsible for compiling in Macro feature.
I an replace macro with Gosub but my phone doesn’t play the dialing tones after I did it. My macro execute several sequence of numbers after connecting and I can hear them in the speakerphone now with Gosub, it does execute these numbers but I don’t hear anything in the speakerphone just silence.
Is there a way to activate speakerphone what on Gosub? So I know the phone is dialing the numbers?
—
You can provide variables to your gosub routine, for an example
Gosub(check-number-forwarding,s,1(${ARG1}))
Doug
—
This one work (but no dialing numbers on phone speeker)
Dial(SIP/718xxxxxxxxx@pstn-5665,20,U(atb-sub))
This one doesn’t work:
Gosub(check-number-forwarding,Dial(SIP/718xxxxxxxxxxpstn-5665,20,U(atb-sub))
Is ARG1 = atb-sub ?
Thanks for your help.
—
No.
My complete line
exten => _45XX,1,Set(_ARG1=${EXTEN}
same => n,Gosub(check-number-forwarding,s,1(${ARG1}))
So, if someone were to dial a 4 digit number starting with 45 (i.e. 4522), it would jump to the sub-routine called check-number-forwarding and supply the variable of 4522 to that sub-routine.
It could have been just as easily written as
same => n,Gosub(check-number-forwarding,s,1(4522))
Your sub-routine will need to pass what dialing options you are wanting to use.
A good source of information
https://wiki.asterisk.org/wiki/display/AST/Gosub
Doug
—
OK, both combination worked but still silence until the all numbers are dialed.
exten => 65,1,Progress() ;plays the music on internal call exten => 65,n,Answer exten => 65,n,Dial(SIP/718xxxxxxxxxx@pstn-5665,20,U(atb-sub))
[atb-sub]
exten => s,1,Wait(6)
exten => s,n,SendDTMF(1)
exten => s,n,SendDTMF(xxxxxxxxxxxxx#)
exten => s,n,SendDTMF(xxxxxxxxx#)
exten => s,n,SendDTMF(1)
[atb-sub]
exten => s,1,Wait(6)
exten => s,n,SendDTMF(1)
exten => s,n,Gosub(check-number-forwarding,s,1(xxxxxxxxxx#))
exten => s,n,Gosub(check-number-forwarding,s,1(xxxxxxxx#)
exten => s,n,SendDTMF(1)
What I want is hear the phone dialing the number or play music, so I know it is dialing or doing something. in the first line I have “Progress()” it used to play music but it doesn’t anymore.
—
I have never used the U option on the dial command to call a sub-routine,
Doug
—