CLI – displaying all channel variables

Home » Asterisk Users » CLI – displaying all channel variables
Asterisk Users No Comments

On 11-05-11 12:29 PM, Steve Edwards wrote:
> On Wed, 11 May 2011, Eric Wieling wrote:
>> Generally you should insert a Noop in the dialplan to examine variables.
>> Noop(EXTEN is ${EXTEN}) for example.
> The ‘verbose()’ application would be an example of ‘better practices.’
> It’s function is obvious rather than just a convenient side-effect.
> It has additional functionality in that you can specify the ‘verbosity’ level
> needed.

Agreed. I tend to use NoOp() for an actual No Operation, such as using it on the
first line of an extension:

exten => something_awesome,1,NoOp()
same => n,Verbose(2,Incoming call from ${CALLERID(all)})
same => n,Dial(SIP/someone_awesome)
same => n,Hangup

That way if you want to place things ahead of any line, you can do that without
impunity. Even using Verbose() on the first line can cause problems if you want
to move the Verbose() around and place something before it — now you have to do
some copy/pasting, and extra work that could be avoided 🙂