I want to add a new ip phone and new line with Java using AXL API of Cisco Call Manager 6. Here is my code:
XRoutePartition partition = new XRoutePartition();
partition.setName("PT_INTERNAL");
XNPDirectoryNumber dirn = new XNPDirectoryNumber();
dirn.setPattern("1006");
dirn.setRoutePartition(partition);
XLine phoneLine = new XLine();
phoneLine.setDirn(dirn);
XLine[] phoneLineArray = new XLine[1];
phoneLineArray[0] = phoneLine;
AddLineReq addLine = new AddLineReq();
addLine.setNewLine(dirn);
XIPPhone.Lines lines = new XIPPhone.Lines();
lines.getLine().add(0, phoneLine);
XIPPhone xp = new XIPPhone();
xp.setName("SEP64168D50552C");
xp.setDescription("Laroussi Nader Test");
xp.setProduct("Cisco 7911");
xp.setClazz("Phone");
xp.setModel("Cisco 7911");
xp.setProtocol("SCCP");
xp.setProtocolSide("User");
xp.setDefaultProfileName("Standard Common Phone Profile");
//XDevicePool devicePool = new XDevicePool();
//devicePool.setName("Default");
xp.setDevicePoolName("Default");
//XLocation location = new XLocation();
//location.setName("Hub_None");
xp.setLocationName("Hub_None");
xp.setLines(lines);
AddPhoneReq addPhoneReq = new AddPhoneReq();
addPhoneReq.setNewPhone(xp);
StandardResponse response = axlPort.addPhone(addPhoneReq);
the SOAP response is: The specified name has invalid characters or is not formatted correctly for this device type.
What can I do to resolve this problem? Thank you