Reload Dialplan From Bash In Strict Mode

Home » Asterisk Users » Reload Dialplan From Bash In Strict Mode
Asterisk Users 1 Comment

Hi All,

I hope someone can give me a hint.

We try to reload the asterisk dialplan config using ansible command module. Using this we just trigger asterisk -rx “dialplan reload”

Now we want ansibe to fail if there is something wrong in the dialplan.

If we put a bad config in extensions.conf dialplan reload prints some warning in Asterisk console but the command “asterisk -rx” is successful and prints out “Dialplan reloaded”.

So Asterisk try to merge the bad config with the actual one and succeeds with it. If there would be a strict mode which would fail if there is a bad line in the config would help us to parse the output.

Unfortunately we haven’t found anything in documentation.

If you have any Idea how to do this or any other way to ensure the dialplan reload is successful and there are no error in config would be much appreciated.

our bad config looks something like this:

after reloading it prints out “Line 2 contains no ‘='” and the reload is successful, but it shouldn’t.

many Thanks!
BR
Jöran

One thought on - Reload Dialplan From Bash In Strict Mode

  • Joran,

    A “hack” would be to issue the command with one thread and with the other tail the log and lookout for “WARNING”.