This is not a FOP2 issue, you have some dialplan macros that fires the DND event after it is actually performed, you can invert those actions and it will work fine. FOP2 reacts to events, it does not poll for information and it will never rely on polling for getting status. So, modify your aastra scripts to fire a userevent as one of the first priorities, that will probably fix the problem you describe.