Digium TDM400P supports DID (Direct inward dialing)?


I have setup an Asterisk server with Digium Wildcard TDM400P card installed (2xFXO, 2xFXS). I can use the FXO interfaces to dial-out or receive dial-in calls.

Now, my local PSTN provider can support DID/DDI (Direct inward dialing) and I can get a group of telephone numbers mapped to these two FXO interfaces. For example, I can get a range of number XXXX1001 -> XXXX1101 and all these numbers will be routed to same customer.

My questions are:
(1) Does TDM400P support DID/DDI features? Or I need other models which support PRI/ISDN lines?
(2) If the answer of question (1) is “yes”, can I setup the Asterisk server to automatically related the dailed number and the destination number? For example, if someone dial XXXX1001, then my extension number 1001 will be ring; if someone dial XXXX1003, my extension number 1003 will be ring.

As I am new to Asterisk and your kindness responses will be much appreciated. :smile:


If I were doing something like that, I’d setup the ZAP channels to “answer=immediate” and “usecallerid=no” to get the channel to answer as quickly as possible.

Then I would put a standard dial handler into your default context like this:

exten => s,1,Answer()
exten => s,2,Read(ARG1,4,3)
exten => s,3,Dial(${ARG1},30)
exten => s,4,Voicemail(${ARG1})
exten => s,5,Hangup
exten => s,104,Voicemail(${ARG1})
exten => s,105,Hangup
exten => i,1,Dial(${OPERATOR},30)
exten => i,2,Voicemail(${OPERATOR})
exten => i,3,Hangup()
exten => t,1,Dial(${OPERATOR},30)
exten => t,2,Voicemail(${OPERATOR})
exten => t,3,Hangup()

In this routine, the ZAP channel is answered immediatly, and PSTN touchtone digits are sent to the Asterisk system and captured by the Read() command. The captured digits are immediately used to dial an extension that corresponds to the digits received. If the digits are not received within three seconds, the call would continue to the “t” extension. In this case it would be my operator, who would be defined as a global variable.

Any extensions that are not yet assigned, or are taken out of service, would also go to the operator. (Or wherever you may choose by changing the “i” extension destination.)

The downside to this configuration, is that a caller would hear a ring from the PSTN, then a small pause as the Asterisk system collected the DID digits, and then a new ring tone from the Asterisk extension. To callers, it will sound like the call has been re-directed. You also can’t use caller ID, unless you’re willing to make your callers wait the number of rings it takes to deliver the caller ID data. (Which they may not like.)

It does automate the delivery of extensions, but it’s not seamless like an ISDN PRI, or a T1 might be.