Page 443 - Asterisk™: The Future of Telephony
P. 443
exten => 123,1,Answer()
exten => 123,2,NBScat()
NoCDR() Disables Call Detail Records for the current call
NoCDR()
Disables CDRs for the current call.
; don't log calls to 555-1212
exten => 5551212,1,Answer()
exten => 5551212,2,NoCDR()
exten => 5551212,3,Dial(Zap/4/5551212)
See Also
AppendCDRUserField(), ForkCDR(), SetCDRUserField()
NoOp() Does nothing
NoOp(text)
Does nothing—this application is simply a placeholder. This application is often used
as a debugging tool. Whenever Asterisk’s core verbosity level is set to 3 or above, As-
terisk evaluates and prints each line of the dialplan before executing it. This means that
any arguments passed to the NoOp() application (in the text parameter) are printed to
the console. By watching the console output, a skilled Asterisk administrator can use
this output to debug problems in the dialplan.
exten => 123,1,NoOp(CallerID is ${CALLERID})
You don’t have to place quotes around the text. If quotes are placed
within the brackets, they will show up on the console.
When to use NoOp() and Verbose()
The difference between Verbose() and NoOp() is subtle. Here are some suggestions as
to how you can discern when to use each. The Verbose() application is handy when
you want to output something to the console. Using the set verbose command (fol-
lowed by the level of verbosity you desire—0 to 4), you can set the output to a level
that will not show you all of the activity on the system, but rather only those things
that are equal to or less than that the current level. (Actually, you can set the verbosity
to whatever you want. The set verbose 999 will work just fine, but we have not been
able to find anything that outputs at a level higher than 4, so anything from 4 to infinity
will be effectively the same for the time being.) This means that you can display all
NoCDR() | 415