someone reset the ip phone now it has only ip address not extension number now how i can know what was the extension number of this phone
Maybe try to check into /var/logs/asterisk/full (and full.*)
If your IP address is there, you would find it.
I can imagine there is a log when the extension has been connected and disconnected.
more /var/logs/asterisk/full | grep "10.10.10.10"
Just an idea like that.
This is held in the phone. You may have set up means to provision the phone with that information, but you will have to configure the phone to make use of those, and they are likely to be based on MAC address, not IP address.
It is possible that DHCP has allocated the phone a new IP address, so the IP address from the logs may be of limited use.