Home arrow Asterisk arrow SolutionBase: Configure Asterisk to support a T1 PRI connection

Language Translator

Hacking Zone

Hacking Tools
Attacking

Configure Windows

Windows Configuration

Novels

Mix Novels

Human Personality

Body Language
SolutionBase: Configure Asterisk to support a T1 PRI connection PDF Print E-mail
Written by Harry   
Saturday, 19 January 2008
Article Index
SolutionBase: Configure Asterisk to support a T1 PRI connection
Page 2
Page 3
Page 4

Outgoing connections

To allow users in the office to make an outgoing call, you must first add them to the outgoing context. To do this, edit extensions.conf, and under the [office] context, add include => outgoing.

Now that telephone calls from the outside world can be delivered into the Asterisk controlled PBX network, there needs to be a method to allow the extensions in the office context to call out, perhaps to order a pizza. To do this, define a new context labeled "outgoing". This will ensure that outbound phone calls are separate in access from the rest of your dial plan. Figure D shows what the edits look like.

Figure D

Additional changes to the /etc/asterisk/extensions.conf file allow outgoing phone calls.

This is different than what you've done so far. First, you're going to notice the underscore (_) before the context. The underscore tells Asterisk to match the extension against the pattern that is going to follow the underscore. The format for the pattern is simple, and contains attributes close to a lightweight implementation of regular expressions:

  • X references any digit from 0-9
  • Z references any digit from 1-9
  • N references any digit from 2-9

There are other matching methods also, but are closer to regular expressions pattern matching functionality. In the example, you can see that there is a dial plan for seven- and 10-digit telephone numbers, and the pattern should match any telephone number in the United States. The dial command uses the context variable ${EXTEN} which is the dialed extension that matches the pattern. The dial function dials the first group on the Zap channel we configured earlier and attempts to connect to the extension across that channel. At this point, the extension being dialed is an outside telephone number and an actual call is going to be made.

As with any extension in Asterisk, you have complete control over the dial plan. So in this dial plan, if someone decides they want to dial a (900) adult phone line, the call will be immediately disconnected. Using the above matching methods, you can control who has access make long-distance phone calls, or create a process that requires a PIN number in order to make a long-distance call.

That's it

Now everything is put together. You've configured your Zaptel drivers, the Asterisk Zap channel, and modified the dial plan to allow incoming and outgoing telephone calls. Now you'll want to reload Asterisk by running /etc/init.d/asterisk restart.

Alternatively, you can access the Asterisk console by running asterisk -vvvvcr on the command line and enter the restart gracefully command at the asterisk*CLI> prompt. The gracefully command will instruct Asterisk to wait until all open channels are closed before shutting down, and then start itself up again.





Digg!Reddit!Del.icio.us!Google!Live!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Spurl!Wists!Simpy!Newsvine!Blinklist!Furl!Fark!Blogmarks!Yahoo!Smarking!Netvouz!Shadows!RawSugar!Ma.gnolia!PlugIM!Squidoo!BlogMemes!FeedMeLinks!BlinkBits!Tailrank!linkaGoGo!Free social bookmarking plugins and extensions for Joomla! websites! title=
Comments
Add NewSearch
Only registered users can write comments!

Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved.



Last Updated ( Saturday, 19 January 2008 )
 
< Prev   Next >
Your Ad Here

Donate us!!

Enter Amount:

RSS socialnet

Add to MyYahoo!
Subscribe in NewsGator Online
Add to Newsburst
Add to Google
Add to My AOL
Add to Pluck
Subscribe in FeedLounge
Add to Windows Live
Add to NetVibes
Subscribe in Rojo
Subscribe in Bloglines
Add to MyMSN
Add to Plusmo for your cellphone
Add to PageFlakes
Add to Technorati
Add to BlinkBits