Subject: RE: addDeviceProfile requires Security ProfileReplied by: Josh Gross on 22-02-2013 02:05:38 AMSo I made your request work, but there were several changes i made to your AXL as well as with the header you said you used. The header should be SOAPAction="CUCMB ver=8.5"

The AXL i used is as follows:<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/8.5"> <soapenv:Header/> <soapenv:Body> <ns:addDeviceProfile sequence="?"> <deviceProfile ctiid="?"> <name>EMProfile70001</name> <product>Cisco 7960</product> <protocol>SCCP</protocol><class>Device Profile</class> <protocolSide>User</protocolSide> <userHoldMohAudioSourceId>1</userHoldMohAudioSourceId> <mlppIndicationStatus>Off</mlppIndicationStatus> <preemption>Default</preemption> <lines> <lineIdentifier> <directoryNumber>#1014</directoryNumber> <routePartitionName>hudtloff-Speakers</routePartitionName> <index>1</index> <label>Bobby Gavin Smith</label> <asciiLabel>Bobby Gavin Smith</asciiLabel> <display>Bobby Gavin Smith 12345</display> <ringSetting>Ring</ringSetting> <consecutiveRingSetting>Use System Default</consecutiveRingSetting> <displayAscii>Bobby Gavin Smith 12345</displayAscii> <mwlPolicy>Use System Policy</mwlPolicy> <maxNumCalls>2</maxNumCalls> <busyTrigger>1</busyTrigger> <callInfoDisplay> <callerName>true</callerName> <callerNumber>false</callerNumber> <redirectedNumber>false</redirectedNumber> <dialedNumber>true</dialedNumber> </callInfoDisplay> <recordingFlag>Call Recording Disabled</recordingFlag> <audibleMwi>Default</audibleMwi> <partitionUsage>General</partitionUsage> <missedCallLogging>true</missedCallLogging> </lineIdentifier> </lines> <phoneTemplateName uuid="?">Standard 7960 SCCP 2 Line</phoneTemplateName> <addOnModules> <addOnModule> <model>7914 14-Button Line Expansion Module</model> <index>1</index> </addOnModule> </addOnModules> <singleButtonBarge>Default</singleButtonBarge> <joinAcrossLines>Default</joinAcrossLines> <ignorePresentationIndicators>false</ignorePresentationIndicators> <dndOption>Ringer Off</dndOption> <alwaysUsePrimeLine>Default</alwaysUsePrimeLine> <alwaysUsePrimeLineForVoiceMessage>Default</alwaysUsePrimeLineForVoiceMessage> <softkeyTemplateName uuid="?">Standard User</softkeyTemplateName> <callInfoPrivacyStatus>Default</callInfoPrivacyStatus> </deviceProfile> </ns:addDeviceProfile> </soapenv:Body> </soapenv:Envelope>Every thing in red is something i changed. The biggest things are that one of the required fields is <class>Device Profile</class>. Your request did not have that in there. The next thing that i changed is in the <lines>. Notice that instead of using <lines><line> </line></lines> i use <lines><lineIdentifier></lineIdentifier></lines>. You had several problems in the line section one being that your first instance of <line> blah blah </line> isnt formed at all correctly. the second instance of <line> blah blah</line> is closer but your missing <index> and <dirn>. Now i am no expert i have yet to have any luck adding any type of line to any type of device using the <lines><line><dirn> </dirn></line></lines>. The only way i have had success is using <lines><lineIdentifier><directoryNumber>xxxx</directoryNumber><routePartitionName>xxxxx</routePartitionName>. Here is what you had to add lines:<lines><line ctiid="?"> <ringSetting>Ring</ringSetting> <consecutiveRingSetting>Use System Default</consecutiveRingSetting> <mwlPolicy>Use System Policy</mwlPolicy> <maxNumCalls>2</maxNumCalls> <busyTrigger>1</busyTrigger> <callInfoDisplay> <callerName>true</callerName> <callerNumber>false</callerNumber> <redirectedNumber>false</redirectedNumber> <dialedNumber>true</dialedNumber> </callInfoDisplay> <recordingFlag>Call Recording Disabled</recordingFlag> <audibleMwi>Default</audibleMwi> <partitionUsage>General</partitionUsage> <missedCallLogging>true</missedCallLogging> </line> <line ctiid="?"> <index>1</index> <label>Bobby Gavin Smith</label> <asciiLabel>Bobby Gavin Smith</asciiLabel> <display>Bobby Gavin Smith 12345</display> <ringSetting>Ring</ringSetting> <consecutiveRingSetting>Use System Default</consecutiveRingSetting> <displayAscii>Bobby Gavin Smith 12345</displayAscii> <mwlPolicy>Use System Policy</mwlPolicy> <maxNumCalls>2</maxNumCalls> <busyTrigger>1</busyTrigger> <callInfoDisplay> <callerName>true</callerName> <callerNumber>false</callerNumber> <redirectedNumber>false</redirectedNumber> <dialedNumber>true</dialedNumber> </callInfoDisplay> <recordingFlag>Call Recording Disabled</recordingFlag> <audibleMwi>Default</audibleMwi> <partitionUsage>General</partitionUsage> <missedCallLogging>true</missedCallLogging> </line> </lines>

here is the corrected version (obviously you will need to change the directoryNumber and routePartition) <lines><lineIdentifier> <directoryNumber>#1014</directoryNumber> <routePartitionName>hudtloff-Speakers</routePartitionName> <index>1</index> <label>Bobby Gavin Smith</label> <asciiLabel>Bobby Gavin Smith</asciiLabel> <display>Bobby Gavin Smith 12345</display> <ringSetting>Ring</ringSetting> <consecutiveRingSetting>Use System Default</consecutiveRingSetting> <displayAscii>Bobby Gavin Smith 12345</displayAscii> <mwlPolicy>Use System Policy</mwlPolicy> <maxNumCalls>2</maxNumCalls> <busyTrigger>1</busyTrigger> <callInfoDisplay> <callerName>true</callerName> <callerNumber>false</callerNumber> <redirectedNumber>false</redirectedNumber> <dialedNumber>true</dialedNumber> </callInfoDisplay> <recordingFlag>Call Recording Disabled</recordingFlag> <audibleMwi>Default</audibleMwi> <partitionUsage>General</partitionUsage> <missedCallLogging>true</missedCallLogging> </lineIdentifier> </lines>Sorry if my response is to long winded. This is my first response to a question and I want to be clear in how i made it work. Its frustrating when someone responds with only corrected code and no explanation. One more thing, I am no expert so if my understanding of any of this is wrong i apologize, i just know how to make this stuff work from time to time.

Subject: RE: addDeviceProfile requires Security ProfileReplied by: Geoffrey Carman on 22-02-2013 06:42:06 AMJosh,Thanks! That was exactly what I was looking for, what I missed! So what values are valid for <class> ? Device Profile, and what else? This is the sort of info I find missing in the WSDL and API docs, the sort of reasonable values expected in any particular field. Also, my WSDL shows the lineIdentifier section as: <lineIdentifier> <directoryNumber>?</directoryNumber> <routePartitionName>?</routePartitionName> </lineIdentifier>

You seem to have placed much of the <line> settings values into the <lineIdentifier> node. Is that legal?Most importantly, have you found a good reference for what are allowed values in the various fields?I will test this minor tweak and let you know. (I am going to try <class> first, then <lineIdentifier> to see if I can nail it all down more accurately).

You can also get a 'live' dump of the <class> list from the UCM database, e.g.:

select name from typeclass

Reading the list from UCM actually has practical implications for the <product> field (select name from typeproduct), as it is possible to install new device types into UCM (with new, unique <product> values), and these of course won't be listed in the AXL schema that shipped with the base UCM. Note that <product> can also accept xsd:string values in addition to its enum list - this helps work around the challenge of installable product types.

Subject: RE: addDeviceProfile requires Security ProfileReplied by: Josh Gross on 22-02-2013 01:39:16 PMYou need to remove: <services> <service> <urlButtonIndex>0</urlButtonIndex> </service> </services>That is not formed correctly and I am assuming you dont mean to be adding a service any way. I forgot to mark that on my original post that I remved that.To add a DN with out creating a device you go to Call Routing -> Directory Number -> Add New

This is not a helpful error. The others at least left a hint, this one is sort of annoying. If I skip the <line> or <lineIdentifier> sections entirely I get a similar error. I did a getLine to find my pattern of 70001 and I get nothing back,. but if I listLine for 7000% I see my line there. PS: How do I look at/create a raw Line by itself, not as part of an association to a device profile? I am missing that in the GUI.

Subject: RE: addDeviceProfile requires Security ProfileReplied by: Geoffrey Carman on 22-02-2013 01:48:18 PMThanks! That looks like it finally did it! And thanks for the directory number hint. The reason I had it left behind is the WSDL provides the sample SOAP call with ?'s in empty fields, and my code starts with the full event, you pop in data to the fields you want (based on input data) and then strip out whatever remains empty, and the urlButtonIndex value had the 0 left in the WSDL version, so just change that to ? and it gets stripped properly. (If I decide we need to set more values, we just map more data into the SOAP call. )