[asterisk-dev] Comments in extensions.conf with 2 dashes behind semicolon not being ignored when parsed?

JR Richardson jmr.richardson at gmail.com
Wed May 28 15:56:44 CDT 2008


Hi All,

I use allot of comments throughout my config files, as I suspect most
people do.  I just happened on a situation where a comment crashed my
dial plan.  Here is the example in extensions.conf:

;-some comment (1 dash)
works, ignored

;--some comment (2 dashes)
get a parse error at the CLI:

lab11*CLI> dialplan reload
  == Parsing '/etc/asterisk/extensions.conf':   == Found
[May 28 14:43:17] WARNING[29502]: config.c:1392 config_text_file_load:
Unterminated comment detected beginning on line 10

;--some comment--; (2 dashes, close with semicolon)
works, ignored

;---some comment (3 or more dashes)
works, ignored

I know this is not a big deal overall but this did bite me the other
day, I modified some extensions, added comment to denote changes, I
had to restart Asterisk for some other things besides the dial plan
change, so I did not reload the dialplan (if I did, I would have
noticed the parse error straight away).  I heard from the customer the
next day to let me know the changes did not work, I went into the PBX
to investigate and found the comment/parse error.

I've been using Asterisk since 2002 and never came across this issue.
All the reference documents say comments prefixed with semicolon are
ignored, apparently this is not the case.  And I don't see anywhere
that comments need to be closed with a semicolon.  None of the example
comments in the sample files close with semicolon.

I'm wondering if this behavior can be corrected?  This behavior
appears in 1.2 and 1.6.

Thanks.

JR
-- 
JR Richardson
Engineering for the Masses



More information about the asterisk-dev mailing list