These seem to be a lot of misunderstandings about this functionality. I’ll try to clarify a few.
I just can’t see how you would sync the status from Asterisk with the phone, eg. when changing DND through some other means. From the docs you linked to, it seems it’s not possible directly through SIP, but you’d need an external program to update the DND state in the phone? (Unless you just accept using a BLF button of course. )
This is exactly what this code change is for. It allows an arbitrary application to, through Asterisk, control the DND and other feature state and status on the IP phone.
Only certain IP phones support this functionality, but probably all of the widely used ones, e.g. Polycom.
For me, one anticipated benefit from this DFKS feature is be able to control targets of forwarding requests when, for instance, Alice requests unconditional forwarding to Bob’s phone but Bob’s extension doesn’t exist anymore.
To my knowledge, this can’t be done at phone’s level (even simpler things like disabling forwarding to costly destination can’t be programmed when configuring IP phones).
You don’t need this feature to do that. This is about feature synchronization. You can always implement DND entirely on the Asterisk side and leave the phone out of the picture, just the way it’s typically done.
Other use case: at some point in time Bob’s extension is removed and you want to remove it from any forwarding target.
Ditto.
For me, to implement this control, the phone must request forwarding to a server and wait for confirmation.
Yes, that’s how it’s generally done, using the *78/*79 CLASS vertical service codes.
Then an internal or external process, spying corresponding AMI events or treating incoming calls (which requires sound files and related resources), analyses this request content and either denies or confirms it (using an AMI command or SIP notifies).
That seems like overkill, you could do this right in the dialplan, AMI is not needed.
Can you imagine a different way to implement this ? For me, this DFKS seems like a promising standardized way to handle forwarding/DND.
You don’t need DFKS in order to control the forwarding or DND server side.
This is about seamless integration of the DND/feature buttons on the phone itself, letting them control feature state on the service. The word “synchronization” is key here. This does not implement or provide the feature itself, it is purely about communicating requested feature status changes back and forth.