DAHDI configuration basics (group= and context= parameters)

REQUEST
The free O’Reilly book is GREAT for Asterisk, but I can’t find a reference for the DAHDI configuration files. How do multiple "group="s and "context="s play together within a single config section? Please help!

DETAILS
I purchased a Digium TE121P (T1 card w/echo cancellation).
After some random hacking of DAHDI config, it appears to work.
I don’t understand what I’ve done, and I don’t want surprises later.
Digium tech support ran dahdi_genconf, and #included the resulting /etc/asterisk/dahdi-channels.conf in my /etc/asterisk/chan-dahdi.conf.
However, here’s the result:

; from chan_dahdi.conf
[trunkgroups]
[channels]
usecallerid=yes
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
group=1
callgroup=1
pickupgroup=1
; from dahdi-channels.conf
group=0,11
context=from-pstn
switchtype = national
signalling = pri_cpe
channel => 1-23
context = default
group = 63

Notice how “group=” is specified 3 times? I spent about an hour looking at source code, as far as I can tell only one of these has an effect.

I can:
originate DAHDI/g1/18005551212 extension 6005
originate DAHDI/g11/18005551212 extension 6005
but not:
originate DAHDI/g0/18005551212 extension 6005
originate DAHDI/g63/18005551212 extension 6005

And is one of these supposed to match my global TRUNK=, currently/default:
TRUNK=“DAHDI/G2”

Please help a lost control-freak get a handle on things!

I found a document under the previous name for DAHDI, Zaptel:
http://www.voip-info.org/wiki/view/Asterisk+config+zapata.conf

It looks like my confusion comes from Digium tech support leaving me with dead lines in my DAHDI config.

I’m a little frustrated; the card was about $900, and finding current documentation for its drivers just to do the most basic configuration was extremely difficult. It included a 3-bullet quick-start that skips the critical #include step, it doesn’t provide a single reference to how to configure DAHDI.

I guess it would have been easier to find community documentation for DAHDI if it hadn’t been renamed from Zaptel recently, but this component should be well-documented with my hardware purchase, and not rely on the community anyway.

Aside from file locations, the configuration files between DAHDI and zaptel should be identical - they are for me:

/etc/zaptel.conf = /etc/dahdi/system.conf
/etc/asterisk/zapata.conf = /etc/asterisk/chan_dahdi.conf

Most of the tools are the same, replace “zap” with “dahdi”. Also, I think /etc/sysconfig/zaptel becomes /etc/dahdi/modules.

If you think getting support for that card is bad, try running a trascoder hardware card, which doesn’t work with zaptel hardly at all (had to run development code). The other choice is Asterisk 1.4.22+ and dahdi-2.1.0, which recognizes the card just fine, but crashes on a daily basis.