To understand this question, let SIP phones fail over to an ADTRAN gateway (survivable mode because SIP server is down). Let a call come into a FXO line. Directing this call to a SIP station is easily done with the trunk-number command on the FXO trunk.
But now let a call come into a PRI line which has many DIDs associated with it. How does one direct inbound calls to SIP stations where it is desired to have a one-to-one mapping of called DID to SIP extension. Assume the called number provided by the PRI CO is 10 digits. Assume there is no relationship between any of the last digits of the DIDs and the SIP extension numbers. For example:
Called DID of inbound PRI call send call to this SIP station
555-555-0781 > 5004
555-555-0782 > 5008
Let below be an example partial configuration (before having a solution for above). Of course there is plenty of other configuration in my gateway, for example a SIP trunk to the SIP server. Survivability is working great. SIP phones can dial each other; SIP phones can dial outbound; SIP phones can dial analogs stations and be called by analog stations; and calls inbound an FXO route to a SIP phone. I just need this last piece of the puzzle.
voice trunk T11 type isdn
connect isdn-group 1
(and other stuff)
sip proxy failover accept-registrations
sip proxy failover direct-inbound
I forgot to add the solution I got from ADTRAN support. Merely add lines like these:
sip proxy failover match-alias "2145550781" substitute "5004"
sip proxy failover match-alias "2145550782" substitute "5008"
Of if the last digit(s) of the ANI and extension match you could add one single line like this:
sip proxy failover match-alias "214555078X" substitute "500X"