[asterisk-users] Dialplan / check / tool
Steve Edwards
asterisk.org at sedwards.com
Mon Feb 18 10:54:02 CST 2013
On Mon, 18 Feb 2013, Thorsten Göllner wrote:
> I am wondering, if there is any tool available, which performs a check
> for suspicious entries in the dialplan. For example a non existing
> AGI-Script...
I'm just a 1.2 Luddite, but none that I know of.
Please feel free to write one. Here are a few features that would be
helpful:
) Parentheses, bracket, brace, quote, and double-quote matching.
) Parse /etc/init.d/asterisk to see if -C is used; parse asterisk.conf to
see if astagidir is defined; take note of the username used to start
Asterisk.
) Parse extensions.conf for global variables to cover the use case of:
exten = *,n, agi(${SOME-VARIABLE}/foo)
) Check the permissions of the AGI's path relative to the username and
group that starts Asterisk. Warn if silly permissions like 777 are found.
) If the AGI is an interpreted script (Bash, Perl, PHP, Python, etc.)
instead of a compiled executable (C, Fortran, Cobol, assembler, etc.)
ensure that the interpreter is present and functional (maybe something
like '<interpreter> --version').
) Detect dialplan 'fall-through.'
) Detect 'gaps' in priorities. Note that priorities do not need to be
contiguous or even specified in sequential order.
) Have a command line parameter to specify which version of Asterisk to
check compliance against. This would be a great 'desk check' before
migrating from 1.2 to 11 :)
) Detect global and channel variables defined, but not used.
) Detect global and channel variables used before defined.
) Detect missing goto targets.
Feel free to implement a subset of the above for your initial release :)
--
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000
More information about the asterisk-users
mailing list