This is a feature request.
What I would like is to be able to configure FreePBX to behave (or have the option to behave) like legacy PBX as far as call forwarding is concerned.
We have an old Bosch PBX and a newer Alcatel 4400 and they can both be configured to "ignore call forwarding if the caller is the extension it is forwarded to". This should be very simple to implement and is quite important for our company. I suppose that others may find it useful too.
This issue has also been discussed in the forum:
http://freepbx.org/forum/freepbx/users/call-forward-except-for-the-extension-it-is-forwarded-to
I am attaching a patch for dialparties.agi which works for blind transfers, attended transfers, including the Asterisk built-in atxfer, and direct calls (FreePBX 2.5.1.1; core 2.5.1.5).
Of course, the code should be further modified so that the user has the option to enable and disable the feature, either globally, or per-extension.
I hope you can take a look at it and let me know.
Thanks.