There are a couple of things you're not saying and that are quite important. E.g. are you using extension mobility or not?
Here's one approach that'll always work, EM or not. List all the phones via AXL (listPhoneByName with name %), call a getPhone on each and from that you get the DNs off each phone.
Then from the phone name, access the DeviceListX.asp to go from phone name to IP address.
If in the getPhone response you have loginUserID set to something else than an empty string, it means an extension mobility user is logged into that phone. If that's the case, get the currentProfile from the phone - specifically the uuid. With that info, you call getDeviceProfile with the profile uuid as parameter, and in turn you get the profile of the currently logged in user, and the lines on the phone.
Naturally, there are other ways. E.g. an SQL query (get the db schema).. you'll find lines in the NumPlan table. Link that to the device table to find which devices have a given line. Then you have to make the difference between actual phones (they have SEP in the name for IP phones.. ATA boxes, VG Ports have other common prefixes.. and when it comes to RPs and CTI ports those can have whatever name you like ) and device profiles.
If you have no em, you can look up the SEP name in the DeviceListX.asp report. If you have em, it now comes down to lookup up the device to which a profile is currently tied to (or multiple if you allow multiple logins by the same user) and then look those up. By having a look at the db schema you'll be able to make the link.
Are you getting this error “Installer User Interface Mode Not Supported. The installer cannot run in this UI mode. To specify the interface mode, use the -i command-line option, followed by the UI mode identifier. The value UI mode identifiers...
The below trick might come handy when you have to add a new node to a cluster but you don't have or is unsure of the security password for the publisher. This procedure has been around for ages.
1) Login into the CLI of the Publisher.