Often your clients may ask they need certain extension's outbound calls should go through specific FXO ports .
Here I will show how to pre-define which FXO trunk to choose for each extension ( ephone-dn technically ) on CCME routers . There are many documents available on this but nothing very comprehensive .
Note : You can use trunk command inside ephone-dn easily than this method , but you will face dialing internal extensions and other problem . So below method is advisable .
This method is simple , full script is shown below .
Step 1 : Create translation-rule that will add an extra 4 digits ( in this case 8880,8881,8882,8883,8884 ) ,
Step 2 : Create dial-peer for each FXO port , that only pass numbers with the additional digits added on step 1 .
Step 3 : Asssign translation profile for each ephone-dn .
Code below is self explanatory . Contact me for any clarifications .
!
voice translation-rule 1
rule 1 /^9/ /8880/
!
voice translation-rule 2
rule 1 /^9/ /8881/
!
voice translation-rule 3
rule 1 /^9/ /8882/
!
voice translation-rule 4
rule 1 /^9/ /8883/
!
voice translation-rule 5
rule 1 /^9/ /8884/
!
!
voice translation-profile 44144141
translate called 1
!
voice translation-profile 44144411
translate called 5
!
voice translation-profile 44144444
translate called 4
!
voice translation-profile 44444611
translate called 2
!
voice translation-profile 44444633
translate called 3
!
voice translation-profile myprofile
translate called 1
!
dial-peer voice 1 pots
destination-pattern 8880T
port 0/1/1
!
dial-peer voice 2 pots
corlist outgoing list2
destination-pattern 8881T
port 0/1/0
!
dial-peer voice 3 pots
destination-pattern 8882T
port 0/1/2
!
dial-peer voice 4 pots
destination-pattern 8883T
port 0/1/3
!
dial-peer voice 5 pots
destination-pattern 8884T
port 0/2/0
!
dial-peer voice 6 pots
destination-pattern 8885T
port 0/2/1
ephone-dn 1 dual-line
number 401
label 401
description 401
name 401
translation-profile incoming 44444611
hold-alert 30 originator
!
!
ephone-dn 2 dual-line
number 402
label 402
description 402
name 402
translation-profile incoming 44444611
hold-alert 30 originator
!
!
ephone-dn 3 dual-line
number 403
label 403
description 403
name 403
translation-profile incoming 44444611
hold-alert 30 originator
!
!
ephone-dn 4 dual-line
number 404
label 404
description 404
name 404
translation-profile incoming 44444611
hold-alert 30 originator
!
!
ephone-dn 5 dual-line
number 405
label 405
description 405
name 405
translation-profile incoming 44444611
hold-alert 30 originator
!
!
ephone-dn 6 dual-line
number 406
label 406
description 406
name 406
translation-profile incoming 44444611
hold-alert 30 originator
!
!
ephone-dn 7 dual-line
number 407
label 407
description 407
name 407
translation-profile incoming 44444611
hold-alert 30 originator
!