Home » Technology » Apple & Macs » Introducing Version 3 of the Plug-and-Play Asterisk IP PBX for the Intel Mac

The Most Versatile VoIP Provider: FREE PORTING

Introducing Version 3 of the Plug-and-Play Asterisk IP PBX for the Intel Mac

NOTE: The system referenced in this article is no longer supported by Nerd Vittles as this version of Asterisk® has been phased out. For the latest and greatest, please consider our new PBX in a Flash offering.

We don’t usually write about stuff we haven’t personally tested, but we’re making a partial exception today because we don’t (yet) own an Intel Mac. Donations, anyone? Where were we? Thanks to the work of literally hundreds of developers, there is a terrific Asterisk IP PBX with an incredible array of additional bells and whistles. That product which we have tested extensively is TrixBox 1.2.3. It’s so good, in fact, that we chose it as the base system for all of the Nerd Vittles applications that we write about each week. For Halloween last year, we introduced Version 3 of our Plug-and-Play Asterisk IP PBX for Windows. Then a week later, we showed how to take a standard install of TrixBox 1.2.3 on Linux and NerdVittlize it into the equivalent of our version 3 build for Windows. When you were finished, you had a secure, turnkey Asterisk IP PBX with all of the Nerd Vittles software collection and virtually every mission-critical add-on anyone could ever dream of for a phone system: freePBX, an Apache web server, a SendMail server, PHP, MySQL, WebMin, SugarCRM contact management, FTP and SSH support, Perl, integrated fax-to-email support, calling card billing, and more. And it all runs quite peacefully in a CentOS 4.4 Linux wrapper on either a dedicated Linux machine or on your Windows Desktop.

What was missing unfortunately was a way to run this same system on a Mac. Yes, there’s an Asterisk implementation on the Mac platform. But it’s downright primitive compared with the systems we’ve been writing about for the last 18 months. So today we have not one but two special treats for the Mac enthusiasts of the world. First, it’s now possible to run our standard Version 3 system using the new VMware beta for the Intel Mac. You can download it here (561MB). You’ll also need to install the VMware Fusion beta software on your Intel Mac. Just fill out this form and then download the software. At least the beta is free, and the clients have remained free on other platforms.

Thanks to one of our great contributors, Gillam Hall, there’s now another alternative: a Parallels Desktop image of our Version 3 Asterisk system. You’ll first need to purchase and install Parallels Desktop on your Intel Mac. Parallels Desktop requires Mac OS X 10.4.6 or later. Then you can download the Parallels Desktop image of Version 3 here (535MB).

After installing either VMware Fusion or Parallels Desktop on your Mac, all you need to do is download either our standard VMware Version 3 Build or the new Parallels Version 3 .tar.gz Build, decompress the archived file, and run it in a VMware or Parallels window on your Mac Desktop. Once you get it running, hop over to our Version 3 tutorial for Windows and configure your system. To maximize performance, make sure you also apply the tweaks covered in the Comments to that tutorial. The total setup time is about 30 minutes once you have the download in hand. Enjoy!

What To Do Next. Once your new PBX is humming away, here are the next steps. First, you’ll want to upgrade freePBX to version 2.2.x. The tutorial to walk you through the drill can be found here. Last but not least, you’ll want to apply the latest Asterisk security patches to prevent a denial of service attack on your system. The tutorial for that can be found here.

Securing AsteriDex. Because of a security vulnerability in our very own AsteriDex, you’ll need to download and install this simple patch as well. Log into your Asterisk server as root and issue the following commands:

cd /var/www/html/asteridex
rm -f callboth.php
wget http://nerdvittles.com/trixbox11/callboth.zip
unzip callboth.zip
rm -f callboth.zip
chown asterisk:asterisk callboth.php
chmod 775 callboth.php


  1. Hmm, perfect, I succesfully installed it. But was the root password ? Is there any documentation about this image ? Thank you anyway for the good job.

    [WM: See the comment and our response above. If that doesn’t work, try "abcdef" for the root password. That was in an earlier build that I thought had been fixed. Let me know so we can let others know. Thanks.]

  2. Thanks NV,
    I tried the VMware version on my Intel Mac Mini. Worked perfect. Tested in a real world scenario for a short while. By the way password for root is password, on my version. Link has a tiny report.

  3. Thank you for your answer to my comments.

    The root password is "password" (without quotes obviously). I successfully run the Parallels image, to answer Dave, you have to choose the i386-up kernel (the second one), if you choose the first one Parallels stuck on “Uncompressing Linux….Ok, booting the kernel.”.

    Hope this help. Enjoy your new VoIP system.

  4. If you’ve got the patience you can sucessfully compile Asterisk to run natiivly on the intel mac, im runnung on a MacPro, with freepbx interface, not an easy install by far but great fun doing it.

  5. ok if you go to the asterisk.org site and download the 1.2.15 version ( I havnt tried it with 1.4 yet), make sure youve got all the apple developer tools installed, if not get them of your system dvd. unzip the files you download into /usr/src/asterisk and then fire up terminal.
    in terminal do sudo -s
    and enter your root password, this will save you entering sudo b4 every command.
    now build asterisk with

    cd /usr/src/asterisk
    make clean;make;
    make install;
    make samples

    if all is well asterisk is now built and installed,
    to start it you can use the command line, but i prefer a on/off swith on my desktop and so i use a application called Asterisk Launcher from sunrise.

    That should get you a basic virgin asterisks installed and running you will have to edit the config by hand inless you going to install the freepbx gui.

    if you want to do that to similar steps are involved but before you start create a new user called asterisk on you system and set apache to run as asterisk not as www in the apache httpd.conf file.
    then download freepbx gui copy the files to the websharing folder you want them to be served from, you will need to manually edit the configs of freepbx to point to your folder name and location.
    You will need mysql installed so get the package from marc lineage website as its a nice double-click to install what you need in tiger.
    if you’ve got this far you should now just follow the instructions that come with freepbx to build and install that part of it.

    If you need more help let me know, i’ll try and do a more complete documentation of the process and knock up a webpage with it all on.

  6. Hi Tyler

    thanks for the info.
    I have installed asterisk 1.2.15 following the instructions you provided.
    i am stuck on freepbx install ([FATAL] PEAR must be installed (requires DB.php). Include path: .:)

    I think i will wait for your document
    Thanks in advance

    [WM: Note to everyone else — This is a native install. The VMware and Parallels versions seem to be working just fine.]

  7. ok well pear was a pain, but easiest solution i cam up with was in terminal enter this as sudo
    curl http://go-pear.org | php
    this will download and start the pear installer, again check the paths when in prompts to and point them to where youve installed php.
    Choose yes to install the included pear packages
    when installed is completed in terminal enter:
    pear install DB
    wait for it to download and complete
    then do the ./install_amp but to complete freepbx install
    Im doing a fresh install now on a macpro and documenting as i go…wish me luck

  8. to install asterisk 1.4, i had to download wget. guess i could have linked curl or something. used fink to download and install it.

    tyler, if you get the detailed instructions up here, that would be great.

    Also, i downloaded the VMware beta for mac. running trixbox 2.0 in it. it works, but seems slow. have ethernet set to bridged, and can’t connect to the trixbox from this machine, but can from the g4 400 [which might be why it’s slow?]. anyhow, my imac is a coreduo 2Ghz/2GB ram/256MB video/250GB hd with 10.4.8 server running on it… in case anyone wanted to know.

    a mac version will be out soon enough. as soon as i learn a little more, maybe i’ll push a simple one out ;). Thanks for the info / tips guys.

  9. Tyler,
    If you are still around, i’d be willing to help you write the documentation if you don’t mind sharing some more of what you have done so far.


  10. ok, well i’ve upgraded to asterisk 1.2.17 and freepbx 2.2.2 all seems ok on MAC OS 10.4.10
    have 3 DID’s assigned to it and 4 Aastra SIP phones, also have added mezzo’s app_notify to my setup to display growl notification and ical logging of incomming calls. Docs will come sometime.

  11. ok well have just reinstalled from scratch onto g4 powerbook this time blogged as i went so for those still interested i’ve pasted the entry here until my own blog goes up.

    The Powerbook is a G4 1.67 with 1.5GB of Ram, Tiger 10.4.10 is the installed OS, with the following Apache 2.24 compiled from source to replace Apache 1.3 that apple ship, Mysql 5.0.45 again compiled form source and PHP 5.2.3, also installed / updated are PEAR with DB & Bison. The software as i said was all compiled from source so you can guess that also installed is XCode 2.3. The location that i built the software to install into is usr/local/apache2 & usr/local/mysql and usr/local/apache2/php. Some symbolic links were made to replace the apple versions so that tiger works correctly with them in place and apachectl was also linked to the new apache2 so that i can turn it on and off from web sharing in system preferences.

    Ok so with the base system out of the way here are the steps I used to get Asterisk installed on Mac OS X with the FreePBX GUI.

    These are the versions of the source i got that worked, ive tried older and newer version without success.




    FreePBX 2.2.2

    Expanded the asterisk files into three folders asterisk1217, addons125 and sounds121

    Moved those three folders into /usr/local/sources/asterisk/

    Open up Terminal and sudo -s [Enter Admin Password]

    cd /usr/local/sources/asterisk/asterisk1217

    make install
    make samples

    ok thats got the base asterisk installed now change folders to the addons, so we can cd.. and cd asterisk-addons-125
    folow that with a make
    and then a make install

    and do the same for the sounds
    cd asterisk-sounds-121
    make install

    Ok if thats all done then asterisk is fully installed and ready to go, but we want to add the freePBX GUI to it so its easier to configure. Before I do that i will just quickly fire up asterisk to make sure it loads, so asterisk -vvvvcdgi and i get nice output from asterisk in the terminal as it starts, good, now to shut it down with stop now. Excellent all working so far so good.

    Next up grab the source for freePBX, i got freePBX 2.2.2 as that was the latest version on the site, [ Note to self try FreePBX 2.3 & check for diffs ].

    Now expand the freePBX tar into a /usr/local/sources/freePBX.

    Before installing freePBX we need to prepare the MySQL databases it will require, the two files that have the info we want are in the SQL folder in freePBX folder,
    they are cdr_mysql_table.sql and newinstall.sql

    Ok I have phpmyadmin installed on my setup ( you can do it from the terminal if you want ) and i need to create to mysql databases one called asterisk and one called asteriskcdrdb, so in phpMyAdmin enter asterisk into the create database box and click create, dont worry about making a table yet just return to the index page again and make the next database called asteriskcdrdb

    Next import the data from the two .sql files into the corresponding database, i prefer to do this by running a sql query as sometimes importing files can cause phpmyadmin to hang, to im going to just open the newinstall.sql file in textedit then choose select all and copy, switch over to phpmyadmin and choose the asterisk database with that selected click on the sql tab and paste the content of the newinstall.sql file into the query box, hit go and seconds later you should have 17 or so tables in that database. Now do the same for the cdr-mysql-table.sql file.

    OK return to the index page of phpmyadmin as we now need to set up the correct permissions for those two databases.
    create a user called asterisk with a password of your choice ( the default is AMP109 ) and grant database-specific privileges to databases asterisk and asteriskcdrdb, i also specified only localhost in the hosts allowed to connect, to secure it even further but you may or may not want to do that.

    Now restart mysql.

    OK so nearly ready to install freepbx, but before lets just make a note of some paths we might need, when freepbx installs it will prompt you for the location to various folders such as your httpd docs folder and the cgi-bin folder, now on tiger these are in different locations to most other systems even if your using the apple defaults, [note were using apache2 and thats in a completely different location]

    So my www path is /usr/local/apache2/htdocs/freepbx ( the apple default is /Library/Webserver/Documents )
    my cgi-bin is /usr/local/apache2/cgi-bin ( the apple default is /Library/Webserver/CGI-Executables )
    and i want FOP at /usr/local/apache2/htdocs/freepbx/panel

    If you want your files in a different place or you have installed apache into /opt rather than /usr/local/apache2 you will need to lookup your paths now.

    ok so once you know the paths lets cd to the freepbx source and ./install_amp remember you need to be sudo so if your opening a new terminal window do a sudo -s and enter your password before ./install_amp

    The first question we get asked is for the USERNAME to connect to the asterisk database, just hit enter unless you have changed if to something other than asterisk

    Next enter the password you created if you didnt use the default of AMP109 otherwise just hit enter

    Next just hit enter for the hostname as mysql and asterisk are running on the same machine – obviousaly if this is not the case for you then enter the correct hostname here instead.

    Now for the USERNAME for the Asterisk manager interface just hit enter as were using the default – again if your not change it to what your using.

    And do the same for the PASSWORD for the Asterisk manager interface.

    Now comes the paths to check carefully before hitting enter,
    enter the path for the AMP ( FreePBX ) web-root folder, i choose /usr/local/apache2/htdocs/freepbx as i want a folder called freepbx with all the files in it on my webserver, you can call your folder anything but get the start of the path pointing to the right place or there will be problems.

    Next enter the IP address of the machine, mine has a static address of so i could enter that but im going to enter the localhost address of just incase i want to change my actual ip later. you could also just enter localhost or even powerbook.local or whatever you hostname is.

    Now enter a flash operator panel password or leave it set to the default of passw0rd by hitting enter, i hit enter

    Next hit enter to accept extensions ( this way phones and users are administered from the same page )

    Again hit enter to store the exe’s in the /var/lib/asterisk/bin or change it if you want it elsewhere, again im hitting enter to use the default.

    Do the same for super-user scripts at /usr/local/sbin just hit enter

    FreePBX should now install, there will be a few permission errors at the end of the install but dont panic freepbx is installed and well fix the errors in a moment.

    Ok so in the finder do a get info on your freepbx web root mine is /usr/local/apache2/htdocs/freePBX in the Ownership & Permissions section of the Info window set the Owner to your user accound and set read & write as the Access level, set the Group to WWW and the Access to read & write and set Others to read & write.

    Ok so thats not very secure, but without changing apache to run as a different user and running into a bunch of other problems ( that i’ve experenced over the last year playing with this stuff ) im happy with that as my machine can only be access locally anyway.

    Repeat those permission and owner settings for the following files and folders

    /var/lib/asterisk – and choose Apply to enclosed items at the bottom of the info window

    /var/spool/asterisk – and choose Apply to enclosed items at the bottom of the window


    /etc/asterisk – and choose Apply to enclosed items at the bottom of the windownow in the terminal goto /var/lib/asterisk/bin and chmod 777 *.pl this sets all the perl files to executable, and also chmod 777 retrieve_conf , to make that file executable too.

    /var/lib/asterisk/agi-bin – and chmod 777 dialparties.agi and recordingcheck.agi

    now execute ./retrieve_conf to make those files that the permission was denied for just a moment ago when we ran the install_amp script.

    Now fire it up asterisk -vvvvcgdi

    and in safari http://localhost/freePBX

    So there is only one problem remaining in that clicking the red bar does not reload the configuration file – for some reason retrieve_conf is not being executed so remember to manually run that after making changes in the freePBX interface. when i find a solution to that last problem i will post it here.

    But for now
    Success ! A working system.

  12. OK, so Leopard has arrived, installed yesterday. so now on with Asterisk & FreePBX.
    Here’s the steps needed, these were done with an Erase & Install of Leopard so if youve upgraded from Tiger there may be other probs, but post here and i will try and hep!

    Install Developer Tools & a text editor i choose textwrangler

    Edit /etc/apache2/httpd.conf and remove the # from the line that says LoadModule php5_module

    Install Mysql 5.0.45 from mysql.com ( or compile it if you choose)
    Install mysql startup item – but not the pref pane as its not leopard compatible.

    In terminal open new window and do a sudo -s and enter admin password then do:
    chown -R mysql /usr/local/mysql/data
    echo ‘export PATH=/usr/local/mysql/bin:$PATH’>>~/.bash_profile
    (This adds mysql commands to your prompt)
    mysqld_safe &
    (start up mysql)
    (secure mysql answer the prompts as you desire)

    Download and install phpMyAdmin ( i used version
    Download and install SymbolicLinker.plugin ( this is a contextual menu item – i will post links to my site with all the files req later)

    Setup SSL ( optional – see apple http://developer.apple.com/internet/serverside/modssl.html *** if you do this note that the apple instructions are for Tiger – on Leopard copy the certificates to /etc/apache2/sslkey NOT etc/httpd )

    install pear – (**note its no longer go-pear.php)
    so in terminal do # curl http://pear.php.net/go-pear | php
    and then # pear install DB
    Now make a copy of your php.ini file in /etc/php.ini.defaults called /etc/php.ini
    open this file in textwrangler and change the line include_path to include_path=".:/usr/local/share/pear"
    save the file and restart websharing in system preferences.

    Next download Server Admin tools 10.5 from Apple website and install it.
    Open up workgroup manager and create a group and user called asterisk.

    Download Asterisk 1.2.24, Asterisk addons and asterisk sounds.

    cd to your downloaded asterisk folder
    do a make
    then a make install
    then cd to asterisk addons
    and do a make
    and a make install
    then cd to asterisk sounds
    and do a make install

    Next fix the mysql links that are not quite right, mysql is at /usr/local/mysql/lib but apache is looking for them at /usr/local/mysql/lib/mysql so make a folder called mysql inside /usr/local/mysql/lib and symlink the contents of mysql into it.
    be careful to copy the contents and not the folder or you will double nest it.

    Also the socket for mysql is wrong in apache to, its looking for it at /var/mysql/mysql.sock when infact its been installed at /etc/tmp/mysql.sock so just make a symlink again to that location.

    remove the module res_odbc.so from /usr/lib/asterisk as it causes an error that stops asterisk starting on leopard and were using mysql anyway so we dont need it – (i may look for a solution to this at some time).

    ok so thats got asterisk installed on Leopard,

    fire up asterisk with asterisk vvvvdgi.

    Im of to install freepbx now so i will document that when its done.

  13. ok so on with the Leopard install of freepbx

    The latest version 2.3.1 needs a lot of work to get going so im going to install version 2.2.2 as this installs without problems.

    download it form sourceforge and cd to that folder
    do a ./install_amp in the terminal
    be sure to set the amp web root to /Library/WebServer/Document/fpbx
    (or replace fpbx with your choice)
    chown www -R /Library/Webserver/Documents/fpbx
    chgrp www -R /Library/Webserver/Documents/fpbx
    chown www /etc/amportal.conf
    chgrp www /etc/amportal.conf
    and i also added my user account to the file permission in the finder get info box for that file and the fpbx folder.
    open up safari and goto localhost/fpbx
    start configuring your pbx 🙂

  14. one last thing needed is the perl modules DBI and DBD::mysql

    open terminal and type perl -v to make sure perl is installed it should be by default.
    Then type cpan
    then force install DBI
    then force install DBD::mysql
    then chmod 777 /var/lib/asterisk/bin/.retreive_conf
    then cd /var/lib/asterisk/bin/
    then chmod 777 *.pl
    now clicking on the red bar in freepbx reload the configs from mysql correctly.

    All working now.

Comments are closed.