Solved

Asterisk Dialplan Configuration

Posted on 2008-10-30
2
1,344 Views
Last Modified: 2013-11-12
I having been working of this for almost 2 weeks and really need help. Brand new to Asterisk,
first time I have ever seen it.

I am trying to use Asterisk to simulate a Central Office, for training. Asterisk will not be in a
production environment and will not be plugged into any Telco lines

Running Asterisk 1.6.0 with Dahdi 2.0.0

Hardware:
TE100P T1/E1 card
TDM400P with 2 FXS / 2 FXO modules ( I am not using the 2 FXO's)

Analog phone plugged into the first FXS port on the TDM400P (channel 25)
A RJ11 crossconnect cable running from the 2nd FXS port on the TDM400P to an FXO port on a Cisco
Router (channel 26)

T1 Crossover cable between the Asterisk T1 card and a PRI card on the Cisco Router

Asterisk is to simulate an offnet environment for the Cisco equipment

What I need is the following:

1. When any number comes in, whether over the T1 or the FXO on the FXS port channel 26, I want
Asterisk to ring the analog phone plugged in on the FXS port channel 25

2. From the Asterisk phone, if any 7 digit number is dialed, such as 555-1212, I want Asterisk to
send the call out the FXS port channel 26. This will come in on the FXO port on the Cisco router
and look like a call coming in from the PSTN.

3. From the Asterisk phone, if any 11 digit number is dialed, such as 1-222-555-1212 or
1-800-555-1212, I want Asterisk to send the call out the PRI using the top channel

Asterisk sees the hardware. When I run asterisk -vvvvvvvvgc , I can see the calls coming into
Asterisk from the Cisco Router but Asterisk has no idea what to do with the call and , of course,
I can't call from the Asterisk analog phone.

I have no idea how to configure extensions.conf to accomplish what I need.

Here are my system.config and chan_dahdi.conf

system.conf

defaultzone=us
loadzone=us
echocanceller=mg2,1-23
echocanceller=mg2,25-26

span=1,0,0,esf,b8zs
bchan=1-23
dchan=24

fxols=25
fxols=26
fxsls=27
fxsls=28

*********************************************

chan_dahdi.conf

[trunkgroups]

[channels]
switchtype = 4ess
pridialplan=national
signalling = pri_net
echocancel=yes

group=1
signalling = pri_net
channel => 1-23
signalling=fxo_ls

group=2
channel=25
context=incoming
signalling=fxo_ls

group=3
channel=26
context=phones
signalling=fxs_ls

group=4
channel=27,28

Appreciate all help that I receive.
0
Comment
Question by:hispacific
2 Comments
 
LVL 19

Accepted Solution

by:
feptias earned 500 total points
ID: 22884246
Have you found a solution yet?
The trick to setting up the dial plan is to know which context you should be making changes in. I'm still familiar only with Zap files, not dahdi, but it looks like the context is defined in your chan_dahdi.conf file. Possibly you have the line "context=incoming" in the wrong place. I think that file should look more like the attached snippet. This would assign your T1 and your second FXS port to the [incoming] context. You would then be able to set the dial plan (in extensions.conf) for that context using something like this:
[incoming]
exten=>_X.,1,Dial(Zap/25,30)

That would at least make the analogue phone ring for any call coming from the Cisco router (your requirement 1). The dial plan for requirements 2 and 3 would be in the [phones] context. I'll wait for some feedback from you before making suggestions for that.

[channels]

switchtype = 4ess

pridialplan=national

echocancel=yes
 

group=1

context=incoming

signalling = pri_net

channel => 1-23
 

group=2

context=phones

signalling=fxo_ls

channel=25
 

group=3

context=incoming

signalling=fxo_ls

channel=26
 

group=4

context=dontcare

signalling=fxs_ls

channel=27,28

Open in new window

0
 

Author Closing Comment

by:hispacific
ID: 31511879
Thanks for the help. With this and other support, I was able to get it to work.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Ever wanted to query Cisco Call Manager CDR records from MS SQL Server? Here's how! CUCM can be configured to upload a CDR file to a given FTP server every minute. This article will show you how to set this up, schedule the import of this data an…
Almost all Internet protocol telephones have built-in switches at the back that allow you to connect your personal computer to one port and use the other port to connect your phone to to a Cisco switch.   Why we need to connect the PC to the pho…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now