cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1575
Views
0
Helpful
6
Replies

Configure Key Expansion Module using AXL

Shesh
Level 1
Level 1

Hi,

 

Is there a way to read, update or add name/number in Key Expansion Module using AXL/Python?

I am unable to find any AXL Soap to do that.

 

I did find this article :https://community.cisco.com/t5/collaboration-documents/expansion-module/ta-p/3620690

But that is way too old and none of the functions listed work.

 

EDIT:

I am able to pull the index , label and number from KEM using getPhone. But still facing difficulty to update KEM using updatePhone. Can't figure put how to pass three variables to busyLampFields.

 

Thanks,

Shesh

1 Accepted Solution

Accepted Solutions

You need to pass back all the BLF items in your update phone or it will erase any BLF's not passed back in updatephone. You can accomplish this by running a getphone and capturing all BLF's and then edit the ones you need changed, you could edit them within the script with interactive prompts. Personally myself and another coworker built a script that exports all BLF items for a particular phone into an excel spreadsheet then you edit that excel and then built another script that imports that spreadsheet into a variable and then passes that variable to updatephone and update whatever phone you input based on MAC. We have this working in production and use this set of scripts weekly to update multiple reception phones in one pass. Our code might not be optimized since we're both self taught but it works for what we need it to do.

View solution in original post

6 Replies 6

dstaudt
Cisco Employee
Cisco Employee

Unfortunately I don't have an expansion module to test with, but my understanding is that you configure the actual modules with the <add|updatePhone><addOnModules> collection, and then manage any lines/speed dials/BLF/etc. as you normally would on the base phone using the <add|updatePhone><lines>/<speeddials>/<busyLampFields>/<blfDirectedCallParks> fields and <add|updatePhoneButtonTemplate>

I got the updatePhone function working. However now there is another issue.

Instead of updating the KEM at specified index, it basically deletes all exiting blf and writes the only one that is listed.

Same thing happens when a list of numbers are given to be updated, only the last one gets configured while the rest are not, I assume each one is overwritten by subsequent calls.

------------------------------------------------

num_list=[
{'index' : '1', 'blfDest': '12345', 'label': 'John'},
{'index' : '2', 'blfDest': '78910', 'label': 'Smith'},
{'index' : '3', 'blfDest': '14785', 'label': 'Jane'},
]

for num in num_list:
speed_dial={'busyLampField':{
'index' : num['index'],
'blfDest' : num['blfDest'],
'label' : num['label']
}}

try:
resp = CLIENT.service.updatePhone(uuid = '{xxxxxxxxxxxx}',busyLampFields=speed_dial)
print( '\nupdatePhone response:\n', resp )
except suds.WebFault as err:
error=err
print(error)

------------------------------------------------

Once the above code is run, only Jane is listed in KEM.

I will continue to run some variations but any suggestions are welcome !!!!!

Also I am still using suds to connect. Haven't got around to upgrade to zeep.

For some reason my previous reply is not getting posted, so repeating again. Please ignore if the my earlier reply gets posted later on.

I am able to get the updatePhone soap working. However it has now run into another issue.

Instead of updating the DN at the specified index, it basically deletes all the existing blfs and keeps the one it was told to update.

Same thing happens when a list of DNs are given. Only the last one gets configured while the others not, which I presume is probably because each entry gets overwritten by the next one.

Below is the code snip:

--------------------------

num_list=[
{'index' : '1', 'blfDest': '12345', 'label': 'John'},
{'index' : '2', 'blfDest': '78910', 'label': 'Smith'},
{'index' : '3', 'blfDest': '14785', 'label': 'Jane'},
]

for num in num_list:
speed_dial={'busyLampField':{
'index' : num['index'],
'blfDest' : num['blfDest'],
'label' : num['label']
}}
try:
resp = CLIENT.service.updatePhone(uuid = '{xxxxxxxxxxxx}',busyLampFields=speed_dial)
print( '\nupdatePhone response:\n', resp )
except suds.WebFault as err:
print(err)

----------------------------

Once the above code is run, only Jane is listed in KEM.

I will continue to run some more variations, but any suggestions are welcome.

Excuse the crude syntax, still learning.

Also I am still using suds, haven't got around to upgrade to zeep.

You need to pass back all the BLF items in your update phone or it will erase any BLF's not passed back in updatephone. You can accomplish this by running a getphone and capturing all BLF's and then edit the ones you need changed, you could edit them within the script with interactive prompts. Personally myself and another coworker built a script that exports all BLF items for a particular phone into an excel spreadsheet then you edit that excel and then built another script that imports that spreadsheet into a variable and then passes that variable to updatephone and update whatever phone you input based on MAC. We have this working in production and use this set of scripts weekly to update multiple reception phones in one pass. Our code might not be optimized since we're both self taught but it works for what we need it to do.

Hi Mulvihill,

Thank you for replying.

I agree, however it would have been great if there was an option to edit or update a specific index.

Nevertheless I will script to read, edit  and update the KEM.

Do you use python to update or something else.? If it's python, could you share your script? 

We originally wrote it in 2.6 and its currently fixed to work with python 3.7. It's technically work product since we wrote it during work hours so I don't know if I can directly share the whole script. I'll follow up on company policy on sharing work product and ask my coworker if he's ok with it. Until then I can help you write it in a github if you would like.