Home » 2005 (Page 4)

Yearly Archives: 2005

The Most Versatile VoIP Provider: FREE PORTING

Turbocharging Your Asterisk@Home PBX

This is the fourth in our series of articles on the Asterisk® PBX. You'll be much the wiser and less frustrated reading this if you begin with Part I. Then read Part II. And then read Part III. Then return here.

Voxee.com30 minutes and 2 cents. That's how long it took to configure a backup VoIP provider and the total cost of testing seven outbound calls in the U.S. while configuring last week's CallMe application to use the backup provider. Our choice was Voxee.com, and nobody could make it much easier or charge much less. Outgoing calls within the U.S. or to Canada, London, Paris, and most of Germany are about a penny a minute, and U.S. calls are billed in 6 second increments. China costs 2¢ and most of Mexico is under a nickel. Any place with an island in the name ... well, it's almost cheaper to go there. But that's true with all providers. It costs $5 through PayPal to seed your Voxee account with call money. After that, it's pay as you go. There are no setup fees. In fact, if you opted for the BroadVoice BYOD-Lite plan which gives you free incoming calls and 100 minutes of outgoing calls a month, then Voxee is the perfect complement. You'll pay a penny a minute for most calls with increment rounding in the U.S. while BroadVoice charges 4¢ a minute in the U.S. with full minute rounding. The other good news is that Voxee supports Asterisk's native protocol IAX2 which makes configuring telephones at remote sites a breeze. Unlike SIP, there are no NAT headaches with IAX2. All you need is a phone that talks IAX. For more information, here's a great article. There's even an adapter to plug in POTS phones using IAX. In short, if you want to skip some SIP headaches, IAX is worth a careful look at both the telephone instrument and the service provider levels.

Adding a Voxee Trunk. To add a Voxee trunk using Asterisk@Home, run AMP, choose Setup->Trunks->Add IAX2 Trunk. Maximum channels only matters if you want to restrict how many simultaneous outgoing calls through Voxee can be made. Otherwise, skip down to the middle of the form and under Outgoing Settings, name your trunk voxee. For the Peer Details, insert the following using your username and password assigned when you registered for an account:

type=friend
host=66.246.246.52
username=some number assigned by Voxee goes here
secret=the password you chose at Voxee goes here

Now drop down to the Registration field and plug in the following: YourAcctNoHere:YourVoxeePasswordHere@66.246.246.52. Save your settings and click the red bar.

Voxee.comAdding a Voxee Outbound Dialing Route. The final step is to add an outbound dialing route for your Voxee calls. The easiest way to set this up is to use a dialing prefix for Voxee calls, e.g. 9. So click Outbound Routing within AMP Setup. In the Add Route screen, name your new route OutVoxee. Whether to have a route password is, of course, up to you. For the dial strings, we recommend the following which lets you dial U.S. and foreign Voxee calls by dialing 9, 1, area code and number or 9, 011, country code, and number. The 9's will be stripped off before the dial string is sent to Asterisk to place the call. That's what the "9|" syntax means.

9|011.
9|1NXXNXXXXXX

Now click on the Trunk Sequence pull-down and choose voxee for your outbound trunk. Click the Submit Changes button and then the red bar to update Asterisk. The only gotcha here is to be sure you dial a 9 and a 1 plus area code and number for U.S. calls. BroadVoice doesn't require a 1, but Voxee does. If you want to use the callme application we built last week, the correct syntax to have Asterisk place the call through Voxee is http://asterisk.dyndns.org/callme.php?number=iax2/voxee/16781234567 where asterisk.dyndns.org is the fully qualified domain name for your Asterisk server and 6781234567 is the phone number to be sent dialtone. For early readers of last week's column, please note that a code change was made on Saturday to avoid a potential security problem. It's explained in the comments section of last week's article if you want more details. Otherwise, just download the callme.php file again and replace your old version.

Adding a Voicemail Address. We all are accustomed to having email addresses. So what's next: Voicemail Addresses, of course. Yes, with most SIP phones, you now can make calls to addresses that look just like your existing email address: homer@thesimpsons.com. If you've followed our tutorials thus far and have set up a fully-qualified domain name with dyndns.org or if you have your own domain pointing to your Asterisk server, then it's a two-minute operation to add voicemail addressing. Using AMP, click on the Maintenance tab and open extensions_custom.conf. Now add the following lines to the [from-internal-custom] context of the file substituting your real name for homer and adding an actual extension number on your Asterisk PBX for 1000:

exten => homer,1,dial(SIP/1000,20,m)
exten => home,2,VoiceMail(u1000@default)

Once you save your changes and restart Asterisk, anyone can call you from any IP telephone or softphone by "dialing" sip:homer@asterisk.dyndns.org where homer is the name you plugged in to extensions_custom.conf and asterisk.dyndns.org is the fully-qualified domain name pointing to your Asterisk server. You can add as many additional accounts as desired. It's equally simple to match address names to the locations of IP phone extensions in your home or office: kitchen, office, playroom, pool, or whatever else you might need. And your friends can sign up for a SIPphone account or a Free World Dialup (FWD) account to make the calls ... which are free! Many phones don't even require the sip: prefix just as most web browsers no longer force you to type http://. For those that want to make your new voicemail address match your email address, here's a link that will tell you what's necessary to make it happen with your ISP.

Sipura SPA-3000. There is no finer piece of telephony equipment you can purchase than the SPA-3000. As we mentioned last week (but it's worth repeating), the SPA-3000 does three things and does them all well. First, if you want to connect your existing home or office Ma Bell phone line to your Asterisk server so that incoming calls to your regular phone line can be managed with Asterisk just like your VoIP line, then the SPA-3000 is the way to go. It provides the best voice quality period. Second, if you want the flexibility and redundancy of having a Ma Bell line to place outgoing calls (especially for 911 service), then the SPA-3000 is just the ticket. You even get failover protection when your Internet service croaks. And finally, if you want to connect a 5.8 GHz wireless phone set to your Asterisk PBX for use throughout your home or office, the SPA-3000 is a must-have. With some careful shopping, you can purchase an "unlocked" SPA-3000 for just under $100. Unlocked means you can access the administrator setup features of the unit. You need this capability to use the device with an Asterisk PBX.


Buying the SPA-3000 it turns out is the easy part. Getting it configured properly to work with Asterisk can be a nightmare, and we're not quite sure why. Actually, we are pretty sure why. Sipura is one of those fine companies that thinks only dealers can read so you'll have a hell of a time finding even a user's guide for the product. For those of you that can read, here it is. Another part of the problem is that Asterisk is an incredibly complex toolbox which can be set up in many, many different ways. So providing HOW-TO instructions to configure an SPA-3000 is a daunting task. We're assuming you are using Asterisk@Home and that you've configured Asterisk@Home according to our tutorials. If not, you may be in for a rough ride with the SPA-3000, but we'll try to provide some explanations as we go so that you can get back on track if your configuration differs from ours. We're also going to stick with Plain English rather than telephony jargon so, if you're a telephone geek or a purist, don't go postal. Just bear with us.

Overview. There are four parts to the SPA-3000 configuration drill today. First, we'll set up the SPA-3000 hardware device and get everything plugged in correctly. Next we'll set up some Asterisk extensions to support the SPA-3000. Then we'll use a web browser to configure the SPA-3000 device to work with your Asterisk@Home server. And finally we'll add some bells and whistles to Asterisk to show off a little bit. When we're finished, your Asterisk server should be able to answer calls from both BroadVoice and your home/office Ma Bell phone line. And, you should be able to place calls through BroadVoice or your Ma Bell phone line using the phone or wireless phone set connected to the SPA-3000. As we did with the Asterisk server, we're assuming you have placed the SPA-3000 behind a rock-solid firewall. Otherwise, your phone bill may include thousands of dollars of calls to the Queen Mary that you didn't make.

SPA-3000SPA-3000 Hardware Interfaces. So let's begin with the hardware basics. The SPA-3000 is designed to plug in to four different things:

  • The A/C adapter. It's pretty simple to figure out where to plug that in. Plug it in last!
  • The Network Jack. It's on the same side as the A/C adapter jack. Use a network cable to plug it into your 10/100 router or switch. We're assuming your network will provide a dynamic IP address to the SPA-3000 using a DHCP server. If not, fix that before plugging in the unit. The SPA-3000 also must be on the same network as your Asterisk server. Stated another way, the first three numbers in the IP address of your Asterisk box and your SPA-3000 must be the same, e.g. 192.168.0 or 192.168.1. And, yes, I know it is theoretically possible for them to be different, but who cares.
  • The Line Jack. A clearly marked jack on the opposite side of the SPA-3000 from the A/C adapter. Use a garden-variety phone cable to plug it into a phone jack in your home or office that receives incoming calls from Ma Bell, i.e. a POTS line.
  • The Phone Jack. A clearly marked jack on the opposite side of the SPA-3000 from the A/C adapter. Use a garden-variety phone cable to plug in a regular telephone or 5.8 GHz wireless phone set here. If you accidentally plug your home phone line into this jack, you'll probably fry the SPA-3000 the first time someone calls you on your home phone line.
  • Once you get all the wires connected, plug in the SPA-3000. Or, if you plugged it in before connecting it to your LAN, unplug it, count to 10, and plug it back in. Once all the lights stop blinking, pick up the telephone you connected to the Phone jack. You should hear a dial tone. If not, go back to square one. Otherwise, press **** which will access the Sipura configuration menu. Once Egor stops talking, press 110# to retrieve the IP address assigned to your unit. Write it down and hang up the phone. Rather than hard-code an IP address into the SPA-3000, our preference is to tell your router to reserve the IP address already assigned so that it is reassigned to the SPA-3000 whenever you turn it off and back on. We did the same thing with your Asterisk box in Part II so reread the IP Configuration of Asterisk section of that tutorial if you need a refresher.

    Configuring Asterisk to Support the SPA-3000. Before configuring the SPA-3000, let's turn our attention to Asterisk for a bit. You'll need three extensions to support the SPA-3000: one for incoming calls, one for outgoing calls, and one to handle the telephone instrument(s) you plugged into the Phone jack above. From your web browser, access AMP->Setup by going to the IP address of your Asterisk box. When prompted, type in maint for your username and whatever password you assigned to AMP previously. The trick to adding these three extensions is that you have to do everything twice because you can't enter all of the data for each extension in the original form. Aside from that, it's pretty straight-forward. You can obviously use any extension numbers you like, but using ours may make it simpler when we start configuring the SPA-3000. So here goes.

    SPA-3000 Incoming Extension. Click Extensions and fill out the Add an Extension form as follows:

  • Phone Protocol - leave it as is
  • Extension Number - 99
  • Extension Password - 121212 (Make up something good and use it for all three extensions. It's your phone bill!)
  • Full Name - PSTN Incoming
  • Record Incoming - leave it as is
  • Record Outgoing - leave it as is
  • Voicemail and Directory - disabled
  • Click the Add Extension button to save your work and then the red bar to restart Asterisk. In the right column, click on PSTN Incoming - Extension 99 that you just added. Make sure your form looks like the following. Then save your changes and click the red bar to restart Asterisk.

  • Caller ID - PSTN Incoming <99>
  • Canreinvite - no
  • Context - from-internal
  • DTMFmode - RFC2833
  • Host - dynamic
  • NAT - never
  • Port - 5062 < --Important!
  • Qualify - no
  • Secret - your password goes here
  • Type - friend
  • Username - 99
  • Record Incoming - leave it as is
  • Record Outgoing - leave it as is
  • Voicemail and Directory - disabled
  • Now click Submit Changes and then the red bar to update Asterisk. One down. Two to go.

    SPA-3000 Outgoing Extension. Click Extensions and fill out the Add an Extension form as follows:

  • Phone Protocol - leave it as is
  • Extension Number - 199
  • Extension Password - 121212 (Make up something good and use it for all three extensions. It's your phone bill!)
  • Full Name - PSTN
  • Record Incoming - leave it as is
  • Record Outgoing - leave it as is
  • Voicemail and Directory - disabled
  • Click the Add Extension button to save your work and then the red bar to restart Asterisk. In the right column, click on PSTN - Extension 199 that you just added. Make sure your form looks like the following. Then save your changes and click the red bar to restart Asterisk.

  • Caller ID - PSTN <199>
  • Canreinvite - no
  • Context - from-internal
  • DTMFmode - RFC2833
  • Host - dynamic
  • NAT - never
  • Port - 5061 < --Important!
  • Qualify - no
  • Secret - your password goes here
  • Type - friend
  • Username - 199
  • Record Incoming - leave it as is
  • Record Outgoing - leave it as is
  • Voicemail and Directory - disabled
  • Now click Submit Changes and then the red bar to update Asterisk. Two down. One to go.

    SPA-3000 Phone Extension. Click Extensions and fill out the Add an Extension form as follows:

  • Phone Protocol - leave it as is
  • Extension Number - 204
  • Extension Password - 121212 (Make up something good and use it for all three extensions. It's your phone bill!)
  • Full Name - Wireless
  • Record Incoming - leave it as is
  • Record Outgoing - leave it as is
  • Voicemail and Directory - enabled
  • Voicemail Password - 121212 (Make it the same as the Extension password.)
  • Email Address - joe@schmo.com (Fill it in if you want voicemail delivery to your email account.)
  • Pager Email Address - joeschmo@messaging.sprintpcs.com (Fill it in if you want voicemail notification to your pager or cellphone.)
  • Email Attachment - yes (only if you want email delivery of voicemails)
  • Click the Add Extension button to save your work and then the red bar to restart Asterisk. In the right column, click on Wireless - Extension 204 that you just added. Make sure your form looks like the following. Then save your changes and click the red bar to restart Asterisk.

  • Caller ID - Cordless <204>
  • Canreinvite - no
  • Context - from-internal
  • DTMFmode - RFC2833
  • Host - dynamic
  • NAT - yes
  • Port - 5060 < --Important!
  • Qualify - yes
  • Secret - your password goes here
  • Type - friend
  • Username - 204
  • Record Incoming - leave it as is
  • Record Outgoing - leave it as is
  • Voicemail and Directory - enabled
  • Voicemail Password - 121212 (Make it the same as the Extension password.)
  • Email Address - joe@schmo.com (Fill it in if you want voicemail delivery to your email account.)
  • Pager Email Address - joeschmo@messaging.sprintpcs.com (Fill it in if you want voicemail notification to your pager or cellphone.)
  • Email Attachment - yes (only if you want email delivery of voicemails)
  • Click Submit Changes and then the red bar to update Asterisk. Done. Now we're finally ready to configure the SPA-3000.

    Configuring Your SPA-3000 for Asterisk. Before we get down to the nitty gritty, let's chat about what you'll have in place when we get finished. Our design plan is to support incoming calls from both your BroadVoice VoIP number and your POTS (aka Ma Bell or PSTN) number that you've had forever. For outgoing calls in the U.S., dialing a 7-digit number will place the call through your PSTN line. Dialing a 10-digit number will also place the call through your PSTN with BroadVoice as a backup. Dialing 1 and then area code and phone number will place the call through BroadVoice. Dialing 9 and then the area code and phone number will place the call through Voxee. Dialing 911 will place an emergency call through your PSTN (i.e. local) phone number. Dialing 011 calls for other countries will go out through Voxee. If you need another configuration, post your question using language similar to what we've outlined, and we'll respond to some of them in a future column. Don't ask questions about other VoIP providers. That's what the VoIP forums are for, and we've previously pointed you to several good ones. So here we go.


    First, a reminder: MAKE SURE YOUR SPA-3000 IS BEHIND A FIREWALL! Now let's reset the SPA-3000 to its factory defaults just to be sure we're all reading from the same sheet of music. With a phone connected to the Phone jack, lift the receiver and dial **** to access the Sipura Configuration Menu. Now press 73738#. When prompted, press 1 to confirm your request. The SPA-3000 will reboot. Then, using a web browser, access the IP address of your SPA-3000 that you wrote down above. When the main screen displays, click Admin Login in the upper right corner. Then click Advanced. If you're prompted for a password, you have a locked unit, and all bets are off. Contact your vendor and either get the passwords or send the unit back. You won't have this problem with Voxilla. After clicking on the Advanced option, you'll have access to all the settings in the SPA-3000.

    Regional Tab Settings. You'll notice there are nine tabs across the top of the SPA-3000 Admin Config page. Start by clicking on the Regional tab and set your Time Zone. This matters because POTS phones connected to the Phone jack get their time from the SPA-3000. The Time Zone pull-down is in the Miscellaneous section of the form toward the bottom of the screen. The SPA-3000 doesn't know about Daylight Savings so pick your time zone accordingly. Save your change by clicking the Submit All Changes button. The SPA-3000 will reboot.

    Line 1 Tab Settings. In the Proxy Registration section, enter the IP address of your Asterisk box in the Proxy field, set Register to Yes, set Register Expires to 60, and Use Outbound Proxy should be No. Leave all the other settings as you find them. In the Subscriber Information section,

  • Display Name: Kitchen (or whatever you want to call your PSTN phones)
  • User ID: 204
  • Password: whatever you chose for this Asterisk extension
  • Use Auth ID: No

  • Set Auto PSTN Fallback to Yes. Finally, one could write a book on Dial Plan settings, and someone probably should. But it won't be me. While I'm by no means an expert, I'm learning fast. So here's a Dial Plan configuration to get things working, and we'll revisit it in a future column to add additional features and safeguards. For now, plug the following into the Dial Plan field at the bottom of the form after erasing what's already there. Then Submit All Changes:

    (#xx|< :*>*xxxS0|*xx|[3469]11|0|00|1[2-9]xx[2-9]xxxxxxS0|[2-9]xxxxx.|[2-9]xx[2-9]xxxxxxS0|xxxxxxxxxx.)

    PSTN Line Tab Settings. Things get a little tricky in this form so type carefully, or you'll have a real mess when you try to receive calls. In SIP Settings, set the SIP Port to 5061. In the Proxy Registration section, enter the IP address of your Asterisk box in the Proxy field, set Register to Yes, set Register Expires to 60, and Use Outbound Proxy should be No. Leave all the other settings as you find them. In the Subscriber Information section,

  • Display Name: PSTN
  • User ID: 199
  • Password: whatever you chose for this Asterisk extension
  • Use Auth ID: No
  • Dial Plan 8 should be entered for Dial Plan 8 in the Dial Plans section. That's a less than symbol, then S, then zero, then a colon, 99, and a greater than symbol. In the VOIP-To-PSTN Gateway Setup, set Gateway Enable to Yes and Caller Auth Method to None. In the PSTN-To-VoIP-Setup, set Gateway Enable to Yes, PSTN Ring Thru Line 1 to Yes, PSTN CID for VoIP CID to Yes, PSTN Caller Default DP to 8, and PSTN CID Number Prefix to 00 (that's zero-zero).

    In the FXO Timer Values section, set VoIP Answer Delay to 1, PSTN Ring Thru Delay to 3, and PSTN Ring Thru CWT Delay to 3. Click Submit All Changes button to save your work thus far.

    User1 Settings. In the Selective Call Forward Settings section, set Cfwd Sel1 Caller to 00* (zero-zero-asterisk). Set Cfwd Sel1 Dest to 99. And, at the bottom of the form, set VMWI Ring Policy to New VM Arrives. If you forget to change this last one, your phone will ring once a minute, all night long whenever anyone leaves you a voicemail message in the middle of the night. Click the Submit All Changes button, and we're finished configuring the SPA-3000 ... at least for today.


    Tweaking the Asterisk@Home Dial Plan to Support the SPA-3000. Our final drill for today is to tell Asterisk about the SPA-3000, add a few custom routines to our Extensions_Custom config file, and test everything to make sure it's working. Whew! No one said this would be easy, did they?

    Let's first add the PSTN trunk. Call up AMP->Setup->Add SIP Trunk. For the Outbound Caller ID, enter your home phone number with area code. For maximum channels, type 1. Skip the Outgoing Dial Rules section as well as the Incoming and Registration sections. In the Outgoing Settings, let's name the trunk pstn. For PEER Details, enter the following but not our comments on the right. Then click the Submit Changes button and then the red bar.


    auth=md5
    context=from-internal
    dtmfmode=rfc2833
    fromuser=asterisk < -- don't change this host=192.168.0.115 <-- plug in the internal IP address of your SPA-3000 here insecure=very port=5061 <-- important! secret=123456 <-- use your password for extension 204 here type=peer username=asterisk <-- don't change this

    Next we need to reconfigure our Outbound Routing a bit. Let's add a new Outbound Route and name it OutPSTN. For the Dial Rules, enter the following:


    911
    NXXNXXXXXX
    NXXXXX.

    For the Trunk Sequence, choose SIP/pstn and then add SIP/bv. Be sure they appear in this order or press one of the blue arrow keys to reorder them correctly. Now click Submit Changes and then click the red bar. When the list of trunks reappears, make sure they are in the following order (top to bottom): OutVoxee, OutPSTN, Outside. If not, click on the arrows to reorder them, submit changes, and click the red bar.

    Modifying Extensions_Custom to Handle Incoming PSTN Calls. Click on AMP->Maintenance->Config Edit and then choose the extensions_custom.conf file. When the editor opens, move down several lines to an opening in the [from-internal-custom] context. Insert the following code. WARNING: If you cut and paste code from these articles and the code contains quotation marks (such as below), be sure to replace the WordPress-inserted, front and back quotes with normal quotation marks, or you’ll send Asterisk into the ozone.

    ;next extension (99) is to handle incoming PSTN calls
    exten => 99,1,GotoIf($["${CALLERIDNUM:0:2}" = "00"]?2:3)
    exten => 99,2,SetCIDNum(${CALLERIDNUM:2})
    exten => 99,3,SetMusicOnHold(default)
    exten => 99,4,Answer
    exten => 99,5,Wait(1)
    exten => 99,6,Background(custom/welcome)
    exten => 99,7,DigitTimeout,2
    exten => 99,8,ResponseTimeout,2
    exten => t,1,Answer
    exten => t,2,Wait(1)
    exten => t,3,Background(pls-hold-while-try)
    exten => t,4,Dial(SIP/204&SIP/200,20,m)
    exten => t,5,VoiceMail(204@default)
    exten => t,6,Hangup
    exten => i,1,Answer
    exten => i,2,Wait(1)
    exten => i,3,Playback(wrong-try-again-smarty)
    exten => i,4,Goto(99,5)

    The only line above that you'll need to modify is t,4 where you'll need to specify the numbers of each extension you want to ring when a call comes into Asterisk from your PSTN (home phone) line. If you have more than one extension, separate them with an ampersand and use the SIP/extensionnumber syntax for each extension. Now add the following code snippet at the bottom of the file after adding include => custom-recordme-code near the top of the file in the [from-internal-custom] context :

    [custom-recordme-code]
    exten => 456,1,Playback(custom/record-msg)
    exten => 456,2,Wait(2)
    exten => 456,3,Record(/tmp/asterisk-recording:gsm)
    exten => 456,4,Wait(2)
    exten => 456,5,Playback(/tmp/asterisk-recording)
    exten => 456,6,Wait(2)
    exten => 456,7,Hangup

    Recording Voice Prompts with Asterisk. Save your changes by clicking the Update button and then restart Asterisk as previously described. Now pick up a phone and dial 456#. When you hear a beep, say "Please say your voice prompt at the tone. Press the pound key when you are finished." Then press the # key, listen to your recording, and hang up. If you want to revise it, just repeat the steps. Now go to the Asterisk console and log in as root. Change to the tmp directory: cd /tmp. Rename the custom recording we just made: mv asterisk-recording.gsm record-msg.gsm. Now move the file to its permanent home: mv record-msg.gsm /var/lib/asterisk/sounds/custom. Now let's record one more. Dial 456# again. At the tone, say "Hi, you've reached the Rockefeller's. Someone will be right with you." Now press # to save your recording. Now go back to the Asterisk console. Go to the /tmp directory. Rename the recording: mv asterisk-recording.gsm welcome.gsm. Then move the file to its permanent home: mv welcome.gsm /var/lib/asterisk/sounds/custom.

    HU61Why are we doing all of this? Well, there really is a reason. Now when someone (like you) calls that knows what's going on, you can dial any extension on your Asterisk system while this mundane greeting plays. You can even call up the weather.

    At this point, everything should be working. You should be able to dial in using either your home phone number or your BroadVoice number. And you should be able to dial out using the dialing rules we outlined when we began. Finally, a word of caution. Being human, we sometimes forget a step in a process as complex as this was. We've actually built our new system at the same time we wrote this so everything oughta work fine. Ours does. If not, post a comment (don't email me with technical problems!), and we'll have a look. For those that are curious, we purchased an Ice Cube HU61 from Now Micro in St. Paul, Minnesota. For just over $500, it includes an AMD Athlon 64 XP3000 processor, 512MB of RAM, a 250GB Seagate 7200 ATA IDE drive (don't buy SATA drives as they won't work with this version of Linux and Asterisk), a 52X CD ROM drive, and a 3 year parts and labor warranty. Remember, you don't need an operating system for this machine. It's on the Asterisk@Home installation CD. The Ice Cube has the capacity to handle about 1000 phone extensions and roughly 200 simultaneous SIP calls so it'll do just fine for home use unless we have more than a few Strom Thurmond "moments." And, on the weekends, you can disconnect your phones and take your ass-kickin' Ice Cube to the finest LAN parties in town. See you next week.

    There are numerous additional articles in this series now. You can read all of them by clicking here.

    Tips & Tricks to Turbocharge Your Asterisk@Home PBX

    Phone HomeWelcome back to the third installment in our series on installation and use of the Asterisk@Home PBX. Don't start here. Start with Part I and Part II because we're assuming you've already done all those things. Then move on to Part IV after you finish this article. Today we'll cover a few more setup suggestions for your Asterisk@Home PBX, and then we'll turn our attention to some Asterisk® Tips and Tricks that should mesmerize even your non-techie friends. If you've followed along this far, you know what a complex undertaking it is/was to get Asterisk@Home put together. These guys could really use any small donation to purchase additional hardware for testing and further development of future releases. Just click here for more info.

    Configuring Ring Groups. If you did any exploring at all this past week, you probably have already figured out what ring groups are and how to configure them. A ring group acts like any other Asterisk extension number except it rings a collection of Asterisk extensions which you specify. If you dial a ring group number, it will ring all of the Asterisk extensions associated with that ring group. The only gotcha here is one of syntax, and this only becomes important when you start writing your own Auto Attendants or IVR applications. But you need to know it anyway. Using the syntax Dial(SIP/200), you can only ring extensions, not ring groups. If you want to be sure your command works correctly to call either an extension or a ring group, use this syntax: Dial(local/200@from-internal). Don't ask me why. To actually create and configure Ring Groups, go into Setup of AMP and click Ring Groups. The Add Ring Groups screen appears. For the group number, provide the number you want to dial for this ring group. For the extension list, put one Asterisk extension number on each line. The caller-id name prefix is optional. Choose the amount of time you want this ring group to ring, and then pick an option for what should be done with the call if no one answers. Save your settings by clicking the Submit Changes button, and then click the Red Bar to reset Asterisk with your new ring group. One important use of Ring Groups is to ring all or a collection of phones throughout your home or office with incoming calls. You can specify the ring group to use during business hours and afterwards on the AMP->Setup->Incoming Calls screen of Asterisk@Home. Just point your web browser to the IP address of your Asterisk server.

    Music on Hold. Nothing adds that professional "phony" touch to your PBX quite like Music on Hold. Lucky for you, Asterisk@Home comes preconfigured with everything needed to make Music on Hold work out of the box, even music. Ever mindful of the copyright laws, of course, you can create your own Music on Hold libraries by uploading MP3 files using the On Hold Music option within AMP. Whenever you place a call on hold by pressing the switchhook on any phone or the Hold key on business phones, your callers will be serenaded by the default Music on Hold collection.

    Directory Assistance. It may not be quite as high tech as Ma Bell's system, but Asterisk comes with a directory assistance service that's nothing to sneeze at. Just go to AMP->Setup->General Settings and specify how you want names looked up in the directory (first name, last name, or both). Then all your local users can get directory assistance by simply pressing the # key. Callers outside your system can press the # key during any voice prompt to access the directory. We'll show you how to build these scripts in a future column.

    Wakeup Calls. Just like the finest hotels, you now can order up your very own wakeup call from any Asterisk extension. Just dial *62 and key in the time for your wakeup call. Use military time, e.g. 5:00 pm is 1700 and 8:00 am is 0800. At the appointed time, your phone will ring and, when you answer, the soothing sounds of your favorite Music on Hold will play ad nauseum. If you happen to get a fast-busy signal, it's probably because *62 hasn't been enabled in extensions_custom.conf. Follow the directions in the Call Your Friends section below to edit this file, find the 3 lines toward the top of the file that begin with exten => *62 and remove the semicolon at the beginning of each of the three lines. Click the Update button and then restart Asterisk as explained below.


    Setting Up Asterisk Extensions to Call Your Friends. One of the really cool things you can do with your very own PBX is make up extensions which automatically call all your friends just by spelling their first names using the touchtone keys on your phone. For example, to call Mary, you create an extension 6279 which forwards calls to this extension number directly to Mary's cell phone. To set these extensions up, you have to get your hands a little dirty and edit the extensions_custom.conf file which is part of Asterisk@Home. Here's how to do it with your web browser. Type in the internal IP address of your Asterisk server to access AMP and then click on the Maintenance tab. Use maint for your username and whatever password you set last week for your Asterisk accounts. When the Maintenance window displays, click on the Config Edit option, and you'll be presented with a list of all the configuration files for Asterisk@Home. Now click on extensions_custom.conf to open the file in a window. You'll notice that the first section of the file is labeled [from-internal-custom]. These are called contexts in Asterisk. Move your cursor down below the include statements in the from-internal-custom context and press the enter key a few times to open up some blank space. Now type in a line that looks like the exten expression shown below. Instead of 6279, use the numbers that correspond with your friend's first name. And then plug in your friend's phone number in place of 6783214567. Add a comment after the semicolon which shows the name of the person associated with this extension. You can add as many of these as you like. Just make sure they don't conflict with actual extensions you've set up on your system. And keep the length of the extensions to six characters or less. Otherwise, Asterisk will try to place the call directly through BroadVoice. Remember the dialing rules we set up last week. Seven digits or more means send the call directly to BroadVoice for processing. Notice the @bv syntax. That tells Asterisk to place the call using a context called "bv" which was the context name we associated with the Outgoing Calls section of the BroadVoice SIP trunk we created last week.

    exten => 6279,1,Dial(SIP/6783214567@bv) ; Mary's Cell Phone
    exten => 5646,1,Dial(SIP/6783336767@bv) ; John's Office

    Let's introduce a few more features while we're at it. There is a default time for attempting calls which you can set under the General Settings section of Asterisk@Home Setup. For most calls you'd want to set it to 20 or 30 seconds. But suppose we want to try the call for 60 seconds because it's a cell phone. And we'd like to listen to some nice music on hold while Asterisk attempts to find the person. Here's what you need to add to make it work:

    exten => 6279,1,Dial(SIP/6783214567@bv,60,m) ; Mary's Cell Phone

    Google TalkEmail Forwarding of Voice Mail. If you're as big a fan of Google and GMail as we are, then you probably have been following the rumored developments with Google Talk. The good news is that much of what many suspect Google is about to do (click on the inset and find out for yourself), you can do today with Asterisk@Home. And within a very short time, you can expect to connect your Asterisk box directly to Google Talk. For now, just be glad you've already installed Asterisk. When you're out and someone leaves you a voicemail message, Asterisk@Home will let you forward that voicemail message to your email address as a .wav file which can be played within most email client software. Or you can have Asterisk@Home send an instant message to your cell phone or pager telling you who called, what their phone number was, and how long a voicemail message the person left for you. Or you can do both. In addition, you can tell Asterisk@Home whether to delete the voicemail from your Asterisk server after sending it to your email account. In short, you now can manage all of your incoming email and voicemail from a single place, your email client. In order to send out emails from your Asterisk@Home server, you'll need to make two changes. First, make this adjustment to the /etc/hosts file on the server. Since anonymous emails are blocked by most ISPs, you'll need a fully-qualified domain name for your server. The easiest one to use is the fully-qualified domain name that your ISP assigns to the IP address for your broadband connection. Don't forget to update it when your ISP changes your IP address. To find out what your fully-qualified domain name is, go to a command prompt on your Asterisk server and type: nslookup 123.456.789.001 substituting your public IP address for the preceding numbers. Then write down the name entry without the trailing period. Now edit the hosts file: nano /etc/hosts. Move the cursor to the line which begins 127.0.0.1, and then move the cursor over the first letter of the first domain name shown, usually asterisk1.local. Now type in the fully-qualified domain name you previously wrote down and add a space after your entry. Save your settings: Ctrl-X, y, enter. Now restart network services on your Asterisk machine: service network restart. Second, go into AMP->Maintenance->Config Edit->vm_general.inc with a web browser. Change the serveremail entry to your an email name at the fully qualified domain you used in your /etc/hosts file above. Then save your configuration and restart Asterisk. If you continue with this setup and still don't receive emails, here's another configuration change that is sometimes necessary. On the Asterisk terminal, log in as root. Switch to the directory where the SendMail configuration file is stored: cd /etc/mail. Make a backup of the config file: cp sendmail.cf sendmail.cf.bak. Then issue the following command: echo CGasterisk.dyndns.org >> sendmail.cf. Substitute the actual domain name of your Asterisk server for asterisk.dyndns.org, but be sure it's preceded by CG with no intervening spaces.Then restart your server: shutdown -r now.


    To configure the voice mail forwarding options, go into the Setup tab of the Asterisk Management Portal using a web browser. Click on Extensions and then click on an extension you already have configured. In the Voicemail and Directory section of the form, enter either (or both) your email address and your pager or cellphone's text messaging address. To email the voicemails as attachments, just click Yes beside Email Attachment. To delete the voicemail message from your voicemail inbox after sending it to your email address (not recommended until you first get it working correctly), click Yes beside Delete Vmail. Doesn't get much easier, does it? If you want to customize the email message which is sent, just edit vm_email.inc from AMP's Maintenance->Config Edit screen using your favorite web browser.

    Phone HomePhone Home. Inspired by ET and the Coors reminder (see inset), we wanted a way to have our Asterisk system call us while we were on the road and provide dialtone to make international calls ... to hail a cab. Remember, it's free with BroadVoice's $19.99 World Plan. So we put together a little web application (actually a PHP script) so that, using a web browser on the road, you could tell your Asterisk server to call you and provide dialtone to any number you specify. The only prerequisite here was that we didn't want to sell the farm, i.e. provide free dialtone service and unlimited international calling for all the world's hackers and crackers. We also didn't want to have to go through a bunch of authentication steps to access the web site and put the call in motion. So here's the design. We have a PHP script which you can download here. It needs to be renamed to callme.php. Then copy it into the /var/www/html directory on your Asterisk server. You'll also need to tell your firewall/router to route HTTP or port 80 traffic to the internal IP address of your Asterisk server. This is usually done under the Services or Rules menus on most routers. You’ll want to specify that all port 80 traffic be allowed through the firewall all of the time. Be sure you've changed ALL of your Asterisk passwords before you do this!

    To use this script from the Internet, you'll probably want to have to have a more permanent fully-qualified domain name associated with your Asterisk server. We explained here how to do this using dyndns.org. The syntax is as follows: http://asterisk.dyndns.org/callme.php?number=sip/bv/4045551212 where asterisk.dyndns.org is the fully-qualified domain name for your Asterisk server and 4045551212 is the area code and number where you wish to accept a call with dialtone. Nothing else needs to be changed. To dial a local extension, use this syntax: http://asterisk.dyndns.org/callme.php?number=sip/204 where asterisk.dyndns.org is the fully-qualified domain name for your Asterisk server and 204 is the local number to ring. Beginning on the first ring, Asterisk will start prompting for a password. It doesn't care whether the call is answered or not, and it times out after 10 seconds. After three unsuccessful password attempts (each timeout counts as 1), Asterisk hangs up. Stated another way, you have about 30 seconds to enter your password after the phone first rings. Then Asterisk disconnects the call. To enter your password, key in the touchtone numbers which match the numerical password code you specified in your [callout] context (see below). Then press the pound (#) key. Note that a web page will not display at this web address unless you enter the portion of the address following the question mark. Nor will a call be placed unless the sip/bv/ syntax precedes a phone number. We did this for security reasons.

    Before the above script will work, you also need to add the following context to the bottom of the extensions_custom.conf configuration file discussed above. Make sure you change the password 24681234 to something very secure. After all, it's your phone bill! Once you make this change, it won't take effect until you restart Asterisk. The easiest way to do that is to access setup within AMP, click Incoming Calls, then click the Submit Changes button, then click on the red bar which appears. Count to 10 and your changes should be operational.

    [callout]
    exten => s,1,Authenticate(24681234)
    exten => s,2,DISA(no-password|from-internal)

    Update. The Phone Home article has been updated since this was published. The updated article provides setup instructions for three DISA alternatives. You can read all about it here.

    Unlimited Calls For Free With Nextel. If you're one of the lucky ones that subscribes to Nextel's "free incoming calls" plan with web Internet service, then you obviously can use the Phone Home trick above to never again pay for an outgoing call. Just use the web browser on your Nextel phone to connect to the link shown above, and your Asterisk server will immediately call you back with outgoing dial tone.

    NOAALocal Weather Forecasts with Asterisk@Home. One of the really neat things Asterisk can do is run Perl and PHP scripts which gives Asterisk almost limitless expandability. A fellow named Mark Johnson wrote one that goes out and collects your local weather forecast from the National Weather Service when you dial a certain extension, *61 in the case of Asterisk@Home. As installed, you get the forecast for New York City, but it's easy to customize it for any big city near you. First, using an FTP client go to ftp://weather.noaa.gov/data/forecasts/city, click on your state, and write down the name of one of the cities or towns displayed. Now go to your Asterisk server, log in as root, and change to the Asterisk scripts directory: cd /var/lib/asterisk/agi-bin. Make a backup of the weather.agi script just in case something goes wrong: cp weather.agi weather.agi.bak. Then edit carefully the weather.agi script: nano weather.agi. Use the cursor to move down 8 lines to the line which reads: my $custpath = "city/ny"; and, using the delete key, delete ny and replace it with your state's two-letter abbreviation, e.g. ga for Georgia. Be careful you don't erase either the trailing quote or the semicolon. Next, move down to the next line and replace newyork.txt with the name of the city text file within your state that you found on NOAA's FTP site, e.g. atlanta.txt. Finally, move down 4 lines and replace New York with the actual name of your chosen city and state, e.g. Atlanta, Georgia. Now save the file: Ctrl-X, then Y, then press the Enter key. Now give it a try. Just dial *61. If you happen to get a fast-busy signal, it's probably because *61 hasn't been enabled in extensions_custom.conf. Follow the directions in the Call Your Friends section above to edit this file, find the 3 lines toward the top of the file that begin with exten => *61 and remove the semicolon at the beginning of each of the three lines. Click the Update button and then restart Asterisk as explained above and try your call again. If it still doesn't work, chances are there is a typo in either the city or state entry you made in weather.agi. Want some more Tips & Tricks? Here's a great place to start your search.

    VTech i5871Coming Attractions. Next week we'll devote most of our attention to installation and configuration of Sipura's SPA-3000 for use with Asterisk. At under $100, the SPA-3000 is one of the best telephony inventions ever. Unfortunately, the documentation for the product isn't worth a nickel;, but we'll fix that. The SPA-3000 does three things and does them all well. First, if you want to connect your existing home or office Ma Bell phone line to your Asterisk server so that incoming calls to your regular phone line can be managed with Asterisk just like your VoIP line, then the SPA-3000 is the way to go. It provides the best voice quality period. Second, if you want the flexibility and redundancy of having a Ma Bell line to place outgoing calls (especially for 911 service), then the SPA-3000 is just the ticket. You even get failover protection when your Internet service croaks. Of course, our power fails a lot more often than our broadband connection. For those that are interested, here's our take on the FCC's 911 debacle.

    Last but not least, if you want to connect a 5.8 GHz wireless phone set to your Asterisk PBX for use throughout your home or office, the SPA-3000 is a must-have. For more information on wireless phone sets, take another look at Part I of this series. And check out the incredible VTech i5871 (see inset) which we'll also configure next week to use with Asterisk. If you want to order an SPA-3000, the Voxilla Store is the cheapest source at the moment. You'll also get free BroadVoice setup and a month of free service with your purchase. As much as we like Voxilla, don't get sucked in to their $9.95 Priority Support "to [i]nsure your device is up and running in the shortest time possible." We tried it twice and usually got a cryptic email response which said something like "that's not covered in our basic installation support." In short, it's priority support when you order it, and it's (very) basic (or worse) assistance once you need it. I'm reminded of Mark Twain's comment about bankers: "A banker is a fellow who lends you his umbrella when the sun is shining, but wants it back the minute it begins to rain."

    Then, in our final column on Asterisk (not really!), we'll walk you through setting up an Auto Attendant and Interactive Voice Response System with Asterisk. And we'll also spend some time showing you how to use Asterisk's built-in tools to block sales and political calls and even calls from old girlfriends. But why would you want to do that? Have a great weekend.


    Some Recent Nerd Vittles Articles of Interest...

    ISP-In-A-Box: Installing a Free Asterisk PBX Phone System (Part II)

    AsteriskLast week we began our quest to install the free Asterisk® PBX. We won’t repeat ourselves so read Part I before continuing here. We’re also assuming you’ve already signed up for a BYOD-Lite BroadVoice account (using your free coupon from Voxilla). Be sure you’re signed up for a Generic SIP account to use with Asterisk. If not, call BroadVoice customer service and ask them (nicely) to change it. There’s no charge for this change. You also should have picked out your server hardware and have either procured an IP telephone set (we recommend the GrandStream GXP-2000 for under $100) or a Sipura VoIP adapter to use plain old telephones, or you plan to use a software-based telephone with your Mac or PC. We’ll cover installation of the latter option shortly because we’re going to use a softphone to make sure Asterisk is set up correctly before adding additional extensions and other bells and whistles.

    Editor’s Note: This version of Asterisk@Home has been superceded. For the latest tutorial, click here.

    Overview of Asterisk Installation Process. Our installation procedure for today goes like this. We’ll download Asterisk@Home, our favorite bundled Asterisk installation for new users. Then we’ll burn an installation CD from the ISO image. Next we’ll fire up our soon-to-be Asterisk server with the installation CD in place. The installation process will erase your hard disk and then load Linux, Asterisk, Apache, PHP, SendMail, MySQL, and lots of other stuff without your lifting a finger (we hope). For those that have been following our other ISP-In-A-Box tutorials, this process and the collection of open source application software should sound familiar. Once the install completes, we’ll reboot the server, configure Asterisk for use with your new BroadVoice account, download a softphone for testing, and make our first call. If all goes well, the whole process should take about an hour. We’ll then sketch out a deployment plan for Asterisk@Home depending upon how you plan to use it. For this week’s homework, we’ll let you continue building your Asterisk extensions and voicemail accounts. Then next week we’ll get to the fun part by adding an Auto Attendant, an Interactive Voice Response system, Music on Hold, and a few terrific surprises that you’d find it difficult to implement even with a $250,000 PBX install from one of the ‘Big Boys.’ "And what does all this cost," you might be asking. Assuming you have a clunker PC lying around, next to nothing. A 400MHz Pentium III with 128MB of RAM is more than adequate for a home or home office PBX. Your BroadVoice account comes with a 30-day money-back guarantee plus you get free setup and a month of free service if you purchase either a phone or VoIP adapter from Voxilla (either of which is under $100), and Asterisk@Home is free. If you want to use a softphone instead of an IP phone or VoIP adapter, then BroadVoice costs $9.95 for setup, and $8.45 a month for a phone number in almost any area code, unlimited incoming calls, and 100 minutes a month of outgoing within the U.S. So let’s get started. And why do you need a VoIP provider? Because outgoing calls to garden-variety telephones need to travel on the packet-switched voice network (PSTN), and that costs money. As a practical matter, you also need a PSTN phone number if you want folks to be able to easily call you.

    Downloading the Software. First, we need to download an ISO image of Asterisk@Home. Version 1.5 is the latest and greatest, and it fixed some bugs so let’s use it. Just find a link close to your home base and click on it to begin the download. If you’ve never burned a CD from an ISO image, here’s how. For the Mac using Roxio Toast, choose Copy, click Image File, and drag the ISO file you downloaded into the folder. Click Burn after inserting a blank CD. If you don’t own Toast for your Mac, go to the Applications->Utilities folder and run Disk Utility. Click on Images->Burn from the Title Bar and choose the ISO file you downloaded. Then click Burn to begin. For those in the PC World, you’ll need either Roxio Easy CD Creator or Nero to create a CD from an ISO image. With Easy CD Creator, choose Create Data CD. Then in the File menu, select Create CD from Image, and choose your downloaded file. Now click burn to begin. With Nero, go to Recorder from the top menu and choose Burn Image. Select your download file. Then from the Burn Compilation Window, choose Burn to begin. When your CD is ready, insert it into your clunker PC, and reboot. Important: make sure this machine is connected to a network behind a router/firewall and can obtain a valid IP address from a DHCP server (i.e. the machine has working Internet access) before beginning this installation. The reason for this is that Asterisk@Home needs Internet access to properly configure the machine at the conclusion of the setup process. And, remember, everything on the hard disk of this machine will be erased before the Asterisk@Home installation process begins. You’ve been warned. In case you haven’t already figured it out, Asterisk@Home out of the box is anything but secure on the Internet so don’t expose it with a direct network connection until we get it locked down. Any time you can log on to a Linux system as root using password as your password, you have a system which will be hacked in a matter of minutes once it’s exposed to the big, bad Internet. While you’re waiting on Asterisk@Home to install, let’s download our favorite softphone so you’ll have a way to test your new Asterisk PBX once the installation completes. Free versions of X-Lite 2.0 are available for Mac OS X, Windows, and Linux here. So choose your favorite platform and install it on your desktop PC or Mac.0


    IP Configuration of Asterisk. We need a consistent IP address or domain name both on your internal network and externally if you expect to receive incoming calls reliably. There are three pieces to IP configuration: (1) setting the internal IP address of your Asterisk server, (2) configuring an external qualified domain name which will always point to your router/firewall, and (3) configuring your router to transfer incoming Asterisk packets to your Asterisk server. Once the install completes, remove the CD, and reboot your new Asterisk@Home server. When startup finishes, log in as root with password as your password. Now type ifconfig eth0 (that’s "e-t-h-zero") then enter, and write down both your inet addr and your HWaddr on the Ethernet 0 interface, eth0. Inet addr is the internal IP address of your Asterisk box assigned by your DHCP server (i.e. your router/firewall). HWAddr is the MAC address of your Asterisk server’s eth0 network card. To assure a consistent internal IP address, you can either configure your router/DHCP server to make certain that it always hands out this same address to your Asterisk machine, or you can manually configure an IP address for this machine which is not in the range of addresses used by your DHCP server. Almost all routers now make it easy to preassign DHCP addresses so we prefer option 1. It’s generally under the tab for LAN IP Setup and is generally called something like Reserved IP table. Just add an entry and call it Asterisk PBX and specify the IP address and MAC address that you wrote down above. Now each time you reboot your Asterisk server, your router will assign it this same IP addreess. To assure a consistent external address is a little trickier. Unless you have a static (fixed) IP address, you’ll want to use a Dynamic DNS service such as dyndns.org and configure your router to always advertise its external IP address to dyndns.org. DynDNS.org will take care of revising the IP address associated with your domain name when your ISP changes your dynamic IP address. Then you can configure your BroadVoice account using your fully-qualified dyndns.org domain name, e.g. windswept.dyndns.org provides access to our beach house network even though Time Warner cable hands out dynamic IP addresses which change from time to time. For more details, read our article on the subject.

    Basic Asterisk Configuration Using AMP. The crown jewel of Asterisk@Home is a web-based administration tool for Asterisk called the Asterisk Management Portal (AMP). Using your favorite web browser, call up AMP by typing in the internal IP address of your Asterisk server. Now click on the Asterisk Management Portal. When prompted for a username, type admin. The default password is … you guessed it … password. Click on the Setup tab to begin. Our first order of business is to set up Asterisk to work with your VoIP provider, BroadVoice. In Asterisk-speak, this is known as a SIP Trunk. So click on Trunks, and then choose Add SIP Trunk.

    Under General Settings, enter your BroadVoice-chosen phone number for your Outbound Caller ID and enter 2 for Maximum Channels. This will assure that BroadVoice doesn’t shut down your account when ten of your friends attempt to make outgoing calls at the same time.

    For Outgoing Dial Rules, enter the following on three separate lines. It means you can use BroadVoice to place 7 and 10-digit calls as well as 1-areacode-phonenumber calls in the U.S.

    NXXNXXXXXX
    NXXXXXX
    1NXXNXXXXXX

    For Outgoing Settings, name this trunk bv and then cut the following code and paste it into the Peer Details section. Once you have finished, replace the three occurrences of 9994567890 with your actual 10-digit BroadVoice phone number and replace yourBVpassword with your actual BroadVoice SIP password. This is NOT the password you set up to log in to your BroadVoice portal account at www.broadvoice.com. To retrieve your SIP password, log in to your BroadVoice portal at www.broadvoice.com and then click on the Account tab. Under My Devices, click Show Settings. In the list of settings will be your auth_password. Write it down, or better yet, cut and paste it into your Asterisk@Home configuration immediately after secret= with no intervening or trailing spaces.

    authname=9994567890
    canreinvite=no
    dtmf=inband
    dtmfmode=inband
    fromdomain=sip.broadvoice.com
    fromuser=9994567890
    host=sip.broadvoice.com
    insecure=very
    nat=yes
    secret=yourBVpassword
    type=peer
    user=phone
    username=9994567890

    For Incoming Settings, name the USER Context, sip.broadvoice.com. Then cut and paste the following into the User Details section of the form. Replace the two occurrences of 9994567890 with your actual 10-digit BroadVoice phone number and again replace yourBVpassword with your actual BroadVoice SIP password just as you did above.

    context=from-pstn
    dtmf=rfc2833
    dtmfmode=rfc2833
    fromdomain=sip.broadvoice.com
    host=sip.broadvoice.com
    insecure=very
    nat=yes
    secret=yourBVpassword
    type=user
    user=9994567890
    username=9994567890

    There’s one more step in the SIP Trunk configuration, and it’s the place where most folks make typos so BE CAREFUL. In the Register String field, enter the code below. Replace the two occurrences of 9994567890 with your actual 10-digit BroadVoice phone number and again replace yourBVpassword with your actual BroadVoice SIP password just as you did above. Note that there are three sections to this register string, your BroadVoice account address in email format, your BV SIP password, and your BroadVoice account address again in email format. The three sections are separated from each other by two colons which must not be deleted.

    9994567890@sip.broadvoice.com:yourBVpassword:9994567890@sip.broadvoice.com

    Once you’ve checked and double-checked and triple-checked your typing for typos, save the page. A red bar will display at the top of the screen, click on it to reload Asterisk with the new settings. Now let’s check and be sure you’re registered. Click on the Maintenance tab at the top of AMP. If prompted for a username and password, enter maint for the username and password for the password. Click Asterisk Info in the left column and a whole bunch of Asterisk details will be displayed. The section we’re interested in is Sip Peers. It should show sip.broadvoice.com with your phone number as the username. In the right column, if you have successfully logged in, it will show Registered. If it shows anything else, you need to make a small addition to your Linux configuration (which is a good idea anyway). Look at your BroadVoice device configuration settings screen again (where we found your SIP password), and there will be an entry like this: proxy_ip: proxy-atl.broadvoice.com. The entry we are most interested in is the three-letter city code following proxy-. As an aside, if you try to ping this domain, you’ll get an unknown domain message because BroadVoice has been too lazy to change the hyphen to a period which would be the correct name for this proxy. Anyway, this is BroadVoice’s best guess of their closest server to you. The other problem is that all of BroadVoice’s servers are not created equal. You can register with some and with others you time out. Atlanta (atl), for example, regularly rejects our registration requests, and we live in Atlanta. Go figure! Actually, we do need to go figure because we want this to work. So drop down to a command prompt, and ping the following IP addresses. Write down the response times for each of the IP addresses. Now what we want to do is point sip.broadvoice.com to the proxy with the shortest ping time and see if Asterisk will register. If not, we’ll move to the next shortest, and so on.

    #Los Angeles proxy
    #147.135.8.128 sip.broadvoice.com
    #New York City proxy
    #147.135.20.128 sip.broadvoicce.com
    #Atlanta proxy
    #147.135.28.128 sip.broadvoice.com
    #DC proxy
    #147.135.0.128 sip.broadvoice.com
    #Chicago proxy
    #147.135.12.128 sip.broadvoice.com
    #Miami proxy
    #147.135.4.128 sip.broadvoice.com
    #service network restart once change is made

    Here’s how to set the default IP address for sip.broadvoice.com on your Asterisk server. Go to the Asterisk server console and log in as root with password of password. Change to the /etc directory: cd /etc. Type all of the code above into the bottom of the hosts file: nano hosts. The pound sign (#) at the beginning of a line means it’s a comment which is ignored by Linux. Now remove the # sign from the line with the IP address with the lowest ping time by pressing Ctrl-D while positioned over the # sign. Save your changes: Ctrl-X, y, then enter. Now restart the network services on your Linux machine: service network restart. Now refresh your AMP maintenance screen and check to see if you’re registered with BroadVoice. If not, repeat the drill. Remark out the line you unremarked and delete the # sign from the IP address line of the server with the next fastest ping times. Continue until you get a Registered message. If none of the servers work and you’re sure you typed your phone numbers and passwords correctly, call BroadVoice support: 1-978-418-7300. Nights and weekends have shorter hold times, and expect to get cut off once or twice. It’s a feature!

    Creating Your First Asterisk Extension. Now that we have a VoIP connection, we need an internal phone number for each telephone that will connect to the Asterisk server. You guessed it. They’re called extensions. And you can number them any way you desire, but we’ll give you a suggestion (if you live in the U.S. of A) which will save you lots of heartbreak. Don’t use extensions that begin with numbers which are used in the North American dialing plan. They may work, but they may not. The best numbers for extensions begin with 1000 and go all the way up to 1199. After that, you’re bumping into the dialing plan. And three-digit numbers almost always begin some phone number in the United States. Having told you the best practice, let me admit that we use numbers in the range of 200 to 399 and have had no problems with BroadVoice service or Asterisk. If we had it to do over again, we’d probably heed our own advice, but …

    To set up an Extension, click on the Setup tab and then choose Extensions. An almost blank form will appear with a default extension of 200 using SIP as the protocol with rfc2833 for DTMF signalling. Set the extension number to whatever you desire, but be sure the protocol says SIP and the DTMF setting is rfc2833, for now. For ease of explanation, let’s assume you chose 1000. Now let’s make the extension password 1000 also to keep things simple. Enter your name for the user name. Be sure the Voicemail and Directory option is Enabled. Make the voice mail password 1000 as well. Enter a working email address for this user account and leave the other defaults as they are for now. Click Add Extension to save your work. Click on the red bar again to reset Asterisk.

    Configuring Asterisk for Incoming Calls. Only two more steps and we’ll be ready to try out our new system. Click the Incoming Calls tab. In both the Regular Hours and After Hours sections of the form, click the Extension radio button and choose your new extension number (1000) for receipt of incoming calls. Click Submit Changes and then click the red bar to reset Asterisk.

    Configuring Asterisk for Outgoing Calls. Now click on the Outbound Routing tab. The Add Route form will display. For Route Name, call it Outside. Leave the password blank. For Dial Patterns, enter the following:

    NXXNXXXXXX
    NXXXXXX
    1NXXNXXXXXX

    Finally, for the Trunk Sequence, choose SIP/bv. Check your entries carefully. Then press the Add button. Now click the Submit button. And click on the red bar to restart Asterisk.

    Configuring the X-Lite Softphone. Start up X-Lite on your PC or Mac and choose Preferences->Systems Settings->SIP Proxy->Default from the menu bar. Make sure it is enabled. To keep things simple, enter 1000 for your Username, Authorization User, and Password. For Domain Realm and SIP Proxy, enter the internal IP address of your Asterisk server. You can change any or all of this later. Close the configuration menu and the softphone will try to register with Asterisk. If all went well, you’ll get a "Logged In" message with your extension 1000 displayed on the screen. You now should be able to dial a call anywhere in the U.S. using the same digits you’d use on your home telephone. Try it. You’ll like it! If that worked, you’re ready to take your first incoming call. Go to your cell phone or home phone and dial your BroadVoice number just as if it were your Aunt Betty’s phone number. All the area code and long distance rules still apply except you can dial any number in your own area code using BroadVoice by dialing a 7-digit number whether Ma Bell requires 10 digits or not.


    Securing Asterisk. Now that we have things working, it’s time to make sure Asterisk@Home stays that way. There are two critical steps to securing Asterisk@Home. First, we need to install all of the patches which have been released since the bundled version for the CD was created. And second, we need to reset a number of passwords to secure passwords that only you know. Then we’ll be ready to put Asterisk on the DMZ of your firewall and expose it to every evil Internet person known to mankind. To get the latest Linux updates, log in to your Asterisk server as root, and type the following at the prompt: yum -y update. You may have to reboot your server when the update process completes. Get in the habit of doing this every couple of weeks, and you’ll never have a security problem with Linux.

    Now for the passwords. First, think up a good one. Use letters and numbers. Now log out and back in to your Asterisk server. Read the screen and type: help-aah. As you can see, you need to change the Linux password (passwd), the maintenance password for AMP (passwd-maint), the standard AMP password (passwd-amp), the MeetMe password (passwd-meetme), and the admin password used to check email (passwd admin). One more you have to dig for is the password for the Flash Operator Panel (FOP). Change to the directory where the config file is stored: cd /var/www/html/panel. Edit the config file: nano op_server.cfg. Find the line with the password: Ctrl-W security_code. Then change passw0rd to something else and save your changes: Ctrl-X, y, then Enter. Don’t forget to stop and restart Asterisk: amportal stop then amportal start.. There’s really no reason you can’t use the same password for all of these passwords as long as it’s secure. Finally, log in to the Asterisk Management Panel (AMP) and click on CRM which starts up the Sugar CRM application. Login as admin with password for your password. Click on My Account in the upper right corner, and then click the Change Password button to change your CRM password.

    Once you’ve completed all of these password changes, use a web browser to open the web interface to your router and find the option which let’s you designate an IP address as your DMZ server. Insert the IP address of your Asterisk server there. What this means is that Asterisk now is sitting out on the Internet without the protections of your router/firewall. You’ll need to do this if you plan to add remote extensions at other locations which can make calls off your Asterisk server. If you don’t care about this functionality, then the DMZ step is unnecessary.

    Homework. We’ve covered enough to get you up and running with Asterisk@Home. Take a little time to add a few more extensions and enjoy your new toy. We’ll add the really fun stuff next week, but, if you want to get a head start, here are some of the best tutorials we’ve found: Asterisk@Home Handbook, Asterisk@Home for Dumb Me (especially good for those outside the U.S. that want to configure Asterisk for international dialing), The Hitchhiker’s Guide to Asterisk, Build Your Own PBX, Configuring Asterisk@Home for BroadVoice, the VoIP Wiki, Asterisk@Home Forums, and Voxilla’s Asterisk Forum.

    Coming Attractions. One of the little goodies we’ve been working on for next week will let you access a web page stored on your Asterisk machine from anywhere in the world, type in the phone number of the phone sitting beside you, and have Asterisk call you back at that number with dial tone (after entering your password, of course). You then can make unlimited calls using your BroadVoice service at your home to anywhere in 21 countries … for free (assuming you have the BroadVoice $19.95 World Plan). For those that travel frequently outside the United States, you know what a big deal this really is. Stay tuned!


    Some Recent Nerd Vittles Articles of Interest…

    ISP-In-A-Box: Installing a Free Asterisk PBX Phone System (Part I)

    AsteriskNOTE: For a more current article on setting up an IVR application with Asterisk®, see this Nerd Vittles article.

    Summer vacation is over for us so today we hit the ground running. No home or office is complete without your very own free PBX. So we kick off our fall season with a series of HOW TO articles which will tell you everything you ever wanted to know about deploying the world’s best and most powerful open-source PBX, Asterisk. You might be asking, "What is Asterisk?" We like to think of Asterisk as the world’s finest telephony toolkit. Just about anything you’ve ever heard on a telephone can be built with Asterisk. It provides a rich collection of building blocks which allow people to call you using virtually any telephony platform including POTS (plain old telephone system) and VoIP (voice over IP). Hardware interfaces are available to connect your Asterisk PBX to T1 and PRI circuits, ISDN lines, POTS lines, and IP networks. And the beauty of the Asterisk design is that you build your system identically regardless of the telephony hardware interfaces you choose. When a call is received, Asterisk provides the tools to design an auto-attendant, an interactive voice response (IVR) system, a call routing system, a voicemail system including email or pager notification and delivery of messages, a fax server, and a teleconferencing system. Asterisk scales from one user to thousands on hundreds of interconnected systems. You can even put extensions at your remote getaways and make and receive calls through Asterisk at your home base. You also can mix and match hardware and call features to your heart’s content while adding sophisticated touches such as call queueing, music on hold, and even wakeup calls. There’s a terrific web interface to walk you through configuring your Asterisk server and another web application lets you listen to your voice mail messages with any browser. You won’t master Asterisk overnight, but you’ll be glad you invested the time learning it.

    Our objective, as with all of our tutorials, was to identify a best-of-breed approach to Asterisk deployment which minimized the cost and learning curve while maximizing the functionality available. Our other Golden Rule applies in spades to Asterisk: Start Small and master the basics. Then grow your system. You don’t need to buy anything to start using Asterisk if you have an old clunker PC lying around your home or office. Out of the box, Asterisk supports VoIP telephony and a number of free softphones including X-Lite that work with Mac OS X, Linux or Windows PCs are available for the taking. Of course there are thousands of Asterisk developers around the world (even us) who will be more than happy to charge you $150 an hour to build any type of Asterisk PBX you can imagine, but we’re assuming your budget is more limited. Before we get to actual installation of Asterisk, let’s address briefly what types of systems are possible and what the relative costs would be.

    Asterisk Hardware Costs. To reduce your anxiety level about Asterisk, let’s first talk about costs. Asterisk can be run on virtually any modern PC (3 years old or less) or a Mac. While we always lean toward the Mac platform because of the ease of installation and use as well as the open source flexibility that Mac OS X provides, Asterisk is an exception primarily because the simple tools are not yet available for the Mac and because Asterisk consumes all the computing resources it can get its hands on. Stated another way, your Asterisk server ought to be built on a machine dedicated to Asterisk and its tools. So don’t waste your Mac when PCs are a dime a dozen these days. And the very best implementation (today) is built around Linux running on any garden-variety PC. Yes, a $188 WalMart special (see inset below) will probably suffice for home or home office use. And, no, you won’t have to learn Linux to use Asterisk effectively.

    Asterisk is extremely processor-intensive because of the digitizing and compression of incoming and outgoing human speech so the more simultaneous calls and tasks you wish to handle, the beefier the machine needs to be. Having said that, an under $1,000 AMD Athlon 64-based system with a gig of RAM and a 200GB drive could probably handle several hundred simultaneous calls and many more users without breaking a sweat. The Nortel solution for an equivalent system with consulting fees would be in the hundreds of thousands of dollars. For more sizing information, go here.


    Editor’s Note: This version of Asterisk@Home has been superceded. For the latest tutorial on or after February 3, click here.

    Choosing a Telephony Provider. Assuming you want to make calls out through your Asterisk PBX, you have two issues to consider. First, you need a telephony provider to route your calls to their destinations unless you only want to talk to other individuals in your home or office. And second, you need telephone equipment for each of your users. Our recommendation on telephony providers is to ditch Ma Bell and her offspring and choose a VoIP provider that gives you unlimited local and long distance calls to the places you frequently call. We’ve already explained in a previous article why our VoIP provider of choice is BroadVoice, and the balance of these tutorials assume you will go that route. Before you go the VoIP route, read our article and get a good handle on not only the advantages but also the risks and tradeoffs of VoIP technology. We think BroadVoice gives you the best VoIP bang for the buck: unlimited incoming and outgoing calls to 21 countries for only $19.95 a month plus a $2.50 service charge including a phone number in your choice of most area codes. There are, of course, other applications where outgoing calls may not be that important. For example, if you wanted to build an Asterisk IVR application to provide movie reviews and schedules or real estate listings or Little League baseball scores, then all you really care about is having a local phone number and free incoming calls. BroadVoice can meet those requirements with their Bring-Your-Own-Device (BYOD-Lite) Plan using Asterisk for $8.45 a month. Add unlimited outgoing calls within a single state for only $4 more a month. And, for businesses, unlimited calls within the U.S. and Canada are only $29.95 a month plus a $2.50 a month service charge. If you’re dead set on keeping your Baby Bell phone line, then you’ll need a Digium Wildcard X100P FXO PCI Card to connect your POTS line to your Asterisk PBX. You can find OEM versions for under $10. Just search for X100P on eBay. Software installation instructions are available here. Note: This card allows your Asterisk PBX to place and receive calls from a POTS line. It does not allow you to connect a telephone instrument. We’re getting to that.

    GrandStreamChoosing Telephones. As with most technology decisions, choosing telephone instruments depends upon your requirements. If your VoIP PBX will be used in your home or home office by mostly your family where one person talks on the phone at a time, our recommendation would be to pick up one of the new 5.8GHz cordless phone sets. Many can support up to 8 wireless extensions which you can scatter around the house as desired. All that’s required is an electric outlet for each unit’s AC adapter. They work great throughout large homes and won’t interfere with your home wireless network. Visit Best Buy, Staples, Office Depot, or Office Max and have a look at the incredible selection which has become available in just the last year. Then go to PriceGrabber.com and save yourself 20 per cent. Sam’s Club and Costco also run specials on these phones almost weekly. If you go this route, then you’ll also need a Sipura VoIP adapter to connect your analog phones to your Asterisk digital PBX. If all you want to connect is a single cordless phone set with up to 8 wireless extensions, then the SPA-1001 will suffice. It’s the size and weight of a pack of cigarettes and costs about $60. For two lines, choose the SPA-2002 or choose the SPA-2100 for a cordless phone set and a fax machine. If you’re looking down the road to the day of multiple VoIP providers, then you’ll want to spring for the Big Kahuna, the SPA-3000, which still costs less than $100 (see inset below).

    If you have a home office or a business and want a true business telephone instrument with speakerphone, multiple line support, and intercom paging, then IP telephone instruments are the way to go. We personally favor the GrandStream GXP-2000 (inset above) which is under $100 at the Voxilla Store. Sipura also makes a phone, but there have been problems reported with the rubberized buttons sticking. For $200, you can move up to the Polycom IP501 with a state-of-the-art speakerphone. With either of these phones, the same BroadVoice coupon described above is included. We’d recommend you steer clear of Cisco-branded IP phones (they also own Sipura now) unless you like burning money and enjoy water torture. Trying to obtain software updates from Cisco is next to impossible unless you purchase the phones directly from Cisco and subscribe to a maintenance contract (also expensive).


    Homework. We’re going to give you until next week to get all of your hardware lined up, and then we’ll be ready to load Asterisk. We’ve chosen a bundled Asterisk product called Asterisk@Home that provides Linux, Asterisk, Apache, MySQL, and PHP all rolled into a single CD. You simply insert the CD into your PC, turn it on, and it will reformat your drive (aka "erase everything") and load a turnkey system for you. It doesn’t get much easier than that. You’ll be up and running in less than an hour. If you want to get a head start, you can download the ISO image, handbook, and user’s guide from here. There’s a great Asterisk tutorial from an Australian user that’s worth a look: Asterisk@Home for Dumb-Me. You may also want to review the Asterisk User Documentation Project including The Hitchhiker’s Guide to Asterisk which was written by some of the best in the business. It’s available in both HTML and PDF formats. Finally, there’s a new commercial offering, Asterisk: The Future of Telephony, at Amazon.comblank. For future reference, here’s the place to go when you get stumped down the road.


    Some Recent Nerd Vittles Articles of Interest…

    ISP-In-A-Box: Mastering Internet Telephony – One SIP At A Time

    X-Ten LiteWe're interrupting our summer break to tell you about what we've been playing with these past few weeks. So today we resume our coverage of IP Telephony with the second in a series of articles on the subject. We'll be exploring SIP-based telephony solutions. These are hardware, software, and service offerings that implement the industry-standard Session Initiation Protocol (RFC 3372) for delivery of telephony services. What cell phones did to the pay phone business is happening in spades with home and business phone and long distance services thanks to VoIP telephony. Cisco had the right idea. They just got too greedy. We previously covered using Skype with your Mac mini or other Mac running Tiger or Panther. The two major drawbacks of the Skype service are Skype's utilization of a proprietrary communications protocol and being tied to your Mac or PC to make and receive phone calls. Once you upgrade to Tiger, however, you can at least get 30 feet away from your Mac using a bluetooth headset such as the Plantronics M3000.

    There are some other options that are worthy of a careful look before you jump on the Skype bandwagon. And there's nothing to prevent you from using more than one voice over IP service. You could use a half dozen and still save money compared to what you're paying a Baby Bell for home and especially business phone and long distance services. The only real prerequisite for acceptable IP telephony service is a broadband Internet connection but that, too, is changing. The quality of the calls is now virtually identical to what the Baby Bells provide. Look at it this way: cancelling your residential or business phone service will almost pay for your monthly high-speed Internet service. The only time this isn't an option is in markets where DSL is your only broadband choice. Most of the Baby Bells still tie DSL service to the existence of a regular phone line at your home or office. So much for the Sherman Act's tying prohibition, but that's another story. Finally, a word of caution: VoIP telephony is still in its infancy so don't expect absolute perfection. Many of us endured snowy televisions for years, and VoIP is way past that already. But, if being able to make a 911 call in the middle of the night from your home phone is the most important criteria to you for home phone service, then by all means stick with the Baby Bells. They appreciate your 50 bucks every month for local phone service.

    Unlimited "Call (almost) Anywhere" Phone Service. If, on the other hand, you're looking for a drop-in replacement for your home phone service and exhorbitant long distance fees (i.e. per minute rates for U.S. calls in excess of 4¢ per minute), then look no further than BroadVoice. Yes, once in a while, we get a whopping $20 if someone signs up for BroadVoice service using our account number, but we haven't bought our dream home with the proceeds yet. In fact, a good night on the town is still a pipe dream. Some of you may remember the late Victor Kiam commercial for Remington razors: "I liked 'em so much ... I bought the company." That's kinda the way we feel about BroadVoice although we're still awaiting the deluge of $20 checks before making the company purchase. Here's our BroadVoice phone number just in case you want to help: (4O4) 795-2227.

    What distinguishes BroadVoice from the rest of the pack are several things: the breadth of their hardware and software offerings and the flexibility they provide in letting you switch plans, switch hardware, or bring your own devices for use with their service. And BroadVoice doesn't cripple the devices they sell to preclude your using their hardware with another IP telephony provider's service down the road. Imagine Sony selling you a television that could only receive Fox News. George Bush might buy one, but ...

    The other major distinction with BroadVoice residential service is what $20 a month buys: unlimited calls to anywhere in the United States, Canada, and the United Kingdom, Ireland, Austria, Belgium, France, Germany, Italy, Vatican City, Norway, Sweden, Denmark, the Netherlands, Switzerland, Spain, Chile, Singapore, Taiwan, and China. Another five bucks a month buys you free calling to fourteen more countries. As with most IP telephony providers' plans, calls to other BroadVoice users in any country are always free. And nothing precludes your having an Atlanta phone number on your BroadVoice phone in Holland so grandma in Atlanta can call you toll-free using her big black Ma Bell phone from 1952. But, suppose you just want to experiment with IP telephony before making the leap. Keep reading!

    What initially separated Vonage from the rest was the feature set that accompanied their IP telephony service. BroadVoice not only has matched Vonage feature for feature, but they've added almost a dozen more at no cost. The free voice mail service is nothing short of incredible. You can retrieve your messages using any phone or a web browser. Better yet you can have either your messages or just the caller ID information emailed to you in real time. You also can have calls to your BroadVoice number ring simultaneously on up to seven additional phone numbers including your cell phone. Other features include Anonymous Call Rejection, Call Waiting, Call Forwarding Always, Call Forwarding Busy, Call Forwarding No Answer, Distinctive Ring, Do Not Disturb, Last Number Redial, Call Hold, Speed Dial 8, Speed Dial 100, Caller ID with Name, Three-Way Calling, Call Notify, *69 Call Return, Voice Mail Aliases, Call Transfer, and Voice Mail Distribution Lists. If that isn't enough features to keep your fingers busy, you can add additional phone numbers in different area codes including toll free and United Kingdom numbers of your choice for less than $2 more a month. And Microsoft Windows Messenger Soft Phone support is available for $3 a month. Many other features are also on the drawing board. Last, but not least, you can manage all of these features using your favorite web browser.

    The one feature we wish BroadVoice would hurry up and implement is the ability to use multiple phones in different locations with the same account. Since BroadVoice could charge for multiple simultaneous calls from the same account, we really don't see any business impediment to such a feature. And it would facilitate movement from place to place by business travelers who might want a terminal adapter in their home but would prefer a WiFi phone or softphone while on the road. Right now you would have to disable your home terminal adapter before switching to another device, or BroadVoice would suspend your service when multiple devices appeared on their radar.


    VoIP Telephony Hardware. If Skype has an Achilles Heel, it would have to be the quality of hardware offerings available for use with the Skype service. Once you get used to high quality telephone instruments, it's hard to go back to a $15 plastic headset to make and receive telephone calls. You won't find that problem with BroadVoice. In fact, if you already have broadband service, you can add a terminal adapter with or without a router and use your existing cordless phones with ease. All you pay is the $40 set up fee, and the device is yours to use for free. Any of the 5.8GHz cordless phone sets are almost perfect for use with the BroadVoice router. Our personal favorites are Uniden's new two-line model (see inset above) which is expandable to 10 units or the single-line vTech i5871 which has about the same feature set as a high-end cell phone (see inset below).


    Using A Wi-Fi Phone. Another option which finally began shipping again last week is a WiFi-enabled IP phone. BroadVoice offers this new phone for $99 when you sign up for their service. Or you can purchase one later for $140 from Hello Direct to use with your BroadVoice service. The claimed advantage of the WiFi phone is that you can take it with you and use it from virtually any Wi-Fi HotSpot or from any home or office equipped with wireless Internet service. We ordered the phone from Hello Direct, the marketing arm for BroadVoice hardware now. BroadVoice actually shipped the new phone, a UTStarcom F1000, not the WiSIP phone previously sold by BroadVoice. Unlike the WiSIP phone, this phone does not yet have a web interface (either incoming or outgoing). This means you cannot configure it through a web browser and can't connect to WiFi HotSpots that require some sort of terms of use acknowledgment before you can use their service. So the phone is all but worthless at Wi-Fi hot spots but does work reliably with home and office networks using nothing more secure than WEP encryption. WPA is promised as a future enhancement.


    The only way to configure the phone for use with BroadVoice is to have BroadVoice customer service select this phone as your only type of device (i.e. you lose your BYOD status) and then download the configuration using TFTP. Once you switch to this phone, BroadVoice customer service claims there's no way to revert back to another type of device without calling BroadVoice support again since the phone is so new that it's not in their list of supported BYO devices yet. BroadVoice support swears that you'll be able to have 2 separate devices (for a modest fee) within a month so I guess we'll see what happens. The other drawback with this particular phone is that there appeared to be no way to adjust the speaker volume. BroadVoice support wasn't much help on this either. We were told there was a button "somewhere probably on the side of the phone." Well, gee, why didn't we think to look there before calling. There, of course, is no button on the side of the phone nor anywhere else to adjust the volume. Nor is it supported in the menus which are fairly intuitive. UTStarcom's Forum happened to answer the question: press the right arrow key during a conversation to increase the volume or the left arrow to decrease it. Using the Up and Down arrows would have been too intuitive, I suppose. It turns out that the volume already was set to 4 of 5 steps, and increasing it to 5 made very little difference. You really couldn't use this phone in a noisy restaurant or airport setting based upon our testing. There's also a problem obtaining the device unlock code from BroadVoice support. At least two BroadVoice agents couldn't find the answer. You need this code to force a power-on password and to enter (or discover) your SIP password. Let me save you some time on the forums. For the benefit of all the hard-working BroadVoice agents, the default password is 888888 which then can be changed. And finally this footnote: despite what BroadVoice Customer Service says about not being able to change devices without their help, once you discover your SIP password using the device unlock code above, it actually is a simple matter to reconfigure the X-Ten Lite softphone to work when you are not using your WiFi phone. Just change the X-Ten Lite SIP password to match that of your WiFi phone, and it works swimmingly. Sipura terminal adapters also work fine. Just don't use two devices at once (for the time being anyway), or the BroadVoice switch will lock your account.

    After successful use of the phone at home using a 128-bit WEP password, we went to test it at one of our neighborhood restaurants which has free Wi-Fi access. The phone didn't work there because (like most WiFi Hot Spots) there is a web acknowledgment screen to consent to terms of use before you can gain access to the Internet. Since the phone has no web browser, there's no way to get connected. Interestingly, some other store or home near the restaurant apparently had an open Wi-Fi router which the phone connected to with no problems after giving up on the Wi-Fi Hot Spot connection inside the restaurant. Considering that a prosecutor in St. Petersburg, Russia Florida just indicted a person for "theft of computer services" for using his computer on a public street beside a person's house with an open WiFi router, this may not be the smartest use or design of technology until a few courts speak on the legality of using open WiFi connections in public areas. In this particular case, the phone made the connection with no user intervention. We only noticed what happened because it initially paused on the Wi-Fi Hot Spot connection, and we then began watching the screen to see what would happen next. What the phone did was start scanning for other access points. Incidentally, you can store six separate WiFi locations with separate passwords in this particular phone model which is a significant improvement over the older WiSIP phone. Assuming the courts confirm the lunacy of charging individuals with theft of services for using open, unprotected WiFi access points (we'll let you be the judge of who the real dummies are in this scenario), all this phone really needs now is a simple web browser to navigate through HotSpot log in screens, and it will be a pretty terrific, first generation product. The phone is the same length and a bit more than half the width and a third the weight of Palm's Treo 650. As for the "look and feel" of the phone, we'd rate it as pretty much the equivalent of most $100-$150 cell phones.

    Using A Softphone With Your Mac or PC. If you are hell-bent on using your VoIP phone service directly with your Mac or PC, X-Ten Lite (see inset) is as good a product as you could ask for. It can be configured to work with BroadVoice service easily, and it can be downloaded for free from here. We use it, and it works great!

    We've barely scratched the surface of SIP-compatible devices which can be used with BroadVoice. Here's a list of configuration tutorials for the major devices that BroadVoice supports. But many other SIP-compatible devices will work as well. Visit The VoIP Connection web site to get an idea of the breadth of choices which are out there. Our only advice would be not to purchase a SIP device unless a configuration for that device exists to use with your provider. The very best Wizard for configuring numerous SIP devices for use with dozens of VoIP providers can be found at Voxilla.com. Our rule of thumb goes like this: if it's not on the Voxilla Wizard's device list or BroadVoice's supported device list, don't buy it unless you enjoy water torture.

    Pay-As-You-Go Internet Phone Service. If "all-you-can-eat" isn't your favorite meal ticket, there now are a couple great SIP alternatives to Skype. As you might have guessed, BroadVoice has a BYOD-Lite plan for $8.45 a month that includes a regular phone number in your choice of area codes, all the same features outlined above, and 100 outgoing minutes to anywhere in the U.S., free incoming calls, and free calls to other BroadVoice users. Additional U.S. minutes are about 4¢ (maybe cheaper if some BroadVoice folks read the rest of this paragraph). That's about the same per minute rate that many traditional long distance carriers have been charging for U.S. calls during the last five years. And some are even cheaper. If the objective is to encourage switching or at least experimentation with VoIP services which the $8.45 pricing scheme certainly suggests, then the pot could stand a little more sweetening insofar as the per minute costs are concerned. And, yes, we make money if you sign up with this carrier, too. Agent 5185 at your service. Ain't America great!

    Another VoIP provider option is SIPphone. As with BroadVoice, it is not proprietary and is also SIP-compatible meaning it uses open standards-based SIP technology. And, just as with Skype and BroadVoice, calls between users of the service are free. For calls to plain-old-telephones (POTS) in the United States, the cost is 2¢ a minute. Calling rates to other countries are available here. And, if you'd like a "regular" phone number in your favorite area code for free incoming calls from any other phone of any flavor, the cost is about $6 a month with 100 free outgoing call minutes which makes it virtually identical to BroadVoice's BYOD-Lite plan except for the per minute charges. The other good news with the SIPphone service is that most of the same hardware that works with BroadVoice will also work with SIPphone. So, if you get tired of BroadVoice for any or no reason, you can switch to SIPphone and take your hardware with you. That includes terminal adapters and routers with SIP service compatibility, the WiSIP Wi-Fi phone, and softphone clients such as the free Gizmo and X-Ten Lite clients which work with Macs, Windows PCs, and soon Linux desktop machines. Unfortunately, we haven't found the SIPphone service to be nearly as reliable as BroadVoice's. Check out their Getting Started forum before you make the leap.

    Build-Your-Own PBX. For all the supernerds still reading, you also can add your own PBX to your Mac or PC and use either BroadVoice or SIPphone to place and receive calls. Known as Asterisk®, the software for your Mac can be downloaded from our experimental WebDAV server or from this Asterisk web site. You can map a network drive to our WebDAV server by connecting to http://windswept.dyndns.org:82 with a username of bozo and a password of forlife. Then you can drag and drop the Asterisk file folder on your desktop. Don't forget to eject the drive when you are finished. For more info on WebDAV and Web Folders, start here.

    Our personal preference at the moment is to build an Asterisk PBX using any old, low-end Windows machine with the Blue Lava VOip PBX In A Box software. We have lots of scrapped Windows machines that are no longer permitted to access email or a web browser because of Microsoft's self-inflicted security mess. The cost of Blue Lava is only $49 and will save you weeks of headaches. Incidentally, the Blue Lava developers are the same fine folks that developed the WiSIP Wi-Fi phone discussed above. And the Asterisk software is preconfigured for use with BroadVoice and SIPphone among others.

    Everything Else You Wanted to Know About BroadVoice. No single article can do justice to the breadth of features and functions available with a new BroadVoice account. Here's another article worth a look. Finally we'll send you to the same place we go when there's something new to be learned, the Voxilla Forum. As mentioned before, VoIP in general and BroadVoice in particular are not without their problems. BroadVoice, for example, had a serious meltdown several months ago after a dispute with one of their providers who had everything to gain by shutting down the likes of BroadVoice. Such are the growing pains of a new, incredible technology. Just explore it with your eyes wide open and take precautions to avoid having all of your communications eggs in one basket.

    WHERE-TO Bonanza: 50 Great Summertime Web Sites for You & Your Mac mini

    Today we’re providing 50 of our favorite Mac mini resources on the web that will tell you anything and everything you ever wanted to know about Mac technology. There are sites for news, reviews, tutorials, tips and tricks, troubleshooting, blogs, forums, hacks, rumors, and loads of additional applications. So, while we’re taking it easy this summer, visit a few of the sites you haven’t already tried and learn something new. We’ll even wave to you from the beach. Any Mac running at least Mac OS X v10.3 aka Panther is a suitable candidate for taking advantage of most of these web sites. In case we missed a few, feel free to add your own favorites as comments. And, for the math geniuses, you’re right. The number of sites doesn’t quite add up to 50, but a few sites weren’t that great so we’ll leave it to you to figure out which ones shouldn’t be here. And be sure to check out our HOW-TO Bonanza: 50 Great Summertime Applications for You & Your Mac Mini.
    Mac mini

    Favorite Hacks

  • hack a day   HOW-TO Hacks to the Max
  • lifehack.org   Daily Productivity Pointers and Life Hacks
  • Favorite Tech Sites

  • O’Reilly Make:   Technology on Your Time
  • O’Reilly MacDevCenter   Mac Projects to the Max
  • Command-Tab   Technology and Mac Geekery
  • MacGuru HQ   Mac and Linux Tips, Tricks, and Secrets
  • Favorite Mac mini Sites

  • 123macmini.com   The granddaddy of the Mac mini sites
  • Modmini.com   Making the most of your Mac mini
  • BYODKM.net   Mac mini Enthusiast Network
  • HTmini   Mac mini Hardware News
  • Favorite Mac News Sites

  • MacSurfer’s Headlines News   If You Only Have Time To Check Out One Site, This Is It!
  • Mac News Network   Another Terrific Site for Mac News
  • Mac Mini News   All the Latest Mac Mini News
  • MacCentral   Great news and reviews from MacWorld
  • MacMiner   get deep. find news.
  • MacDailyNews   Apple and Mac news
  • Infinite Loop   Ars Technica’s Mac journal
  • trendalicious!   Another view of the del.icio.us bookmarking service
  • Other Mac News and Reviews

  • Applelinks   The Ultimate Mac Website
  • MacInTouch   Mac News and Information
  • MacMerc.com   Mac Articles and News
  • MacMegasite   Mac News from a Software Developer’s Perspective
  • Macsimum News   Mac Online Newspaper
  • MacSlash   Daily Dose of Mac News and Commentary
  • The Tao of Mac   Two parts genius, one part … well, you decide
  • Favorite Mac Applications

  • Mac OS X Apps   Mac Applications for Everyman … and Woman
  • Mac OS X Power Tools   Every Link from First and Second Editions
  • Favorite Mac Mags

  • MacAddict   A Better Machine, A Better Magazine
  • MacWorld   The Mac Product Experts
  • Popular Science   Great How-To article on the Mac mini
  • Favorite Mac Rumor and Gossip Sites

  • Apple Insider   News and Rumors
  • Mac Rumors   News and Rumors You Care About
  • Think Secret   Mac Insider News
  • Favorite Mac Weblogs

  • Technorati   Blog search engine
  • The Apple Blog   Everything Apple
  • The Unofficial Apple Weblog   A Little Bit of Everything Including A Chat Room
  • Daring Fireball   Mac Nerdery, etc.
  • Obvious Diversion   Mac Stuff That Makes You Think
  • Nerd Vittles   Just In Case You Share This List With A Friend
  • Favorite Mac mini Forums

  • Apple Discussion   Lots of stuff with lots of rules (registration required)
  • Macminiforums   #1 Resource for the Mac mini (registration required)
  • MacOSXhints Forum   Everything you ever wanted to know about Mac OS X
  • Favorite Mac Troubleshooting Sites

  • MacFixIt   Troubleshooting Solutions for the Mac
  • Accelerate Your Mac   Lots of great real-world tips
  • Tiger Hints   Solutions to just about any problem with Tiger
  • Favorite Mac Tutorials

  • MacZealots.com   Mac Tutorials and Reviews
  • Favorite Gadget Sites

  • Engadget   
  • Gizmodo   
  • Ubergizmo   
  • GadgetryBlog   
  • Akihabara News   
  • Popgadget   For Ladies Only
  • For The Other Side

  • For Windows XP Users   Still Using Win XP But Wanna Try the Mac OS X Experience for Free
  • When 50 Just Isn’t Enough

  • MacPiCkS   Every Mac resource on the web … except ours, but who cares
  • ISP-In-A-Box: Remotely Managing Your Mac Using AFP and SSH Tunnels

    blankWe've been exploring remote access and remote management options for the Mac mini and other Macs running Mac OS X Panther or Tiger for several months, and today we'll turn our attention to another solution that is ideally suited for those with multiple Macs at different locations. Every copy of Mac OS X ships with client and server versions of the Apple File Protocol (AFP) over TCP/IP. Enabling the server is a one-click operation. Choose System Preferences->Sharing and put a check mark beside Personal File Sharing. Assuming you have enabled the Mac's built-in firewall (which we always recommend), this automatically opens ports 548 and 427. If you have a hardware-based firewall (which we also recommend), you'll need to open port 548 and point it to the internal IP address of your Mac. If you have two Macs with Internet connections at different locations, you'll need to do the same thing on the other end. To connect to a remote Mac, you'll need to know its IP address or fully qualified domain name. Using a web browser on the remote Mac, you can obtain the IP address of your Mac by clicking on this link.

    Once you enable Personal File Sharing and open the necessary ports in your firewalls, anyone can access and upload files to your Macs knowing nothing more than your IP address or fully-qualified domain name. Only those with actual user accounts can read and write files and execute programs on your remote Mac, and their access is restricted just as if they had logged in sitting at the desktop. The anonymous write access may or may not be what you had in mind. One very real risk of this design is that, given enough time, a malicious passer-by can flood your Mac with data and fill your entire hard disk with junk which will eventually crash the operating system since there will be no room for temporary files. If you couldn't already tell, this isn't our favorite Apple engineering design so here's how to fix it.

    As delivered from Apple, every user's account has a Public folder with a Drop Box subfolder. The owner-user has read-write-execute privileges. The owner's group and everyone else have write and execute privileges to the Drop Box folder. This means strangers can upload files but can't see what's been uploaded. To adjust this so that strangers have no access privilegs, open a Terminal window and switch to root privileges: sudo su. Switch to the directory which houses user accounts: cd /Users. Display a directory listing for this folder: ls -all. Then repeat the steps below for every user account on your Mac substituting the name of each user's file folder for thisuser:

  • chmod -R o-rwx thisuser/public
  • ls -dl thisuser/public
  • Make certain that the public directory listing in Step #2 begins with the following:

    drwxr-x---

    There should be three trailing hyphens following the "x" and these are the important part. Don't worry if the rest of the rights don't match. Continue repeating the steps above until you've done it for every user account on your Mac. Forgetting just one means someone can fill your disk with garbage!

    blankNow that we've gotten the security housekeeping out of the way, we're ready to test your AFP access. This can be done from another Mac on your local area network or from a Mac elsewhere on the Internet. If you're trying it from your LAN, use the private IP address of the remote Mac (we'll call the Mac we're connecting to the AFP host or AFP server). If you're trying this from elsewhere on the Internet, use your AFP host's Internet IP address, the one you obtained in the first paragraph above. Now, click on your Desktop and press Command-K. For the server address, type afp://192.168.0.102 substituting your AFP host's IP address, of course. Click the Connect button to make the AFP connection, and assuming you got the IP address typed correctly you will see an AFP login window which looks similar to the one shown in the inset to the left. Notice the Guest and Registered User options. Now you know why we did what we did above to disable Guest access. Technically, strangers still can connect. They just can't get to anything or do any damage. To see how this works, try Guest access to our beach house Mac by going to this address: afp://windswept.dyndns.org.

    For our purposes, you'll want to log in as a Registered User. So type your username and password just as you would sitting in front of your AFP Mac host. If you have Administrator rights, you'll be asked whether to mount your user directory or one of your mounted drives. Mounting the internal drive gives you access to everything on your Mac just as if you had logged in as the root user. You now can perform almost any task as if you were sitting in front of your remote Mac ... only slower. If you're using a modem, make that "painfully slower." If you have broadband connections at both ends of your AFP connection, you'll find AFP is perfectly acceptable for transferring files back and forth but probably not desirable for executing most applications, such as Word or iTunes. Another drawback of pure AFP is that data is sent in clear text and is unencrypted meaning all of the data including your account names and passwords are subject to compromise especially from a "Man in the Middle" attack. A good example would be a curious college geek managing the routers for your local Internet service provider.

    That brings us to the second half of this article which is how to use an encrypted SSH tunnel to protect your AFP sessions. In one of many great articles on the subject O'Reilly put it this way:

    A tunnel is a networking term with an appropriate name. It refers to a connection, usually encrypted, that connects two computers together across another, usually untrusted network. Picture a mountain of evil 3l33t d00dz sitting between your laptop and a server on your internal, protected network. You don't want to just throw your traffic really hard at the mountain and hope it gets there; you want to first form a protected tunnel from you to your machine, and then send the traffic through it.

    Without getting into too much detail, what we want to do is set up an encrypted tunnel using Mac OS X's SSH tools, and then we'll pass all of our AFP traffic through that tunnel to keep the bad guys from reading its contents. Once we finish our AFP session, we'll shut down the tunnel until we need it again. For this to work reliably, you'll need to set up identical user accounts with identical passwords on both the remote host and client machines, and these accounts should have administrator privileges. A user with admin privileges need not be logged in on the remote host to establish the tunnel successfully. On the remote host, you'll need to enable Remote Login by checking the appropriate box in System Preferences->Sharing. This will enable Port 22 traffic on your Mac firewall; however, you also will need to adjust your hardware-based firewall to route port 22 traffic to the internal IP address of your Mac. Now log in to your client Mac using the same account name with admin privileges that you established on your remote Mac. Open a Terminal window and type: ssh 192.168.0.102 substituting the remote IP address of your remote Mac host. You'll be warned that this machine may not be who you think it is. Type Yes to proceed anyway. Type your admin password when prompted. Once the tunnel is established, you can shut it down by typing Exit. You now know how to establish an SSH tunnel and, once established, you can do anything on the remote Mac that you could do sitting in front of it with a Terminal window.

    But we want to tunnel our AFP session through the SSH tunnel. That gets a little trickier, and we've created yet another code snippet to save you a semester's worth of work trying to figure it out yourself. Nothing in this script is original incidentally. It merely combines various suggestions I've scoured from around the 'Net to save you a bunch of time. So download afptunnel.txt to your browser by Control-Clicking on it and choosing to open it in a new tab or window. Press Command-A and then Command-C to copy the contents of the snippet to your clipboard. Now open a Terminal window and create a new file: pico afptunnel. Once the Pico editor opens, press Command-V to copy the contents of the clipboard into the editor. Now search for "windswept": Ctrl-W,windswept,enter. With the cursor positioned over the w in windswept, use Ctrl-D to delete windswept.dyndns.org. Now type the fully qualified domain name or IP address of your remote Mac AFP host but make certain the line ends with a semicolon with no blank spaces between the address and the semicolon. Now save the file: Ctrl-X,Y,enter. Change the file attributes to support script execution: chmod 770 afptunnel. Now try out the script to connect from your local machine to your remote Mac host through an SSH tunnel: ./afptunnel. Type Yes if asked whether to trust the host. Provide your admin password when prompted. When the tunnel is established and the AFP connection is made, log in to the remote host using your remote account created earlier. Heed the Terminal window warning and leave the window open until you end your AFP session by dismounting your AFP drive. Then click in the Terminal window and press the ENTER key to close down your SSH tunnel. You're now an expert on AFP and SSH. Now you can securely connect to your remote Mac from any other Mac on the planet!

    Security Alert. Just a heads up that earlier this week Apple announced a security vulnerability in the AFP server for Mac OS X Tiger only. You can read all about it here. Before using AFP Server on a Tiger system with or without an SSH tunnel, you are well advised to download and install Security Update 2005-006 for Mac OS X 10.4.1.

    Other Mac Projects and HOW-TO's. We tackle a new open source project for the Mac almost every week on Nerd Vittles. You can review the complete list at any time by going here.

    ISP-In-A-Box: Hosting Multiple Web Sites And Domains On Your Mac

    blankOnce you get a web site up and running on your Mac mini (or any other Mac running Mac OS X Panther or Tiger), you’ll probably get hooked and want to add additional web sites or domains. So today we’re going to give you a template that can be used to add additional sites to your heart’s content. In a previous article, we covered one approach to hosting multiple domains. In that scenario, we built separate web sites in the Sites folder for various user accounts on your Mac. Then using Omnis.com‘s DNS tools, we pointed different domains or subdomains to the appropriate web sites on your Mac using a Proxy (aka mod_proxy) record for the domain that looked like this (substituting your own IP address, of course):

  • Namewww
  • TypePROXY
  • Contenthttp://111.111.111.111/~johnny
  • That solution works; however, it forces you to log in as different users to manage the different web sites. Today’s approach assumes you want to manage multiple web sites from a single account on your Mac using the traditional web site folder heirarchy located at /Library/WebServer/Documents. Our site design for multiple web sites and multiple domains goes like this. We’ll create a websites folder below the /Library/WebServer/Documents folder. Then, for each new web site or domain, we’ll create a subfolder below the websites folder. We’ll leave the websites folder empty and adjust Apache to bar direct access to the contents of that folder. Then we’ll assign a TCP port for the new site and add the necessary code to support the new domain to the Apache config file, httpd.conf. Finally, we’ll point our domains to your Mac’s IP address using the proxy service of a domain registrar, restart Apache, and presto, you’ll be hosting multiple web sites from your Mac mini ISP-In-A-Box. One advantage of this design is that you still can remotely manage all of your web sites using a WebDAV client on almost any computer. We covered all of that here last week. We’re assuming you already have built your first web site using our Apache tutorials. If not, start here. Then go here and here. Then you’ll be ready to continue on with this tutorial. As with most of our articles, a degree in Rocket Science isn’t required, but you do have to use the Pico editor to make a few customizations to the Apache configuration files. For the Internet wizards reading this, you’re probably saying there’s an easier way to set up multiple web sites with Apache. Yes, there is. It just doesn’t seem to work in the Mac environment. If anyone comes up with a simpler method that works, do us all a favor and put it in a comment.

    Creating the First Web Site. Let’s begin by creating the folder that will house all of our new web sites. Open a Terminal window and switch to root access with your admin password: sudo su. Now move to the main web site folder: cd /Library/WebServer/Documents. Create the new websites folder: mkdir websites. Move to the websites folder: cd websites. Now create a directory to house our first new web site: mkdir mysite. For additional web sites, you’ll simply create additional folders below the websites folder as we just did.

    Modifying Apache to Support New Web Sites. Because of Apple’s configuration design, we’re going to configure our new web sites to use TCP ports in the eighties beginning with 81 rather than the default HTTP port, port 80. Remember not to use 82. We used that for our WebDAV server. So we’ll need to first edit httpd.conf in the /etc/httpd folder. Open a Terminal window and switch to root access: sudo su. Move to the Apache config directory: cd /etc/httpd. Make a duplicate of the httpd.conf file just in case something goes wrong: cp httpd.conf httpd.sav. Now carefully edit the Apache config file: pico httpd.conf. Switch back to your web browser and Ctrl-Click on the access.txt code snippet here and open it in a new tab or window in your web browser. Press Command-A then Command-C to copy the code snippet to your clipboard. Now switch back to your Terminal window and move to the bottom of the httpd.conf file by repeatedly pressing Ctrl-V. Copy the clipboard contents there by pressing Command-V.

    Now let’s look at what we pasted. The first three lines tell Apache not to display a directory listing of the websites folder if someone accesses your web site by typing: http://yourwebsite.com/websites/. The Listen 81 line tells Apache to listen on this TCP port as well as port 80. The VirtualHost _default_:81 line identifies the port which will be used to access this web site. The DocumentRoot and Directory lines tell Apache where the data for this web site is stored on your server: /Library/WebServer/Documents/websites/mysite. The allow from all line gives everyone access to this web site. And Options +Indexes tells Apache to display a directory listing of this folder if there is no index.html or index.php startup file in the folder. If you want to hide the directory if there is no startup file, change the plus sign to a minus sign.

    Now that you understand what the various lines in the config file do, let’s save the changes to httpd.conf: Ctrl-X,Y,enter. Now restart the Apache web server: apachectl restart.

    Firewall Adjustments. Remember to add a new port authorization in your Mac firewall to support port 81. Go to SystemPreferences->Sharing->Firewall and click the New button. Choose Other for the PortName, specify the desired TCP port number (81), and name the service HTTP81 so you can remember what it does. Click OK to save your update. Also make the necessary adjustment to your hardware based firewall to authorize the new port and point it to the internal IP address of your Mac. If your hardware firewall uses port 81 for remote access, be sure to change it to another port.

    Domain Registrar Adjustments. Finally, access your domain registrar’s web site (as previously noted, we recommend Omnis.com which supports proxy DNS entries) and, using the registrar’s DNS tools, add a proxy record to point your domain to the IP address and port 81 of your Mac web server: http://111.111.111.111:81 using your own IP address. You usually have to make two proxy record entries, one for @ and one for www if you want your web site accessible as either www.yourwebsite.com or yourwebsite.com. If you don’t know the IP address of your Mac web server, just access our IP site identifier using a web browser on your Mac web server, and it will tell you.

    Adding Additional Web Sites or Domains. When you’re ready to add additonal web sites or domains to your web server, just follow these simple steps. Add a new folder in the /Library/WebServer/Documents/websites folder. Add an additional Listen and VirtualHost block to your access.conf config file for each domain address which will be used to access the new web site. Be sure to change the access port to port 83 or higher and the web site directory location in every line that you added. Remember to use a different TCP port for each new domain you add. Restart your Apache web server. Make the necessary additions to your Mac and hardware-based firewalls to support the new port. Then add the proxy DNS entry for your new domain using your domain registrar’s proxy DNS tools. For a sample of what we just did using the mysite.webify.us subdomain, click here. Yes, we eat our own dog food.