Dahdi T1 setup issue (Asterisk newbie)

Good morning all,

Though I’ve been playing around with asterisk for some time, this is the first time I’m actually attempting to run an entire system on my own. I’m having some trouble setting up the T1 connection. The card is a Digium TE205P and we are using only one port.

The provider sent me the following info:

Line code: B8ZS
Frame: ESF
Start Sig: Wink
Pulse type: DTMF

The first strange thing I noticed when trying to set up DAHDI in FreePBX was that the GUI was showing 24 Channels used/23 Total, but the documentation showed a T1 with 24 Used/24 Total.

When I checked /etc/dahdi/system.conf, I see the following:

span=1,1,0,ESF,B8ZS
span=2,0,0,ESF,B8ZS
e&m=1-2325-48
echocanceller=oslec,1-2325-48
loadzone=us
defaultzone=us

Figured something was wrong here. If I manually edit this file and restart dahdi, calls can go in and out, however, we start to get LOADS of ghost calls.
Problem is, if I make any changes in the GUI and apply, it wipes anything I’ve changed. So i’m not sure how to fix that line within the GUI

Please help!

For reference:

/etc/asterisk/chan_dahdi.conf

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate. ;
;--------------------------------------------------------------------------------;
[general]

; generated by module
#include chan_dahdi_general.conf

; for user additions not provided by module
#include chan_dahdi_general_custom.conf

[channels]
language=en
busydetect=no
busycount=5
usecallerid=yes
callwaiting=yes
usecallingpres=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=no
immediate=yes
faxdetect=no
rxgain=0.0
txgain=0.0
callprogress=no

; for user additions not provided by module
#include chan_dahdi_channels_custom.conf

; include dahdi groups defined by DAHDI module of FreePBX
#include chan_dahdi_groups.conf

; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf

/etc/asterisk/dahdi-channels.conf

; Autogenerated by /usr/sbin/dahdi_genconf on Mon Oct 23 09:21:49 2017
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: TE2/0/1 “T2XXP (PCI) Card 0 Span 1” (MASTER) ESF/B8ZS ClockSource
group=0,11
context=from-pstn
switchtype=national
signalling=em_w
channel => 1-24
; context=from-analog
group = 63

; Span 2: TE2/0/2 “T2XXP (PCI) Card 0 Span 2” ESF/B8ZS RED
; group=0,12
; context=from-pstn
; switchtype = national
; signalling = pri_cpe
; channel => 25-47
; context=from-analog
; group = 63

Many providers do not differentiate between a PRI and an actual T1. I know in my market, the ILEC and CLEC will not provide pure T1s any more - they are all delivering PRI. PRI is 23 channels with a single control channel on channel 24.
It sounds like you have a 23 channel PRI being delivered on a T1 (which is common).

I think if you adjust your setup to reflect that, most of the confusion will clear. Also, with just one interface, you should only have 1 span on channels 1-23.

Hi cynjut,

Thank you for your response.
When I first shared my challenges and configuration with the provider, they responded with the following:

“Note that the T1 is not a PRI circuit. It is a CAS (Channel Associated Signalling) circuit. Your setting looks like a PRI config.”

Also, I commented out the second span that was generated, but the system still shows channels 25-48 and I have no idea why…
I saw a suggestion in another forum post where a user was forced to disable the FreePBX Dahdi config module and stick to manually modifying the files.
Currently trying that.

Any other suggestions are greatly appreciated

While the FreePBX DAHDI module is cool and wonderful, I always set my own DAHDI configuration and let FreePBX handle things that it’s good at.

Well great news. I followed some of the config sampled here:

And along with some trial & error, the card seems to be stable at this time.
The only thing I’ve noticed thus far is that when I hang up from my cell, the call ends immediately, but if I hang up from the extension, it stays connected to my cell for at least another 20 seconds.

Is this something to worry about?

So… unfortunately, this has not been solved.
Users are reporting that they are getting legit calls, but still seeing a few ghost calls here and there.

Sincerely not sure where to go from here.

Here’s system.conf:

Autogenerated by /usr/sbin/dahdi_genconf on Thu Oct 26 15:53:54 2017

If you edit this file and execute /usr/sbin/dahdi_genconf again,

your manual changes will be LOST.

Dahdi Configuration File

This file is parsed by the Dahdi Configurator, dahdi_cfg

Span 1: TE2/0/1 “T2XXP (PCI) Card 0 Span 1” (MASTER)

span=1,1,0,esf,b8zs

termtype: te

e&m=1-24

bchan=1-23

dchan=24

echocanceller=mg2,1-24

Span 2: TE2/0/2 “T2XXP (PCI) Card 0 Span 2”

span=2,2,0,esf,b8zs

termtype: te

bchan=25-47

dchan=48

echocanceller=mg2,25-47

Global data

loadzone = us
defaultzone = us

Here’s chan_dahdi.conf

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate. ;
;--------------------------------------------------------------------------------;
[general]

; generated by module
#include chan_dahdi_general.conf

; for user additions not provided by module
#include chan_dahdi_general_custom.conf

[channels]
language=en
busydetect=no
busycount=5
usecallerid=yes
callwaiting=yes
usecallingpres=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=no
immediate=yes
faxdetect=no
rxgain=0.0
txgain=0.0
callprogress=no

; for user additions not provided by module
#include chan_dahdi_channels_custom.conf

; include dahdi groups defined by DAHDI module of FreePBX
#include chan_dahdi_groups.conf

; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf
#include dahdi-channels.conf

And finally, dahdi-channels.conf:

; Autogenerated by /usr/sbin/dahdi_genconf on Thu Oct 26 15:53:54 2017
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: TE2/0/1 “T2XXP (PCI) Card 0 Span 1” (MASTER)
group=0,11
context=from-analog
switchtype = national
signalling = em_w
channel => 1-24
context = default
group = 63

; Span 2: TE2/0/2 “T2XXP (PCI) Card 0 Span 2”
; group=0,12
; context=from-pstn
; switchtype = national
; signalling = pri_cpe
; channel => 25-47
; context = default
; group = 63

Any help greatly appreciated!

Be sure you have all the same settings your provider has (which at this point I’m sure you have)

It definitely matters whether you choose T1 or PRI, the 2 are not the same.

Here’s what I have in a config that has a Openvox T1 card - it is a T1 connection not a PRI. This is a link between a Norstar using the T1 to pass calls through, but it should still be relevant.

If you are going to configure the T1 circuit by hand, be sure you disable the Dahdi module inside freepbx. I have a system with Dahdi hand configured, and a few with it configured with the Freepbx module, so either way will work.

/etc/dahdi/system.conf

span=1,0,0,ESF,B8ZS
e&m=1-24,
echocanceller=oslec,1-24,
fxsks=25-36
echocanceller=oslec,25-36
loadzone=us
defaultzone=us


/etc/\asterisk/chan_dahdi.conf

[general]

; generated by module
#include chan_dahdi_general.conf

; for user additions not provided by module
#include chan_dahdi_general_custom.conf

[channels]
language=en
busydetect=yes
busycount=10
busypattern=500,500
usecallerid=no
callwaiting=yes
usecallingpres=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=no
immediate=no
faxdetect=no
rxgain=0.0
txgain=0.0

; for user additions not provided by module
#include chan_dahdi_channels_custom.conf

; include dahdi groups defined by DAHDI module of FreePBX
#include chan_dahdi_groups.conf

; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf

dahdi-channels.conf is empty

Just to add…

Re context=from-internal - I would think you would either want from-digital or from-pstn for your application

/etc/asterisk/chan_dahdi_groups.conf

; [span_1]
signalling=em_w
switchtype=national
pridialplan=national
prilocaldialplan=national
group=0
context=from-internal
channel=>1-23

Thanks for the reply.
This is my latest config.
Doesn’t seem to have any ghost calls but also doesn’t always answer the call.
When it does answer, it takes REALLY long.

/etc/asterisk/chan_dahdi.conf

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate. ;
;--------------------------------------------------------------------------------;
[general]

; generated by module
#include chan_dahdi_general.conf

; for user additions not provided by module
#include chan_dahdi_general_custom.conf

[channels]
language=en
busydetect=no
busycount=5
usecallerid=yes
callwaiting=yes
usecallingpres=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
echotraining=no
immediate=yes
faxdetect=no
rxgain=0.0
txgain=0.0
callprogress=no

; for user additions not provided by module
#include chan_dahdi_channels_custom.conf

; include dahdi groups defined by DAHDI module of FreePBX
#include chan_dahdi_groups.conf

; include dahdi extensions defined in FreePBX
#include chan_dahdi_additional.conf
#include dahdi-channels.conf

/etc/asterisk/chan_dahdi_groups.conf

;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate. ;
;--------------------------------------------------------------------------------;

; [span_1]
signalling=em_w
switchtype=euroisdn
pridialplan=national
prilocaldialplan=national
group=0
context=from-pstn
channel=>1-12
priexclusive=no

; [span_2]
;signalling=em_w
;switchtype=euroisdn
;pridialplan=national
;prilocaldialplan=national
;group=1
;context=from-analog
;channel=>25-47

/etc/asterisk/dahdi-channels.conf

; Autogenerated by /usr/sbin/dahdi_genconf on Thu Oct 26 15:53:54 2017
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: TE2/0/1 “T2XXP (PCI) Card 0 Span 1” (MASTER)
; group=0,11
; context=from-analog
switchtype = national
; usecallerid=yes
; signalling = em_w
; channel => 1-12
; context = default
; group = 63

; Span 2: TE2/0/2 “T2XXP (PCI) Card 0 Span 2”
; group=0,12
; context=from-pstn
; switchtype = national
; signalling = pri_cpe
; channel => 25-47
; context = default
; group = 63

When you say it doesnt answer or takes a long time, what do you mean?

On an inbound or outbound call?

What does the caller hear?