Since a phone can have multiple extensions, that approach could lead to problems.
However, you can give the phone name to the service (append ?name=#DEVICENAME# to the service url). From that, you can look up the phone's extensions via AXL (also keep in mind that in case you're using extension mobility you'll have to get the extensions for the currently logged in user).
There are a few examples on this in the IP Phone SDK.