I have a client asking to route the call based on the source coming from different location. We have a way for inbound call routing based on the prefixed of the caller ID in FreePBX. I have create a manual for how to setup this as below maybe useful for someone else:
We need to define the inbound route by going to the connectivity and inbound route then click on the new inbound route.
In the inbound route you will need to give it a name then in the CID need to mention the inbound caller ID in this format:
_”Country and state prefix”X.
Malaysia Kuala Lumpur: _603X.
Malaysia Pinang: _604X.
Malaysia Ipoh _605X.
Then you need set the CID Priority Route to yes and select your destination for this route.
After saving this inbound and apply changes any call coming that start with this prefix will go to the defined destination.
This will use for distribute the call based on the source location to different agent for support or sales where different group will be responsible to handle each state or country request.