Hi I'm using AxlToolkit scheme 8.0
I try add new device profile to cucm (version 8+)
I get exception type of InvalidOperationException with that message "There was an error generating the XML document".
What am I do wrong?
public void addDeviceProfile(ref AXLAPIService reference_approved, Person person)
{
AddDeviceProfileReq deviceprofilereq = new AddDeviceProfileReq();
StandardResponse res = new StandardResponse();
XDeviceProfile deviceprofile = new XDeviceProfile();
XPhoneButtonTemplate phonebuttontemplate = new XPhoneButtonTemplate();
XFkType softkey = new XFkType();
XFkType linepartition = new XFkType();
XDeviceProfileLines deviceprofilelines = new XDeviceProfileLines();
XLine line = new XLine();
linepartition.Value = "Local_PT";
softkey.Value = "Standard User";
phonebuttontemplate.name = "Standard 7861 SIP";
line.pattern = "6499262";
line.routePartitionName = linepartition;
line.alertingName = "New Line";
line.asciiAlertingName = "New Line";
object[] line_items = new object[2];
line_items.SetValue(line, 0);
deviceprofilelines.Items = line_items;
deviceprofile.softkeyTemplateName = softkey;
deviceprofile.name = person.ipphone;
deviceprofile.description = person.alias + " " + person.ipphone;
deviceprofile.protocol = "SIP";
deviceprofile.product = "Cisco 7861";
deviceprofile.protocolSide = "User";
deviceprofile.@class = "Device Profile";
deviceprofile.lines = deviceprofilelines;
deviceprofilereq.deviceProfile = deviceprofile;
try
{
res = reference_approved.addDeviceProfile(deviceprofilereq);
}
catch
{
;
}
}
OK I forgot to add the phonetemplate
Comments
0 comments
Please sign in to leave a comment.