Aggregate ISDN trunks
When connecting using multiple ISDN BRI interfaces (I've not tested this with PRI, but should work), it's easier to use ISDN trunks than creating a dial-peer for each voice port.
We start by creating a trunk:
trunk group TRK-PSTN max-retry 5 voice-class cause-code 1 description ** Trunk group to PSTN ** hunt-scheme sequential
max-retry is the number of times the trunk tries to establish a call before it considers it a fail. A rule of the thumb is: "number of voice ports"-1, ie, with 4 BRIs the trunk should retry 3 times in case of BRI failures.
hunt-scheme defines the hunt algorithm your trunk will search for an available channel.
What we define as fails is defined with this:
voice class cause-code 1 no-circuit temp-fail no-channel
This effectively makes the the trunk consider failures when the disconnect cause is
no-circuit (ISDN is down),
temp-fail (temporary failure at the far end) or
no-channel (no channel is available).
If we don't define any of this cause-codes, if a trunk cannot make a call because of this reasons, it will deliver "destination unreachable" to the dial-peer and the call will not be made, even if you have available working BRIs across the trunk.
Do not forget to include each BRI into the trunk:
interface BRI0/1/1 no ip address isdn switch-type basic-net3 isdn point-to-point-setup isdn incoming-voice voice isdn send-alerting isdn sending-complete isdn static-tei 0 trunk-group TRK-PSTN
The only point that is important here is the
trunk-group command. All the others are network dependent and are not related to the trunk assignment.
Remember that when using ISDN trunk-groups, the trunk becomes the voice-port. The voice-ports for each BRI are not mentioned any more, but only the trunk. However, if there are any capabilities or compandings, this still must be configured on each BRI voice-port.
voice-port 0/0/1 compand-type a-law bearer-cap Speech
Finally, the simplified (and single) dial-peer (for all ports, of course):
dial-peer voice 10 pots trunkgroup TRK-PSTN description ** PSTN Emergency translation-profile outgoing TO-PSTN destination-pattern 0011[1-3] forward-digits all
For outgoing calls, issue the trunkgroup command on the dial-peer.
With this method, you can effectively simplify your dial-peer usage and aggregate all the BRI voice-ports into a single trunk.