Asterisk Open-Source PBX System
The next file is voicemail.conf (Listing 3). Again, it has a general section that deals with general or global parameters for voice mail. The first parameter, format, lists the audio format of the messages. The next two parameters are used for e-mail notification: serveremail is the source e-mail address (from field), and attach instructs Asterisk to attach the message to the e-mail. In our example, we do not want the message attached. Again, some parameters have been omitted.
<mbox> is the number used to save and access messages for the user. This is also used in extensions.conf for directing the call flow to the proper voice-mail box. The <passwd> parameter is needed when checking messages. <name> is the name of the user. <email> and <pager> are e-mail addresses that are used to send message notifications. The pager e-mail has a shorter message, because it needs to be read on smaller devices (pagers and cell phones). Many mobile and pager providers have e-mail gateways that can deliver the message to the device.
Listing 3. Voicemail.conf File
[general] format=gsm|wav49|wav serveremail=asterisk attach=no maxmessage=180 maxgreet=60 ; ; Voicemail box definitions. ; mbox# => password,name,email,pager/mobile ; [cg1] 111 => 1111,Brett,brett_schwarz@yahoo.com 222 => 2222,Maria,maria@foo.com,4255551212@mob.net
The last file that we examine here is the extensions.conf file (Listing 4). This is one of the most involved files because it contains the dialplan. The dialplan in my example is rather simple compared to its capabilities. This file has a general and global section. The general section is similar to the general section in the previous files; it defines general parameters. I don't define any general parameters in this example. The global section is used to define global variables. These variables can be accessed in the dialplan by using the syntax ${VARIABLE}. I have defined one variable: TIMEOUT is the answer timeout. Built-in variables also can be used within the dialplan, such as, CONTEXT, EXTEN and CALLERID.
Listing 4. extensions.conf File
[globals]
TIMEOUT=12
[misc]
exten => t,1,PlayBack(timeout)
exten => t,2,Hangup()
exten => i,1,PlayBack(invalid)
exten => i,2,Hangup()
; voicemail management
[voicemail]
include => misc
exten => 6245,1,VoiceMailMain2()
exten => 6245,2,Hangup
[iax]
include => misc
exten => 111/222,1,SetCIDName("it's your wife!")
exten => 111/222,2,agi(callerid.agi)
exten => 111/222,3,Dial(IAX/brett/s,${TIMEOUT})
exten => 111/222,4,Voicemail2(111)
exten => 111,1,agi(callerid.agi)
exten => 111,2,Dial(IAX/brett/s,${TIMEOUT})
exten => 111,3,Voicemail2(111)
exten => 222,1,Dial(IAX/maria/s,${TIMEOUT})
exten => 222,2,Voicemail2(222)
exten => maria,1,Goto(iax,222,1)
exten => 333,1,Dial(IAX/niko/s,${TIMEOUT})
[afterhours]
include => misc
exten => _.,1,Wait(1)
exten => _.,2,Answer
exten => _.,3,Background(vm-menu)
exten => 1,1,Voicemail2(111)
exten => 2,1,Voicemail2(222)
exten => 3,1,Voicemail2(333)
[cg1]
include => iax
include => voicemail
[cg2]
include => afterhours|1:00-6:00|*|*|*
include => iax
All of the other sections are context definitions. A context is simply a grouping of digit patterns. Here I have defined several contexts that define dialing scenarios: voicemail, iax and afterhours. Think of these as individual or mini-dialplans. I then define two contexts that I assign to the users. These inherit the capabilities of the other contexts I already have defined by using the include keyword.
The first context, voicemail, lists the digit patterns that allow users to access their voice-mail messages. Users can dial 6245, and the application VoicemailMain2 prompts them for the mailbox number and password. Users then can manage (listen to, delete and so on) the messages in their mailbox.
The iax context is used for PBX dialing between IAX users. We have defined various extensions for each of the users. An entry with the name of the user (maria) redirects to the extension number entry. For the 111 extension, I also match on callerid. If the callerid matches, I change the callerid name so it has a relative meaning. For example, if the extension dialed is 111, and the callerid is 222, the callerid name is changed to “it's your wife!”. This message shows up on my client whenever my wife calls me (I won't get into how I use this to my advantage).
The last digit pattern context is used for calls that arrive during late hours. Because I don't want to be disturbed at night by external users, I match on any dialed number (_.). It waits for one second and then answers the call. After it answers, it plays a background message so the caller can choose for which person to leave a message (“for brett, press 1”). So, if the caller presses 1, the call proceeds to the 1,1,Voicemail2(111) entry, which sends the user to the 111 mailbox. This is a simple illustration of how you could construct an IVR system.
The [cg1] and [cg2] contexts include functionality I already have defined inside other contexts. This allows me to create different user groups easily. For example, [cg1] has all of the capabilities I have defined, but [cg2] has only the iax capabilities and gets directed to voice mail during late hours. Powerful dialing capabilities can be constructed by utilizing the flexibility of Asterisk's dialplan. My example has shown only a glimpse of the possibilities. You also can simplify the dialplan by using macros, but I leave that as an exercise for the reader.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Linux Systems Administrator
- New Products
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Favorite (and easily brute-forced) pw's
1 hour 29 min ago - Have you tried Boxen? It's a
7 hours 21 min ago - seo services in india
11 hours 53 min ago - For KDE install kio-mtp
11 hours 54 min ago - Evernote is much more...
13 hours 54 min ago - Reply to comment | Linux Journal
22 hours 39 min ago - Dynamic DNS
23 hours 13 min ago - Reply to comment | Linux Journal
1 day 12 min ago - Reply to comment | Linux Journal
1 day 1 hour ago - Not free anymore
1 day 5 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
German Book to Asterisk: "Der Weg zu VoIP Asterisk von A bis Z"
Buch Bekanntmachung: Der Weg zu VoIP Asterisk von A bis Z
For english see bellow.
Als ich Oktober 2005 angefangen habe mit Asterisk zu arbeiten, gab es nur wenig zusammenhängende Informationen zu Asterisk. Es gab bereits ein Buch zu Asterisk, jedoch wurden dort einige Themen ausgelassen. Auch im neuen Asterisk von Oreilly wird nur Asterisk besprochen, jedoch nicht auf Telefonkarten, VoIP Telefone, Zusatzprogramme eingegangen.
Der Buch Inhalt ist auf die deutschsprachigen Länder, Deutschland, Österreich, Schweiz, bezogen.
Das Buch "Der Weg zu VoIP Asterisk von A bis Z" beschreibt nicht nur Asterisk sondern auch alles Dinge,
welche mit Asterisk verwendet werden können. Hier einige Beispiele aus dem Buchinhalt.
- Einführung in Asterisk
- Benötigte Hardware für Asterisk
- Asterisk installation
-- Das erste Gespräch
-- Echo Call test
-- die sprechende Uhr
- die Konfigurationsdateien
- Sicherheit
- Anrufbeantworter
- Sprachausgabe auf deutsch wechseln
- makeln, weiterleiten
- Music on Hold
- Automatisch weiterleiten
- PSTN(POTS) integration
- ISDN integration
- SIP Telefone
- Sprachcodecs
- Asterisk Konfigurationsprogramme
- Asterisk und Billing
- Rollout in einem Unternehmen
- Alternativen zu Asterisk
- VoIP Protokolle
- ...
Das Buch ist bereits teilweise frei erhältlich im Internet verfügbar.
Die ersten 30 Seiten finden man jetzt schon unter http://www.suvi.org/theory/asterisk.html
Jede Woche, oder beim Verkauf eines Buch Exemplares, wird eine Seite freigegeben. Das Buch wird also Zeit abhängig freigegeben. Zudem unterstützt man mit dem Kauf des Buches die freie Erhältlichkeit des Buches.
Das Buch hat rund 243 Seiten und kann unter https://www.lulu.com/commerce/index.php?fBuyContent=359309 bezogen werden.
Gruss
Silvio
Book announcement: Der Weg zu VoIP Asterisk von A bis Z
First at all: The book is only aviable in the german language. The book does describe Asterisk as well as things that are usefull for Asterisk: VoIP-Telefons, Configuration Software, Billing Software, Telefonycards, ...
The book content is sutiable for the german speaking countries: Germany, Austria and Switzerland.
Parts of the book are allready free avialbe on the internet.
The first 30 pages can be found at http://www.suvi.org/theory/asterisk.html
Everyweek, and if someone buys the book, one page more will be free aviable. With the buy of the book the freedom of the book is supported.
The book has 244 pages and can be bought at https://www.lulu.com/commerce/index.php?fBuyContent=359309
Best Regards
Silvio
Asterisk Connects wtih GoogleTalk
New project is underway to connect GoogleTalk/Jabber with Asterisk. Delivery date and details can be seen here: http://www.networkingpipeline.com/blog/archives/2006/04/asterisk_server....
Faxing with Asterisk using AsterFax
You can also fax with Asterisk using AsterFax which is an email to Fax gateway.
And you plug it in...
...to the Verizon rj11 jack on the wall!
Or you use the magical wireless connectivity available only in the author's town.
Very technical, very specific article. How about a followup that dumbs it down just a bit, such as, you connect the Digium PCI card to your network, this is how much upload speed you'll need per line, you find a voip carrier by looking for this service (sip...) You can/can't have branch offices with the same number and transfer calls across the city/town with call transfer...
I know someone stuck on Vonage's two line SB plan, who is looking for something cheap, where he can migrate his number to something like Broadvoice or some other service, and have one or two (or more) voice lines, plus a fax line like through Vonage. Number portability takes care of the original number, but the technical details on using Asterisk with a carrier to replace Vonage (or Broadvoice which has their own adapters like Vonage, or bring your own adapter) still isn't clear.
What exactly needs to be done to migrate from Vonage Voip to Asterisk, where I can get one voice and one fax (or actually 2 voice lines) which actually has functional call "hunting" for each voice line? Who do I call to order the service, once I have a dedicated box for Asterisk and Digium modems? Unless the cost comes in less than either Vonage for two lines, or Broadvoice or other Voip for multiple single lines, what's the point besides the geek factor? Using call forwarding on busy with multiple single lines, you get all the benefits of all the other services, without worrying about another point of failure in the hardware, a huge UPS for a computer vs. a UPS for a few phone adapters, plus the cost of electricity of running that computer 24/7 every month.
While the technical details are nice, the major part of the story, the connection explanation/possibilities as compared to something like Vonage/Broadvoice so one can fully understand what/why is missing. The technical details would be a nice addition, but I doubt that most post-purchase users are going to use this article for relying on their phone system when the mailing list for Asterisk and the abundant docs online are all available and will be utilized anyway.
Good technical explanation, but the article misses the mark. Thanks for the article anyway.
Asterisk Rapid Installation
Xorcom has released version 0.9 of Debian and Asterisk auto-installer. It can turn any PC to pre-configured PBX from scratch in a few minutes, and contains lots of extra software and features. It is free and open source.
Asterisk auto-install CD
Eran Gal
Xorcom Ltd
Asterisk Solutions
Re: Asterisk Open-Source PBX System
callerid example is wrong
Should be:
[brett]
type=friend
host=dynamic
secret=brettsecret
context=cg1
callerid="brett"
Re: Asterisk Open-Source PBX System
good catch, although in the context of what I was doing, it wouldn't really have any affect. Technically, I should have had:
callerid="brett"
Re: Asterisk Open-Source PBX System
Or, even more technically correct would be:
callerid="brett"
This sets the CALLERIDNAME variable to brett and the CALLERIDNUM variable to 111 (referencing the whole callerid with CALLERID) if required... (look in Readme.variables for other interesting stuff)
Andy
Re: Asterisk Open-Source PBX System
ok, that didn't work it (it was stripped out...) should be
callerid="brett"
Perhaps you mean...
Do you mean like this?
callerid="brett"<111>
Re: Asterisk Open-Source PBX System
ok, I'm just about to give up on this stupid filtering!
callerid = "brett" less-than-sign 111 greater-than-sign
replace the 'less-than-sign ' with 'shift ,' and greater-than-sign 'shift .'
or look at http://www.automated.it/guidetoasterisk.htm
Andy
Re: Asterisk Open-Source PBX System
right...I think the filtering was messing everyone up...thanks
Re: Asterisk Open-Source PBX System
where is callerid.agi?
cant find it :(
Re: Asterisk Open-Source PBX System
it's on my website: http://www.bschwarz.com/asterisk/
Re: Asterisk Open-Source PBX System
callerid="brett"