How can I escape a block of code in dialplan?

I would like to escape for example block of code in diaplan from line 70-300.
How can I do that?
In BASH i can do with:

: <<  TURNED_OFF
...
something what won't be seen
...
TURN_OFF

You can’t. You can insert a semi-colon in front of every line, but that’s about it. Hopefully, your editor can do this for you.

If you can break your dialplan down into chunks, you can 'include' the chunks and then just ‘comment out’ the include…

Personally, I pass my dialplan (extensions.{ael,conf}.pre through a preprocessor so I can do substitutions and block {in,ex}clusions, but native? Nope.

I escape multiple lines as follows: ;-- code line 1
code line 2

code last line --;

Start with semicolon and double dash, end with double dash and semicolon.

2 Likes

Way cool. Who knew? :slight_smile:

This is somewhere at the beginning of the wiki.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.