Tuesday, 23 September 2008

Asterisk for OpenWRT

Asterisk for OpenWRT

last updated: september 19, 2007

This page contains binaries and sources for running the Asterisk PBX software on OpenWRT devices.

This page has become obsolete since the majority of these patches were merged and improved in the official OpenWRT repositories since version 1.4.11. All requests and bug reports should now be propagated through tickets in the OpenWRT development process. People are strongly advised to use the official repositories for further Asterisk development an installations since there will be no new releases or developement through this site.

The original repositories for version 1.4.9 are still maintained because of some extra features that have not been merged yet, but will be in the near future.
(obsolete) Asterisk 1.4.9
Asterisk 1.4 packages can be obtained through a package repository by adding a new line to your /etc/ipkg.conf:

For OpenWRT WhiteRussian 0.9 on mipsel/brcm (Broadcom and compatibles):
src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/whiterussian/packages/asterisk-1.4

For OpenWRT Kamikaze 7.06 on mipsel/brcm (Broadcom and compatibles):
src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/kamikaze/packages/asterisk-1.4

For OpenWRT Kamikaze 7.06 on mips/atheros (Fonera and compatibles):
src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/kamikaze/packages/asterisk-1.4/atheros

For OpenWRT Kamikaze 7.06 on x86:
src asterisk14 http://members.home.nl/hans.zandbelt/openwrt/kamikaze/packages/asterisk-1.4/x86

NB1: The 1.4.x packages are named "asterisk14-*" to allow them to co-exist with the 1.2.x packages, *BUT* the 1.4 packages _do_ use the same installation directories so installing them next to 1.2 must be done with a different "-d" flag to "ipkg install".
NB2: For the Kamikaze releases based on kernel 2.6 the zaptel/ztdummy kernel module is not yet available thus app_meetme and IAX2 trunking are not yet usable on that platform.

Update: Asterisk core updated to version 1.4.9; added asterisk-addons 1.4.2 zaptel-libtonezone updated to version 1.4.4.
asterisk14-addons includes backported-from-trunk chan_mobile (svn 384)
asterisk14-app-fax package is included, including app_rxfax and app_txfax.
asterisk14-chan-gtalk is included, with stability fixes, providing GTalk support for Asterisk.
(obsolete) Building from source
You can build Asterisk 1.4.9 and addons for OpenWRT yourself, together with all supported modules, using the buildroot environment provided by the OpenWRT team, called the SDK. The script for doing so (download) :

#!/bin/sh

ZAPTEL="1.4.4"
IKSEMEL="1.2"
ASTERISK="1.4.9"
ADDONS="1.4.2"

URL="http://zandbelt.dyndns.org/asterisk"
PREFIX="openwrt-packages"

DIR="openwrt-devel"
SDK="OpenWrt-SDK-Linux-i686-1"

do_patch() {
PATCH=${PREFIX}-$1-$2.patch
wget ${URL}/${PATCH}
patch -p0 < ${PATCH}
}

mkdir ${DIR} && cd ${DIR}
wget http://downloads.openwrt.org/whiterussian/newest/${SDK}.tar.bz2
tar jxvf ${SDK}.tar.bz2
svn co https://svn.openwrt.org/openwrt/packages
do_patch zaptel ${ZAPTEL}
do_patch iksemel ${IKSEMEL}
do_patch asterisk ${ASTERISK}
do_patch asterisk-addons ${ADDONS}
cd ${SDK}/package && ln -s ../../packages/*/* . && cd ..
make package/asterisk14-compile V=99
make package/asterisk14-addons-compile V=99

After finishing successfully, packages can be found in:
openwrt-devel/OpenWrt-SDK-Linux-i686-1/bin/packages
(obsolete) Asterisk 1.2.16
NB: these packages are obsoleted by the 1.4.x ones; people are encouraged to switch to 1.4.x as OpenWRT support for 1.2.x will probably end in the near future. These packages can be obtained through a package repository by adding a new line to your /etc/ipkg.conf:

src asterisk http://members.home.nl/hans.zandbelt/openwrt/whiterussian/packages
Installing dummy Zaptel timer support (ztdummy)
This enables MeetMe audio tele-conferencing bridge support and IAX2 trunking.
It is only useful on routers with UHCI USB features such as the Asus WL-500GdL.

1. Install kmod-zaptel
2. Install kmod-usb-uhci-iv
3. Install asterisk-app-meetme
4. Remove the alternate USB kernel module (if loaded): rmmod uhci
5. Insert the required USB module required for Zaptel timer support: insmod ./usb-uhci.o
6. Insert the Zaptel module: insmod ./zaptel.o
7. Insert the dummy USB Zaptel timer module: insmod ./ztdumy.o
8. Install the Asterisk core package (or *-mini ipk for iax2-only support) from the list above.
9. For tele-conferencing: configure meetme.conf and extensions.conf and make sure the app_meetme.so is loaded.
10. For trunking: configure iax.conf.

Have fun with tele-conferencing and/or IAX2 trunking...
Sounds
Here's a package with Dutch (male) voices for Asterisk 1.x, created by Jeroen Naeff from the samples provided by Born Digital.
# asterisk-dutchmale-sounds_0.1_mipsel.ipk
Contact
Preferably send your comments to the OpenWRT forum in one of the topics on Asterisk in the section for Community Releases.

Sunday, 7 September 2008

What is VoIP?

VoIP (Voice over Internet Protocol) is simply the transmission of voice traffic over IP-based networks.

The Internet Protocol (IP) was originally designed for data networking. The success of IP in becoming a world standard for data networking has led to its adaption to voice networking.

The Economics of VoIP

VoIP has become popular largely because of the cost advantages to consumers over traditional telepone networks. Most Americans pay a flat monthly fee for local telephone calls and a per-minute charge for long-distance calls.

VoIP calls can be placed across the Internet. Most Internet connections are charged using a flat monthly fee structure.

Using the Internet connection for both data traffic and voice calls can allow consumers to get rid of one monthly payment. In addition, VoIP plans do not charge a per-minute fee for long distance.

For International calling, the monetary savings to the consumer from switching to VoIP technology can be enormous.

VoIP Telephones

There are three methods of connecting to a VoIP network:

  • Using a VoIP telephone
  • Using a "normal" telephone with a VoIP adapter
  • Using a computer with speakers and a microphone

Types of VoIP Calls

VoIP telephone calls can be placed either to other VoIP devices, or to normal telephones on the PSTN (Public Switched Telephone Network).

Calls from a VoIP device to a PSTN device are commonly called "PC-to-Phone" calls, even though the VoIP device may not be a PC.

Calls from a VoIP device to another VoIP device are commonly called "PC-to-PC" calls, even though neither device may be a PC.

Why VoIP?

The number one reason to switch to VoIP technology for telephone service is cost reduction. From that base, VoIP is able to provide some compelling features which makes switching even more attractive.

Eliminating Phone Lines

With VoIP service, you can cancel your traditional phone service through your local telephone company and place all of your telephone calls over your broadband Interner connection.

For a residential customer, this will save around $40 a month. For business customers, the savings can be thousands of dollars a month.

Eliminating Long Distance Charges

VoIP technology can also save money on long-distance charges. Most residential and business telephone customers pay per-minute fees for long-disatance telephone calls. VoIP can reduce or eliminate those long-distance fees.

This saving is especially valuable with International calls, where per-minute charges for traditional telephone calls can be very expensive.

Number Portability

With VoIP service, you can take your phone number anywhere you go, easily. If you have a Chicago number and you move to New York, you can keep your Chicago number. This is very convenient for friends and family to keep in contact with you wherever you go.

Computer Telephony Integration (CTI)

VoIP service providers are designing and implementing new features which implement Computer Telephony Integration (CTI).

For example, VoIP customers may be able to receive their voice messages in e-mail as .WAV file attachments. This can make managing voice mail messages much easier and more powerful, because it enables recipients to archive voicemails or forward them to anyone with an email address.

How can I get free VoIP?

The first thing to know about free VoIP calls is that none of them are actually completely free. Even in the best hypothetical case in which the VoIP provider doesn't charge you at all, remember that you still have to pay for your broadband Internet connection. You must understand that the goal is not to achieve completely free calls to all destinations, but to use the VoIP operator that suits your needs best. Keeping that in mind, you will learn that most VoIP companies will let you talk for free in their own network but also they will charge you for making calls outside their proprietary network.

The main way for free VoIP calls companies is to offer free calls inside their own network and also towards other specially selected destinations. Using this tactic users are drawn to make calls to free destinations and afterwards purchase credits to make calls towards paid destinations.

There are several ways used by VoIP companies to lure customers and make a profit in the same time. The great thing about VoIP calls is that they're very cheap, but not completely free, here are some systems used today in the VoIP calls market:

If you take Skype for example, one of the most popular VoIP services on the market, you will see that you can initiate conversations with other PC users of Skype free of charge. Of course, this is an advantage for long distance calls, as there is no fee for calls inside the Skype network. But if you want to make calls to regular landlines, you'll have to pay. The subscription fee for calls in North America is $30 per year. It's not a great deal of money but it still isn't free. You can make free phone calls on a PC to PC basis using the Skype software, and the number of users on the Skype network is continuously growing. On the other hand if you want to reach someone that doesn't have a PC or an Internet connection, you'll have to pay the required fees.

Another approach to this, could be the way Raketu is seeing things. Raketu is offering free phone calls to landlines in 42 countries and besides that, it also offers live video television. The downside to Raketu's service is that they ask you to pay $9.95 up front in order to use their free services. They say it's used as credit if you happen to call destinations that are not on the free call list, but either way you look at it; it's money that you have to pay to use the service.


If you are in the pursuit of a real cost free VoIP service you can use something like voipCheap that allows you to make free calls to PC's and regular phone lines. It also includes many destinations outside USA and Canada that can be called without paying a cent. The downside is that you have a limited number of 300 minutes that you can use each week, per IP Address. If you talk more than the included 300, you are required to pay for further calls, you are also required to pay for calls outside of the destinations listed on the free call list.

To better understand how to make free VoIP calls, let's take a look at how VoIP telephony works. Basically all you need is to setup a VoIP gateway, that's most commonly done by using a PBX. A PBX (Private Branch Exchange) is a device that allows the VoIP provider to purchase as many telephone lines, as the maximum number of simultaneous callers. In general, around 10% of the users will make calls at the same time. This means that the VoIP can purchase fewer telephone lines, instead of buying one for each user. This brings us to the point, configuring a PBX is almost cost free, the actual costs come from the prices collected by the telephone companies for connecting to the PSTN (Public Switched Telephone Network). What VoIP providers do is use PSTN connections for accessing the public land and mobile telephone lines, but at the same time uses the SIP (Session Initiation Protocol) to stream media content such as voice over the Internet.

With so many VoIP providers appearing every day the problem of interconnecting, preferably free of charge, with other VoIP providers arises. There are several ways to do this, as some of the existing VoIP providers that use SIP technology have already made peering arrangements to allow users interconnect for free. All you have to do, is use the special prefix code put at your disposal. Although this is not standard procedure, just yet, it's still widely used. The only problem with this is that some devices, such as VoIP phones cannot input the format of the prefix (the prefix usually looks similar to this: number@some_provider.com). As a solution to this, groups like SIP Broker or Voxalot, assign numeric values for your SIP URL, so it can be used on a wider scale of devices.

Although there is no such thing as completely free VoIP telephony, and with some VoIP providers there are some serious hidden costs and restrictions you have to look for, VoIP calls are still very profitable. Knowing that you can make free calls towards destinations in the same VoIP network as you are, and in VoIP networks you have peering with and also towards special destinations selected by your service provider, you can see which combination better suits your needs. If you manage to use services that offer good deals for what you require, you can save up to 98% from your phone bills. This means that you will need to put some time and research into it, but in the end you can achieve almost free calls via the VoIP technology using several and payment methods.

How do I compare VoIP providers?

VoIP (Voice over Internet Protocol) is changing the way people communicate. VoIP utilizes a broadband internet connection for routing telephone calls, as opposed to conventional switching methods, providing efficient use of existing Internet connections as well as lowering overall costs. Interestingly, there is no need for any large scale infrastructures; just combine a conventional phone with a broadband Internet connection to utilize a single service with minimal software and hardware support.

VoIP service providers are touting unlimited local and long distance calling for as little as $199 per year. This provides customers with substantial annual savings. There are several VoIP providers offering VoIP service for both residential customers as well as business. However, from a customer's standpoint it is an ideal option to compare several VoIP providers in selecting the best deal.

VoIP Product Features

There are several VoIP providers who claim outstanding services and comprehensive features. Don't be fooled - not all VoIP services are created equal. The VoIP package includes many features that may not be available on traditional phones. The most common VoIP features include 3-way calling and call waiting. As the competition between VoIP providers escalates, some providers are offering additional features to establish branding of their business while attracting additional customers. That's why it's always a good option to compare several VoIP providers to discover the VoIP product features you will get when taking a connection from the provider.

Monthly Rates

One of the main advantages of VoIP is reduced long distance cost and inexpensive local phone service with several enhanced features conventional telephone services are ill equipped to provide. Compare various VoIP providers to know the monthly rates they charge for their service. Selecting an ideal VoIP provider will help you to save up to 75% on expected annual charges.

Using VoIP for International Calling

If you make a lot of international calls, do a bit of research to find a VoIP provider who offers outstanding international services at the best rates. International rates differ from one VoIP provider to another. There are also some carriers which offer unlimited overseas calling. Though this offer is limited to certain countries, check whether the country to which you call falls in this category.

911 Service

Today, majority of the VoIP providers offer E911 service. While selecting a VoIP provider, make sure the provider offers 911 service.

Keeping Your Number

There are many VoIP providers who allow the customers to transfer (port) their current phone number to the VoIP service. Not all VoIP providers offer this service. If you need to change your phone number in this way, then you need to do research on the various VoIP providers to discover whether they offer such services. However, before asking your VoIP provider to switch your current number to the VoIP service, it is advisable to try out the provider's service and make sure that you are satisfied with the end result.

Money Back Guarantee

As VoIP is a relatively new product, most of the VoIP providers will offer a free money back guarantee. As a customer you will be in a risk-free position if your VoIP provider is offers a money back guarantees for up to 30 days.

Comparing various VoIP providers will help you to select the one VoIP service provider whose terms and conditions meet your specific needs and calling pattern, especially if you make regular long distance or international calls.

What are VoIP phones?

VoIP phones are telephones which connect to VoIP networks instead of to the PSTN.

  • VoIP phones with Ethernet connections
  • VoIP phones with Wi-Fi / 802.11 connections
  • VoIP phones with dialup modem connections
  • Software VoIP phones

VoIP phones with Ethernet connections

A VoIP phone with an Ethernet connection is the easiest type of VoIP telephone to use. Instead of a standard telephone RJ-11 connector to plug into the PSTN, these phones have RJ-45 connectors to plug into Ethernet networks.

The Ethernet connection is used to connect these VoIP phones to the VoIP server or VoIP gateway.

VoIP phones with Wi-Fi / 802.11 connections

Wi-Fi (802.11) VoIP phones provide the same service as Ethernet VoIP phones, but they do it wirelessly.

A Wi-Fi enabled VoIP phone connects to a VoIP server or VoIP gateway through your existing Wi-Fi network.

VoIP phones with dialup modem connections

VoIP phones with dialup modem connections are very similar to VoIP phones with Ethernet connections.

Instead of connecting to an Ethernet network, these VoIP phones dialup over the PSTN to VoIP service providers.

Using a VoIP phone with a dialup modem connection requires a regular analog POTS telephone line, but enables long-distance and international calls to be made over VoIP networks, usually at a significant savings.

Software VoIP phones

Software VoIP phones turn your PC into a VoIP telephone.

Software VoIP telephones are less expensive than the choices listed above, if you already own a personal computer.

Hardware for Software VoIP phones

Software VoIP phones use the PC's sound card, speakers or earphones, and microphone. This hardware works to emulate a telephone, even though this is not what the PC was designed for.

For better ease-of-use, many companies manufacture USB VoIP phones. These devices give your PC a normal-looking telephone handset or headset.

How do I choose a VoIP phone?

The first choice is determining if you want a hardware VoIP phone or a software VoIP phone.

Hardware phones are generally easier to use and do not require a PC. Software phones are usually less expensive and may offer better options for CTI (Computer Telephony Integration).

Choosing a VoIP Phone

With either a hardware or software VoIP phones, the major considerations remain the same:

  • What VoIP call control protocols does the phone support?
    • H.323
    • SIP
    • MGCP
    • IAX2
  • What VoIP codecs does the phone support?
    • G.711
    • G.722
    • G.723
    • G.726
    • G.727
    • G.728
    • G.729
    • ILBC
    • Speex
    • GSM - Full Rate
    • GSM - Enhanced Full Rate
    • GSM - Half Rate
    • DoS FS-1015
  • Does the phone support 3-way calling
  • Does the phone support Do-Not-Disturb (DND)
  • Does the phone support custom ringtones?
  • Does the phone provide a method to work behind routers and NAT?
  • Does the phone support STUN?
  • Does the phone support Symmetric RTP?
  • Does the phone support a SIP outbound proxy?
  • Does the phone support QoS
  • Does the phone support encryption?
    • Secure RTP
    • AES

Choosing a Hardware VoIP Phone

When selecting a hardware VoIP phone, you should consider these items:

  • What connections does the VoIP phone support?
    • Ethernet
      • Does the phone support Power Over Ethernet?
    • Wi-Fi
    • Dialup
    • ISDN
  • Does the phone support IPv6?
  • Does the phone support videoconferencing?
  • Is the phone handset corded or cordless?
  • Does the phone have a handset or a headset?
  • Does the phone have a speakerphone?
  • Does the phone have an LCD display?
    • Is the LCD display backlit?
  • Does the phone have good ergonomics?
  • Do you like the style of the phones?

Choosing a Software VoIP Phone

If you choose a software VoIP phone, you should consider these items:

  • Does the phone software support my Operating System?
  • Is the phone software easy to use?
  • Does the software support customizable skins?
  • Does the software support videoconferencing?
  • Does the software support shared whiteboarding?

And, of course, the final purchasing decision should always include price as a criteria.