O'Reilly Emerging Telephony

oreilly.comSafari Books Online.Conferences.
advertisement
MySQL Conference and Expo April 14-17, 2008, Santa Clara, CA
AddThis Social Bookmark Button

Print Subscribe to Telephony Subscribe to Newsletters

Building Your Own Teleconference System with Asterisk and Gizmo
Pages: 1, 2, 3, 4

Building and Configuring Your System

Once you have sized your system, you'll need to install and configure your Asterisk servers. Since Asterisk has a built-in meet me conferencing capability, this is pretty easy to do. The hardest part is getting Asterisk up and running. It is a fairly complex piece of software with a lot of moving parts. If you're completely new to Asterisk, I recommend starting with Asterisk@Home, which will guide you through setting up a small system. Asterisk Business Edition, sold by Digium for $795, also makes the initial setup process easier.



My other company, Radio Handi a teleconferencing service that runs partially on Asterisk, is publishing a set of basic configuration files that you can use as a cheat sheet to get a system up and running fairly quickly.

Sample Configurations

The following three configuration files tell Asterisk how to answer and route incoming calls to one or more conference rooms.

  • extensions.conf defines the overall dial plan for the system. This file tells the system how to answer calls arriving from different types of telephone circuits and services, and where to route the calls once answered.
  • meetme.conf defines the list of group conference rooms and which features to enable or disable for each room (such as passcode access)
  • sip.conf contains the configuration details for routing incoming SIP calls (SIP is the protocol used to carry voice calls over the Internet). In the example configuration we provide default settings for both Gizmo (which is used to answer calls from Gizmo's free internet phone software) and for Voxbone (which can provide you with local telephone numbers in more than 40 countries).

Download extensions.conf.

---extensions.conf---

;
; Static extension configuration file, used by
; the pbx_config module. This is where you configure all your 
; inbound and outbound calls in Asterisk. 
; 
; This configuration file is reloaded 
; - With the "extensions reload" command in the CLI
; - With the "reload" command (that reloads everything) in the CLI

;
; The "General" category is for certain variables.  
;
[general]
;
; If static is set to no, or omitted, then the pbx_config will rewrite
; this file when extensions are modified.  Remember that all comments
; made in the file will be lost when that happens. 
;
; XXX Not yet implemented XXX
;
static=yes
;
; if static=yes and writeprotect=no, you can save dialplan by
; CLI command 'save dialplan' too
;
writeprotect=no
;
; If autofallthrough is set, then if an extension runs out of
; things to do, it will terminate the call with BUSY, CONGESTION
; or HANGUP depending on Asterisk's best guess (strongly recommended).
;
; If autofallthrough is not set, then if an extension runs out of 
; things to do, asterisk will wait for a new extension to be dialed 
; (this is the original behavior of Asterisk 1.0 and earlier).
;
autofallthrough=yes
;
; If clearglobalvars is set, global variables will be cleared 
; and reparsed on an extensions reload, or Asterisk reload.
;
; If clearglobalvars is not set, then global variables will persist
; through reloads, and even if deleted from the extensions.conf or
; one if its included files, will remain set to the previous value.
;
clearglobalvars=no
;
; If priorityjumping is set to 'yes', then applications that support
; 'jumping' to a different priority based on the result of their operations
; will do so (this is backwards compatible behavior with pre-1.2 releases
; of Asterisk). Individual applications can also be requested to do this
; by passing a 'j' option in their arguments.
;
priorityjumping=no
;
; You can include other config files, use the #include command
; (without the ';'). Note that this is different from the "include" command
; that includes contexts within other contexts. The #include command works
; in all asterisk configuration files.
;#include "filename.conf"

; The "Globals" category contains global variables that can be referenced
; in the dialplan with ${VARIABLE} or ${ENV(VARIABLE)} for Environmental
; variables,
; ${${VARIABLE}} or ${text${VARIABLE}} or any hybrid
;
[globals]
CONSOLE=Console/dsp                ; Console interface for demo
;CONSOLE=Zap/1
;CONSOLE=Phone/phone0
IAXINFO=guest                    ; IAXtel username/password
;IAXINFO=myuser:mypass
TRUNK=Zap/g2                    ; Trunk interface
;
; Note the 'g2' in the TRUNK variable above. It specifies which group (defined
; in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in
; the specified group. The four possible options are:
;
; g: select the lowest-numbered non-busy Zap channel
;    (aka. ascending sequential hunt group).
; G: select the highest-numbered non-busy Zap channel
;    (aka. descending sequential hunt group).
; r: use a round-robin search, starting at the next highest channel than last
;    time (aka. ascending rotary hunt group).
; R: use a round-robin search, starting at the next lowest channel than last
;    time (aka. descending rotary hunt group).
;
TRUNKMSD=1                    ; MSD digits to strip (usually 1 or 0)
;TRUNK=IAX2/user:pass@provider

;
; Any category other than "General" and "Globals" represent 
; extension contexts, which are collections of extensions.  
;
; Extension names may be numbers, letters, or combinations
; thereof. If an extension name is prefixed by a '_'
; character, it is interpreted as a pattern rather than a
; literal.  In patterns, some characters have special meanings:
;
;   X - any digit from 0-9
;   Z - any digit from 1-9
;   N - any digit from 2-9
;   [1235-9] - any digit in the brackets (in this example, 1,2,3,5,6,7,8,9)
;   . - wildcard, matches anything remaining (e.g. _9011. matches 
;    anything starting with 9011 excluding 9011 itself)
;   ! - wildcard, causes the matching process to complete as soon as
;       it can unambiguously determine that no other matches are possible
;
; For example the extension _NXXXXXX would match normal 7 digit dialings, 
; while _1NXXNXXXXXX would represent an area code plus phone number
; preceeded by a one.
;
; Each step of an extension is ordered by priority, which must
; always start with 1 to be considered a valid extension.  The priority
; "next" or "n" means the previous priority plus one, regardless of whether
; the previous priority was associated with the current extension or not.
; The priority "same" or "s" means the same as the previously specified
; priority, again regardless of whether the previous entry was for the
; same extension.  Priorities may be immediately followed by a plus sign
; and another integer to add that amount (most useful with 's' or 'n').  
; Priorities may then also have an alias, or label, in 
; parenthesis after their name which can be used in goto situations
;
; Contexts contain several lines, one for each step of each
; extension, which can take one of two forms as listed below,
; with the first form being preferred.  One may include another
; context in the current one as well, optionally with a
; date and time.  Included contexts are included in the order
; they are listed.
;
;[context]
;exten => someexten,priority[+offset][(alias)],application(arg1,arg2,...)
;exten => someexten,priority[+offset][(alias)],application,arg1|arg2...
;
; Timing list for includes is 
;
;   <time range>|<days of week>|<days of month>|<months>
;
;include => daytime|9:00-17:00|mon-fri|*|*
;
; ignorepat can be used to instruct drivers to not cancel dialtone upon
; receipt of a particular pattern.  The most commonly used example is
; of course '9' like this:
;
;ignorepat => 9
;
; so that dialtone remains even after dialing a 9.
;

; handle incoming call

[gizmocontext]
;Wait 1 second and answer the line
exten => _1747NXXXXXX,1,Wait,1
exten => _1747NXXXXXX,n,Answer

;Play prompt - "Welcome to Quarantine Class"
exten => _1747NXXXXXX,n,Playback(welcome-quarantine)

;Enter MeetMe conference
;With no conference ID indicated the caller will be prompted
;to enter a conference ID.
;The accompanying meetme.conf is configured to require the
;caller to also enter a pin.
exten => _1747NXXXXXX,n,MeetMe()

exten => _1747NXXXXXX,n,Hangup

[voxbonecontext]
;Wait 1 second and answer the line
exten => _1NXXNXXXXXX,1,Wait,1
exten => _1NXXNXXXXXX,n,Answer

;Play prompt - "Welcome to Quarantine Class"
exten => _1NXXNXXXXXX,n,Playback(welcome-quarantine)

;Enter MeetMe conference
;With no conference ID indicated the caller will be prompted
;to enter a conference ID.
;The accompanying meetme.conf is configured to require the
;caller to also enter a pin.
exten => _1NXXNXXXXXX,n,MeetMe()

exten => _1NXXNXXXXXX,n,Hangup

Download meetme.conf.

---meetme.conf----

;
; Configuration file for MeetMe simple conference rooms for Asterisk of course.
;
; This configuration file is read every time you call app meetme()

[general]
;audiobuffers=32        ; The number of 20ms audio buffers to be used
                ; when feeding audio frames from non-Zap channels
                ; into the conference; larger numbers will allow
                ; for the conference to 'de-jitter' audio that arrives
                ; at different timing than the conference's timing
                ; source, but can also allow for latency in hearing
                ; the audio from the speaker. Minimum value is 2,
                ; maximum value is 32.
;
[rooms]
;
; Usage is conf => confno[,pin][,adminpin]    
;
; conf => [conference id],[optional password]
; The conference ID would map to a scheduled class or meeting
; 
conf => 2001,9938   ; history 2001 conference, with pin code 9938
conf => 3001,1877   ; history 3001 conference, with pin code 1877

Download sip.conf.

---sip.conf---

;
; SIP configuration
;
;
; SIP Configuration for Asterisk
;
; Syntax for specifying a SIP device in extensions.conf is
; SIP/devicename where devicename is defined in a section below.
;
; You may also use
; SIP/username@domain to call any SIP user on the Internet
; (Don't forget to enable DNS SRV records if you want to use this)
;
; If you define a SIP proxy as a peer below, you may call
; SIP/proxyhostname/user or SIP/user@proxyhostname
; where the proxyhostname is defined in a section below
;
; Useful CLI commands to check peers/users:
;   sip show peers              Show all SIP peers (including friends)
;   sip show users              Show all SIP users (including friends)
;   sip show registry           Show status of hosts we register with
;
;   sip debug                   Show all SIP messages
;


[general]
port = 5060            ; Port to bind to
bindaddr = xx.xx.xx.xx    ; Address to bind SIP channel to
context = default        ; Default context for incoming calls
srvlookup = yes            ; Enable DNS SRV lookups on outbound calls
;allowguest = yes

pedantic = no            ; Enable slow, pedantic checking for Pingtel
tos=lowdelay            ; IP QoS parameter, either keyword or value

;maxexpirey=3600        ; Max length of incoming registration we allow
;defaultexpirey=120        ; Default length of incoming/outoing registration
;notifymimetype=text/plain    ; Allow overriding of mime type in NOTIFY
;videosupport=yes        ; Turn on support for SIP video

disallow=all            ; Disallow all codecs
allow=ulaw            ; Allow codecs in order of preference
;allow=alaw
;allow=gsm
;allow=ilbc

; Asterisk can register as a SIP user agent to a SIP proxy (provider)
; Format for the register statement is:
;       register => user[:secret[:authuser]]@host[:port][/extension]
;
; If no extension is given, the 's' extension is used. The extension
; needs to be defined in extensions.conf to be able to accept calls
; from this SIP proxy (provider)
;
; host is either a host name defined in DNS or the name of a 
; section defined below.
;
; Examples:

register => 1747xxxxxxx:*******@proxy01.sipphone.com

;gizmo config
;
; This section configures Asterisk to receive incoming calls from the Gizmo VoIP network
; if you have multiple Gizmo accounts, just create one entry for each account.
[proxy01.sipphone.com]
host=proxy01.sipphone.com
username=1747nnnnnnn
secret=*******
type=friend
context=gizmocontext
disallow=all
allow=ulaw
allow=alaw
dtmfmode=inband
insecure=very
canreinvite=no

[voxbone]
[213.246.216.81]
host = 213.246.216.81
type = friend
insecure = very
context = voxbonecontext

[213.246.216.82]
host = 213.246.216.82
type = friend
insecure = very
context = voxbonecontext

[213.246.216.90]
host = 213.246.216.90
type = friend
insecure = very
context = voxbonecontext

[213.246.216.91]
host = 213.246.216.91
type = friend
insecure = very
context = voxbonecontext

[213.246.216.92]
host = 213.246.216.92
type = friend
insecure = very
context = voxbonecontext

This example configuration works as follows. It will answer incoming calls from Gizmo with a greeting and prompt you to enter a four-digit extension number. This will identify the conference room that you want to join. You configure conferences in the meetme.conf configuration file. The example configuration has a few different types of conferences defined. You can easily edit this file to number conferences any way you want and to enable or disable features such as password controls.

I recommend testing the system using Gizmo Project. To do this, create an account on Gizmo, and then fill in the appropriate fields in the sip.conf file on your Asterisk server. You should then be able to call the Gizmo phone number for the account you created (usually 1747nnnnnnn) or the Gizmo nickname (e.g., "ConcordHighSchool"). You'll hear the greeting, and can then enter an extension number to join the desired conference.

If you need more than one server to accommodate all of your callers, I recommend creating one Gizmo account for each server. This way, you can park some classes on one server, and some on another. The simplest thing is to have one Gizmo account per server (e.g. ConcordHighSchoolMath, ConcordHighSchoolHistory, etc). This will spread the load across many servers, but avoid building a sophisticated load balancing and dynamic call routing service (this is very difficult to do, and beyond the scope of what most organizations can do). In general, my advice is to find a smart computer and networking person, give them your headcount and class or meeting schedules, and let them come up with the best solution. Then send out his instructions telling users what to do.

To call into the system, users will need to have Gizmo on their home or laptop computers, as well as a reasonably fast Internet connection. Since Gizmo is free software, and it costs nothing to make Internet calls you will not need to buy normal telephone service to answer these calls. These calls ride entirely over the Internet. It is also very easy to install and use, unlike other VoIP software, such as CounterPath (formerly Xten), which requires a lot of configuration to work properly. I do not recommend Skype because it does not peer with other VoIP networks. Gizmo also has built in instant messaging capability, which is great as an adjunct to a live voice teleconference.

Because some of your users may not have home computers or broadband Internet connectivity, you should also provide some local telephone connectivity if possible. There are two ways to do this: order digital phone lines from your local phone company or order VoIP origination service.

Most local telephone companies offer a fairly affordable digital telephone service called T-1. T-1 lines carry up to 24 simultaneous calls, and usually cost several hundred dollars per month. Incoming calls are generally toll-free (callers dial a local number, so there may be long-distance charges if they are not calling locally). Asterisk supports connections to digital telephone lines, including T1, E1, and ISDN Primary Rate circuits. T1 is the most common in North America, while E1 and ISDN are common elsewhere. Digium sells inexpensive network interface cards that can connect up to four T1/E1 circuits per system.

The problem with T-1 service is that it often takes four to six weeks to provision, and in the event of a crisis, the phone company will be focused on keeping existing service up and running. It may be impossible for them to provision new services. Configuring these circuits, E1 and ISDN especially, can be a real nightmare, although generic T1 voice service is not too bad if you follow the phone company's instructions closely.

The simplest way to link phone numbers into your system will be by ordering VoIP service from a company like Voxbone. It will give you direct inward dialing (DID) telephone numbers in cities throughout the United States and about 40 other countries. You pay a flat monthly rate to accept incoming calls via these numbers (no per minute charges, although users may incur cellular or long distance charges). The calls arrive on your Asterisk servers via the Internet. The example configuration includes settings for Voxbone. There are several other providers to choose from, including Level Three, Global Crossing, XO Communication, and a number of smaller providers. Unfortunately, many of these companies only cater to large customers and will not accept small orders. This will change during the next year or so as dozens of new companies enter this market, but for now your choices are limited.

In general, I recommend that you simply tell your users that they need to figure out how to get online with Gizmo to dial in to your system. Phone companies can take weeks to process orders, and some of these companies may be overwhelmed by demand in a situation like this. Provide local phone numbers if you can, because not everyone will have a computer with a broadband connection, but don't assume that it will be easy to interconnect your Asterisk system with the public telephone network.

The key to success here is finding someone who is knowledgeable about Linux and who is a good tinkerer. This type of person will be able to download the example files and instructions, troubleshoot network or configuration problems, and get an improvised system working quite quickly. This is very important, and I can't emphasize this enough. This is not a shrink-wrapped product, and so it is important that you have someone who is good at tinkering and troubleshooting.

I also strongly recommend Asterisk: The Future of Telephony. It is an excellent primer about Asterisk and provides a lot of information about many different types of applications and how to configure the system.

Pages: 1, 2, 3, 4

Next Pagearrow




Search Emerging Telephony

Search

Tagged Articles

Post to del.icio.us

This article has been tagged:

asterisk

Articles that share the tag asterisk:

Asterisk: A Bare-Bones VoIP Example (115 tags)

VoIP and POTS Integration with Asterisk (54 tags)

The PBX Is Dead; Long Live VoIP (28 tags)

Building Your Own Teleconference System with Asterisk and Gizmo (28 tags)

What Is Asterisk (20 tags)

View All

voip

Articles that share the tag voip:

Asterisk: A Bare-Bones VoIP Example (110 tags)

VoIP and POTS Integration with Asterisk (47 tags)

The PBX Is Dead; Long Live VoIP (42 tags)

Building Your Own Teleconference System with Asterisk and Gizmo (28 tags)

Top Ten Questions People Ask About Switching to Internet Telephones (23 tags)

View All

collaboration

Articles that share the tag collaboration:

What Is Web 2.0 (145 tags)

What Is a Wiki (and How to Use One for Your Projects) (33 tags)

Building Your Own Teleconference System with Asterisk and Gizmo (9 tags)

Design by Wiki (6 tags)

The Architecture of Participation (4 tags)

View All

tutorial

Articles that share the tag tutorial:

Rolling with Ruby on Rails (1417 tags)

A Simpler Ajax Path (135 tags)

Ajax on Rails (88 tags)

Rolling with Ruby on Rails, Part 2 (66 tags)

Very Dynamic Web Interfaces (66 tags)

View All

teleconference

Articles that share the tag teleconference:

Building Your Own Teleconference System with Asterisk and Gizmo (8 tags)

View All

Sponsored Resources

  • Inside Lightroom
Advertisement
Sign up today to receive special discounts,
product alerts, and news from O'Reilly.
Privacy Policy >
View Sample Newsletter >
  • Youtube
  • http://www.youtube.com/OreillyMedia
  • Twitter
  • Subscribe
  • View All RSS Feeds >
O'Reilly Media

800-889-8969 or 707-827-7019
Monday-Friday 7:30am-5pm PT
©2011, O'Reilly Media, Inc.
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
  • About O'Reilly
  • Academic Solutions
  • Contacts
  • Customer Service
  • Careers
  • Press Room
  • Privacy Policy
  • Terms of Service
  • Writing for O'Reilly
  • Community
  • Authors
  • Forums
  • Membership
  • Newsletters
  • RSS Feeds
  • User Groups
  • Partner Sites
  • makezine.com
  • makerfaire.com
  • craftzine.com
  • igniteshow.com
  • PayPal Developer Zone
  • O'Reilly Insights on Forbes.com