Here you go. I’ve got three zap identifiers g0, g1, and g2 defined for three PRI’s. One outbound route with the three PRIs in that order. From chan_dahdi.conf:
; Span 1: TE2/0/1 “T2XXP (PCI) Card 0 Span 1” (MASTER)
group=0,11
context=from-pstn
switchtype = national
signalling = pri_cpe
channel => 1-23
context = default
group = 63
; Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2"
group=1,12
context=from-pstn
switchtype = national
signalling = pri_cpe
channel => 25-47
context = default
group = 63
; Span 3: TE2/1/1 "T2XXP (PCI) Card 1 Span 1"
group=2,13
context=from-pstn
switchtype = national
signalling = pri_cpe
channel => 49-71
context = default
group = 63
I can use groups 0,1,2,11,12,and 13 in the dahdi show command to filter the output to the related channels.
Here is that output during a test call:
[Jun 20 08:35:10] VERBOSE[5601] pbx.c: – Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/3046-00000fb6”, “0?customtrunk”) in new stack
[Jun 20 08:35:10] VERBOSE[5601] pbx.c: – Executing [s@macro-dialout-trunk:19] Dial(“SIP/3046-00000fb6”, “DAHDI/g0/2310629,300,tTwW”) in new stack
[Jun 20 08:35:10] VERBOSE[5601] app_dial.c: – DAHDI/4-1 is proceeding passing it to SIP/3046-00000fb6
[Jun 20 08:35:18] VERBOSE[5601] app_dial.c: – DAHDI/4-1 answered SIP/3046-00000fb6
[Jun 20 08:36:10] VERBOSE[5601] pbx.c: – Executing [h@macro-dialout-trunk:1] Macro(“SIP/3046-00000fb6”, “hangupcall,”) in new stack
[Jun 20 08:36:10] VERBOSE[5601] pbx.c: – Executing [s@macro-hangupcall:1] GotoIf(“SIP/3046-00000fb6”, “1?skiprg”) in new stack
# asterisk -rx 'sip show channels'
Peer User/ANR Call ID Format Hold Last Message Expiry
192.168.30.180 3046 2315ec97bc3aa41 0x4 (ulaw) No Rx: ACK
192.168.30.157 3079 4ca1bcc3f5d3ee8 0x4 (ulaw) No Rx: ACK
10.0.3.10 (None) 2048937816-5070 0x0 (nothing) No Rx: REGISTER
192.168.30.161 3031 fbe6f2fdf9c985e 0x4 (ulaw) No Rx: ACK
192.168.30.219 3076 bdeeb363368a3e7 0x4 (ulaw) No Rx: ACK
192.168.30.159 3048 5c86c92222f472d 0x4 (ulaw) No Tx: ACK
192.168.30.166 3033 28ed1783679a1db 0x4 (ulaw) No Tx: ACK
7 active SIP dialogs
# asterisk -rx 'dahdi show channels'
Chan Extension Context Language MOH Interpret Blocked State
pseudo default default In Service
1 from-pstn en default In Service
2 from-pstn en default In Service
.... (2-44 are the same)
44 from-pstn en default In Service
45 7514 from-pstn en default In Service
46 from-pstn en default In Service
47 4976 from-pstn en default In Service
49 from-pstn en default In Service
.... (49-71 are the same)
71 from-pstn en default In Service