Tuesday, 10 February 2009

Asterisk: A Bare-Bones VoIP Example p:4

Testing: Here We Go!

The user on extension 2000 should be able to dial 2001 and the other line will ring. As you watch the console, you should see a flurry of messages showing up as you dial, and after you hang up. If you go immediately to the "Busy" message, it's probably because your phone client hasn't registered with the Asterisk server -- make sure it's sending server registry statements, as these are the "heartbeats" that Asterisk uses to ensure that a remote client is available for inbound calls. If you have your registry interval set to more than 15 seconds, you'll need to wait at least that long for the SIP client to register (once Asterisk is started) before calls can be sent to that phone.

Try leaving voicemail for extension 2000. From extension 2000, dial 2999 and you should hear a prompt for the password -- you won't need to type in the extension for which you are trying to retrieve mail, as it is automatically entered with the addition of the ${CALLERIDNUM} variable as an argument to the VoiceMailMain line -- this types in the correct extension automatically. Extension 2999 has a password of 4321, so type in "4321#" -- the # sign is equivalent to "enter." Then follow the prompts to retrieve the mail. You can also change the greetings on the line -- experiment a bit with the different options within voicemail.

Hopefully this all worked for you. Often, getting the first implementation up and running is a process of trial-and-error, and the added complexity of the SIP clients can make this an exhaustive reduction in variables. Feel free to ask the asterisk-users mailing list any specific questions you might have after reviewing the archives -- both resources are very useful to the beginner.

Debugging

SIP is a bit tricky to start out with. I would strongly suggest that your Asterisk server and both phones are on the same network segment when you begin your testing; having one or more devices processed through a firewall or NAT will cause you quite a few ulcers, and will almost certainly not work during your testing.

Make sure your SIP phones are sending correct REGISTER statements to the server -- without valid registration, the Asterisk process will not know where to send a call destined for that extension. Try sip show peers to see if the IP address of your phone shows up and is valid.

If SIP registration seems to be the problem, you can try removing the secret= lines and specifying an IP address of the phone in the host= line. This will lock the phones onto specific addresses and remove any registration issues you might be having.

I have found the tethereal tool (part of the ethereal network sniffer toolset) to be immensely valuable. tethereal -n ip and port 5060 will debug SIP packets in a human-readable form, and should show you what is happening on the wire when testing.

Another important debugging technique is to run asterisk in "full debug mode." This is done with asterisk -vvvvvgcd and puts all possible debugging information on your console. Also make sure that your SIP client is using the G.711 codec (either alaw or ulaw) as that is a codec that is known to work with Asterisk.

Additional Features

To list Asterisk's full feature set would take quite a while, as it is just as much a toolkit as a set of applications. Some things I've implemented for myself and other customers include:
  • Telemarketer block: Forces callers without caller ID to enter valid info, or hangs up.
  • Zapateller: Used with telemarketer block -- plays three-tone "disconnected number" for callers with no caller ID, which auto-removes from many phone spam networks.
  • Dual ring: Phones at the office and at home ring at the same time, during certain hours.
  • PBX long distance gateway: PRI interface to Asterisk box, then low-priced ITSP to get better LD rates using existing PBX.
  • IVR interface: Use as an inbound call center pre-processor.
  • International toll avoidance: One in the HQ in each continent allows for centrex-style dialing over the Internet.
  • Voicemail: Stand-alone voicemail server interfaces with existing PBX -- low-cost solution to otherwise expensive upgrade.
  • Monitoring system: Intelligent dial-out platform that can verbalize network problems and take actions based on IVR.
  • NAT traversal: Asterisk can work with SIP clients behind NATs with no additional software (see nat=1 in sip.conf).

Digium makes a low-cost ($100) analog FXO (Foreign Exchange Office -- meaning, it accepts a wire that has dialtone on it) PCI card that can be used to connect your home or office phone line into Asterisk. Add to this a Cisco ATA-186 (~$150) for two lines of FXS (handsets) use, and you can have a mini-PBX in your house with extremely powerful features for about $250, plus the cost of a reasonably decent old PC that you may have laying around. I've had acceptable experiences running with a 400mhz PIII with two lines. I've found that putting one of these systems together with an FXO card is a fast way to convince others that OSS VoIP platforms are ready to be examined as a serious possibility for the office environment, since one can attach the machine directly to the existing PBX (assuming you can get an analog line off of your PBX system).



More complex Asterisk configurations and some other SIP-related examples can be found on my web site.

Other Projects and Resources

Servers/Software

There are several SIP implementations that are OSS, but they are primarily what are known as "call proxies" instead of more full-featured PBX applications. This means that they function only to connect two endpoints together, and are basically just large, fast, directory servers. Examples of SIP Proxies are ser and Vocal. There are also other open source PBX projects like Bayonne and OpenPBX, which have slightly different feature sets than Asterisk.

Long Distance/Free Services

There are also now retail vendors of SIP long distance service, which are called Internet Telephony Service Providers (ITSPs.) Vendors such as iconnecthere (formerly Deltathree) have rates in the $.01-per-minute category anywhere in the U.S., and I expect that some searching will find similar vendors in Europe and Asia. There are also no-cost solutions like Free World Dialup that are limited to calling users via IP only, but you can mix/match dialplans so you can reach all destinations from the same phone, if that phone is routed through Asterisk. There are other SIP long distance providers, but to my knowledge all of the others (Vonage, Packet8) require you to use their equipment, thus making use with Asterisk impossible.

SIP Hardware


Cisco ATA-186 (About $150 new) Supplies two FXS ports (standard phones plug into FXS ports)
Cisco 7960/7940 (About $300 used) Deskset with XML-programmable six-line LCD
Digium ($100-$500 new) Variety of PCI cards for direct telephony connections to Asterisk servers
Pingtel (About $550 new) Deskset with LCD
SNOM 200 (About $290 new) Deskset with LCD
Grandstream (About $85 new) Deskset with small LCD

SIP Software/Hardware

SIP Product List: Lists of hardphones, softphones, and other servers

IPTel.org: Lists of hardphones, softphones, and other servers

John Todd is the CTO of TalkPlus, Inc. which is a next-generation mobile identity management and enhanced call services provider.


Monday, 9 February 2009

Asterisk: A Bare-Bones VoIP Example p:3

Configuration

The following configs are going to put an extremely basic configuration in place, and we will pretty much going to throw out the sample files that came with Asterisk and pare down things to an absolute minimum. If you need to find out more information about additional options, the original demonstration files are located in /usr/src/asterisk/configs for your reference. Leave everything in place that Asterisk's "make samples" puts in for you, except for the three files below; those are the only three that need to be touched for our sample to work.

After configuration, you will have the ability to dial between your two phones, and voicemail will end up stored in the system for each extension, and will also be sent as an email attachment to the email address specified in the mailbox configurations.
Since only SIP channels are being used, we only need to modify three files for our mini-PBX two-line system: sip.conf (this defines the SIP peers, which are the software or hardware SIP phones), extensions.conf (this is where the dialplans are kept -- the meat of the system), and voicemail.conf (where we define the voice mailboxes for each user).

Perform a cd /etc/asterisk, move the existing sip.conf, extensions.conf, and voicemail.conf somewhere safe, and create new files with the following contents:

sip.conf

[general]

port = 5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
allow=all ; Allow all codecs
context = bogon-calls ; Send SIP callers that we don't know about here

[2000]

type=friend ; This device takes and makes calls
username=2000 ; Username on device
secret=9overthruster7 ; Password for device
host=dynamic ; This host is not on the same IP addr every time
context=from-sip ; Inbound calls from this host go here
mailbox=100 ; Activate the message waiting light if this
; voicemailbox has messages in it

[2001] ; Duplicate of 2000, except with different auth data

type=friend
username=2001
secret=11bbanzai9
host=dynamic
context=from-sip
mailbox=101

extensions.conf

[general]

static=yes ; These two lines prevent the command-line interface
writeprotect=yes ; from overwriting the config file. Leave them here.

[bogon-calls]

;
; Take unknown callers that may have found
; our system, and send them to a re-order tone.
; The string "_." matches any dialed sequence, so all
; calls will result in the Congestion tone application
; being called. They'll get bored and hang up eventually.
;

exten => _.,1,Congestion

[from-sip]

;
; If the number dialed by the calling party was "2000", then
; Dial the user "2000" via the SIP channel driver. Let the number
; ring for 20 seconds, and if no answer, proceed to priority 2.
; If the number gives a "busy" result, then jump to priority 102
;

exten => 2000,1,Dial(SIP/2000,20)

;
; Priority 2 send the caller to voicemail, and gives the "u"navailable
; message for user 2000, as recorded previously. The only way out
; of voicemail in this instance is to hang up, so we have reached
; the end of our priority list.
;

exten => 2000,2,Voicemail(u2000)

;
; If the Dialed number in priority 1 above results in
; a "busy" code, then Dial will jump to 101 + (current priority)
; which in our case will be 101+1=102. This +101 jump is built
; into Asterisk and does not need to be defined.
;

exten => 2000,102,Voicemail(b2000)
exten => 2000,103,Hangup

;
; Now, what if the number dialed was "2001"?
;

exten => 2001,1,Dial(SIP/2001,20)
exten => 2001,2,Voicemail(u2001)
exten => 2001,102,Voicemail(b2001)
exten => 2001,103,Hangup

;
; Define a way so that users can dial a number to reach
; voicemail. Call the VoicemailMain application with the
; number of the caller already passed as a variable, so
; all the user needs to do is type in the password.
;

exten => 2999,1,VoicemailMain(${CALLERIDNUM})

Now, we're almost ready to go. Actually, we've completed everything that is required for two phones to call each other, but we still need to assemble the configuration files that will know how to save messages in case a line is busy or "unavailable." Note that Asterisk treats phones that are turned off or are otherwise not registered as "Busy" and not "Unavailable" -- the status of "Unavailable" usually refers to a situation where nobody has answered the phone in the given number of seconds.

Before we can use our voicemail system, we need to create empty voicemail boxes for each user. This is done using the script located at /usr/src/asterisk/addmailbox, which is simply a small shell script that creates a directory and puts some default greetings into place. Run addmailbox twice, specifying "2000" and "2001" as the mailboxes that you wish to create.

voicemail.conf

[general]

format=wav

[local]

;
; format: password, name, email address for attached voicemail msgs
;

2000 => 4321,John Whorfin,jwhorfin@planet10.com
2001 => 8383,Sidney Zweibel,newjersey@banzaiinstitute.com

Asterisk: A Bare-Bones VoIP Example p:2

Applications

After a match is made on ${EXTEN}, the applications start to be executed in the order in which they are listed by their priority values. There are a huge number of applications that are available, and additional applications are fairly easy to integrate. There is even an application called AGI that links to external programs, and there are Perl and Python libraries that allow for easy development of tools external to the applications built into Asterisk.


The most-used application is called Dial, and that is the application that rings a remote channel and then connects the two different channels together if there is an answer. The Dial application has some special abilities due to its multiple responses. If a Dial application gets an answer on the remote channel, then the two callers are bridged together and the call proceeds. After an answer, the only options are for one or both parties to hang up. When a hangup happens, the Dial routine exits with a non-zero status, and the priority list stops executing because we have lost the call -- this is a normal call termination.


If the Dial application rings the remote phone for 20 seconds (specified by the ,20 in our Dial statement) but there is no answer, Dial will exit and the next priority will be executed -- in our case, that next priority is a command to run the Voicemail application, which sends the caller to the "unavailable" greeting for the called party. If the Dial application gets a "busy" answer back from the remote phone, or the remote phone is not on-line, then the Dial application does something special: it adds 101 to the existing priority, and jumps to that priority. In our case, this means priority 102, which sends the caller to the "busy" greeting for the called party. Dial is the only application that has this special priority incrementing ability, though there are priority control applications that can give the administrator direct control to the priority, context, and extension such as Goto, and more sophisticated versions such as GotoIf, which can be used to evaluate expressions.

To get a list of applications, just type "show applications" at the command prompt, and then "show application xxxx," where xxxx is the application for which you want more information.

Prerequisites

Asterisk currently runs on Linux > 2.4.x (various flavors) and OpenBSD 3.3. The OpenBSD version has not been tested thoroughly and should be considered "alpha" at the time of this writing (June 2003).

You will also need an SIP-capable phone, such as a Cisco 7960 or 7940, SNOM, Pingtel, or Grandstream. Alternately, you could get a software client for Windows such as the free client from Xten or a Linux SIP phone like kphone. Configuring these various SIP clients is outside of the scope of this article, but I will describe what is required to make them work with Asterisk as far as SIP login data is required.

I would strongly suggest a "hardphone" to start with, especially if you are using this as a demonstration platform. Anecdotal evidence strongly suggests that nobody except the most hardcore road-warrior wants to talk on the phone through their computer -- they want a handset that looks and acts like a phone. Plus, the SIP hardphones are usually debugged quite well, as the vendors cannot simply expect to roll out a "patch" to upgrade their customers without extensive preparation, so I have found that the hardphones are generally more reliable than softphones.

Your two phones or phone clients should have at least 80 kilobits of capacity each back to the Asterisk server, as we will be using G.711 codecs that take up quite a bit of bandwidth. There are other voice encoding methods that get as low as about 4kbps, but that's getting a bit too fancy for this article.

You will need a complete kernel source tree symlinked to /usr/src/linux since Asterisk requires certain header files from the kernel to compile correctly. If you are running OpenBSD, this is not required. You will need to have the following packages installed to complete a full installation: bison, cvs, gcc, kernel-source, libtermcap-devel, ncurses-devel, newt-devel, openssl096b, and openssl-devel.

SIP Client Configuration

You will need to configure your SIP clients so that they have their SIP gateway set to be the IP address of your Asterisk server. The usernames and passwords are contained below in the sip.conf file -- the username is the extension, and the password is listed in the secret= line for each extension. The configuration of the clients is often half the battle of getting VoIP to work, but once your particular client is understood, it normally becomes plug-and-play to add more phones. Your client must support registering with the SIP server -- I would suggest telling your client to register every 15 seconds or so during your experiments, to keep things re-registering quickly after Asterisk restarts. Later, you can take this back up to 1000 seconds or higher.

Installing Asterisk:

Go to the Asterisk home page and you can follow the "Download" link to get to the correct page. I would suggest not downloading the tarball, but using CVS to create your version of the application. The project sees an enormous amount of work done to it almost daily, so getting the most recent version via CVS is strongly suggested.

To download the latest CVS repository:

foo# cd /usr/src
foo# mkdir asterisk
foo# export CVSROOT=:pserver:anoncvs@cvs.digium.com:/usr/cvsroot
foo# cvs login

[type "anoncvs" without the quotes as your password]

foo# cvs checkout asterisk

[Here you should see the package being downloaded
and distributed into the ./asterisk directory.]

foo# cd asterisk
foo# make
foo# make install
foo# make samples

Now, to test, type asterisk -vvvvgc to start up Asterisk. If you end up with a prompt that says *CLI>, then you've successfully installed the demonstration configuration. If you get errors on the installation, I would suggest joining the IRC channel #Asterisk on FreeNode or asking the asterisk-users mailing list for advice.

Here's a compile hint. If you get "illegal instruction" errors on launching Asterisk, you probably have run across an issue with Asterisk compiling itself for the wrong processor type. Edit /usr/src/asterisk/Makefile and uncomment your processor type and comment out all other lines starting with PROC= in the processor definition section.

Asterisk is normally launched with safe_asterisk, which will be installed in /usr/sbin. To connect to the currently running version of Asterisk, launch a client with asterisk -r and you should see a command prompt.

Command-line Use

There are many instructions that are available from within Asterisk's CLI interface, and described below are several that you may find useful during your configuration. A full list may be displayed by simply hitting the "?" key, and applications may be displayed (but not executed) with "show applications."

reload - soft-restarts Asterisk and updates internal configs
with changes you've made to /etc/asterisk/* - does not hang up calls

show dialplan - shows the full dialplan of how your calls will be handled

sip show peers - shows all registered SIP clients

sip show channels - shows current "live" channels that are in
use by SIP clients (off-hook)

stop gracefully - shuts down Asterisk after all calls have hung up

stop now - shuts down Asterisk, hanging up any current calls

Asterisk: A Bare-Bones VoIP Example p:1

Open source software (OSS) has achieved a dominant role in the delivery of IP-based content such as web data (Apache) and email (sendmail), and is making serious headway in streaming media (icecast). As processors become less expensive and more powerful, even jobs that were once relegated to specific hardware (such as routing and load sharing) are now becoming possible on low-cost OSS platforms running Linux or BSD-based operating systems. The last bastion of hardware-specific functionality in the office environment has been the phone system, or PBX (Private Branch Exchange). PBX installations range from key systems with a few lines to large platforms fed by Primary Rate Interface ISDN (PRI) that are complex and expensive to deploy, with hundreds or thousands of extensions spanning several states or continents.

Until now, open source telephony applications have been at the periphery of the PBX, and even then, they have not been PBX-specific: fax modem software, simple voicemail software, and caller-identification software all work in conjunction with standard phone lines, but rarely together in concert as a unified platform.

Asterisk is both an open source toolkit for telephony applications and a full-featured call-processing server in itself. It can be a standalone system, or used as an adjunct to a previously existing PBX or Voice Over IP (VoIP) implementation. It can be software only, moving calls around via IP, or it can have a variety of hardware interfaces to directly tie in with existing TDM (Time Division Multiplexing) equipment. Asterisk is not a VoIP platform; it is a Computerized Telephony Integration platform, which just happens to have a number of very useful input/output channels through VoIP. Asterisk can just as easily be a server that has no Internet connectivity, but uses PCI-card-based analog or digital trunks to process calls -- an important distinction between Asterisk and many other systems.

It is difficult to describe the full feature set of Asterisk due to the number of fairly complex topics that are incorporated into the system: multiple VOIP channel types, hardware interfaces, a scripting language, an API, modules, and more features than can be addressed in this short article. To provide a brief introduction to Asterisk's capabilities, I will show an example that creates a very simple PBX with two extensions and voicemail on each. There will be no external connectivity to this PBX; we will simply be able to call from one line to the other. This would allow, as an example, two users to be in separate parts of the country but they could ring each other's desk phones. If the called party was unavailable, voicemail could be left.


Voice Over IP (VoIP)

VoIP has been around for a while, but has been fairly restricted to high-end users such as phone companies and large enterprise phone networks; only recently has VoIP gained momentum with end users and smaller shops. There have been a small handful of proprietary long-distance solutions for some time, but these were closed-source systems that did not lend themselves to any extensions by the OSS community. The push of VoIP technology closer to the grasp of the Linux/*BSD end user or administrator can be attributed to a combination of low-cost, high-speed bandwidth and a recent agreement to standardize on open protocols for call delivery.

Within the last eighteen months, it has become evident that the protocol that will be leading the industry for VoIP deployments is Session Initiation Protocol (SIP) -- see RFC3265. SIP is a simple, text-based description protocol that uses interactions similar to HTTP and SMTP in order for two systems to describe a media stream (in our case, voice traffic) that needs to get from point A to point B. The description includes authentication, caller ID information, media stream parameters, and a variety of other header information that is needed to fully qualify a call between two endpoints.

While there are other VoIP protocols supported by Asterisk (such as H323 and MGCP) I will only describe SIP, as there are a growing number of phones and software stacks that support SIP as a method for call description, and for the beginner, SIP is easier to debug due to its use of plaintext headers.

Asterisk Theory

See the Configuration section below for samples of the files that are referenced here.

Call Flow: Starting Out

A call comes in on one of several channels (SIP in our case) and is "destined" for a dialed number. The Asterisk process first deals with the call via whatever channel it came in on, and learns what to do with it in that manner, and into what context to send the call in extensions.conf. In our example, calls inbound from both of our SIP phones are sent to the context from-sip, which is where we are going to start matching the dialed numbers. The called number is translated into a variable called ${EXTEN}, and we'll refer to this variable from now on when talking about the number being dialed. It is implicitly used in any matching statements, so you don't have to worry about specifying it elsewhere. However, for ease of reference, we will use it in this article whenever we talk about the number that has been called.

Contexts

Now that sip.conf has told our call what context to go to, the control is handed over to the definitions created by the file extensions.conf. The extensions.conf file works by defining various "contexts," which are clusters of dialed-number matching statements. The context is the central building block of Asterisk, and, loosely, is used as one might use a subroutine. Within a context are a number of matching statements that perform match tests against the number being processed. The call is passed through the comparison list until a match is found.

A context can have "special" extensions, which are pre-defined and are reserved for special behavior. The most commonly used extension is h, which means hangup, and allows your dial plan to execute certain routines at the completion of a call. See the manual for a more complete listing of special extensions. None of the special extensions are used in our example.

Extension Matching

Each context has a set of extension matches, which determine what applications should be triggered by the call, and how the call should be routed. Matching is performed in numerically ascending order, which can be tricky if you have many matches that are similar; in our example we have a very simple match list. The matching examination is done on the digits following the => up until the next comma. Each match definition has at least one "priority," which simply is a number that tells the server in what order to execute the applications when a match for the matching string is found. Priorities must be sequential whole numbers, which sometimes leads to headaches if you discover you need to insert an application at the top of a priority list.

Each line is in the format:

exten => extension,priority,application

Here's an example:

exten => 3334,1,Answer
exten => 3334,2,Playback(welcome-to-foo-inc)
exten => 3334,3,Wait(1)
exten => 3334,4,Playback(the-date-and-time-is)
exten => 3334,5,DateTime

The above example will match any inbound calls sent to extension 3334 and play back a short welcome followed by a verbalization of the date and time. As long as the caller hasn't hung up, the next application will be run and the results played into the channel.

To give an idea of how this works in our mini-phone system, imagine an inbound SIP call is headed towards extension 2001 from extension 2000. Thus, ${EXTEN} would be equal to 2001. Using our example sip.conf file (see below), it shows that any calls coming from extension 2000 should be passed into the context from-sip. When the call is passed into from-sip, the first match statement compares ${EXTEN} against the string "2000". That isn't a match, so the matching process jumps to the next numeric extension definition, which is "2001". In this comparison, it is true that ${EXTEN} equals "2001" -- we have a match! At this point, the priority 1 application is executed, which is "Dial".

If the calling channel still exists and has not been terminated at the end of priority 1, then priority 2 is executed, and so on. If there are no matches for ${EXTEN}, then the user will be sent an "Invalid Extension" result, and most likely will hear a re-order tone (fast busy) that would be generated from their phone.

Wildcards can be used in extension mapping, and match strings beginning with the underscore character (_), meaning that the following portions of the match string include wildcard characters. Commonly used wildcards are N (digits 2-9), X (any digit), . (any number of digits), and a variety of regular-expression matching methods. See the handbook for more detailed explanations of wildcards for matching. A valid example of a wildcarded matching string might be exten => _301.,1,Dial(Zap/1/${EXTEN}), which would match any of the following: 3013, 3015551212, 301543*999.

Much more extensive comparisons can be applied to the matching behaviors: caller ID of calling party, time of day, detection of fax modems, string matching, and more can all be used to determine call flow.

Also, for a quick description of some system variables and conditional expressions, take a look at the file README.variables, which is in the main Asterisk source directory.

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.

How do I Become A VoIP Reseller?

If you are serious about reselling Voice over Internet Protocol (VoIP) services, there are some questions you will need to ask yourself first. Here are some simple guidelines to help you determine if and how you should pursue your goal of becoming a VoIP reseller.

Know the Service

If you really want to be a reseller for VoIP services, you need at least a basic working knowledge of how VoIP works and what type of applications are currently commonly used. Among the things you will need to understand are gateways and how they interact with voice switches. You will also need to understand the process for creating an integrated voice package that allows easy switching to and from conventional digital switches. Educate yourself on the basics before you attempt to move on to the next step--reselling.

Determine the Applications You Want to Sell

You may want to market VoIP to audio teleconferencing companies as a cost efficient means of participation during conference calls from any location. You may want to focus on providing Fortune 500 companies with a VoIP telephone service that virtually eliminates long distance charges. By selecting the types of applications you want to resell, you set the stage for moving on to your next step, which is becoming an agent or reseller.

Decide Whose Services You Want to Resell

Once you know what applications you want to resell, it is easy to begin investigating the companies that offer those types of services. Look into such qualities as reliability, customer support, private labelling options (if you want to sell under your own company name), and the rates offered. You may also want to see if billing and receiving payments are something you will have to do, or whether your supplier handle those functions for you. Don't be afraid to ask questions if you can't find documentation to specifically address a concern of yours. Companies that rely on resellers to generate revenue typically are very happy to work with persons who are serious and can think for themselves.

Being a VoIP reseller is an excellent way to make a living; and also a career choice that should be secure for a number of years to come. Investigate this possibility in more detail. You may find that this opportunity is right for you.

What is a VoIP Gateway?

A VoIP Gateway, or Voice over IP Gateway, is a network device which helps to convert voice and fax calls, in real time, between an IP network and Public Switched Telephone Network (PSTN). It is a high performance gateway designed for Voice over IP applications. Typically, a VoIP gateway comes with the ability to support at least two T1/E1 digital channels. Most VoIP gateways feature at least one Ethernet and telephone port. Controlling a gateway can be done with the help of the various protocols like MGCP, SIP or LTP.

Benefits of VoIP Gateways

The main advantage of VoIP gateway is that it can provide connection with your existing telephone and fax machines through the traditional telephone networks, PBXs, and key systems. This makes the process of making calls over the IP network familiar to VoIP customers.

VoIP gateways can end a call from the telephone and can provide user admission control using IVR (Interactive Voice Response) system and provide accounting records for the call. Gateways also help direct outbound calls to a specific destination, or can end the call from another gateway and send the call to the PSTN.

VoIP gateways plays a major role in enhancing carrier services and also supports the simplicity of the telephone calls for less cost and easy access. Flexible call integration has been developed at less cost which enables programmable call progress tones and distinctive ring tones.

Functions of VoIP Gateways

The main functions of VoIP gateways include voice and fax compression or decompression, control signaling, call routing, and packetization. VoIP gateways are also power packed with additional features such as interfaces to external controllers like Gatekeepers or Softswitches, network management systems, and billing systems.

Future of VoIP Gateway Technology

Over the years, VoIP gateway has become an efficient and flexible solution and is used for office data and voice connectivity. Besides the connectivity performance, VoIP also offers better reliability under a variety of circumstances.

The future of VoIP gateway is very clear and precise; high-density, scaleable, open platforms need to be designed and implemented to allow the millions of installed telephones and fast-growing number of H.323 computer clients (such as Netscape's Communicator and Microsoft's NetMeeting) to communicate over IP. Many vendors are in the process of designing interoperable VoIP gateways according to the latest architectures to meet the changing demands of service providers, corporate network clients, and individual carriers.

What is an IP PBX?

A PBX (Private Branch Exchange) is a small telephone switch owned by a company or organization. An IP PBX is simply a PBX which supports VoIP (Voice over IP). An IP PBX can also be referred to as a VoIP PBX.

An IP PBX may support VoIP both internally and externally. Internal VoIP support means that the IP PBX uses VoIP to communicate with each of its connect PBX phones. External VoIP supports means that the IP PBX uses VoIP to route calls to the outside world.

Most IP PBX's also support older analog or digital PBX phones and also support external connections on the public switched telephone network (PSTN).


Books on IP PBX's

PBX Systems for IP Telephony
PBX Systems for IP Telephony

The most efficient and economical ways to bring enterprise communication systems into the digital age are in this guide. PBX Systems for IP Telephony evaluates technologies, markets, and best practices for enterprise voice systems, messaging, and customer contact centers.

The heart and brains of an enterprise communications network, the PBX (Private Branch Exchange) can be the vital link that interfaces businesses and their customers. This guide, from the recognized expert in telephony systems, provides answers. Whether you need to IP-enable a PBX system for a small business, make complex choices for the advanced call center, or gain the expertise to integrate a variety of communication systems into a state-of-the-art foundation for your e-business vision, PBX Systems for IP Telephony should be your first choice.

What is VoIP Security?

Any technology that involves transfer of data or information is prone to compromised security. It happens with telephones, cell phones, email and Internet transactions. Because VoIP (Voice Over Internet Protocol) has the internet as its mode of transference it's possible to have your Internet-based called intercepted. To make matters worse, there are techno-troublemakers who are armed with the hacking skills needed to eavesdrop on virtually any call over the Internet they want to. It is impossible to ensure total security on information flow over the web including Internet based phone calls. As new technologies emerge with more highly developed security protocols, there will be those who consider it a unique challenge to crack these online defenses rendering security advances antiquated. The Internet has been notorious for alternating security breaches and accompanying fixes.

As VoIP becomes more popular, VoIP security continues to be stressed as a key to advancement of this technology, especially since it will thrive in the realm of the World Wide Web. There are, however, advances in VoIP security that have been utilized by VoIP providers in order to ensure protection of customer's personal information.

VoIP Security is IP Security

VoIP is vulnerable to all security issues that generally affect the traditional IP data networks. This includes viruses, worms and denial of service (DoS), spoofing, port scanning, unauthorized access from a third party. and toll fraud. In short, the same issues you deal with in compromised Internet function can be linked to the use of VoIP technology.

VoIP's Defensive Linemen

The two primary methods of security for VoIP users are tunneling and encryption. These security measures assist in providing a mechanism of trust in the safe use of the VoIP user's personal data. Most VoIP providers use Layer 2 tunneling and an encryption method called Secure Sockets Layer or SSL to keep hackers at bay. Large corporate enterprises are using similar security mechanisms based on encryption for all internal traffic flowing over the VoIP system as well. It is advisable to route all inbound VoIP traffic that flows via a firewall through a proxy server, thus eliminating any direct connection with the internet.

On a larger level, organizations that are using VoIP as a popular mode of communication rely on a multiple level defense that addresses most VoIP security issues. In this scenario, the VoIP network is divided into secure zones protected by layers of firewall, intrusion prevention, and various additional security mechanisms. The advantage with this strategy is that it allows an organization to logically split and secure separate voice and data networks in front of individual voice and data components and between interactive points within the network. A system (like the one just described) should be complete with authentication, controls access (passwords and firewalls), encryption, an audit trail of calls, and facilities. Recording these issues can prevent security issue to a large degree because they are traceable.

Securing Your VoIP Network

While VoIP being internet-based is a key vulnerability, it also has its beneficial side. The years of experience in fending off or foiling internet attacks is experience that can be used in blocking VoIP assaults; the lessons learned in the data networking field are just as applicable to VoIP networking.

One approach that should be given serious consideration is setting up a separate network for VoIP applications, running in parallel but separate from the data network. This may be considered a serious expense item that is incompatible with the perceived savings from VoIP. On the other hand, one has to consider the potential costs involved if both networks become corrupted or disrupted from an attack on one which also disrupts the other.

Here are some other methods for securing a VoIP network:

  • – Enable as many of the manufacturer's security protocols as possible, adapting or 'tweaking' these to your own specifications rather than simply following manufacturer's defaults. Keep in mind that hackers and other attackers would probably know these defaults as well.
  • – Apply a strong authentication and encryption for both data and voice networks. As noted above, use the lessons learned in dealing with data network security problems to establish a preemptive stance in dealing with potential VoIP security concerns.
  • – Work out access controls and authentication protocols to ensure that only legitimate users can gain access to the VoIP network.
  • – Use gateway and host-based anti-virus as well as anti-spyware programs to protect crucial VoIP servers. At the same time, consider establishing perimeter security protocols to protect both networks.

A key point to remember is that VoIP is built on already established equipment and applications. The experiences and lessons gained from dealing with security threats to the data network can and should be used in developing security for the voice network.

Conclusion

Because VoIP is a newer technology there is a lot of discussion about its security and reliability. But it may be interesting to note that VoIP is actually more secure than normal email or even bill paying online. You may not need to be too worried about the security issues related to VoIP technology. Many newer technologies are emerging and, given the current trend, it won't take long before VoIP will be as secure as any other communication technology available today. Until then, if you are not sending highly sensitive information over the internet, VoIP is a relatively safe, reliable, and cost effective means of communication.

What are books on VoIP?

Voice over IP Fundamentals
Voice over IP Fundamentals
The authors of Voice over IP Fundamentals--three packet-voice specialists at Cisco Systems--initiate their exploration of next-generation technologies for supporting conversations across large distances: the switched telephone network as implemented on large (intercontinental) and small (building and enterprise) scales. They then point out problems with the old way of doing things and illuminate the standards and regulatory conditions that have made Internet telephony attractive. Signaling System 7 (SS7) gets particularly insightful coverage, with ample graphical support for the clear, fact-rich, example-laden prose.

The authors do a great service for readers by breaking packet telephony into its component technologies and explaining each one carefully. Coverage of the various protocols that enable voice over IP, particularly H.323 and Session Initiation Protocol (SIP), is simultaneously clear and deep. The same goes for media gateway protocols and various schemes for translating sounds into digital signals and back again, while retaining maximum clarity. There's even some practical material; concluding chapters diagram Cisco router configurations for voice traffic and flesh out solutions with case studies.

You'll like this book if you need to implement a voice over IP system and know more about IP than you do about traditional voice telecommunications. The patient and detailed explanations of traditional telephony concepts and voice over IP protocols will mesh nicely with your existing data communications knowledge, enabling you to make wise design and product decisions.

Switching to VoIP
Switching to VoIP
More and more businesses today have their receive phone service through Internet instead of local phone company lines. Many businesses are also using their internal local and wide-area network infrastructure to replace legacy enterprise telephone networks. This migration to a single network carrying voice and data is called convergence, and it's revolutionizing the world of telecommunications by slashing costs and empowering users. The technology of families driving this convergence is called VoIP, or Voice over IP.

VoIP has advanced Internet-based telephony to a viable solution, piquing the interest of companies small and large. The primary reason for migrating to VoIP is cost, as it equalizes the costs of long distance calls, local calls, and e-mails to fractions of a penny per use. But the real enterprise turn-on is how VoIP empowers businesses to mold and customize telecom and datacom solutions using a single, cohesive networking platform. These business drivers are so compelling that legacy telephony is going the way of the dinosaur, yielding to Voice over IP as the dominant enterprise communications paradigm.

Developed from real-world experience by a senior developer, O'Reilly's Switching to VoIP provides solutions for the most common VoIP migration challenges. So if you're a network professional who is migrating from a traditional telephony system to a modern, feature-rich network, this book is a must-have. You'll discover the strengths and weaknesses of circuit-switched and packet-switched networks, how VoIP systems impact network infrastructure, as well as solutions for common challenges involved with IP voice migrations.

VoIP For Dummies
VoIP For Dummies
Put your phone system on your computer network and see the savings See how to get started with VoIP, how it works, and why it saves you money VoIP is techspeak for "voice over Internet protocol," but it could spell "saving big bucks" for your business! Here's where to get the scoop in plain English. Find out how VoIP can save you money, how voice communication travels online, and how to choose the best way to integrate your phone system with your network at home or at the office. Discover how to Use VoIP for your business or home phone service Choose the best network type Set up VoIP on a wireless network Understand transports and services Demonstrate VoIP's advantages to management.

VoIP Crash Course
VoIP Crash Course
Recent advances in VoIP (Voice over IP) technology have made it the solution of choice for voice service because of its low cost and increased reliability. Voice Over IP Crash Course offers practical technology coverage, while discussing the business, strategic and competitive implications of VoIP deployment in corporations. The book also covers the challenges faced by service providers as they evolve to an IP infrastructure while continuing to operate the PSTN.

IP Telephony Unveiled
IP Telephony Unveiled
This book explains four key points to help you successfully implement your IP telephony strategy:
  • IP telephony works today. This is not new, unproven technology. Thousands of customers have implemented IP telephony successfully. So can you.
  • Expect to save money. IP telephony may well cost your organization money-initially. But the business impact and post-installation process improvements give you a significant and rapid return on your investment.
  • It's more than voice over IP. You'll understand the difference between voice over IP (VoIP) and IP telephony and what that means for your business. This is critical. They are not the same.
  • It's more than a dial tone. There are potential business-impacting applications within your own organization. IP Telephony Unveiled helps you recognize these applications.
The emerging IP telephony market is fraught with misunderstandings and misinformation. IP telephony can impact a company's business model in tremendous ways. It can open new revenue streams, enhance profitability, drive new levels of customer and employee satisfaction, and be a key enabler in a company's strategy to differentiate itself competitively-but only if you're aware of these benefits.

IP Telephony Unveiled is written for all those responsible for corporate strategies for revenue generation, cost containment, and customer satisfaction. IP Telephony Unveiled uncovers the value behind this technology, which helps you see past what might appear to be only a new telephone system, to understand the strategic enabler laying dormant in many companies' networks. Through this book, you will understand the real benefits of an IP telephony strategy and get assistance in developing this strategy inside your organization.

Taking Charge of Your VoIP Project
Taking Charge of Your VoIP Project
The step-by-step approach to VoIP deployment and management enables you to plan early and properly for successful VoIP integration with your existing systems, networks, and applications.
  • The detailed introduction offers a common grounding for members of both the telephony and data networking communities.
  • IT managers and project leaders are armed with details on building a business case for VoIP, including details of return-on-investment (ROI) analysis and justification.
  • A VoIP deployment is presented as a major IT project, enabling you to understand the steps involved and the required resources.
  • The comprehensive look at quality of service and tuning describes when and where to use them in a VoIP deployment. These are often the most complex topics in VoIP; you'll get smart recommendations on which techniques to use in various circumstances.
  • You learn how to plan for VoIP security, including prevention, detection, and reaction.
Voice over IP (VoIP) is the telephone system of the future. Problem is, VoIP is not yet widely deployed, so there are few skilled practitioners today. As you make your move to VoIP, how will you know how to make VoIP work and keep it working well? What changes will you need to make without disrupting your business? How can you show your return on this investment?

Many books contain technical details about VoIP, but few explain in plain language how to make it run successfully in an enterprise. Taking Charge of Your VoIP Project provides the detailed plans you need to be successful in your organization's deployment of VoIP. Through their years of work in the field, authors John Q. Walker and Jeffrey T. Hicks bring a project-oriented approach to VoIP, with much-needed clarity on getting VoIP to work well.

Taking Charge of Your VoIP Project starts with simple concepts, each chapter building on the knowledge from the last. Although not a technical manual, you learn about the standards, such as H.323, G.711, and Real-Time Transport Protocol (RTP), and the implications they have on your VoIP system. Most importantly, you'll gain expert advice and a systematic guide on how to make VoIP work for your organization.

VoIP Security
VoIP Security
VoIP Security has been designed to help the reader fully understand, prepare for and mediate current security and QoS risks in todays complex and ever changing converged network environment and it will help you secure your VoIP network whether you are at the planning, implementation, or post-implementation phase of your VoIP infrastructure.

This book will teach you how to plan for and implement VoIP security solutions in converged network infrastructures. Whether you have picked up this book out of curiosity or professional interest . . . it is not too late to read this book and gain a deep understanding of what needs to be done in a VoIP implementation.

In the rush to be first to market or to implement the latest and greatest technology, many current implementations of VoIP infrastructures, both large and small, have been implemented with minimal thought to QoS and almost no thought to security and interoperability.

IP Telephony: Deploying Voice-over-IP Protocols
IP Telephony: Deploying Voice-over-IP Protocols
IP Telephony, enabled by softswitches, is going to usher in a new era in telecommunications. By putting voice and data over one IP network, operators can enjoy lower costs and create new, revenue-generating "multimedia" services. This valuable reference offers a comprehensive overview of the technology behind IP telephony and offers essential information to network engineers, designers and managers who need to understand the protocols and explore the issues involved in migrating the existing telephony infrastructure to an IP-based real time communication service. Drawing on extensive research and practical development experience in VoIP from its earliest stages, the authors give access to all the relevant standards and cutting-edge techniques in a single resource. IP Telephony: Deploying Voice-over-IP Protocols: Assumes a working knowledge of IP and networking and addresses the technical aspects of real-time communication over IP. Presents a high level overview of packet media transport technologies, covering all the major VoIP protocols - SIP, H323 and MGCP Details specific strategies to design services for public networks where endpoints cannot be trusted and can be behind firewalls. Explores the problems that may arise from incomplete protocol implementations, or architectures optimized for private networks which fail in a public environment. This amply illustrated, state-of-the art reference tool will be an invaluable resource for all those involved in the practical deployment of VoIP technology.

Beyond VoIP Protocols: Understanding Voice Technology and Networking Techniques for IP Telephony
Beyond VoIP Protocols: Understanding Voice Technology and Networking Techniques for IP Telephony
This book offers a comprehensive overview of the issues to solve in order to deploy global revenue-generating effective "multimedia" services. Drawing on extensive research and practical deployment experience in VoIP, the authors provide essential advice for those seeking to design and implement a post-bubble VoIP network. Beyond VoIP Protocols: Understanding Voice Technology and Networking Techniques for IP Telephony Introduces the basics of speech coding and voice quality Demonstrates how quality of service may be built into the network and deals with dimensioning aspects, e.g. multipoint communications and how to model call seizures. Explores the potential of multicast to turn an IP backbone into an optimized broadcast medium Includes amply illustrated, state-of-the-art practical advice for formulating a complete deployment strategy A companion volume to "IP Telephony: Deploying VoIP Protocols", this book takes the reader a stage deeper into how to prepare the network and exploit VoIP technology to its full potential.

VoIP Hacks: Tips and Tools for Internet Telephony
VoIP Hacks: Tips and Tools for Internet Telephony
Voice over Internet Protocol (VoIP) is gaining a lot of attention these days, as more companies and individuals switch from standard telephone service to phone service via the Internet. The reason is simple: A single network to carry voice and data is easier to scale, maintain, and administer. As an added bonus, it's also cheaper, because VoIP is free of the endless government regulations and tariffs imposed upon phone companies.

VoIP is simply overflowing with hack potential, and VoIP Hacks is the practical guide from O'Reilly that presents these possibilities to you. It provides dozens of hands-on projects for building a VoIP network, showing you how to tweak and customize a multitude of exciting things to get the job done. Along the way, you'll also learn which standards and practices work best for your particular environment.

IP Telephony - The Integration of Robust VoIP Services
IP Telephony - The Integration of Robust VoIP Services
Now that virtually every leading telecommunications service provider has committed to delivering IP-based telephony services, communications professionals face the enormous challenge of implementation. This hands-on guide brings together today's best-known answers and solutions for delivering Voice Over IP (VoIP) services with the quality customers demand. No other book covers the combined issues of protocol signaling, media transport methodology, reference topological considerations, and voice quality testing in service offerings. Bill Douskalis presents systematic coverage of every aspect of IP-based telephony:

Coverage includes:
  • A realistic reference topology for implementing and benchmarking voice quality in IP telephony
  • Detailed explanations of call setup using each major competing technology
  • Signaling, bearer transport, and other key network elements
  • In-depth network and service performance analysis in both "normal" and impaired scenarios
  • State-of-the-art traces and performance measurements taken from actual IP networks
No matter what your role in delivering VoIP services, IP Telephony delivers the specifics you need to speed deployment, improve reliability, ensure quality, and simplify troubleshooting. Precise, thorough, and based firmly in the real world, it is simply indispensable.

The accompanying CD-ROM contains Hewlett-Packard Internet Advisor software that runs off-line—view live VoIP traffic examples! It also includes sample capture files of the H.323, MGCP, and SIP protocols; the latest IETF Working Group documents for VoIP; and an assortment of white papers and application notes that provide a real-world view of IP telephony.

What is SPIT?

VoIP spam or Spam over Internet Telephony (SPIT) is one of the foreseen future forms of spamming that Internet authorities are preparing for today. With the increasing use and dependence on the Internet for communications and data transfer, malicious software programmers have taken advantage by creating VoIP bots with the ability to harvest data and advertise massively at a very small cost. These advertising methods include email spams, SPIMS or spams over instant messaging applications, malicious bots that generate pop up ads, initiate redirects, etc.

With the inevitable popularity of VoIP over the traditional telephone, authorities are convinced that this is where the next form of spam will come from. In this case, the unsolicited emails will be replaced by video or audio recordings advertising dubious products and services. Prank callers will also take advantage of this new frontier as the new technology becomes more available. This is even more profitable for such users as they can send automated or pre-recorded advertising messages to thousands of users with just one click, making it a very cheap operation to run.

SPIT will also have more impact on users than unsolicited instant messaging and email spam as it has the potential of clogging up the network. Given enough SPIT volume, users may not have any other options that to hang the VoIP phone 'off the hook'.

Other threats include spammers who might take temporary control of a user's systems to launch VoIP attacks on other networks, hackers that will inject profane words in conversations, fake voice mails and viruses that have the ability to use critical bandwidth.

Furthermore, These VoIP bots have the capability of launching automated DDoS or distributed denial of service attacks against rival corporations or users using VoIP with SIP protocols and vulnerabilities. Botnets armed with VoIP-directed software will play a big role in launching these kinds of attacks.


VoIP Built-In Security

VoIP, however, will have the usual array of spam defenses that other forms of Internet communication applications like emails and instant messengers have to combat unsolicited video/voice communication. This will include the stealth mode of instant messenger applications, privacy options as well as spam reporting options.

Other security measures may also include separating the voice and data streams so that in the event that the voice lines do get clogged with traffic, the website traffic will not be affected and will remain operational. Anti-spyware and anti-virus systems coupled with SIP encryption systems designed for VoIP will also help a lot in screening incoming calls and data and detect any instructions in the system. This will prevent DDoS attacks from being launched against your company. Moreover, increased collaboration between ISPs and Internet authorities will also be effective in determining the locations of these spammers as well as blocking calls and data from dubious IP addresses.

Improvements and updates on the security systems for VoIP systems in its initial stages will also play a crucial role in making this communication option a cost effective and reliable alternative than telephones.

What is H.323?

H.323 is an ITU standard multimedia conferencing protocol, which includes voice, video, and data conferencing, for use over packet-switched networks.

H.323 was the first standard for VoIP, but is being supplanted by SIP.

H.323 defines five components of a multimedia network:

  • Terminals
  • Multipoint Control Units (MCUs)
  • Gateways
  • Gatekeeper
  • Border Elements

Terminals are telephone and PC equipment which connect end-users to the H.323 network.

MCUs are responsible for managing conferences. MCU's consist of a Multipoint Controller (MC) and an optional Multipoint Processor (MP). The MC manages signaling and the MP manages media mixing and switching.

Gateways nterface the H.323 network with other networks, including PSTN (Public Switched Telephone Network) and other H.323 networks. Gateways consist of a Media Gateway Controller (MGC) and a Media Gateway (MG). The MGC is is responsible for call signaling functions and the MG is responsible for media-related functions.

Gatekeepers are responsible for admission control and address resolution. Gatekeepers are able to provide advanced services such as normally found in PBX's.

Border Elements are positioned between two H.323 networks and assist in call routing and call authorization.

What is IAX?

IAX is a call control protocol for VoIP.

IAX was designed to replace the earlier call control protocols, H.323 and SIP.

IAX is much more bandwidth efficient than the competing VoIP call control protocols, enabling it to support more concurrent VoIP calls over the same amount of bandwidth.

IAX traffic uses UDP port 4569. The use of a single well-known port enables IAX to be compatible with NAT (Network Address Translation), which can be a serious difficulty for earlier VoIP call control protocols.

IAX supports authentication using RSA public keys with the SHA-1 message digest algorithm for digital signatures.

IAX was developed for the Asterisk PBX and originally stood for Inter-Asterisk eXchange. IAX is now supported by many other VoIP platforms.

What is RTP?

RTP (Real-Time Transport Protocol) is used to encapsulate VoIP data packets inside UDP packets.

RTP is defined in RFC 3550 - RTP: A Transport Protocol for Real-Time Applications.

RTP provides end-to-end network transport functions suitable for applications transmitting real-time data, such as audio, video or simulation data, over multicast or unicast network services. RTP does not address resource reservation and does not guarantee quality-of-service for real-time services. The data transport is augmented by a control protocol (RTCP) to allow monitoring of the data delivery in a manner scalable to large multicast networks, and to provide minimal control and identification functionality. RTP and RTCP are designed to be independent of the underlying transport and network layers. The protocol supports the use of RTP-level translators and mixers.

Other RFCs which document RTP include:

Books on RTP

RTP: Audio and Video for the Internet
RTP: Audio and Video for the Internet
RTP (Real-time Transport Protocol) provides a framework for the delivery of audio and video across IP networks with unprecedented quality and reliability. In RTP: Audio and Video for the Internet, Colin Perkins provides readers with detailed technical guidance for designing, implementing, and managing any RTP-based system.

By bringing together crucial information that was previously scattered or difficult to find, Perkins has created an resource that enables network professionals to leverage RTP's benefits in a wide range of Voice-over IP (VoIP) and streaming media applications. Colin demonstrates how RTP supports audio/video transmission in IP networks, and shares strategies for maximizing performance, robustness, security, and privacy.

Comprehensive, exceptionally clear, and filled with examples, RTP: Audio and Video for the Internet is the definitive reference on RTP for every audio/video application designer, developer, researcher, and administrator.

Key coverage in the book includes:
  • RTP's goals, design philosophy, and relationships with other protocols
  • The psychology of human perception in the design of media delivery systems
  • RTP data transfer and control protocols, including framing, loss detection, reception quality feedback, and membership control
  • Media playout, timing, and synchronization, including lip synchronization
  • Mitigating network problems: error concealment, error correction, and congestion control
  • Optimizing performance over low-speed links: header compression, multiplexing, and tunneling
  • Integrating leading media codecs and standards into RTP systems
  • Securing RTP sessions: encryption, authentication, and the new secure RTP profile for wireless networks
  • Extensive references and practical examples