Yes, you can do this.
What you will end up with is dial peers pointing towards the other sites.
If you have 3 sites, say A has extensions 1.., B has 2.., and C has 3..
You would have dial peers on each site that point those extensions to the other ones via SIP or H323.
Site A:
dial-peer voice X voip
destination-pattern 2..
session target ipv4:
dial-peer voice X voip
destination-pattern 3..
session target ipv4:
Site B:
dial-peer voice X voip
destination-pattern 1..
session target ipv4:
dial-peer voice X voip
destination-pattern 3..
session target ipv4:
...etc
You would in essence, create a fully meshed H323 or SIP trunk between each site.