You can route calls based on the ANI or the Caller Number. It is very powerful. You can do it on source phone number, source IP address or range, etc.
See Section 3: Routing and Restricting Calls section of the following admin guide:
Hope that helps.