I don’t suppose you have a ‘spare’ T-1 port on the Definity to test with?
Again, since I am not familiar with Elastix, I will have to be somewhat generic.
The basic steps are as follows…
Setup DAHDI on the Operating system level. If the card was physically in the machine when Elastix was installed, that may already be done. From the Bash command line, the command dahdi_hardware will tell you if the card is found. dahdi_scan will tell you how it is currently configured. The configuration file for setting the framing and d-channel allocation is /etc/dahdi/system.conf. Here is an example from one of mine.
[code]#
Span 1: TE2/0/1 “T2XXP (PCI) Card 0 Span 1” B8ZS/ESF RED
span=1,1,0,esf,b8zs
termtype: unknown
bchan=1-23
dchan=24
echocanceller=hwec,1-23
Span 2: TE2/0/2 “T2XXP (PCI) Card 0 Span 2” B8ZS/ESF RED
span=2,2,0,esf,b8zs
termtype: unknown
bchan=25-47
dchan=48
echocanceller=hwec,25-47
[/code]
It would be easiest to set your spans the same as is currently used on the PSTN <-> Definity now.
Once this is setup, the next thing is to define the channels for each span. That is done with the /etc/asterisk/chan_dahdi.conf file. This may also #include the dahdi-channels.conf file. This will define features of the channels and allow you to group them.
chan_dahdi.conf
[trunkgroups]
trunkgroup => 1,24,72
trunkgroup => 2,48,96
spanmap => 1,1,0
spanmap => 3,1,1
spanmap => 2,2,0
spanmap => 4,2,1
[channels]
relaxdtmf=yes
usecallerid=yes
hidecallerid=no
callwaiting=no
usecallingpres=yes
callwaitingcallerid=no
threewaycalling=no
transfer=yes
cancallforward=yes
callreturn=no
echocancel=yes
echocancelwhenbridged=yes
rxgain=1.0
txgain=0.0
immediate=no
faxdetect=no
#include dahdi-channels.conf
dahdi-channels.conf
; Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" B8ZS/ESF RED
; General Trunking
group=1
context=from-pstn
switchtype = national
signalling = pri_cpe
channel => 1-23
; Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2" B8ZS/ESF
; IVR Trunking
group=2
context=from-pstn
switchtype = national
signalling = pri_cpe
channel => 25-47
NOTE how the group= is BEFORE the definition for the group. Here you set the context where the incomming call will be placed in Asterisk. You also define the switch time and network connection (CPE or NET) side of the connection. For the PSTN connection, you will be pri_cpe, for the Definity connection, you could act as the net side. If the Definity connection does not work, you could set the Definity for NET and set Asterisk for CPE.
The incomming context is unknow as you have to determine what context Eleastix needs the calls to go to. Be carfull here as the wrong choice could have significant reprecusions.
Once that is configured, it is all dial plan. Assuming that Elastix allows you to define trunks, you would define the two spans as different trunks. I assume there is a way to setup outbound routes so that specific digit patterns can be directed to specific trunks. Digit patterns that match extensions on the Definity would go to that trunk. Digit patterns that match PSTN numbers that you want to allow, would go to that trunk.
With the proper configuration of the contexts and outbound routes, the calls shoule flow between the systems and the PSTN.
Good luck and have fun.