radpeter's picture

To my knowledge, it is considered good practice place your own dialplan code in -custom contexts in _custom.conf files.

In the extensions_additional.conf the [macro-user-callerid] starts with
include => macro-user-callerid-custom

The place of this line seems to indicate that the included code is executed at the start of the macro,

However, the documentation of the include statement, e.g. on www.the-asterisk-book.com, states

=================
Order of execution when using include statements

Asterisk will always look for a match in the current context before referencing any included contexts. If a matching entry is found, that entry is used. If no matching entry is found, Asterisk will look for a match in the first included context, then the next, and so on. It is also possible to have nested includes; that is, includes within includes.
================
Since you can only use the s extension in a macro,it looks like the custom include code is always executed last, if ever.
This seems also to be confirmed by a CLI show dialplan @macro-user-callerid, and also by viewing the dialplan executed,.

How and where can I place dialplan code which is excuted at the start of the [macro-user-callerid]?


__________________