Check the MAC address on the back of the phone.
Now go to your DHCP server and search for that MAC address.
Now you have the IP address.
Check SMDR records looking for that IP address.
This should give you the extension. Double-check IP address matched MAC address in the same record.
(You can search the SMDR for MAC address, but MAC address formatting is all over the place, so IP address is easier).