08-30-2020 10:41 AM
I'm looking to clean up our phone devices by updating device descriptions on phones to include the Owner User ID and Perhaps First and Last Name to the already existing device descriptions.
Is this possible via SQL?
09-08-2020 03:16 PM
I got something like this working on my CUCM 12.5 system with this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/12.5"> <soapenv:Header/> <soapenv:Body> <ns:executeSQLUpdate sequence="?"> <sql>UPDATE device SET description= (SELECT enduser.firstname||" "||enduser.lastname||" ("||enduser.userid||")" FROM enduser WHERE device.fkenduser=enduser.pkid) WHERE device.tkmodel NOT IN (134,645) AND device.fkenduser IS NOT NULL </sql> </ns:executeSQLUpdate> </soapenv:Body> </soapenv:Envelope>
Models 134/645 are Remote Destination/Universal Device Template....everything else with a fkenduser value seemed to be an 'actual' device.
Note, the CUCM CLI would not accept the double-pipe symbol ( || ) for concatenating strings, so I resorted to using AXL to make the request. If you're going that way, you may just want to use regular AXL requests to accomplish your task, e.g. <listPhone>, <getUser>, <updatePhone>, etc.
09-13-2023 11:09 AM - edited 09-13-2023 12:35 PM
I needed to update / append / concatenate which carrier serviced every directly number in my 3 CUCM clusters. I used the below CLI run sql command to append / concatenate the carrier id to the description field that already contained the cost center for the user the directory number belonged to.
run sql update numplan set description= CONCAT('CBTS:', description) where dnorpattern='9999999999' == Appends carrier and Colon to beginning of Description Field
The Line Description started off with only the cost center number like this -- 101522
Now the Line Description looks like this -- CBTS:101522
If I ever need to change the carrier then I can use the below query to change the carrier in the description field
run sql update numplan set description= REPLACE(description,'CBTS:','CBTS-Teams:') where dnorpattern='9999999999' == Updates carrier in Description Field
10-22-2023 09:39 AM - edited 10-22-2023 09:40 AM
Yes it's usually possible to update device descriptions including Owner User ID and First/Last Name through SQL commands especially if your phone system supports best projectors it. However the exact SQL commands and procedures can vary depending on the phone system or software you're using. I recommend consulting your system's documentation or reaching out to their support for specific guidance on how to achieve this.
10-31-2023 10:57 PM - edited 10-31-2023 10:58 PM
To update device descriptions on phones to include the Owner User ID and perhaps the First and Last Name, follow these steps:
Access the Phone Device Settings: Log in to the phone system's administration portal or control for panel. The exact steps to access device settings may vary depending on your phone system (e.g., VoIP provider or on-premises PBX).
Locate the Device: Find the specific phone device you want to update in the list of connected devices. This list is typically found in the administration portal.
Edit Device Description: Once you've located the device, there should be an option to edit or configure its settings. Look for a field labeled "Device Description" or similar.
11-22-2023 12:54 AM
Yes, updating device descriptions on phones using SQL is possible. You can achieve this by running SQL queries to modify the relevant fields in your database. However, the exact best SQL query would depend on the structure of your database and the specific details you want to include in the device descriptions.
12-01-2023 02:37 AM
"Great initiative! Adding Owner User ID and First/Last Name to device descriptions is a smart way to streamline and organize. If you need any assistance or have specific steps in mind, feel free to share. Happy to help with the cleanup process!
02-13-2024 11:52 PM - edited 02-13-2024 11:55 PM
Yes, it's possible to update device descriptions on phones to include Owner User ID, First Name, and Last Name using SQL, but it depends on the specific database schema and setup you have for storing device information. Moreover, you can use Vsco Lightroom Presets to enhance your photography editing skills.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide