Summary:ASTERISK-17985: Syntax errors in dialplan do not display the file name
Reporter:Richard Miller (ulogic)Labels:
Date Opened:2011-06-08 13:33:50Date Closed:2011-06-24 15:54:30
Versions:1.8.4 Frequency of
Environment:Attachments:( 0) badsyntax.conf
( 1) badsyntax.conf
( 2) pbx_config.patch
Description:When issuing the CLI command
dialplan reload
syntax errors and warnings are displayed on the console.  The offending line number is displayed on the console, but the file name is not displayed.  Errors caught in main/config.c do display the file name.

#icnlude doesnotexist.conf ; include is misspelled, caught by config.c
exten => s,1,Noop(This line is OK)
same -> n,Noop(This line is caught in config.c and the file name is displayed)
sane => n,Verbose(3,We got here) ; same is misspelled
same => n,Set(semicolon=;) ; semicolon must be escaped and won't work like this
same => n,Noop(A) semicolon contains '${semicolon}' with length ${$LEN(${semicolon})}) ; warning for unmatched parentheses
same => n,MSet(semicolon="\;") ; This one works correctly
same => n,Noop(B) semicolon contains '${semicolon}' with length ${$LEN(${semicolon})})
same => n,ExecIf($["${CHANNEL:-2:1}" = ";"],Verbose(We have a semicolon)) ; semicolon must be escaped
same => n,Set(tech=${CUT(${EXTEN},/,1)) ; missing right brace, not detected until runtime
sane => n,Hangup() ; same is misspelled

exten -> i,Hangup() ; missing = caught in config.c

same => n,Noop(Unexpected hangup) ; missing priority 1
Comments:By: Richard Miller (ulogic) 2011-06-08 13:47:18.842-0500

This has a "correction" to produce the error as commented, where "same" is misspelled as "sane".

By: Richard Miller (ulogic) 2011-06-14 08:25:31.567-0500

Maybe this is not the right place for this comment, but I am not sure where to post it.  The issue got migrated to issue 18012 and I got an email to that effect, but when I try to navigate to

I get the following error:

Permission Violation

It seems that you have tried to perform an operation which you are not permitted to perform.

If you think this message is wrong, please consult your administrators about getting the necessary permissions.

By: Richard Mudgett (rmudgett) 2011-06-24 15:52:28.364-0500

Trunk -r324850

Merged revisions 324849 via svnmerge from

 r324849 | rmudgett | 2011-06-24 15:46:01 -0500 (Fri, 24 Jun 2011) | 15 lines

 Syntax errors in dialplan do not display the file name.

 When issuing the CLI command "dialplan reload" syntax errors and warnings
 are displayed on the console.  The offending line number is displayed on
 the console, but the file name is not displayed.  Errors caught in
 main/config.c do display the file name.

 (closes issue ASTERISK-17985)
 Reported by: ulogic
       pbx_config.patch uploaded by ulogic (License #5685) modified format
 Tested by: rmudgett

 JIRA SWP-3554