cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1502
Views
10
Helpful
2
Replies

SOAPUI AXL update phone description CUCM version 12.5

Tony_M_W
Level 1
Level 1

I am trying to update phone description via SOAPUI AXL. It can update 1 phone description successfully.
How can I update a batch of phone using this update phone description script?

 

 

update 1 phone description


<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:updatePhone>

 <name>SEP************</name> <description>****</description>

 </ns:updatePhone>

</soapenv:Body>

</soapenv:Envelope>

2 Replies 2

npetrele
Cisco Employee
Cisco Employee

There is no batch updatePhone API in AXL. I recommend you write a simple script (python and zeep would work well) that loops and reads a list of phones/descriptions and performs the update for each one.

 

Here are a bunch of python/zeep/AXL samples:

 

https://github.com/CiscoDevNet/axl-python-zeep-samples

 

You don't have to use Python. Other languages work well with SOAP.

JasunKAR
Level 1
Level 1

Howdy!  Someone already pointed you at the GitHub for the zeep stuff.  I'd definitely start there as that'll show you how to build your authentication.  You'll need a user that has axl creds in CUCM.  Along with that your script will look like this if you are just wanting to change a bunch of phones descriptions.  

.csv format should be phone mac in first column and phone description in second column.  NO COLUMN HEADERS
example:
SEP6CF1B3D29C,My Phone Description
CSFJohnDoe,My Other Phone Description

# type in your full path with file name.csv
filePath=input('Enter path and file name to your input file: ')

# Iterates through csv to update your phones
with open(filePathas f:
    reader = csv.reader(f)
    for phoneMACphoneDesc in reader:
        resp = service.updatePhone(name = phoneMACdescription = phoneDesc)
        print(resp)