Posted by ant
July 19th, 2007
Filed in Asterisk, Rails
After spending ages playing around with both Parallels and VMWare on OS X I’ve decided it’s probably easier if I get a local copy of Asterisk working rather than running it on a virtual machine. With the project I’m working on I need access to the files that Asterisk has created and was having problems getting the files between the the virtual machine and my Mac.
I’ll assume you’ve got the Macports system installed (if you haven’t you can find out how to do so here). However there’s no port for Asterisk, so I’ve created one for Asterisk 1.4. To get it all running, you have to:-
- Checkout my ports directory:
svn co http://svn.cumu.li/ports - Edit the file
/opt/local/etc/macports/sources.confadd the linefile:///Users/anthony/develop/ports/to the bottom - Do a
sudo port selfupdate - Do a
sudo port install asterisk14– this should install Asterisk - Do a
sudo launchctl load -w /Library/LaunchDaemons/org.macports.asterisk14.plistto start Asterisk and enable it on boot
When the port is installed you will have two extensions, 101 which gets directed to agi://127.0.0.1 and an IAX2 extension on 102 (password 102) – this is for you to test the line. A good IAX client is Loudhush. In the Loudhush preferences create a new account with localhost as the address and 102 as the username and password. When you save this Loudhush should say your registration has been accepted.
You can monitor what’s going on by using the Asterisk console. In a terminal just type sudo asterisk -rvvv and you should get you an Asterisk console. If you try to call line 101 from Loudhush you should see Connect to 'agi://127.0.0.1/' failed: Broken pipe on the console.
Hurrah! The Asterisk stuff should now be working! You can use this to do work with the Telegraph and Adhearsion Ruby/Rails telephony packages.
Blog uses Mephisto
Design from OSWD
by dreamLogic

Sorry, comments are closed for this article.