1. NoOp - this application allows you to do nothing – No Operation.
NOTE: This application is valid for Asterisk version 1.0.9 and above.
Syntax:
NoOp() : this operation is doing nothing. In fact it can be used as echo for the command line interface (CLI).
Purpose and usage
The purpose of this dial plan application is dumping some variable in the CLI. It is useful for debugging an application.
Below you can find an example for the possible usage of the application.
Prerequisites
First of all you need to install Asterisk PBX. Afterwards you need to configure at least one user in iax.conf , sip.conf or mgcp.conf ; the protocol you are going to use depends on you or of the phone you are using. After this you need to write some extensions in extensions.conf.
In this tutorial I will use Idefisk softphone that is an IAX client. You can download it by clicking here. Tutorial showing how it works and configuration support can be found here.
Asterisk PBX configurations
NOTE: This is just an example of what you can use this application for. Of course you can use it and for other purposes.
When you have installed and working Asterisk PBX you will need some user to test this application. If you do not have any registered in iax.conf you may add the following one. If you are not going to user Idefisk Softphone and iax.conf you have to register the user in the same way in sip.conf, h323.conf or mgcp.conf depending on the protocol you are using.
Above I registered a user [ivan] with the properties:
type=friend (type might be "user", just can call "peer" just can be called and "friend" can call and can be called)
username=ivan - this is the user which must authenticate when connecting to the Asterisk PBX server
context=test is the context from extensions.conf which the user can access (including any other context which is/are included in this one)
secret=ivan is the password with which the user must authenticate when connecting to the Asterisk server
host=dynamic means that the host for this user is dynamic and he/she can connect to Asterisk PBX from different computers (host may be defined with static ip address)
Allow=all means that all audio codecs are allowed (You can allow certain codecs as well as disallow others)
We now have a user that can use the context test from extensions.conf. So now we need some dial plan application in [test] in extensions.conf.
Here is the application in extensions.conf.
exten => 222,1,Answer()
the call is answered
exten => 222,2,NoOp(Channel : ${CHANNEL})
This will display in CLI the channel name
exten => 222,3,NoOp(Context : ${CONTEXT})
${CONTEXT} is variable that returns the context name you are calling. Here this will display in CLI test.
exten => 222,4,NoOp(Extensions : ${EXTEN})
${EXTEN} is predefined variable that returns the extension you have dialed
exten => 222,5,NoOp(Date/time call : ${DATETIME})
${DATETIME} is predefined variable that returns the current date and time (DDMMYYYY-HH:MM:SS)
exten => 222,6,Set(new_var=ABC)
New variable named new_var is created and value "ABC" is assigned to it. For more information concerning the variables declaration see Set.
exten => 222,7,NoOp(${new_var})
the value of new_var is displayed in the CLI
exten => 222,8,HangUp()
Hangup() closes the line
2. The application in CLI
3. Additional information
For more information about extensions.conf you can check here.
For more information about iax.conf you can check here.
This application is tested with our IAX softphone Idefisk. You can download it from here. For more information about this softphone please read our tutorial.
If you would like to test this application with the SIP channel you can read our tutorials about the SIP Softphones to learn how to configure them to work with Asterisk PBX
User Comments
viagra sample (angelo dot delamothe79 at welcore dot ml) 17 July 2020 05:11:56 viagra sample http://viagenupi.com/
Infinity (qgfm7lgwp9c at yahoo dot com) 21 April 2016 03:41:49 Good job maikng it appear easy. http://gcluquuo.com [url=http://vcukmqver.com]vcukmqver[/url] [link=http://avchgvglaam.com]avchgvglaam[/link]
Shirl (azomrg2uyit at gmail dot com) 19 April 2016 15:00:01 Created the greatest <a href="http://kgqrkmcxvtl.com">arelcits,</a> you have.
priyank (priyanksri at rediffmail dot com) 16 April 2008 13:12:35 sumir lo
A. Halder (imon_u at yahoo dot co dot in) 14 September 2007 13:49:56 dear Asterisk users,
I want to set the current system date & time as value in a variable. can anybody help me by giving that line of code?
Anand Kumar Gupta (kumaranandgupta at gmail dot com) 18 November 2006 10:48:39 Use the command on Linux CLI "asterisk -vr", If
it is not starting means your Asterisk is not working. Troubleshoot the problem.
sixty_9 (sixty999 at hotmail dot com) 11 July 2006 17:54:33 How do i put the CLI showing every step of the calls? my cli is always stopped.