Chan_dahdi.conf for PRI and analog

I’m having a little trouble getting some direction on how to configure chan_dahdi.conf for a te122 and a tdm400p. Of all of the examples I have read though none have a PRI and an analog card under [channels] so I’m not sure of the syntax. I had the PRI working a year ago and it is still working to this date but when I try to add the analog channels (25 - 28) neither card works. This is my chan_dahdi file:


switchtype => national
pridialplan => unknown
overlapdial => yes
signalling => pri_cpe
channel => 1-23

This is what I want to add:


channel => 25
channel => 26
channel => 27
channel => 28

One thing to note about multiple DAHDI cards is that the channel numbers appear to be directly related to the the order in which the kernel driver module is loaded. If the tdm400 card is new, and the driver is being loaded before the te122 card, then it will be channels 1-4 with the PRI on channels 5-28. Probably not going to work well with your config.

Along the lines of what dalenoll said, you can use ‘dahdi_scan’ to make sure the channel numbers match what you would think they should. For example, when I put a TE122 and a TDM410P in the same system I get the following which shows how channels 1-24 are on the TE122 and there are three channel (25,26, and 28) on the TDM410.

[1] active=yes alarms=OK description=Wildcard TE122 Card 0 name=WCT1/0 manufacturer=Digium devicetype=Wildcard TE122 (VPMOCT032) location=PCI Bus 11 Slot 01 basechan=1 totchans=24 irq=0 type=digital-T1 syncsrc=0 lbo=0 db (CSU)/0-133 feet (DSX-1) coding_opts=B8ZS,AMI framing_opts=ESF,D4 coding=B8ZS framing=ESF [2] active=yes alarms=UNCONFIGURED description=Wildcard TDM410P name=WCTDM/0 manufacturer=Digium devicetype=Wildcard TDM410P (VPMADT032) location=PCI Bus 05 Slot 05 basechan=25 totchans=4 irq=0 type=analog port=25,FXS port=26,FXS port=27,none port=28,FXO

best thing is to use the dahdi autogen script commands

  1. dahdi_genconf -vvvv ; this will generate system.conf and dahdi-channesl.conf
    1a . add #include dahdi-channels.conf in chan_dahdi.conf
  2. dahdi_cfg -vvv ; this shows whether the cards is configured with right channels

now you reload the dahdi deriver from asterisk cli to check the channesl status and edit the chan_dahdi.conf as per your requirement