Obviously the Bye message is getting through, but not when the handset is replaced on-hook, which means that it probably isn't a network issue. This suggests a set issue. You could try swapping out the set, or doing a factory reset, and re-provision. Is the sets firmware up-to-date?