cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
672
Views
4
Helpful
3
Replies

Difference in RPhoneLine & XPhoneLine

upchaurasia
Spotlight
Spotlight

What is difference between RPhoneLine & XPhoneLine?

I can see get method returns RPhoneLine whereas update methods expect XPhoneLine type.

Can I type cast RPhoneLine to XPhoneLine and viceversa, I tried but getting error.

Actually I am trying to modify "Line Text Label" of directory number associated with phone. I am able to modify CSS using updateLine API.

Other option which I can use execureSqlQuery but I don't want to use this as for all other feature I am using direct AXL API like updatePhone,updateLine etc.

Regards,

Umesh

1 Accepted Solution

Accepted Solutions

npetrele
Cisco Employee
Cisco Employee

Have you tried this for updating the display text?

import java.util.ArrayList;

import java.util.List;

List<XPhoneLine> phoneLines = new ArrayList<XPhoneLine>();

XPhoneLine phoneLine = new XPhoneLine();

phoneLine.setDisplay("display text goes here");

...set other stuff...

phoneLines.add(phoneLine);

Then use phoneLines as the required <List>XPhoneLine in your updatePhone operation.

No, RPhone does not map to XPhone, so  you can't simply grab the RPhone from getPhone and use it in your updatePhone.

View solution in original post

3 Replies 3

upchaurasia
Spotlight
Spotlight

Do I need to user UpdateDeviceProfile to update "Line Text Label" as I can see in CUCM Admin Console this parameter is in "Line 1 on Device SEPE8BA70FA173D" section.

Regards,

Umesh

I can't help you with the objects (I'm still doing things manually as I don't really trust the API (see my many recent posts.. lots of things are a bit iffy)), but yet, you do need updateDeviceProfile to update the <line> element. The directory number (as seen in ccmadmin) is actually two things.. the <directoryNumber> itself, that you managed with get/add/update/deleteLine, and the part that ties a device/device profile/etc to a directory number. You always update the <line> part by updating the underlying device (a device profile is just a special case of a device.. they use the same tables in the database even).

npetrele
Cisco Employee
Cisco Employee

Have you tried this for updating the display text?

import java.util.ArrayList;

import java.util.List;

List<XPhoneLine> phoneLines = new ArrayList<XPhoneLine>();

XPhoneLine phoneLine = new XPhoneLine();

phoneLine.setDisplay("display text goes here");

...set other stuff...

phoneLines.add(phoneLine);

Then use phoneLines as the required <List>XPhoneLine in your updatePhone operation.

No, RPhone does not map to XPhone, so  you can't simply grab the RPhone from getPhone and use it in your updatePhone.