[asterisk-dev] [Code Review] 4379: Example configuration scenario - Super Awesome Company: Phase 1 - Patch 1

Steve Edwards asterisk.org at sedwards.com
Wed Feb 11 09:05:39 CST 2015

On Fri, 30 Jan 2015, Paul Belanger wrote:

> I'd also prefer to see the first time always a naked NoOp()
> exten => 8000,1,NoOp()
>     same => n,Verbose(1, "blah")

What value does noop() add?

I start my contexts with

         exten = s,1,			verbose(1,[${EXTEN}@${CONTEXT}!<application specific cruft>.'

(I define a template named 's' and reference it in all contexts.)

This way, you get a nice little console message saying where you are in 
the dialplan in a format that you can easily 'double-click-and-drag' 
(picking up the evaluated '${EXTEN}@${CONTEXT}') so you can type 'dialplan 
show ' followed by <shift><insert><enter> to display the relevant portion 
of the context.

While the OP's use of noop() is appropriate (a placeholder or 'no 
operation') the contraction may be confusing to the non-English, 
non-assembly language programmers among us.

Further, I find the common practice of using the 'side effect' of noop() 
(displaying text on the console) egregious when there are obvious and more 
versatile applications specifically for that purpose -- verbose() and 

I'd like to drive a stake into the abuse of the lowly noop().

Thanks in advance,
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

More information about the asterisk-dev mailing list