Archive for the 'General' Category

A while back I wrote about my experience setting up a business phone system with Asterisk, Polycom, and POTS. This system has been working fine over the last year, I’ve only had to dive in once or twice to fix a couple issues (which I’ll detail in a future post).

However, recently someone using the phone system needed a Direct Inward Dial (DID) to their phone. I couldn’t find any concise walkthrough about how to set this up, so I’ve written down my processing in figuring this out.

I knew Asterisk supported DID, and I found a guide that walked you through setting one up.

If you using POTS for your calls and not a SIP trunk, DID gets tricky really fast. Some information mentioned voltage, analog signaling, and other trickshaving to work with your telephone provider; and PRI, number pulsing, and reversing polarity on analog lines. Both solutions seemed very messy and time consuming to me (working with my telephone company – Verizon – has only been painful). My hunch was that the lines coming into our building weren’t clean and we would have issues with the connections (the contractor who set up the lines mentioned something about the lines being dirty and not being able to fix them). I’m not a VOIP professional – nor do I want to be – line voltage and electrical signaling is the last thing I want to deal with.

Another possibility would of been to dedicate a physical line to the specific phone off the PBX and take that number off the hunt group. I could create an inbound route in Asterisk linking the dedicated line to the extension off the PBX. If I used this method, I would of had to take the line off the hunt group because depending on the number of people calling in the line might be picked up and then anyone using the DID will get a busy signal.

However, this would require buying more hardware and ordering another POTS line, something I didn’t want to do (mainly because of the time involved).

At this point I started to regret going with POTS over SIP trunks for our phone provider. However, POTS offered significant savings for us. Our lines through Verizon are relatively cheap (somewhere around ~$25/line) and came with unlimited minutes. When I looked at cloud phone providers they were charging $0.02 – 0.03 a minute. With our call volume this would of ended up costing us a good chunk more per month. Taking a look at cloud phone providers now it looks like the landscape has changed and cloud and land line providers seem to be much closer to price parity.

I figured it must be possible to forward a call over the PSTN to a SIP. Twilio definitely doesn’t allow connection to SIP endpoints right now (although, they have a service in beta). With Tropo it seemed like it was possible, but I couldn’t test an outbound phone connection without going through a verification process. Additionally, outbound calls ran $0.03/minute which seemed high.

After some googling I found DID Logic which on their front page mentioned call forwarding to a SIP URI – great. The company seems a bit  shady (“bought a theme + plugged in some standard marketing copy” sort of site), but since I could test things out for a couple bucks I went ahead and tried it out – it works great.

I grabbed a number off of DID Logic for ~$1/month + $0.007/minute and forwarded it to my PBX.

However, the Asterisk box was not setup to pick up anonymous SIP calls and my SonicWall firewall was not setup to expose SIP ports to the PBX.

Setting up Asterisk to Support SIP Call Forwarding From DID Logic

Make sure “Allow Anonymous InBound SIP Calls?” is enabled in the General Settings on your FreePBX admin (a SIP call from DID Logic will be anonymous).

Then add an InBound DID number in the extension’s control panel. With this DID assigned you can now call your phone using the SIP URI “”. Most likely your PBX is behind a firewall, you’ll have to configure your firewall + NAT settings to forward SIP traffic to the PBX.

Sonic Wall SIP Traffic Forwarding Setup

You need to have both a firewall rule and a NAT routing policy for SIP traffic to work on a Sonic Wall device. Check out this comment for information about UDP timeout settings and some other general information about SonicWall Config.

Your Firewall rule should look something like:

  • WAN –> LAN
  • Source: Any
  • Destination: Any
  • Service: VOIP
  • Allow

Your Firewall rule should nothandle the routing to a specific IP address even though there is an option for it. The routing is handled via your NAT rule (General > Nat Policies) and should look like:

  • Original Source: Any
  • Translated Source: Original
  • Original Destination: Any
  • Translated Destination: PBX
  • Original Service: VOIP
  • Translated Service: Original

The PBX destination won’t exist by default. To create that destination, go to Firewall > Address Objects and add one referencing your PBX on your LAN.

Also, ensure that “Enable consistent NAT” is enabled under VOIP > Settings. Do not enable any of the transform options.

Average Rating: 4.9 out of 5 based on 176 user reviews.

Quick tip for anyone having issues with getting their iPhone’s Billings Pro app to sync with a local Billings Pro server:

I recently grabbed a Asus RT-N16 and flashed it with DD-WRT. It was working great until I was fiddling with some of the wireless settings and accidentally reset the router.

After reconfiguring the router, my iPhone with Billings Pro Touch would not sync with the local Billings Pro Server. For some reason it seemed that the network tab on the server admin GUI wasn’t picking up my lastest public IP and/or reporting it to the switchboard service correctly. To fix your reported public IP: log out of the switchboard, click advanced, manually set your public IP, and login to switchboard again.

However, my phone would still not connect to my local server. It seemed like it cached the old public IP and wouldn’t update its connection details. The iPhone UI is sparse and doesn’t include any way to manually update connection details. However if you navigate to Settings –> Server, click on your switchboard account, and navigate to password field the “done” button will appear in the iPhone UI. If you click done it seems to pull the updated switchboard login details and it should sync without a problem.

Not sure if this made a difference, but I manually setup port forwarding for 60525-60527 and 7113-7118.

Average Rating: 4.8 out of 5 based on 259 user reviews.

I recently jumped back into a MacRuby project that I haven’t touched in a while. I upgraded to the latest MacRuby 0.12, installed the necessary gems via macgem install, and was presented with this error:

Segmentation fault: 11

Since I started this project my ruby setup had drastically changed: RVM, custom irbrc, and lots of other tools that I’ve found essential for productive rails development had been installed. I noticed that macgem list --local returned the list of gems needed for my rails project.

Running env from the command line revealed that GEM_HOME and GEM_PATH were set explicitly in my bash env, a result of having RVM installed and a non-system ruby set as default. These two environment variables were causing macgem to look for and install gems in the rvm gem directory. To fix the issue run these two commands in your shell and then run your necessary macgem install commands:

unset GEM_PATH
unset GEM_HOME

Average Rating: 4.7 out of 5 based on 262 user reviews.

I created these years ago, but forgot to post them until now: back forward icons for a Cocoa / Objective-C application. PSD + TIFF files included. They were designed during the snow leopard (possibly the leopard) era, but they still look decent. Should be a good starting point for anyone looking to design a custom previous and next button set for their Mac application.

Download Cocoa UI Previous and Next Images

Average Rating: 4.6 out of 5 based on 251 user reviews.

Jarrod Drysdale on digital product pricing:

Our strategies were very different. Sacha wrote a book and priced it relative to the cost of other books, which is the strategy just about everyone follows. Instead of that, I wrote a book and priced it based on the value it provides.

Choosing a pricing strategy based on competition is a natural approach, but also a flawed one. Price competition implies scarcity—supply and demand market forces. There is no scarcity for ebooks because digital files are replicated practically for free.

Seth Godin has mentioned this before: there seems to be a ‘race to the bottom’ effect with a lot of eBooks, but many are doing fairly well with pricing way above the competition if they are in a market with scarce competition. Of course this is nothing new – small supply relative to demand results in a above market price.

If you not planning on growing a business or establishing a brand (including your own ‘personal brand’ – your value in the marketplace) then selling a one-off book (or any sort of digital content) by estimating the intersection of supply and demand curves might work.

However, every product has some of auxiliary asset whose value is increased or decreased depending on a product is priced, designed and released.

Mailing list growth. Establishment of a respected voice in a niche market or field. Growth of enthusiastic fans. Possibility of a future acquisition.

All of these intangible assets are not easily valued because in most cases they are dependent on the future. However, they have a real value and possible growth in any of these assets can effect the short term pricing of a product or service. I think this is what makes digital good pricing challenging – why some books are on sale for $3.99, some free, and some less that 150 pages and $50. I don’t think there is ever going to be any one model that works – when you can slice and dice pricing into many different facets the possibilities are endless.

Average Rating: 4.9 out of 5 based on 253 user reviews.

Recently I was involved in a project moving a company’s files from a old 2003 windows exchange server to a mac mini server setup. The first setup was to move from Exchange’s email and calendaring to Google Apps. After that step was complete we moved the shared files drive over to thunderbolt RAID 5 storage attached to a mac mini server device. The transition was pretty smooth, however there was one problem which wasted a significant amount of time.

The accountant’s in the organization use QuickBooks 2010 for all accounting purposes. Moving to a hosted solution was not an option, and they needed multi-user access to the file (2-3 people could be working on the same quickbooks file at any given moment). Our old 2003 server had quickbooks database server installed which seemed to work fine. Unfortunately, if you are not an ‘enterprise’ quickbooks customer there is no linux version of the database server available. There was an old windows box lying around (fairly fast: dual core 2.8ghz, 3GB ram) that would be a perfect fit (or so I thought…) for a quickbooks server. Wiped the box, installed Windows XP with all updates, removed all crapware, installed quickbooks database software, but had significant trouble getting quickbooks database server to work correctly.

I ran the QuickBooks Network Diagnostic tool, but it did not report any errors. When opening the QuickBooks file from a client machine in multi-user machine the login prompt would come up fine, but after entering the correct login information it would time out with an error message stating a connection issue (H202) and suggesting using an ‘alternative’ method (there was a significant delay in between initiating login and getting a response). Note that QuickBooks at this stage would correctly report an incorrect password.

The network setup in the location where this was occurring had a local server running DNS. The QuickBooks server had a static IP set.

Here are some general notes on setting up QuickBooks:

  • Some mentioned that anti-virus software on the client machine causes slow operation. This didn’t seem to make in a difference in my case.
  • Tried turning firewall off on server + client machines: no difference (proper port settings were already in place)
  • Pulling data off of the shared QuickBooks folder on the XP machine wasn’t bad: 15MB/sec on a badly engineered 10/100 network (there are 5-port 10/100 switches in probably 5-10 locations around the office)
  • Opening the QuickBooks file in single-user mode from a client machine worked fine
  • Launching QuickBooks 2010 on the server and opening the file in multi-user mode, then opening the file from client machines worked fine as well
  • The significant delay between the login screen and the error messages pointed to some sort of look-up timeout, but given that file access to the machine was fine, this didn’t make a ton of sense. However, this seemed to be part of the issue.
  • It is important that the daemon process for QuickBooks Database Server is part of the administration group
  • On another note: some great information on backing up QuickBooks
  • How to schedule backups of QuickBooks from the QB Pro interface

What finally fixed the problem was adding the computer-name (aka server name or BIOS name) to the hosts file. Opening up quickbooks is still painfully slow, but at this point it works.

Update 02/24/2012

After moving (and completely eliminating the windows server from the network) problems ended up cropping up again. QuickBooks seemed to rely on the WINS (a crappy windows replacement for DNS) server to some extent. After editing the lmhosts file (same location as hosts file in windows) and manually adding the NetBIOS entries everything seemed to work. Note that there is not a lmhosts file by default! There is a lmhosts.sam (should for sample). To active the file you have to remove the extension (watch out for hidden extensions). On the machines that are using quickbooks both the hosts and lmhosts file have manual entries for the QB server. Not sure if this is necessary, but it worked.

Update 08/25/2012

The Windows XP QuickBooks Server will seemingly disappear from the network. You can still ping the machine, still access it directly via mouse + keyboard, but accessing the file system or connecting to the quickbooks database will cease to work. I don’t have enough windows knowledge to know if this is a windows bug or not, but I’ve scheduled an automated restart twice a week and this seems to fix the issue.

Average Rating: 4.6 out of 5 based on 174 user reviews.