Hi there - first time poster - not sure if this is a dev issue, or a support issue, but I think it MAY relate to a bug as I don’t see how the system will work as it exists now.
Originally I was looking for a way to modify the script generated for extensions created automatically by the FreePBX interface - I was looking for a template or other construct that I could add a couple of lines of custom code to to facilitate call accounting of issues such as find-mefollow-me and call forwarding, etc.
After trying to understand the config generation system (and failing) I thought I would look at the existing config files for a way to include a section in every extension using the existing code.
That lead me to the blacklist-check, which includes app-blacklist-check-custom
exten => XXXXXXXXXX,n,Gosub(app-blacklist-check,s,1)
From this gosub, I can see the call to app-blacklist-check, BUT, because the include occurs BEFORE “s,1” I think it is never called and therefore useless?
include => app-blacklist-check-custom
exten => s,1,LookupBlacklist()
My test code is simply a Noop to echo a string so I know it’s working. I’m unsure how includes work and whether or not extensions_custom.conf (which is included AFTER extensions_additional.conf) would be referenced at this point, so I added my test code to globals_custom.conf which is included earlier in the extensions_additional.conf file.
exten => s,1,Noop(XXX TEST MITCH XXX)
exten => s,n,Noop(XXX)
This “include custom” seems to be a common construct in a lot of the apps in existing config, am I misunderstanding how they are supposed to work? From what I can see on the gosub docuemention, gosub requires an extension and priority, so I don’t see how the includes at the begining of these sections could ever be referenced unless they were called as Macro’s or perhaps specifcally referenced by another gosub within the routine itself.
Is there any documentation to set me on the right track or maybe a primer on the config generation so I can add my statements into the template somehow.
Can you point me in the right direction please.