In addition to what David mentioned, if you are using 2.5.1 SR2, your application will get Address events (AddressInService) as well. This will give you the lineDNs on the devices.
The following new triggering events were added to the JTAPI 3rd-party API to provide address change notifications:
<a name="wp71223"></a>
¿

JTapiAddressAddedToTerminal
<a name="wp71224"></a>
¿

JTapiAddressRemovedFromTerminal
<a name="wp71225"></a>
¿

JTapiAddressInService
<a name="wp71226"></a>
¿

JTapiAddressOutService
Please refer to the 2.5.1 SR2 release notes for more information.
Thanks,
Rajesh