<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Security Profile is required for this device - python + devnet sandbox in Management</title>
    <link>https://community.cisco.com/t5/management/security-profile-is-required-for-this-device-python-devnet/m-p/4296530#M3620</link>
    <description>&lt;P&gt;No, actually. addPhone does not add a line.&amp;nbsp; You need to use addLine to add the line first, and then specify the line in your addPhone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 23 Feb 2021 22:52:35 GMT</pubDate>
    <dc:creator>npetrele</dc:creator>
    <dc:date>2021-02-23T22:52:35Z</dc:date>
    <item>
      <title>Security Profile is required for this device - python + devnet sandbox</title>
      <link>https://community.cisco.com/t5/management/security-profile-is-required-for-this-device-python-devnet/m-p/4296501#M3617</link>
      <description>&lt;P&gt;messing around in devnet CUCM ver 11.5 i tried adding a new phone with a DN line configured. i manage to add a regular phone without a line, but trying to add a line keeps failing on me:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;import requests

url = "https://x.x.x.x:8443/axl/"


payload = """
&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5"&amp;gt;
   &amp;lt;soapenv:Header/&amp;gt;
   &amp;lt;soapenv:Body&amp;gt;
      &amp;lt;ns:addDeviceProfile sequence="?"&amp;gt;
         &amp;lt;deviceProfile ctiid="?"&amp;gt;
            &amp;lt;name&amp;gt;SEPAAAAAAAAAACC&amp;lt;/name&amp;gt;
            &amp;lt;description&amp;gt;test phone&amp;lt;/description&amp;gt;
            &amp;lt;product&amp;gt;Cisco 7911&amp;lt;/product&amp;gt;
            &amp;lt;class&amp;gt;Phone&amp;lt;/class&amp;gt;
            &amp;lt;protocol&amp;gt;SCCP&amp;lt;/protocol&amp;gt;
            &amp;lt;protocolSide&amp;gt;User&amp;lt;/protocolSide&amp;gt;
            &amp;lt;securityProfileName uuid="?"&amp;gt;Cisco 7911 - Standard SCCP Non-Secure Profile&amp;lt;/securityProfileName&amp;gt;
            &amp;lt;lines&amp;gt;
               &amp;lt;line ctiid="1"&amp;gt;
                  &amp;lt;index&amp;gt;1&amp;lt;/index&amp;gt;
                  &amp;lt;label&amp;gt;line1&amp;lt;/label&amp;gt;
                  &amp;lt;display&amp;gt;menash&amp;lt;/display&amp;gt;
                  &amp;lt;dirn uuid="?"&amp;gt;
                     &amp;lt;pattern&amp;gt;1122&amp;lt;/pattern&amp;gt;
                     &amp;lt;routePartitionName uuid="?"&amp;gt;?&amp;lt;/routePartitionName&amp;gt;
                  &amp;lt;/dirn&amp;gt;
                  &amp;lt;ringSetting&amp;gt;Ring&amp;lt;/ringSetting&amp;gt;
                  &amp;lt;consecutiveRingSetting&amp;gt;Use System Default&amp;lt;/consecutiveRingSetting&amp;gt;
                  &amp;lt;ringSettingIdlePickupAlert&amp;gt;Use System Default&amp;lt;/ringSettingIdlePickupAlert&amp;gt;
                  &amp;lt;ringSettingActivePickupAlert&amp;gt;Use System Default&amp;lt;/ringSettingActivePickupAlert&amp;gt;
                  &amp;lt;displayAscii&amp;gt;menash phone&amp;lt;/displayAscii&amp;gt;
                  &amp;lt;mwlPolicy&amp;gt;Use System Policy&amp;lt;/mwlPolicy&amp;gt;
                  &amp;lt;maxNumCalls&amp;gt;3&amp;lt;/maxNumCalls&amp;gt;
                  &amp;lt;busyTrigger&amp;gt;1&amp;lt;/busyTrigger&amp;gt;
                  &amp;lt;callInfoDisplay&amp;gt;
                     &amp;lt;callerName&amp;gt;true&amp;lt;/callerName&amp;gt;
                     &amp;lt;callerNumber&amp;gt;true&amp;lt;/callerNumber&amp;gt;
                     &amp;lt;redirectedNumber&amp;gt;true&amp;lt;/redirectedNumber&amp;gt;
                     &amp;lt;dialedNumber&amp;gt;true&amp;lt;/dialedNumber&amp;gt;
                  &amp;lt;/callInfoDisplay&amp;gt;
                  &amp;lt;recordingFlag&amp;gt;Call Recording Disabled&amp;lt;/recordingFlag&amp;gt;
                  &amp;lt;audibleMwi&amp;gt;Default&amp;lt;/audibleMwi&amp;gt;
                  &amp;lt;partitionUsage&amp;gt;General&amp;lt;/partitionUsage&amp;gt;
                  &amp;lt;missedCallLogging&amp;gt;true&amp;lt;/missedCallLogging&amp;gt;
                  &amp;lt;recordingMediaSource&amp;gt;Gateway Preferred&amp;lt;/recordingMediaSource&amp;gt;
               &amp;lt;/line&amp;gt;
               &amp;lt;lineIdentifier&amp;gt;
                  &amp;lt;directoryNumber&amp;gt;1122&amp;lt;/directoryNumber&amp;gt;
                  &amp;lt;routePartitionName&amp;gt;Global learned E164 Numbers&amp;lt;/routePartitionName&amp;gt;
               &amp;lt;/lineIdentifier&amp;gt;
            &amp;lt;/lines&amp;gt;
            &amp;lt;phoneTemplateName uuid="Standard 7911"&amp;gt;Standard 7911&amp;lt;/phoneTemplateName&amp;gt;
            &amp;lt;alwaysUsePrimeLine&amp;gt;Default&amp;lt;/alwaysUsePrimeLine&amp;gt;
            &amp;lt;alwaysUsePrimeLineForVoiceMessage&amp;gt;Default&amp;lt;/alwaysUsePrimeLineForVoiceMessage&amp;gt;
            &amp;lt;softkeyTemplateName uuid="Standard User"&amp;gt;Standard User&amp;lt;/softkeyTemplateName&amp;gt;
            &amp;lt;callInfoPrivacyStatus&amp;gt;Default&amp;lt;/callInfoPrivacyStatus&amp;gt;
         &amp;lt;/deviceProfile&amp;gt;
      &amp;lt;/ns:addDeviceProfile&amp;gt;
   &amp;lt;/soapenv:Body&amp;gt;
&amp;lt;/soapenv:Envelope&amp;gt;
"""


headers = {}

data = requests.post(url=url, headers=headers, data=payload,auth=("administrator","ciscopsdt"), verify=False)
print(data.text)&lt;/PRE&gt;&lt;P&gt;this is the returned output:&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&amp;gt;&amp;lt;soapenv:Body&amp;gt;&amp;lt;soapenv:Fault&amp;gt;&amp;lt;faultcode&amp;gt;soapenv:Client&amp;lt;/faultcode&amp;gt;&amp;lt;faultstring&amp;gt;Security Profile is required for this device&amp;lt;/faultstring&amp;gt;&amp;lt;detail&amp;gt;&amp;lt;axlError&amp;gt;&amp;lt;axlcode&amp;gt;429&amp;lt;/axlcode&amp;gt;&amp;lt;axlmessage&amp;gt;Security Profile 
is required for this device&amp;lt;/axlmessage&amp;gt;&amp;lt;request&amp;gt;addDeviceProfile&amp;lt;/request&amp;gt;&amp;lt;/axlError&amp;gt;&amp;lt;/detail&amp;gt;&amp;lt;/soapenv:Fault&amp;gt;&amp;lt;/soapenv:Body&amp;gt;&amp;lt;/soapenv:Envelope&amp;gt;&lt;/PRE&gt;&lt;P&gt;i cant figure out what im not doing right.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 22:12:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/security-profile-is-required-for-this-device-python-devnet/m-p/4296501#M3617</guid>
      <dc:creator>menash</dc:creator>
      <dc:date>2021-02-23T22:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Security Profile is required for this device - python + devnet sandbox</title>
      <link>https://community.cisco.com/t5/management/security-profile-is-required-for-this-device-python-devnet/m-p/4296518#M3618</link>
      <description>&lt;P&gt;Try leaving out the uuid="?" here:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;securityProfileName uuid="?"&amp;gt;&lt;/PRE&gt;
&lt;P&gt;There are other places you can omit, like the sequence="?" and uuid="?".&amp;nbsp; Also, the ctiid="?" here:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;deviceProfile ctiid="?"&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Basically, if there's an element pointing to a "?" then either you need to omit it, or specify what goes there. It should not point to a question mark.&amp;nbsp; There are exceptions where it will ignore a ="?", but better safe than sorry. &lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 22:35:57 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/security-profile-is-required-for-this-device-python-devnet/m-p/4296518#M3618</guid>
      <dc:creator>npetrele</dc:creator>
      <dc:date>2021-02-23T22:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Security Profile is required for this device - python + devnet sandbox</title>
      <link>https://community.cisco.com/t5/management/security-profile-is-required-for-this-device-python-devnet/m-p/4296525#M3619</link>
      <description>&lt;P&gt;hey, thanks for the response. i did what you mentioned but it still didnt work, regardless, i noticed i used the wrong action. i used &amp;lt;AddDeviceProfile&amp;gt; instead of &amp;lt;AddPhone&amp;gt;. this is the new code, and a new error comes along with it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/11.5"&amp;gt;
   &amp;lt;soapenv:Header/&amp;gt;
   &amp;lt;soapenv:Body&amp;gt;
      &amp;lt;ns:addPhone&amp;gt;
         &amp;lt;phone&amp;gt;
            &amp;lt;name&amp;gt;SEPAAAAAAAAAACC&amp;lt;/name&amp;gt;
            &amp;lt;description&amp;gt;test phone&amp;lt;/description&amp;gt;
            &amp;lt;product&amp;gt;Cisco 7911&amp;lt;/product&amp;gt;
            &amp;lt;class&amp;gt;Phone&amp;lt;/class&amp;gt;
            &amp;lt;protocol&amp;gt;SCCP&amp;lt;/protocol&amp;gt;
            &amp;lt;protocolSide&amp;gt;User&amp;lt;/protocolSide&amp;gt;
            &amp;lt;devicePoolName&amp;gt;Default&amp;lt;/devicePoolName&amp;gt;
            &amp;lt;securityProfileName&amp;gt;Cisco 7911 - Standard SCCP Non-Secure Profile&amp;lt;/securityProfileName&amp;gt;
            &amp;lt;lines&amp;gt;
               &amp;lt;line&amp;gt;
                  &amp;lt;index&amp;gt;1&amp;lt;/index&amp;gt;
                  &amp;lt;label&amp;gt;Test phone&amp;lt;/label&amp;gt;
                  &amp;lt;display&amp;gt;menash phone&amp;lt;/display&amp;gt;
                  &amp;lt;dirn&amp;gt;
                     &amp;lt;pattern&amp;gt;1111&amp;lt;/pattern&amp;gt;
                  &amp;lt;/dirn&amp;gt;
                  &amp;lt;displayAscii&amp;gt;Menash&amp;lt;/displayAscii&amp;gt;
                  &amp;lt;e164Mask&amp;gt;&amp;lt;/e164Mask&amp;gt;
                  &amp;lt;busyTrigger&amp;gt;1&amp;lt;/busyTrigger&amp;gt;
                  &amp;lt;callInfoDisplay&amp;gt;
                     &amp;lt;callerName&amp;gt;true&amp;lt;/callerName&amp;gt;
                     &amp;lt;callerNumber&amp;gt;true&amp;lt;/callerNumber&amp;gt;
                     &amp;lt;redirectedNumber&amp;gt;false&amp;lt;/redirectedNumber&amp;gt;
                     &amp;lt;dialedNumber&amp;gt;true&amp;lt;/dialedNumber&amp;gt;
                  &amp;lt;/callInfoDisplay&amp;gt;
                  &amp;lt;missedCallLogging&amp;gt;true&amp;lt;/missedCallLogging&amp;gt;
               &amp;lt;/line&amp;gt;
               &amp;lt;lineIdentifier&amp;gt;
                  &amp;lt;directoryNumber&amp;gt;1111&amp;lt;/directoryNumber&amp;gt;
               &amp;lt;/lineIdentifier&amp;gt;
            &amp;lt;/lines&amp;gt;
            &amp;lt;phoneTemplateName&amp;gt;Standard 7911&amp;lt;/phoneTemplateName&amp;gt;
         &amp;lt;/phone&amp;gt;
      &amp;lt;/ns:addPhone&amp;gt;
   &amp;lt;/soapenv:Body&amp;gt;
&amp;lt;/soapenv:Envelope&amp;gt;&lt;/PRE&gt;&lt;PRE&gt;&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&amp;gt;&amp;lt;soapenv:Body&amp;gt;&amp;lt;soapenv:Fault&amp;gt;&amp;lt;faultcode&amp;gt;soapenv:Server&amp;lt;/faultcode&amp;gt;&amp;lt;faultstring&amp;gt;Item not valid: The specified Directory Number was not found&amp;lt;/faultstring&amp;gt;&amp;lt;detail&amp;gt;&amp;lt;axlError&amp;gt;&amp;lt;axlcode&amp;gt;5007&amp;lt;/axlcode&amp;gt;&amp;lt;axlmessage&amp;gt;Item not valid: The specified Directory Number was not found&amp;lt;/axlmessage&amp;gt;&amp;lt;request&amp;gt;addPhone&amp;lt;/request&amp;gt;&amp;lt;/axlError&amp;gt;&amp;lt;/detail&amp;gt;&amp;lt;/soapenv:Fault&amp;gt;&amp;lt;/soapenv:Body&amp;gt;&amp;lt;/soapenv:Envelope&amp;gt;&lt;/PRE&gt;&lt;P&gt;it doesnt make any sense to me. isnt the whole point of the &amp;lt;line&amp;gt; section to add a new line?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 22:44:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/security-profile-is-required-for-this-device-python-devnet/m-p/4296525#M3619</guid>
      <dc:creator>menash</dc:creator>
      <dc:date>2021-02-23T22:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Security Profile is required for this device - python + devnet sandbox</title>
      <link>https://community.cisco.com/t5/management/security-profile-is-required-for-this-device-python-devnet/m-p/4296530#M3620</link>
      <description>&lt;P&gt;No, actually. addPhone does not add a line.&amp;nbsp; You need to use addLine to add the line first, and then specify the line in your addPhone.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Feb 2021 22:52:35 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/security-profile-is-required-for-this-device-python-devnet/m-p/4296530#M3620</guid>
      <dc:creator>npetrele</dc:creator>
      <dc:date>2021-02-23T22:52:35Z</dc:date>
    </item>
  </channel>
</rss>

