DAHDI channel numbering

Hello,
I’ll go straight to the question before deepening into the details: is it possible in Asterisk/DAHDI to declare the 30 channels of a PRI ISDN trunk in the form bchan=1-30 and at the same time declare the D channel to be dchan=16?

I understand a typical E1 trunk is set up like this:

Physical timeslot 00: Framing
Physical timeslot 01: Channel 01
Physical timeslot 02: Channel 02
Physical timeslot 03: Channel 03
Physical timeslot 04: Channel 04
Physical timeslot 05: Channel 05
Physical timeslot 06: Channel 06
Physical timeslot 07: Channel 07
Physical timeslot 08: Channel 08
Physical timeslot 09: Channel 09
Physical timeslot 10: Channel 10
Physical timeslot 11: Channel 11
Physical timeslot 12: Channel 12
Physical timeslot 13: Channel 13
Physical timeslot 14: Channel 14
Physical timeslot 15: Channel 15
Physical timeslot 16: D-channel
Physical timeslot 17: Channel 17
Physical timeslot 18: Channel 18
Physical timeslot 19: Channel 19
Physical timeslot 20: Channel 20
Physical timeslot 21: Channel 21
Physical timeslot 22: Channel 22
Physical timeslot 23: Channel 23
Physical timeslot 24: Channel 24
Physical timeslot 25: Channel 25
Physical timeslot 26: Channel 26
Physical timeslot 27: Channel 27
Physical timeslot 28: Channel 28
Physical timeslot 29: Channel 29
Physical timeslot 30: Channel 30
Physical timeslot 31: Channel 31

I want to set it up like this:

Physical timeslot 00: Framing
Physical timeslot 01: Channel 01
Physical timeslot 02: Channel 02
Physical timeslot 03: Channel 03
Physical timeslot 04: Channel 04
Physical timeslot 05: Channel 05
Physical timeslot 06: Channel 06
Physical timeslot 07: Channel 07
Physical timeslot 08: Channel 08
Physical timeslot 09: Channel 09
Physical timeslot 10: Channel 10
Physical timeslot 11: Channel 11
Physical timeslot 12: Channel 12
Physical timeslot 13: Channel 13
Physical timeslot 14: Channel 14
Physical timeslot 15: Channel 15
Physical timeslot 16: D-channel
Physical timeslot 17: Channel 16 <-- (Note that I’m not skipping channel 16, thus counting up to 30)
Physical timeslot 18: Channel 17
Physical timeslot 19: Channel 18
Physical timeslot 20: Channel 19
Physical timeslot 21: Channel 20
Physical timeslot 22: Channel 21
Physical timeslot 23: Channel 22
Physical timeslot 24: Channel 23
Physical timeslot 25: Channel 24
Physical timeslot 26: Channel 25
Physical timeslot 27: Channel 26
Physical timeslot 28: Channel 27
Physical timeslot 29: Channel 28
Physical timeslot 30: Channel 29
Physical timeslot 31: Channel 30

I’ve set up an Asterisk server which goes connected in between an Ericsson MX-One and a Nec SV700 which are already connected via a ISDN PRI QSIG physical link and communicating fine. I’m using a TE410P card (4x E1s) of which the first two connectors are configured to spans 1 (Nec) and 2 (Ericsson).

Whenever I try to use channel 17 as bchan 16, I get an error stating that channel 16 is reserved for the channel D.

However, I must do this because calls coming from the Ericsson come that way. Ericsson’s channel 17 is channel 16 for Asterisk, and whenever calls are placed on that timeslot, I get the following error:

[WARNING] (…) sig_pri.c:6164 pri_dchannel: Span 2: SETUP on unconfigured channel 0/16

Subsequently, calls coming from Ericsson’s channel 18 come on channel 17 for Asterisk, and so on.

This means calls placed on channels 1-15 are perfect, but on higher channels I get no audio.

I’ve read about NFAS but I don’t need to move the D channel, just declare the B channels as 1-30 without having to skip number 16.

Any help on this matter will be highly appreciated.

Alright, the answer was nearer than I thought:

chan_dahdi.conf

qsigchannelmapping=logical
channel => 32-46, 48-62

This way channels are internally numbered from 1 to 30 without gaps, just what I wanted.