You can do this in multiple ways. THe easiest way would be to set up dial peers and prefernces and use translation rules to change the numbers
FOr example :
translation-rule 1
rule 1 ^42 0119242
dial-peer voice 1 voip
destination-pattern 42....
sessiaon target ipv4:1.1.1.1
prefernce 1
dial-peer voice 2 pots
destination-pattern 0119242.....
port 1/0:0
prefernce 2
Taimoor