Trunking

One of the first things most people will want to do with Asterisk is to connect it to a real-world telephone number. There are different ways to do this, but here I'll cover the basics of IP-based trunking.

Contents

How Trunking Works

Asterisk makes no distinction between a trunk and any other device. For example, if you connect your phone to Asterisk, you can place and receive calls. In the same way, a configured trunking provider can place or receive calls to your Asterisk box, usually corresponding to a telephone number.

Advantages of IP Trunking

  • No telephone lines need to be installed or maintained
  • Significantly cheaper than a single land line
  • Undoes the notion of one phone number = one phone line
  • Support multiple DID numbers, from any area code (including toll-free)
  • Potentially unlimited simultaneous channels (depending on bandwidth)
  • Ability to set outgoing CallerID (some providers)
  • Multiple providers can be used for failover

Selecting a Provider

I initially started with BroadVoice. I had way too many quality problems with them. To be fair, they may have improved, but I couldn't wait to find out. This would be a good time to point out that VoIP technology isn't perfect and it's possible that IP trunking can be less reliable overall than what you might be used to with a landline. Still, I think the advantages far outweigh the disadvantages. And the providers are getting better...

I've been using two providers, that I can recommend:

  • VoiceMeUp - for DID and inbound, some outbound
  • VoIPjet - preferred for outbound (cheaper per minute)

On all these services I've selected metered rate plans. Though there may be monthly fees and taxes, these plans are cheap. You pay for the minutes you use, but you'd have to spend many hours per day on the phone to equal the "unlimited" price point that most of these providers offer. In other words, even with moderate use, the bills are usually under $15/mo (while most unlimited plans start at $30). Do the math.

Another potential disadvantage to the unlimited plans is they often will limit the number of simultaneous channels you can use. This may or may not be an issue for you, but I like the thought of being able to process as many calls as I need to at any given time.

Configuring Asterisk

The actual configuration is something that is a bit beyond the scope of this document. Depending on the provider you select, you ought to be able generate Asterisk configurations based on the settings they provide. Both of the providers listed above give some Asterisk-specific instructions, but Asterisk can be used with any provider that offers SIP or IAX trunking.

Physical Lines

If you want to connect to physical lines, you will need an FXO solution. That isn't covered here at the moment.