<?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: CUCM - update spanToPCPort - 10.5 and 12.5 in Management</title>
    <link>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960891#M4143</link>
    <description>&lt;P&gt;Not sure TBH, but sounds right..?&lt;/P&gt;</description>
    <pubDate>Thu, 16 Nov 2023 17:10:29 GMT</pubDate>
    <dc:creator>dstaudt</dc:creator>
    <dc:date>2023-11-16T17:10:29Z</dc:date>
    <item>
      <title>CUCM - update spanToPCPort - 10.5 and 12.5</title>
      <link>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960018#M4135</link>
      <description>&lt;P&gt;I posted something in the UC infrastructure forum &lt;A href="https://community.cisco.com/t5/unified-communications-infrastructure/cucm-db-where-is-span-to-pc-port-stored/td-p/4959456" target="_self"&gt;https://community.cisco.com/t5/unified-communications-infrastructure/cucm-db-where-is-span-to-pc-port-stored/td-p/4959456&lt;/A&gt; but I think this might be a better place. I am trying to update specific phones to disable Span to PC port. I can't do a BAT update where device name begins with 'SEP' because some of the products that it matches don't support that so it doesn't offer that as an option to change. I have a query that finds the phones and templates I need to change.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;run sql select fkdevice from devicexml4k where xml like '%&amp;lt;spanToPCPort&amp;gt;0&amp;lt;/spanToPCPort&amp;gt;%'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;I was hoping to use the AXL updatePhone, but I am not seeing that in AXL schema on the Cisco developer site. Is there some way to do this other than doing the update in SQL?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 15:53:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960018#M4135</guid>
      <dc:creator>Elliot Dierksen</dc:creator>
      <dc:date>2023-11-15T15:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: CUCM - update spanToPCPort - 10.5 and 12.5</title>
      <link>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960118#M4138</link>
      <description>&lt;P&gt;Handling vendor specific configs can be tricky:&lt;BR /&gt;* All of the configs for a device are stored in the DB as a single XML document in one of the devicexml* fields&lt;BR /&gt;* The vendor config XML for a specific device may (likely does not) contain all of the actual available configs/values - only values that have been modified previously tend to be present.&lt;BR /&gt;* Modifying the XML requires figuring out if the element is even present, adding it if needed while keeping all the other elements, and writing it back&lt;BR /&gt;* The XML has a tiered structure with various sections to keep things interesting&lt;BR /&gt;* The vendor configs and the corresponding XML elements/values supported by a particular device type are not documented - it's pretty much a reverse engineering effort to figure out which models support which options, and what the XML elements/values need to be&lt;BR /&gt;So just using your SQL query above might not return all devices that support span to PC port - probably only those with a value that has been modified at some point.&lt;BR /&gt;All that being said, AXL would be the recommended/supported mechanism for affecting this kind of change, i.e. via &amp;lt;updatePhone&amp;gt;&amp;lt;vendorConfig&amp;gt;, where the &amp;lt;vendorConfig&amp;gt; element contains the entire XML document.&amp;nbsp; This Python sample does some vendor config read/parse/update stuff:&amp;nbsp;&lt;A href="https://github.com/CiscoDevNet/axl-python-zeep-samples/blob/master/axl_add_Phone_vendorConfig.py" target="_blank"&gt;https://github.com/CiscoDevNet/axl-python-zeep-samples/blob/master/axl_add_Phone_vendorConfig.py&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 19:08:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960118#M4138</guid>
      <dc:creator>dstaudt</dc:creator>
      <dc:date>2023-11-15T19:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: CUCM - update spanToPCPort - 10.5 and 12.5</title>
      <link>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960257#M4140</link>
      <description>&lt;P&gt;OK, I think I can work with that. I'll try a getPhone and check out one of the devices I want to change. I already found where I can use the lxml/etree libraries to change just XML element in question. I'll work on that tomorrow and update here. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 23:57:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960257#M4140</guid>
      <dc:creator>Elliot Dierksen</dc:creator>
      <dc:date>2023-11-15T23:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: CUCM - update spanToPCPort - 10.5 and 12.5</title>
      <link>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960847#M4141</link>
      <description>&lt;P&gt;This isn't the most elegant thing to be sure, but it does work. Thanks for the pointers!&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;    dphone = source_axl.getPhone(name=devname)
    vendorxml = dphone['return'].phone.vendorConfig._value_1

    loc = 0
    for elem in vendorxml:
        if elem.tag == 'spanToPCPort':
            if Debug:
                print('Found spanToPCPort',elem.text,'at loc',loc)
            vendorxml[loc].text = '1'
            break
        loc += 1

    if not ReadOnly:
        source_axl.updatePhone(name=devname,vendorConfig=vendorxml)
        source_axl.applyPhone(name=devname)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Nov 2023 16:02:30 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960847#M4141</guid>
      <dc:creator>Elliot Dierksen</dc:creator>
      <dc:date>2023-11-16T16:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: CUCM - update spanToPCPort - 10.5 and 12.5</title>
      <link>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960885#M4142</link>
      <description>&lt;P&gt;I have one more question. Some of the devices where this is set are phone templates. I assume I can do an updatePhone on them, but wouldn't want to do an applyPhone there. Is that accurate?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 17:06:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960885#M4142</guid>
      <dc:creator>Elliot Dierksen</dc:creator>
      <dc:date>2023-11-16T17:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: CUCM - update spanToPCPort - 10.5 and 12.5</title>
      <link>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960891#M4143</link>
      <description>&lt;P&gt;Not sure TBH, but sounds right..?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 17:10:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960891#M4143</guid>
      <dc:creator>dstaudt</dc:creator>
      <dc:date>2023-11-16T17:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: CUCM - update spanToPCPort - 10.5 and 12.5</title>
      <link>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960941#M4144</link>
      <description>&lt;P&gt;Yes, updatePhone works on phone templates. I didn't try doing an apply since that isn't relevant.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 18:45:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/cucm-update-spantopcport-10-5-and-12-5/m-p/4960941#M4144</guid>
      <dc:creator>Elliot Dierksen</dc:creator>
      <dc:date>2023-11-16T18:45:22Z</dc:date>
    </item>
  </channel>
</rss>

