Cascading Macros In 1.8. Bug Or Feature ?

Home » Asterisk Users » Cascading Macros In 1.8. Bug Or Feature ?
Asterisk Users 1 Comment


In Freepbx 2.10, for instance, you can read several instances of the following pattern :

In extensions.conf
#include extensions_additional.conf
#include extensions_custom.conf

In extensions_additional.conf
include => macro-hangupcall-custom exten => s,1,Noop(foobar1)

In extensions_custom.conf
exten => s,1,Noop(foobar2)

When using “dialplan show s@macro-hangupcall”, Asterisk (1.8.12) displays both foobar1 and foobar2 dialplans, in this order. Then asterisk ignores foobar2 dialplan and only run foobar1 diaplan.

Would you rate this a bug or a feature ?
To me, asterisk should both :
1. list foobar2 dialplan first (with dialplan show) as the include statement is the first one,
2. run foobar2 dialplan it is the first listed.

Opinions ?
Suggestions ?


One thought on - Cascading Macros In 1.8. Bug Or Feature ?

  • Hi, Though I cant say its a bug or feature, but the way you think it should work then try setting correct priority..i.e 1 in custom and then 2 in the other context. Somehow I’m having a feeling that this won’t work. Also AFAIK macros are being replaced by Go-SUB thing. Macros cant be called in another macro in a cascaded manner in the dialplan. Also they dont reas any DTMF for the current running macro rather for the dialplan context which called thd macro.

    Thanks, Sammy Go.