I think it won't be tough. Let's start with ds0-group as you have channelized T1.
!
controller t1 0/0/0
ds0-group 0 timeslots 1 type r2-digital r2-compelled ani
ds0-group 1 timeslots 2 type r2-digital r2-compelled ani
ds0-group 2 timeslots 3 type r2-digital r2-compelled ani
!
(The signaling type would be set here by consulting the PBX signaling type.)
These three ds0-group will create three seperate voice-ports like below:
!
!
voice-port 1/0:0
bearer-cap Speech
!
voice-port 1/0:1
bearer-cap Speech
!
voice-port 1/0:2
bearer-cap Speech
!
Now create three seperate incoming dial-peers with these voice-ports assigned:
!
dial-peer voice 101 pots
incoming called-number <PhoneNumberPrefix>
port 1/0:0
!
This is important: If you have seperate site codes for each PBX site then define the site codes into expression at 'incoming called-number'. For example, your first ds0-group would be destined to PBX-Site-1 and PBX-Site-1 DNs are started with 1 and DN pattern is 1... or 1T then the expression should be:
!
incoming called-number 1T
!
So the dial-peer should be:
!
dial-peer voice 101 pots
incoming called-number 1T
port 1/0:0
!
dial-peer voice 102 pots
incoming called-number 2T
port 1/0:1
!
dial-peer voice 103 pots
incoming called-number 3T
port 1/0:3
!
If you site dial-plan is not uniform, i.e. not started with site code/not distinguishable then you have to apply translation-rules to seperate and identify each PBX type calls. For example here:
!
dial-peer voice 101 pots
incoming called-number .T
port 1/0:0
translation-profile incoming FirstChannel
!
dial-peer voice 102 pots
incoming called-number .T
port 1/0:1
translation-profile incoming SecondChannel
!
dial-peer voice 103 pots
incoming called-number .T
port 1/0:3
translation-profile incoming ThirdChannel
!
You can also apply these translation-profile into voice-ports, not the dial-peers, it makes more understandable right? Create your translation-rules your own. :) An example here:
!
voice translation-rule 1
rule 1 // /11/
!
voice translation-profile FirstChannel
translate calling 1
!
For example you have added prefix 11 infront all of your calls towards PBX-Site-1, so the number pattern would be 11T, for PBX-Site-2 the number pattern is 22T and for PBX-Site-3 the pattern is 33T.
Now create three seperate voip dial-peers towards three routers like here:
!
dial-peer voice 201 voip
destination-pattern 11T
session-target ipv4:<h323 Router-01 IP>
!
dial-peer voice 202 voip
destination-patter 22T
session-target ipv4:<h323 Router-02 IP>
!
dial-peer voice 203 voip
destination-pattern 33T
session-target ipv4:<h323 Router-03 IP>
!
Thus the calls would be routed towards different destination based on the ds0-group channel.
Some of the commands are just typed as I can remember, some of them are copied from routers, please follow the idea not the CLI commands, also excuse any typo and brevity.
HTH!
Best Regards,
Mijanur Rahman
CCIE #27424 (Voice)
dreamforccie.wordpress.com