We are in the middle of making changes to dialparties and would like to end up with a version that can be incorporated into the distribution. In order for this to happen, we would need input from the community.
If the user had DND and CF set, which one rules? Do we apply DND first and assume that it means I don’t want to be disturbed at the forward number? If CF is set, do we cancel (or ignore) any DND that is set and forward the call? If we decide to forward the call, do we check for DND at the forward number? What happens if the forward number had DND set? Does that apply to THAT user’s number only, or does it apply to forwarded calls as well?
…and so on, and so on.
We believe that certain options should be exclusive. That is, DND and CF should not be allowed to coexist (one example there might be others). That does not mean we would erase CW and CFB (or anything else that might be turned on) from the database, it means we need to decide to either forward the call or dump it in voicemail. Any other checks are pointless.
What happens when the user is not logged in and has DND and CF enabled? Since he/she is not logged in, checking for DND seems pointless, or is it?
As it stands today, dialparties does a fair job at routing calls under certain conditions. In order to check the extension state properly, hints need to be set and they are not. This would need a change in freePBX to support it. The current logic works if CW is disabled, but bombs if it’s enabled. In users/devices mode, it checks the extension state of the user (will always be -1 since they are not devices) when it should be checking the state of the device where the user is located. Time to update dialparties. We would like to do it and share with the community.
Healthy discussion is welcome.