I’m confused a bit with cfwd function on phones (Cisco SPA and Yealink) for my setup. The idea is to let users to set up cfwd on their phones to forward all incoming calls (internal calls, calls from queues, etc.) to mobile numbers or any other numbers they want.
I have 3 trunks from 3 VOIP providers with 3 phone numbers.
I have 3 offices located in different cities. Inside each office I have 2 phones with extensions (101, 102, 201, 202, 301, 302).
From each VOIP provider I send incoming calls to the 1 of 3 queues. 10x extensions are in Queue #1, 20x extensions are in Queue #2, etc.
Each extension can make calls only using it’s route to the correspondent VOIP provider’s trunk. So I have 3 outgoing routes. Each route has a dial pattern where I set caller ID as “1XX” for route #1, “2XX” for route #2, etc. So every office can make calls only using its assigned phone number.
When someone sets cfwd for all calls on a phone, the cfwd function doesn’t work. The problem is that caller ID for a forward call doesn’t match dial pattern for outgoing routes. Asterisk sends the phone number of a caller which needs to be forwarded as a caller ID.
If I leave caller id field at dial pattern empty for a route, cfwd starts to work as expected, but then some of other extensions (from other offices) start to use wrong route for outgoing calls.
The question is… What is the best approach to solve the problem in my specific case?