I need some code to be executed in [macro-outbound-callerid], so I figured I’d add this to [macro-outbound-callerid-custom] context.
I added the following stuff into extensions_custom.conf:
[macro-outbound-callerid-custom]
exten => s,1,Noop(CALLERID=${CALLERID(all)})
Reload asterisk, but nothing happens in the log file, though I can see that the macro-outbound-callerid context is called, but my custom stuff isn’t.
What am I doing wrong here? Maybe I’m missing one tiny piece of information…
That’s because you put it as S.
What else would I put there?
The expression to match digits. Most FreePBX contexts pass the exten variable, not the S.
After noticing this is a macro and how macros work (only the ‘s’ exten is allowed), together with how asterisk works when including contexts in macros, I found this post:
http://www.freepbx.org/forum/freepbx/users/how-to-execute-custom-code-at-start-of-macro-user-callerid
So I think I’ll have to do this custom stuff in overrides… Not the way I want to do it but that should work.
Nevertheless: Thanks!
Ok, I never call the macro’s directly. Try and hand it off to the context above the macro and let FreePBX do the heavy lifting.