During my initial setup and configuration of our new VOIP system, I had to remove a phone from the system several times. After doing so several times, I have been able to remove a phone in less than a minute.
To totally remove an Aastra phone from an Asterisk/FreePBX configuration, you need to remove the following files:
and then edit the file:
and delete the section which referred to the old device. The file contains a section for each device which has been registered with the system, each section is started with the device id surrounded by brackets.
If you are also using FTP to support your phones, you will need to delete the same files from the ftp directory.
Finally, restore the phone to factory defaults