How do I determine or set the (ISDN?) Protocol for my D-Channel? (SOLVED!)

My Asterisk implementation is, I think, set up “backwards” from most implementations. Rather than the Digium T1 card in my Asterisk server being plugged into an external T1 circuit from Verizon or some other carrier, my Asterisk server’s T1 is plugged into a Dialogic card in our own predictive Dialer system (from TouchStar). I have green lights on both ends of the cable: the Digium T1 card in my Asterisk server, and the Dialogic card in my Dialer. However, my D-Channel is down. Running “isdiag 1 1 t s” on my Dialer shows the following:

 0    0    0    0    0    0    1

The “1” under DCH indicates that the D-Channel has a problem. However, I’m having much trouble figuring out what the problem is; what I’m missing. Bear in mind that this is a brand new setup that we’ve never used before, so this isn’t a case of something breaking that was once working.

Running “asterisk -r” and then “pri show spans” on my Asterisk server shows the following:

PRI span 1/0: Provisioned, In Alarm, Down, Active
PRI span 2/0: Provisioned, In Alarm, Down, Active
PRI span 3/0: Provisioned, In Alarm, Down, Active
PRI span 4/0: Provisioned, Down, Active

I should note that I currently only have 1 of the 4 T1 ports on my Asterisk server’s Digium card plugged into a Dialogic card in my Dialer: Span 4 on the Asterisk side is plugged into Span 1 on the Dialer side.

In my searching I’ve seen statements that the D-Channel’s ISDN Protocol on the Dialogic side must match the protocol from the provider (in this case, my Asterisk server). I see a long list of protocol choices for the card in the Dialogic Configuration Manager on the Dialer side. However, on the Asterisk side I can’t figure out how to determine or configure the D-Channel Protocol in Asterisk/FreePBX. I’ve scoured all the .conf files I can find; I’ve pored over every inch of the FreePBX interface. I see no place where the actual D-Channel Protocol is defined! Am I missing something? Barking up the wrong tree, or approaching the problem from the wrong direction perhaps?

Any guidance or insight would be much appreciated!

  • Matt Holmes

Environment (VoIP server):
Dell PowerEdge 2850
Digium TE420 card
AsteriskNOW v1.5.0
CentOS Linux v5 final
FreePBX v2.5.1.0

Environment (Dialer):
TouchStar Dialer System
Dialogic D/480SC-2T1 card

I copied chan_dahdi.conf from chan_dahdi.conf.template, since it didn’t exist by default. I commented out the “XTDM20B” section and added the “#include dahdi-channels.conf”. The system’s behavior was exactly the same before and after I created chan_dahdi.conf; it didn’t seem to make any difference.


;# Flash Operator Panel will parse this file for dahdi trunk buttons
;# AMPLABEL will be used for the display labels on the buttons

;# %c Dahdi Channel number
;# %n Line number
;# %N Line number, but restart counter
;# Example:
;# ;AMPLABEL:Channel %c - Button %n

;# For Dahdi/* buttons use the following
;# (where x=number of buttons to dislpay)


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

;#; XTDM20B Port #1,2 plugged into PSTN
;#;AMPLABEL:Channel %c - Button %n


; Autogenerated by /usr/sbin/dahdi_genconf on Thu Aug  6 10:06:29 2009 -- do not hand edit
; 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/asterisk/chan_dahdi.conf that will include the global settings

; Span 1: TE4/0/1 "T4XXP (PCI) Card 0 Span 1" (MASTER) B8ZS/ESF RED
switchtype = national
signalling = pri_cpe
channel => 1-23
context = default
group = 63

; Span 2: TE4/0/2 "T4XXP (PCI) Card 0 Span 2" B8ZS/ESF RED
switchtype = national
signalling = pri_cpe
channel => 25-47
context = default
group = 63

; Span 3: TE4/0/3 "T4XXP (PCI) Card 0 Span 3" B8ZS/ESF RED
switchtype = national
signalling = pri_cpe
channel => 49-71
context = default
group = 63

; Span 4: TE4/0/4 "T4XXP (PCI) Card 0 Span 4" B8ZS/ESF RED
switchtype = national
signalling = pri_cpe
channel => 73-95
context = default
group = 63


[[email protected] asterisk]# cat chan_dahdi_additional.conf
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications, details at:       ;
1 Like

I cannot be very specific as I currently to not have a system to play with.
Some general checkpoints:

Make sure you’re in sync on physical layer - one of your T1 endpoints should provide clocking and another side should take clocking from the line.
Then you should have the same protocol running by both parties on the D-channel (switchtype = national).
Finally, you should have the right master/slave relationship on ISDN level - one side of the link should be set as network while another side should behave as a user. Currently your Asterisk box is configured as ISDN user side (signalling = pri_cpe). If you’re unsure how the other side is configured just try to set signalling = pri_net on Asterisk side.

Thank you for the reply! So…

  1. How does one specify clocking in Asterisk/DAHDI? On the other side - in Dialogic Configuration Manager - I see some clocking-related paramaters, but they are greyed out and uneditable.

  2. Does “switchtype = national” indicate that the protocol being used by Asterisk is “NI2”? (hopefully)

  3. Thank you for the master/slave tip! I wondered what the user/network relationship was. However, where do I change the “pri_cpe” to “pri_net”? The “dahdi-channels.conf” file says, “…do not hand edit”.

Also, what about “context=from-pstn”? Is that appropriate for an internal, Asterisk-to-Dialer connection?

  • Matt Holmes

That was it! Thank you, AndrewZ! I made 2 small changes that fixed the D-Channel Down problem:

1) On the Asterisk server, in /etc/asterisk/dahdi-channels.conf, I changed the signalling from “pri_cpe” to “pri_net”. (Even though the file says “do not hand edit”.)

2) On the Dialer server, I changed the ISDN Protocol for the pertinent T1 spans in Dialogic Configuration Manager from “5ESS” to “NI2”.

That’s it! I rebooted both systems, and everything came up perfectly! :slight_smile:

  • Matt Holmes