Custom feature code to "Apply Config" DOreload?

I am hoping someone can point me in the right direction.
Does anyone know of a way to create a feature code that will “apply config”?

My specific use for this is I have created a PHP Script that uses the GraphQL API to change a particular system recording to certain sound files based on the form selection. It’s used for an Out Of Office Day Night Flow and the script itself works great. My API Credentials are set to only allow for the System Recording API, and I don’t love the idea of opening up the Framework API to the internet so I am really trying to avoid that.
https://support.digium.com/s/article/PBX-GUI-Framework-Module-GraphQL-APIs#FrameworkModuleGraphQLAPIs-Performreload

Instead, I would just like to have a feature code that a user can dial once they use this Web App to set the OOO message, to apply the system config. Is this possible?

Call a script that does a fwconsole reload

This dialplan placed in extensions_custom.conf will do it:

[from-internal-custom]
exten => 55109,1,Noop(Entering user defined context from-internal-custom)
exten => 55109,n,Playback(wait-moment)
exten => 55109,n,System(fwconsole reload)
exten => 55109,n,Playback(beep)
exten => 55109,n,Hangup()

I love this! Simple, easy to use, and does exactly what I need.
Thanks Lorne!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.