Command to see core Application
asterisk -rnx 'core show applications'`
If you've never heard of VoIP, get ready to change the way you think about long-distance phone calls. VoIP, or Voice over Internet Protocol
SHOW SIP PEERS
asterisk -rnx "sip show peers"
SHOW PRI SPAN INFORMATION
asterisk -rnx "pri show span 1"
Command to see detail information of zap channels
asterisk -rnx "core show channels"
Command to see information of zap channels
asterisk -rnx "group show channels"
Digital Receptionist or IVR
Information
The 'Digital Receptionist' page is the interface used to setup your auto attendant when people call your PBX. Normally heard as "Thanks you for calling MYBUSINESS, for Sales press 1, for Service press 2", etc.Planning
While the urge is strong just to dive in by clicking on IVR, you should resist this impulse.First, draw out on paper what you intend to to achieve. Run it by the customer (or your officemates). Write out word-for-word what all the recordings are going to be.
The proper flow to build a good IVR is:
- Planning
- Customer agreement with the plan.
- Record the audio prompts using System Recordings and an extension.
- Create any destinations that don't currently exist (queues, ring groups, day/night modes or time conditions).
- Test all of these. One way to do this is use miscellaneous destinations, assigning a * feature code to whatever thing you want to test.
- Then go create your IVR.
- Show it to the customer, and then make the inevitable changes.
- Now upgrade the voice prompts to a paid voice or designated employee (the office manager or receptionist, etc.)
- Bask in glory!
- Office / Light industrial
- Welcome to BUSINESSNAME. Please listen carefully as our options have changed. If you know the extension of the person you are trying to reach, you may dial it at any time. Press 1 for sales, press 2 for customer service, press 3 for administration, press 4 for Press inquiries, press 5 for office directions,press # to access the company directory, or press 0 for the operator.
- Welcome to BUSINESSNAME. Please listen carefully as our options have changed. If you know the extension of the person you are trying to reach, you may dial it at any time. Press 1 for sales, press 2 for customer service, press 3 for administration, press 4 for Press inquiries, press 5 for office directions,press # to access the company directory, or press 0 for the operator.
- Hospitality
- Welcome to HOTELNAME. Please listen carefully as our options have changed. If you know the room # of the guest you are trying to reach, you may dial it at any time. Press 1 for reservations, press 2 for the front desk, press 3 for event sales, press 4 for hotel administration, press 5 for hotel directions, press # to access the hotel directory, or press 0 for the operator.
- Welcome to HOTELNAME. Please listen carefully as our options have changed. If you know the room # of the guest you are trying to reach, you may dial it at any time. Press 1 for reservations, press 2 for the front desk, press 3 for event sales, press 4 for hotel administration, press 5 for hotel directions, press # to access the hotel directory, or press 0 for the operator.
- Engineering/Product Company with Direct Sales and Support
- Welcome to BUSINESSNAME. Please listen carefully as our options have changed. If you know the extension of the person you are trying to reach, you may dial it at any time. Press 1 for sales, press 2 for customer service, press 3 for technical support, press 4 for administration, press 5 for Press inquiries, press 6 for office directions, press # to access the company directory, or press 0 for the operator.
- Welcome to BUSINESSNAME. Please listen carefully as our options have changed. If you know the extension of the person you are trying to reach, you may dial it at any time. Press 1 for sales, press 2 for customer service, press 3 for technical support, press 4 for administration, press 5 for Press inquiries, press 6 for office directions, press # to access the company directory, or press 0 for the operator.
- Retail
- Welcome to BUSINESSNAME. Please listen carefully as our options have changed. If you know the extension of the person you are trying to reach, you may dial it at any time. Press 1 for sales, press 2 for customer service, press 3 for store hours, locations, and directions, press 4 for administration, press 5 for Press inquiries, press # to access the company directory, or press 0 for the operator.
- Welcome to BUSINESSNAME. Please listen carefully as our options have changed. If you know the extension of the person you are trying to reach, you may dial it at any time. Press 1 for sales, press 2 for customer service, press 3 for store hours, locations, and directions, press 4 for administration, press 5 for Press inquiries, press # to access the company directory, or press 0 for the operator.
Making recordings
Fire up the System Recordings module. Shown here is 3.3.5.1.
I strongly suggest you use an extension connected to the PBX to make your recordings. They'll be quick and in the right format and you can worry about getting everything else right. When everything is all finished, you can come back and replace those temporary recordings with paid or improved versions.
To use your extension to make a recording, enter your extension in Step 1 and press Go. Don't skip this and go to Step 2, or you'll get a cryptic error.
Now dial *77 and make your recording after the beep. Dial *99 to listen to it. You don't have to be the person doing this – I often enter a customer's extension and have a customer do this part while I do the GUI work.
If the recording is good enough (and don't obsess here yet), name the recording and press Save.
For lame and silly reasons, spaces are not allowed in the names.
You can listen to your recording and add on other recordings (such as the built-in recordings) by clicking on your recording in the right tool panel.
We're going to start with a simple 1-level IVR , so the single Welcome-to-ACME recording will be enough.
Now that we've created a system recording, we can create our IVR.
Creating the IVR
When you select IVR, the first page is now a brief set of instructions on how to drive the IVR. You can either edit an IVR, if one is existing, or create a new one by clicking on 'Add IVR'.
Editing your IVR
Unlike the old Digital Receptionist system, this creates the IVR (and calls it 'Unnamed') as soon as you click 'Add' - You'll see it appear on the right straight away.
These are your options:
- Change Name: This is simply the descriptive name that appears on the right, and in the drop-down menu of Destinations
- Timeout: This is the amount of time the system waits before sending the call to the 't' destination
- Enable Directory: If you switch this on, users will be able to dial the FeatureCodes">feature code for Directory, usually #, from the IVR and access the Directory service.
- Directory Context: This is the asterisk context of the directory. Advanced users can then use different IVRs to create a multi-tenant installation.
- Enable Direct Dial: If you enable that, users will, in addition to being able to dial the IVR options, be able to directly dial an Extension number.
- Announcement: A System Recording that is played to users when they enter the IVR. This can be set to 'nothing'. These announcements are great for “today is July 4th and we're closed for the holiday” and then proceeding on to the regular call flow.
Configuring your IVR
In the box on the left, enter the option for the user. This may be one, or a series of numbers, or, 'i', or 't'. 'i' and 't' have special meanings:- i: This overrides the default invalid choice behavior, which is to play a 'invalid option' message and immediately replay the current menu. E.G. If you only have 1 2 and 3 defined, and caller pushes 4, it will jump to this destination.
- t: This overrides the default timeout behavior, which is to play the menu three times and hangup. A standard configuration is to go the operator, to handle customers that don't have DTMF-capable phones.
Use 'Increase Options' or 'Decrease Options' to alter the number of options available. This won't let you decrease it to less than the number of options that are currently set.
To delete an option, simply leave the selection blank.
When you're finished, click 'Save' and you have your new IVR.
To test it, give it an incoming route or set up a miscellaneous application (* code) to reach it.

database put blacklist
eg. database put blacklist 0123456789 1
Stores 0123456789 as a blackilsted CallerID
To delete a number from the blacklist using the CLI
database del blacklist
eg. database del blacklist 0123456789
Deletes 0123456789 from the blacklist database
Recent versions of Asterisk 1.6 are compatible with the Asterisk 2.0 GUI. This wasn’t always the case, as the Asterisk GUI was developed for the 1.4 branch. Although I wish Digium had gone for the LAMP model, the GUI is pretty good and getting better all the time. However the instructions to install are difficult to find on the asterisk.org website. That is, if they are there at all. My guess is that Digium doesn’t want to make it to easy to get a free GUI. I think this a very poor strategy, but that’s another article…. Today we will run through a quick install of asterisk and the 2.0 GUI. A far superior option as compared to to Trixbox and FreePBX.
GOALS OF THIS POST:
- Install Asterisk 1.6
- Install Asterisk 2.0 GUI
Download the most recent sources to the ‘/usr/src’ directory. Download the Asterisk source files. To accomplish this we will use Subversion. Remember to execute this command after changing to the ‘/usr/src’ directory.
svn checkout http://svn.digium.com/svn/asterisk/trunk asterisk
svn checkout http://svn.digium.com/svn/asterisk-gui/branches/2.0/ gui
Change to the ‘asterisk’ directory we just downloaded and build.
example commands:
./configure
make
make install
make config - note: installs redhat style init startup scripts
make samples - note: adds Asterisk example files to ‘/etc/asterisk’
example commands:
./configure
make
make install
Now we have a basic Asterisk install with GUI. But to make this function correctly we have to edit a couple config files located in ‘/etc/asterisk’. To allow web configuration open /etc/asterisk/manager.conf with your favorite text editor.
change to ‘enabled=yes’ and ‘webenabled=yes’.

At the bottom of the file create a username and password for the web login page.
Next edit the ‘/etc/asterisk/http.conf’. It should look something like this,

From the ‘/usr/src/gui’ directory run the ‘make checkconfig’ command, you should see output like this,
[root@localhost gui]# make checkconfig
— Checking Asterisk configuration to see if it will support the GUI —
* Checking for http.conf: OK
* Checking for manager.conf: OK
* Checking if HTTP is enabled: OK
* Checking if HTTP static support is enabled: OK
* Checking if manager is enabled: OK
* Checking if manager over HTTP is enabled: OK
— Everything looks good —
* GUI should be available at http://localhost:8088/asterisk/static/config/index.html
* Note: If you have bindaddr=127.0.0.1 in /etc/asterisk/http.conf
you will only be able to visit it from the local machine.
Example: http://localhost::8088/asterisk/static/config/index.html
* The login and password should be an entry from /etc/asterisk/manager.conf
which has ‘config’ permission in read and write. For example:
[admin]
secret = mysecret11769
read = system,call,log,verbose,command,agent,config
write = system,call,log,verbose,command,agent,config
When you run a phone service over the public internet there is not much that you can do to optimize the service. The quality of the phone service will be dictated by the IP packet loss, the IP latency and the time require to dial.
You cannot use the SIP re invite function to by-pass the Asterisk server to improve the latency. Due to way of defining the NAT functions you will have to force the media traffic to transit via your Asterisk server. There is very little that you can do about latency, but you can avoid some stupid configuration at both end of the service (e.g. using WiFI link to connect VoIP phones).
Packet loss
A typical voice call will require about 30 to 100 kbps depending of the Codec that you have selected. I use the DECT codec G.726 (32 kbps) because it works with the Gigaset and is supported by Asterisk for interconnection on Analog phones via a Digium adaptor card. If your SIP phone supports the GSM codec ETSI 06.10 (13Kbps) you should use it.
This type of traffic will go smoothly via your home Broadband internet, if you setup define the priorities correctly. Some consumer gateways (e.g. Linksys) will let you define priority by port numbers. Give the highest priority to your RTP ports.
Dialing and ringing delays
As your SIP phone will pool the SIP proxy (Asterisk server) every 10 to 30s, the IP route should always be up and provide a decent time to dial and to ring. If that is not the case the issue is probably in the Asterisk extention.conf not in SIP.
Troubleshooting.
SIP
Connect to Asterisk with command 'asterisk -c'
The command 'sip debug' and 'sip debug ip' will give you access to detailled debug.
If your firewall is correctly configured 'sip debug ip' and 'tcpdump' will show the similar information. If not check your firewall. Remember that tcpdump tap in the Ethenet traffic before the firewall.
Media
You must debug the media independently in both direction. The simplest is to create noise at one end and follow the RTP stream with tcpdump. Software SIP phone are handy for debug because you can run tcpdump (or ethereal) on the same PC than the SIP phone and check what traffic comes in / goes out.
Statistic can also be use to check RTP traffic. As the number of packet is large it will quickly be visible on stats reports.
Asterisk FAQ
General questions
How do I search the Asterisk mailing list archives?Is there a news interface for the mailing list asterisk-users?
How do I avoid getting into trouble on the mailing list?
Asterisk installation and configuration
- How do I get my Asterisk up and running in no time at all?
- The short answer is Keep it simple, stupid, don't start with all bells and whistles. Follow the quickstart guide. After you have the base system running, start adding hardware and features.
- Can I use my modem to connect to the PSTN?
- The answer is short — No you cannot. You'll need special telephony hardware.
- How do I run Asterisk behind a NAT firewall?
- The short answer is "it depends on protocol". With IAX, all you need to do is register to an outside Asterisk server and let the traffic flow. With SIP, there's a lot of "it depends". Check NAT and VOIP, Asterisk sip qualify, Asterisk sip nat solutions, Asterisk tips and tricks, Asterisk sip client SER and STUN. The default principle with NAT is that no device on the outside can contact something on the inside without the inside client first setting up a connection. This is what is used by many solutions, described on the pages behind the previous mentioned links. If you want a more detailed explanation of the problem, have a look at this tutorial:
- How do I run Asterisk outside my NAT with SIP clients on the inside?
- The short answer is "normally, without any problem". If you configure it right, with Asterisk sip qualify, Asterisk sip nat in the sip.conf, you're all set. Many clients help, too, by using STUN to discover NATs. If your firewall restricts ports in addition to being a NAT device, you have another problem setting up ports to use.
- Show me a default configuration!
- Well, when you install Asterisk you get a default configuration, so read the configuration files. If you click on the link, you'll get plenty of pointers to reference configurations published by other Asterisk users on the Internet.
- How do I convert and create sound files?
- You can record sound files with the record application. If you record on Windows, you can convert sound files with sox, or use this online audio conversion tool See Asterisk sound files
- How do I change the voice in the sound files?
- All of the Asterisk sound files are typically located in the /var/lib/asterisk/sounds directory. There are currently over 1,500 recordings provided with Asterisk. You can record the ones you actually use yourself (see above), or you can use professionally produced sound file collections made to replace the default voice. Voice Vector Media and others offer complete replacement sound file collections for free. In addition, inexpensive custom recording services are typically offered to allow you to customize the collection for your needs using the same voice.
- How do I get rid of the ridiculous echoes?
- There is not a echo=no switch, because echo problems are hard to solve and echo cancellation is a complicated area of telephony theory. This said, Asterisk have many variables you can try after you located the real source of the problem. Don't start with the Asterisk configuration, use the source, Luke. Read Asterisk echo cancellation, Asterisk echo analog lines, Digium X100p echo cancellation.
- How much bandwidth is needed for XXX clients using YYY protocol?
- There's no simple answer for this. However, there's guides to help you calculate bandwidth. Look on the Asterisk bandwidth page for more information.
- Is it possible to run Asterisk without special hardware?
- Yes, PSTN hardware like Digium cards or ISDN adapters is not a requirement. For some applications, like the conferencing application, you need hardware support to get timer support, but that's possible in many ways. Asterisk works well as a VOIP and voicemail server with SIP, MGCP, IAX and H.323 support both with and without PSTN connectivity.
- Where do I find a graphical user interface for Asterisk?
- There are a couple of them, depending on what you want to do, manage your installation, have a user interface or configure the software. Check the Asterisk gui page.
- How do I fax over IP?
- To forward a FAX call over IP, you need a codec that transports the media stream without loss. Do not try GSM or any other lossy codec. With the proper codec, you can connect your fax machine to an Asterisk server and receive incoming faxes from another server's phone line. See Asterisk fax for more information.
- What does this RFC3389 error message in the CLI/my log try to tell me?
- This RFC refers to silence suppression. For example X-Lite has a configuration setting called "Transmit silence" where the behaviour can be controlled by the user. Anyway, Asterisk is complaining about silence supression. It's a harmless message, but if you can turn off silence suppression in your SIP client the message will go away. Related keywords are "VAD" and "comfort noise".
- Explain the warning "Maximum retries exceeded on call ... for seqno ..."!
- Most likely you have a SIP client behind NAT that is trying to communicate with Asterisk without having the "nat=yes" setting in place in sip.conf. Another cause for this could be related to a user device that has an sip entry but has been physically removed (switched off or LAN-disconnected). Asterisk still thinks connected - include AbsoluteTimeout() in extensions.conf to at least limit this. See also bug 207
- Asterisk doesn't notice when an outside caller hangs up!
- See Disconnect Supervision.
- I receive messages like
- "Unable to find a path from GSM to G729A". What could be wrong?: G.729 is licensed. See Asterisk G.729.
- How do I dial from the CLI?
- you'll need chan_oss for that. chan_oss provides a "dial" command form the CLI that literally connects the soundcard (via chan_oss) to the outgoing line. By including the module chan_oss, you'll find a new "dial" command on the CLI.
Application problems
- Why doesn't conference YYYY work in MeetMe?
- If you define new conferences in meetme.conf you need to restart Asterisk, not only reload configuration. Also, MeetMe conferencing needs support of a zaptel timer to work, otherwise you'll get the error message "this is not a valid conference number" even if you have configured everything correct. Also, make sure you have at least one blank line at the bottom of your meetme.conf.
- Error in MusicOnHold - Warning, flexibel rate not heavily tested!
- This warning is coming from the coding of your MP3 music. Variable bitrate is not supported by Asterisk, so use your favorite MP3 editing tool and convert the file to constant bitrate encoding.
- Why don't I get any Caller IDs?
- In some PSTN connections, you have to subscribe to CALLER ID from the telco. In other cases, the caller id is delivered between the first and second ring, so start by waiting a while before answering, i.e. exten => s, 1, wait(2), exten => s, 2, answer
- Why is the sound jittery when running Asterisk and the X Window System?
- X Windows (KDE/Gnome) is very resource-intensive and competes with Asterisk for system resources. The only way to solve this is to disable X on your Asterisk PBX Server. You may also experience sound jitter when using the virtual frame buffer in text mode.
- How do I dial out from an application?
- You can make Asterisk dial out on a trigger from a third party application or an AGI script in Asterisk. Check Asterisk auto-dial out.
Third party software
- Do I need XXX or YYY to run Asterisk?
- Theres a list of some third party software on the Asterisk page. In short: Festival, sendmail, MySQL, PostgreSQL, UnixODBC, mpg123 and Speex. None of these is a requirement, unless you use Asterisk applications that need these in your dial plan.
- Why is the Mysql support missing?
- Due to a licensing change by Mysql AB, the Mysql support had to be taken out of the standard distribution. It's still available under GPL license in the Asterisk-addons Asterisk cvs. The standard distribution supports PostgreSQL.
The IAX protocol
- Why invent a new protocol, instead of using standard protocols?
- Asterisk supports many standard protocols. This said, the IAX protocol has many features missing in others. NAT traversal, dynamic line trunking and other features making it an ideal solution for PBX to PBX connectivity. See IAX for more information.
- What version of IAX should I use?
- The IAX version 1 protocol is now considered obsolete, so please use IAX2 for new installations. IAXTEL is now using IAX version 2 only, as will other providers.
SIP connectivity
- Is Asterisk a full fledged SIP Proxy Server?
- Well. Not really. It's a SIP client, connecting to other SIP proxies. It's also a very good SIP Server, letting SIP clients connect to Asterisk to receive and set up calls, transfer calls, participate in conferences and much more. As of conforming to the SIP RFC, Asterisk does not support SIP over TCP or SIP over SSL/TCP yet. See Asterisk SIP channels and Asterisk SIP not-proxy for more information.
- Why does DTMFmode inband not work?
- Inband DTMF only works when you use a 64K encoding scheme, like G711. See DTMF, SIP DTMF signalling, Asterisk SIP channels
- Can Asterisk handle multiple SIP registrations?
- Asterisk only handles one registration per SIP peer in Asterisk config sip.conf. If you want multiple SIP devices for a user, add more peers and change the dial plan to call more devices when calling the user's extension. Check the syntax dial(SIP/BrianPhone1&SIP/BrianPhone2) of the Dial application.
H.323 connectivity
- What do i need to get H.323 support in Asterisk?
- There are two different H.323 implementations for Asterisk and this sometimes creates a bit confusion.
- asterisk-oh323: (See Asterisk oh323 channels) The first implementation was asterisk-oh323. This driver uses the RTP/RTCP stack and the adaptive jitter buffer implementation of OpenH323.
- asterisk-h323: (See Asterisk H323 channels) The other implementation is the h.323 channel driver by Jeremy McNamara. It uses the Asterisk RTP stack instead of the pseudo soundcard idea of the initial driver.
Open source or not
- Can I sell Asterisk?
- Yes, The Open Source GPL license gives you that right, provided that you make available all changes/additions to the Asterisk source code. If that is not acceptable to you, Digium, the company behind Asterisk, can provide you with an alternative license.
VOIP Providers and Asterisk
- How do I connect my Asterisk PBX to a VSP (VoIP Service Provider)?
- It depends upon the VSP. Some providers support SIP, others support H.323 or IAX. For examples, please read Asterisk How to connect to FWD, Asterisk voicepulse connect. To find VSPs, check VoIP Service Providers. The VSPs that support IAX are also listed on the IAX page.
Operating system and hardware support
- Does Asterisk work on the XXX or YYY Linux Distribution?
- See Asterisk OS Platforms. In addition to Linux, Asterisk works on FreeBSD, OpenBSD, and Macintosh OS X. On these alternative systems, however, the Digium hardware is not fully supported, although there is work being done on FreeBSD and OS X
- Which Linux distribution should I choose for Asterisk?
- There is no best distribution. There are no fundamental differences in functionality or behaviour between Linux distributions like there are between versions of Windows. Pick whichever one you feel most comfortable with.
VoIP phone support
- Does Asterisk support the YYYY phone?
- See Asterisk phones for a list of hard- and software phones that are known to work with Asterisk. There are possibly many more phones and devices that work, since Asterisk supports Open standard protocols for VOIP connectivity.
- What kind of hardware works with Asterisk?
- See Asterisk hardware for a list of hardware that is known to work (or not work) with Asterisk. For example configurations, see Asterisk hardware recommendations.
- Can i install Asterisk on a beowulf cluster?
- A cluster can't migrate threads that use shared memory. Asterisk uses that kind of threads.So no, Asterisk wouldn't work on a cluster. (It might be helpful to know whether anyone has a working load-balanced Asterisk configuration where multiple systems can share the load of an Asterisk environment (IAX2, not SIP) and whether this environment would fail over nicely in the event of downtime!)
Compiling Asterisk
- The Makefile seems wrong, I get a lot of errors!
- You may not be running GNU Make. On FreeBSD systems, try with gmake. On Linux systems, please download the GNU Make for your distribution. In some cases, your CVS update may have garbled the file. Remove the Makefile, do a new CVS checkout and try again.
- The version date is old, even though I did a fresh checkout. What's wrong?
- The best way to do a fresh checkout is to move the source directory to another name, like asterisk.20031213. Then do a new checkout. If you remove all files in your source directory, don't forget the files that has got names starting with a dot, like .version. This is the file that keeps the latest date when you run an update with make update in the source directory.
Welcome to all of you in the world of TRIN TRIN , I mean to say in the world of new advance telecom technology.
Telephony is generally regarded as a mission critical business service, and any downtime can be costly in terms of lost productivity and lost business: Most companies want their phones to be a dial-tone service. And since the PBX is the heart of a corporate telephone system, you'd imagine it would not be something that the company would want to scrimp and save on. No one ever got fired, in other words, for buying a Cisco PBX. Which is why the Asterisk open source PBX is quite surprising. Running on Linux on standard PC hardware with suitable PCI interface cards, it works as a PBX with extra telephony features like voice mail and conferencing, working with analog phones and standards-based IP phones for VoIP telephony
I am working on telecom technology from last 14 years in which 7 years on Asterisk. when i entered in this technology it is totally based on hardware switches, day by day it changed from hardware to software switches, thanks to Mark Spencer who designed such a wonderful technology by the name of Asterisk . This technology help the telecom engineers to design hybrid solution with worlds most advanced features.
In my entire professional life i designed more then 340 working units with a capacity of 500 users in one location. On asterisk server we catered more then 60,000 calls a day with Inbound and Outbound features.
System designed on Asterisk server is more flexible then traditional system at lower cost. If we look into the entire system there is no limitation of designing the hybrid solution in other words sky is limit for telecom engineers who use asterisk solution.
Be a part of Asterisk community to provide the best Technology for Telecommunication.
Thanks
Anil Kappal
Telcom Consultant
General commands
- !
: Executes a given shell command - abort halt: Cancel a running halt
- add extension: Add new extension into context
- add ignorepat: Add new ignore pattern
- add indication: Add the given indication to the country
- debug channel: Enable debugging on a channel
- dont include: Remove a specified include from context
- help: Display help list, or specific help on a command
- include context: Include context in other context
- load: Load a dynamic module by name
- Asterisk cli logger reload: Reopen log files. Use after rotating the log files.
- no debug channel: Disable debugging on a channel
- originate: originate a call.
- remove extension: Remove a specified extension
- remove ignorepat: Remove ignore pattern from context
- remove indication: Remove the given indication from the country
- set verbose: Set level of verboseness
- show agents: Show status of agents
- show applications: Shows registered applications
- show application: Describe a specific application
- show channel: Display information on a specific channel
- show channels: Display information on channels
- show codecs: Display information on codecs
- show conferences: Show status of Asterisk conferences
- show dialplan: Show dialplan
- show hints: Show registered hints
- show image formats: Displays image formats
- show indications: Show a list of all country/indications
- show locals: Show status of local channels
- show manager command: Show manager commands
- show manager connect: Show connected manager users
- show parkedcalls: Lists parked calls
- show queues: Show status of Asterisk queues, see details
- show switches: Show alternative switches
- show translation: Display translation matrix
- soft hangup: Request a hangup on a given channel - in Asterisk 1.6.2: "channel request hangup
" - show voicemail users: List defined voicemail boxes
- show voicemail zones: List zone message formats
- devstate change: Change state of a custom device (new in Asterisk 1.6.0)
Server management
- restart gracefully: Restart Asterisk gracefully, i.e. stop receiving new calls and restart at empty call volume
- restart now: Restart Asterisk immediately
- restart when convenient: Restart Asterisk at empty call volume
Note for Asterisk 1.2: Restart now is like a reload, not a real restart it just run the reload routines (thus open ports are not closed). Often you don't need really need to restart asterisk, instead just need to issue e.g. 'unload chan_sip.so' and 'load chan_sip.so'.
- reload: Reload configuration
- stop gracefully: Gracefully shut down Asterisk, i.e. stop receiving new calls and shut down at empty call volume
- stop now: Shut down Asterisk imediately
- stop when convenient: Shut down Asterisk at empty call volume
- Asterisk cli dialplan reload: Reload extensions and only extensions (formerly extensions reload)
- unload: Unload a dynamic module by name
- show modules: List modules and info about them
- show uptime: Show uptime information
- show version: Display Asterisk version info
GI commands
- show agi: Show AGI commands or specific help
- dump agihtml: Dumps a list of agi command in html format
Database handling commands
- database del: Removes database key/value
- database deltree: Removes database keytree/values
- database get: Gets database value
- database put: Adds/updates database value
- database show: Shows database contents
- database showkey: Shows database contents: An alternative to showing keys by family with database show, this command shows all the families with a particular key
IAX Channel commands
- iax2 debug: Enable IAX debugging
- iax2 no debug: Disable IAX debugging
- iax2 set jitter: Sets IAX jitter buffer
- iax2 show cache: Display IAX cached dialplan
- iax2 show channels: Show active IAX channels
- iax2 show netstats: Show network and jitter buffer statistics for active IAX calls
- iax2 show peers: Show defined IAX peers
- iax2 show registry: Show IAX registration status
- iax2 show stats: Display IAX statistics
- iax2 show users: Show defined IAX users
- iax2 trunk debug: Request IAX trunk debug
- iax debug: Enable IAX debugging
- iax no debug: Disable IAX debugging
- iax set jitter: Sets IAX jitter buffer
- iax show cache: Display IAX cached dialplan
- iax show channels: Show active IAX channels
- iax show peers: Show defined IAX peers
- iax show registry: Show IAX registration status
- iax show stats: Display IAX statistics
- iax show users: Show defined IAX users
- init keys: Initialize RSA key passcodes
- show keys: Displays RSA key information
H323 channel commands
- h.323 debug: Enable chan_h323 debug
- h.323 gk cycle: Manually re-register with the Gatekeper
- h.323 hangup: Manually try to hang up a call
- h.323 no debug: Disable chan_h323 debug
- h.323 no trace: Disable H.323 Stack Tracing
- h.323 show codecs: Show enabled codecs
- h.323 show tokens: Manually try to hang up a call
- h.323 trace: Enable H.323 Stack Tracing
SIP channel commands
- sip debug: Enable SIP debugging
- sip no debug: Disable SIP debugging
- sip reload: Reload sip.conf (added after 0.7.1 on 2004-01-23)
- sip show channels: Show active SIP channels
- sip show channel: Show detailed SIP channel info
- sip show inuse: List all inuse/limit
- sip show peers: Show defined SIP peers (clients that register to your Asterisk server), see details here
- sip show registry: Show SIP registration status (when Asterisk registers as a client to a SIP Proxy)
- sip show subscriptions: Lists all sip presence (busy lamp indication) subscriptions
- sip show users: Show defined SIP users
Zap channel commands
- zap destroy channel: Destroy a channel
- zap show channels: Show active zapata channels
- zap show channel: Show information on a channel
- zap show status: lists all the Zaptel spans. A span will apear here whether or not its channels are configured with chan_zap.
- zap show cadences: Show the configured ring cadences (available e.g with Zap/1r2).
- zap set swgain(<= 1.6): set the (software) gain for a hannel. Temporary equivalents of rxgain and txgain in zapata.conf.
- zap set hwgain(<=1.6): set the hardware gain for channels that support it.
- zap set dnd(<=1.6) set a channel's do-not-disturb mode on or off.
The following commands are available if the channel is built with support for libpri:
- pri debug span: Enables PRI debugging on a span
- pri intense debug span: Enables REALLY INTENSE PRI debugging
- pri no debug span: Disables PRI debugging on a span
- pri show spans: List spans and their status.
- pri show span: Information about a span.
- pri show debug: show where debug is enabled.
See section 3 of AT&T tr41459_99 to better understand what the output generated by the pri debug command means.
Bristuff adds bri debug which is an alias for pri debug.
TODO: SS7 support in 1.6.
Console channel commands
- dial : Dials the given extension, if specified, from the console. Can be used to initiate a call, or to dial digits during an existing call.
- Asterisk CLI answer: Answer a call if one is currently ringing on the console.
- Asterisk CLI hangup: Hangup the call if there is currently one on the console.
Asterisk channel MGCP commands
- mgcp audit endpoint: Audit specified MGCP endpoint
- mgcp debug: Enable MGCP debugging
- mgcp no debug: Disable MGCP debugging
- mgcp show endpoints: Show defined MGCP endpoints
skinny channel commands
- skinny debug: Enable Skinny debugging
- skinny no debug: Disable Skinny debugging
- skinny show lines: Show defined Skinny lines per device
Asterisk channel CAPI commands
- capi debug: Enable CAPI debugging
- capi no debug: Disable CAPI debugging
- capi info: Show CAPI info
Sirrix ISDN channel commands
- srx reload: Reload channel driver configuration; active calls are not being terminated!
- srx show ccmsgs: Disable / enable output of incoming callcontrol messages.
- srx show chans: Show info about B-Channels
- srx show globals: Show info about global settings
- srx show groups: Show info about configured groups
- srx show layers: Show info about ISDN stack (Layer 1, 2, 3)
- srx show sxpvts: Show private info about active channels
- srx show timers: Show info about running timers
Installation of Asterisk:
Asterisk Used three main packages:
1. Asterisk
2. Zaptel
3. libpri
If only looking for pure VoIP network, then only asterisk packages in required.
Compile requirement:
1. gcc,gcc-c++
2. C,C++ development library
3. Kernel Sources
4. Kernel headers
5. bison,bison-devel
6. libnewt,libnewt-devel
7. zlib,zlib-devel
8. openssl,openssl-devel,libssl-devel
Download Source:
# cd /usr/src
# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-1.6.2.*.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.2.*.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/zaptel/zaptel-1.4.12.*.tar.gz
# wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.10.*.tar.gz
Extract the Source Code:
# tar -xzvf zaptel-1.4.12.*.tar.gz
# tar -xzvf asterisk-1.6.2.*.tar.gz
# tar -xzvf asterisk-addons-1.6.2.*.tar.gz
# tar -xzvf libpri-1.4.10.*.tar.gz
Compile libpri
# cd /usr/src/libpri-version && make && make install
libpri is used by many manufacturer of PCI TDM Cards it is always safe to compile it even if card is not installed/used.
Compile Zaptel:
# cd /usr/src/zaptel-version && ./configure --prefix=/usr && make && make install && make config
make config install some tools:
$ ztcfg : reads the config in /etc/zaptel.conf to configure the Hardware.
$ zttool : for monitoring installed hardware
$ ztmonitor : for monitoring active calls
$ zttest: testing the latency and accuracy of Card.
$ ztscan : Print Configuration of Zaptel Spans.
Configuring /etc/zaptel.conf
span=1,1,0,ccs,hdb3,crc4
bchan=1-15,17-31
dchan=16
span=2,2,0,ccs,hdb3,crc4
bchan=32-46,48-62
dchan=47
span=3,3,0,ccs,hdb3,crc4
bchan=63-77,79-93
dchan=78
span=4,4,0,ccs,hdb3,crc4
bchan=94-108,110-124
dchan=109
Compile Asterisk:
# cd /usr/src/asterisk-version && ./configure && make && make install && make samples
Asterisk File Locations:
* /etc/asterisk/ --> Asterisk configuration files directory
* /usr/lib/asterisk/modules/ --> all loadable modules: codecs, channels, formats etc.
* /var/lib/asterisk/ --> contains astdb , sounds, firmware, images and keys.
* /var/spool/asterisk/ --> temporary files and voicemails
* /var/run/ --> contains process Id of running prcess including Asterisk.
* /var/log/asterisk/ --> Asterisk log files
* /var/log/asterisk/cdr-csv/ --> Asterisk call details records
Asterisk Basics:
Asterisk is a Hybrid TDM and packet voice PBX.
Interface any piece of telephony hardware or software to any telephony application.
Prime components: channels and /etc/asterisk/extensions.conf - the Asterisk dial plan.
Channels can be many different technologies - SIP,IAX,H323,Skinny,Zaptel etc.
extensions.conf is powerful programming language controlling the flow of the call.
Application do the work - answering channels , ringing a channels , providing a voicemail system etc.
Telephony Hardware:
Digium makes several digital and analog PCI Cards.
* T/E1 single to quad span card.
* FXO and FXS interface upto 24 ports.
* One port FXO Card - PCI Intel Winmodem.
* plus the usual array of SIP and IAX Phones and analouge apapters.(ATAs)
* Even Interface to proprietary digital key phones are available.
Asterisk is released as open source under the GNU General Public License (GPL), and it is available for download free of charge. Asterisk® is the leading open source telephony project and the Asterisk community has been ranked as a key factor in the growth of VoIP.
What Does Asterisk Do?
Asterisk is like an erector set or a box of Legos for people who want to create communications applications. That's why we refer to it as a "tool-kit" or "development platform". Asterisk includes all the building blocks needed to create a PBX system, an IVR system or virtually any other kind of communications solution. The "blocks" in the kit include:- Drivers for various VoIP protocols.
- Drivers for PSTN interface cards and devices.
- Routing and call handling for incoming calls.
- Outbound call generation and routing.
- Media management functions (record, play, generate tone, etc.).
- Call detail recording for accounting and billing.
- Transcoding (conversion from one media format to another).
- Protocol conversion (conversion from one protocol to another).
- Database integration for accessing information on relational databases.
- Web services integration for accessing data using standard internet protocols.
- LDAP integration for accessing corporate directory systems.
- Single and mult-party call bridging.
- Call recording and monitoring functions.
- Integrated "Dialplan" scripting language for call processing.
- External call management in any programming or scripting language through Asterisk Gateway Interface (AGI)
- Event notification and CTI integration via the Asterisk Manager Interface (AMI).
- Speech synthesis (aka "text-to-speech") in various languages and dialects using third party engines.
- Speech recognition in various languages using third party recognition engines.
This combination of components allows an integrator or developer to quickly create voice-enabled applications. The open nature of Asterisk means that there is no fixed limit on what it can be made to do. Asterisk integrators have built everything from very small IP PBX systems to massive carrier media servers.
Asterisk As A PBX
Asterisk can be configured as the core of an IP or hybrid PBX, switching calls, managing routes, enabling features, and connecting callers with the outside world over IP, analog (POTS), and digital (T1/E1) connections.Asterisk runs on a wide variety of operating systems including Linux, Mac OS X, OpenBSD, FreeBSD and Sun Solaris and provides all of the features you would expect from a PBX including many advanced features that are often associated with high end (and high cost) proprietary PBXs. Asterisk's architecture is designed for maximum flexibility and supports Voice over IP in many protocols, and can interoperate with almost all standards-based telephony equipment using relatively inexpensive hardware.
Asterisk As A Gateway
It can also be built out as the heart of a media gateway, bridging the legacy PSTN to the expanding world of IP telephony. Asterisk’s modular architecture allows it to convert between a wide range of communications protocols and media codecs. Asterisk as a feature/media server.Need an IVR? Asterisk’s got you covered. How about a conference bridge? Yep. It’s in there. What about an automated attendant? Asterisk does that too. How about a replacement for your aging legacy voicemail system? Can do. Unified messaging? No problem. Need a telephony interface for your web site? Ok.
Asterisk In The Call Center
Asterisk has been adopted by call centers around the world based on its flexibility. Call center and contact center developers have built complete ACD systems based on Asterisk. Asterisk has also added new life to existing call center solutions by adding remote IP agent capabilities, advanced skills-based routing, predictive and bulk dialing, and more.Asterisk In The Public Network
Internet Telephony Service Providers (ITSPs), competitive local exchange carriers (CLECS) and even first-tier incumbents have discovered the power of open source communications with Asterisk. Feature servers, hosted services clusters, voicemail systems, pre-paid calling solutions, all based on Asterisk have helped reduce costs and enabled flexibility.Asterisk Everywhere
Asterisk has become the basis for thousands of communications solutions. If you need to communicate, Asterisk is your answer.The Voice over Internet Protocol (VoIP) specifies the transmission and reception of audio over the Internet. A connection between caller and call recipient is established using the Session Initiation Protocol (SIP). SIP has many functions, including negotiating the codecs used during the call, transferring calls, and terminating calls.
During a peer-to-peer call, VoIP phones communicate directly over IP and stream audio directly. However, analog phones and cellular phones cannot use SIP and peer-to-peer calling. Many VoIP deployments use an Internet Protocol Private Branch Exchange (IP PBX) to serve as a bridge between a phone using IP-based calling and the Public Switched Telephone Network (PSTN). Analog phones and cell phones can connect to the PSTN. By routing the audio from a VoIP phone through an IP PBX and the PSTN, a VoIP phone can establish a call with an analog or cellular phone.