Colored Verbose Output

I’m currently using the Verbose() application to print some important information from my dialplan to asterisk’s CLI with verboses lower than 3. My code is something like this:

same => n,Verbose(0,Hello World!)

However, when I check the CLI i can see something like that:

MyPBX*CLI> core set verbose 0
Console verbose is still OFF.
Hello World
MyPBX*CLI> 

I’m wondering if it is possible to use the Verbose application to print colored text or at least a tab and how to do it.

Thanks!

Just in case anybody needs help as the documentation is not very explicit:

Verbose aplications logs messages into any channel, for example console as the documentations says. By default console will log all Asterisk dialplan if verbosity level is set to 3 or higher which may be a bit confusing when using Verbose() application. This means Verbose makes sense on console only with level values between 0 and 2, as this verbosity levels will prevent diaplan from being printed and will continue printing verbose messages.

A simple test can be run adding a context on extensions.conf:

[test-verbosity]
exten =>s,1,Noop( Testing Verbose() )
same => n,Verbose(1,Test 1); printed on verbosity 1 or higer
same => n,Verbose(2,Test 2); printed on verbosity 2 or higer
same => n,Verbose(3,Test 3); printed on verbosity 3 or higer
same => n,Hangup()

and dialing with command line using:
debian*CLI> console dial s@test-verbosity

we’ll have several console outputs depending on verbose level:

Level 3: you’ll see the entire dialplan execution in here

debian*CLI> console dial s@test-verbosity
    -- Executing [s@test-verbosity:1] NoOp("Console/dsp", " Testing Verbose() ") in new stack
    -- Executing [s@test-verbosity:2] Verbose("Console/dsp", "1,Test 1") in new stack
 Test 1
    -- Executing [s@test-verbosity:3] Verbose("Console/dsp", "1,Test 2") in new stack
 Test 2
    -- Executing [s@test-verbosity:4] Verbose("Console/dsp", "1,Test 3") in new stack
 Test 3
    -- Executing [s@test-verbosity:5] Hangup("Console/dsp", "") in new stack
  == Spawn extension (test-verbosity, s, 5) exited non-zero on 'Console/dsp'
  << Hangup on console >>
debian*CLI>

Level 2: you’ll be able to read Verbose messages from 0 to 2 and also some Asterisk default messages printed on level 2 like “== Spawn extension …”

debian*CLI> console dial s@test-verbosity
 Test 1
  == Test 2
  == Spawn extension (test-verbosity, s, 5) exited non-zero on 'Console/dsp'
  << Hangup on console >>
debian*CLI>

Level 1: you’ll be able to read Verbose messages from 0 to 1

debian*CLI> console dial s@test-verbosity
 Test 1
  << Hangup on console >>
debian*CLI>

You’ll also notice Verbose messages un level 1 are preceded with a blank space " " ant Verbose messages on level 2 are preceeded with “==”