We're doing something similar to outpulse (DTMF) the ANI/DNIS to a "BlackBox" (brand) DTMF decoder that outputs speech. Its purpose is an ANAC (automatic number announcement circuit) aka a number readback generator.
The "magic" that you're wanting to mimic occurs in the DIGIT MOD table where you insert <E> - this in interpreted by the machine to insert the calling party number (ANI/DNIS) in the outpulse digit string that you send on to the analog port, for example:
Here the 8**55 is sent to alert the BlackBox device that "digits to read" follow
<T21> is a call progress tone plan built simply for the purpose of delaying the next (important) string of digits by 2 seconds, to allow the device time to settle and get ready. The tone plan simply is programmed to look for something it will never see (for example NA Busy Tone), set the eait timer for 2 seconds with action on timeout to outpulse DTMF. The DTMF it sends is the <E> component of this equation.
This info is shipped (via the ARS Table) to a LS/GS trunk (i.e., the outgoing phone line). In our case we use a simple 2-wire E&M trunk, since the BlackBox DTMF-to-Speech decoder isn't expecting loop curent.
In operation, a technician simply dials **##
**## is a system speedcall to 8035563
8035563 is an ARS entry that selects route 198, trunk group 58 and digitmod 251
Trunk group 58 has 1 trunk (the LS/GS or E&M trunk)
DigitMod 251 absorbs 7 (the 8035563) and inserts Tone Plan 21 which pauses 2 seconds then outpulses the ANI/DNIS whether internal or external in DTMF followed by star *
The trailing * digit informs the BlackBox device that the string has ended and to execute the readback sequence.
You may want to do some digging to find some old documentation about Mitel ARS and Call Progress Tone Plans. You can perform a lot of magic with them.
Original MUG/NAMU Charter Member