Asterisk Syntax Checker...?

Hi,

After a lot of grief over a missing dollar sign, I am looking for a syntax-checking/proof reading application for asterisk conf files. It doesn’t have to be fancy - could just be a set of grep commands that someone has put together, covering likely mistakes.

Can anyone let me know whether such a thing exists? If not I’ll write one, but I don’t want to reinvent the wheel.

Naomi

Asterisk itself is a great syntax checker. I don’t know of anything else out there to do the job. One thing you may want to do though (this is pretty helpful to me) is do your Asterisk coding in vim (vim is a UNIXy text editor available on all platforms). vim’s syntax highlighting rules work great with Asterisk config files and add a great amount of color which helps troubleshoot syntax easily.

True,

Just apply the vim syntax on your dev platform :

voip-info.org/wiki/view/vim+ … ghlighting

Regards,

Joao Cohen
Telecom Systems and Audiotext Specialist
linkedin.com/in/joaocohen

Thank you very much for your replies.

The highlighting is very helpful, and I have discovered that a few of the servers I work on already have it enabled, once I started using vim instead of my usual nano. (Now I need to get my head around all that “:wq” stuff … I had a feeling it would happen some day!)

I’ve got a follow-up question -

  • are you referring to the debug information it gives out during a reload or is there something else in there that I’m missing?

Naomi

I’m referring to just testing your code, and watching the asterisk CLI. It’ll let you know if the function you are using is depreceated, or if it has the wrong syntax, and other stuff. It’s a great tool in itself.