07-01-2022 05:47 AM
I am utilizing zeep and requests modules to pull and modify phones and lines in Call Manager. I looked through the AXL schema, but couldn't quite find how to pull port information from a phone. I am looking to gather LLDP/CDP information. Any help would be appreciated.
Solved! Go to Solution.
07-05-2022 11:55 PM
Hi Ken!
The update has been attached.
I think the second option (XML) is more practical
The result looks like this!
{ "10.50.200.146": { "PortInformation": { "RxtotalPkt": "211984621", "RxcrcErr": "00000000", "RxalignErr": "00000000", "Rxmulticast": "85096768", "Rxbroadcast": "74958097", "Rxunicast": "51929756", "RxshortErr": "00000000", "RxshortGood": "00000000", "RxlongGood": "00009917", "RxlongErr": "00000000", "Rxsize64": "83457972", "Rxsize65to127": "98555885", "Rxsize128to255": "08565025", "Rxsize256to511": "03737534", "Rxsize512to1023": "00875376", "Rxsize1024to1518": "16792829", "RxtokenDrop": "00000000", "TxexcessDefer": "00000000", "TxlateCollision": "00000000", "TxtotalGoodPkt": "58532663", "Txcollisions": "00000000", "TxexcessLength": "00000000", "Txbroadcast": "00006463", "Txmulticast": "01311297", "lldpFramesOutTotal": "00000000", "lldpAgeoutsTotal": "00000000", "lldpFramesDiscardedTotal": "00000000", "lldpFramesInErrorsTotal": "00000000", "lldpFramesInTotal": "00000000", "lldpTLVDiscardedTotal": "00000000", "lldpTLVUnrecognizedTotal": "00000000", "CDPNeighborDeviceId": "sw_core", "CDPNeighborIPv4": "10.50.x.y", "CDPNeighborIPv6": null, "CDPNeighborPort": "GigabitEthernet1/0/7", "LLDPNeighborDeviceId": null, "LLDPNeighborIPv4": null, "LLDPNeighborIPv6": null, "LLDPNeighborPort": null, "PortSpeed": "Full, 1000" } }, "10.50.200.147": { "PortInformation": { "RxtotalPkt": "23908310", "RxcrcErr": "00000000", "RxalignErr": "00000000", "Rxmulticast": "11417382", "Rxbroadcast": "11106885", "Rxunicast": "01384043", "RxshortErr": "00000000", "RxshortGood": "00000000", "RxlongGood": "00004336", "RxlongErr": "00000000", "Rxsize64": "11439010", "Rxsize65to127": "11772250", "Rxsize128to255": "00366174", "Rxsize256to511": "00295028", "Rxsize512to1023": "00034900", "Rxsize1024to1518": "00000948", "RxtokenDrop": "00000000", "TxexcessDefer": "00000000", "TxlateCollision": "00000000", "TxtotalGoodPkt": "01271863", "Txcollisions": "00000000", "TxexcessLength": "00000000", "Txbroadcast": "00000148", "Txmulticast": "00181527", "lldpFramesOutTotal": "00000000", "lldpAgeoutsTotal": "00000000", "lldpFramesDiscardedTotal": "00000000", "lldpFramesInErrorsTotal": "00000000", "lldpFramesInTotal": "00000000", "lldpTLVDiscardedTotal": "00000000", "lldpTLVUnrecognizedTotal": "00000000", "CDPNeighborDeviceId": "sw_core_04", "CDPNeighborIPv4": "10.50.x.z", "CDPNeighborIPv6": null, "CDPNeighborPort": "GigabitEthernet1/0/6", "LLDPNeighborDeviceId": null, "LLDPNeighborIPv4": null, "LLDPNeighborIPv6": null, "LLDPNeighborPort": null, "PortSpeed": "Full, 1000" } } }
best regards
07-01-2022 06:30 AM
getPhone should show that information in the <vendorConfig> section, but my tests don't return that information. So it's possible that you can't access it via AXL. AXL generally only fetches data from the database, but vendorConfig data isn't stored in the database. So while you can get some vendorConfig information, you can't necessarily get it all.
I'll double-check with the engineers, and if it's not possible now, I can file an enhancement request.
07-05-2022 05:33 AM
Thank you @npetrele. I can take a look at the vendorConfig returnedTag.
07-04-2022 03:00 AM
Hi!
I can recommend you the following.
You could read the information from the phone website.
Requirements: A list of phones ip address,
phones must be accessible via ip and web access must be activated.
Attached is an example written in Python. The results are stored in a dictionary.
{
"10.50.x.y": {
"CDP Neighbor Device ID": "sw_core",
"CDP Neighbor IPv4 Address": "10.50.x.y",
"CDP Neighbor Port": "GigabitEthernet1/0/7",
"Port Information": "Full, 1000"
},
"10.50.x.z": {
"CDP Neighbor Device ID": "sw_core",
"CDP Neighbor IPv4 Address": "10.50.x.y",
"CDP Neighbor Port": "GigabitEthernet1/0/6",
"Port Information": "Full, 1000"
}
}
07-05-2022 05:32 AM
Thank you @BjoernMartin. I was thinking of this solution as well.
07-05-2022 02:04 PM
07-05-2022 11:47 PM
Hi dstaudt!
Thanks for the information.
In XML format, of course, it makes everything easier and the code shorter!
07-05-2022 11:55 PM
Hi Ken!
The update has been attached.
I think the second option (XML) is more practical
The result looks like this!
{ "10.50.200.146": { "PortInformation": { "RxtotalPkt": "211984621", "RxcrcErr": "00000000", "RxalignErr": "00000000", "Rxmulticast": "85096768", "Rxbroadcast": "74958097", "Rxunicast": "51929756", "RxshortErr": "00000000", "RxshortGood": "00000000", "RxlongGood": "00009917", "RxlongErr": "00000000", "Rxsize64": "83457972", "Rxsize65to127": "98555885", "Rxsize128to255": "08565025", "Rxsize256to511": "03737534", "Rxsize512to1023": "00875376", "Rxsize1024to1518": "16792829", "RxtokenDrop": "00000000", "TxexcessDefer": "00000000", "TxlateCollision": "00000000", "TxtotalGoodPkt": "58532663", "Txcollisions": "00000000", "TxexcessLength": "00000000", "Txbroadcast": "00006463", "Txmulticast": "01311297", "lldpFramesOutTotal": "00000000", "lldpAgeoutsTotal": "00000000", "lldpFramesDiscardedTotal": "00000000", "lldpFramesInErrorsTotal": "00000000", "lldpFramesInTotal": "00000000", "lldpTLVDiscardedTotal": "00000000", "lldpTLVUnrecognizedTotal": "00000000", "CDPNeighborDeviceId": "sw_core", "CDPNeighborIPv4": "10.50.x.y", "CDPNeighborIPv6": null, "CDPNeighborPort": "GigabitEthernet1/0/7", "LLDPNeighborDeviceId": null, "LLDPNeighborIPv4": null, "LLDPNeighborIPv6": null, "LLDPNeighborPort": null, "PortSpeed": "Full, 1000" } }, "10.50.200.147": { "PortInformation": { "RxtotalPkt": "23908310", "RxcrcErr": "00000000", "RxalignErr": "00000000", "Rxmulticast": "11417382", "Rxbroadcast": "11106885", "Rxunicast": "01384043", "RxshortErr": "00000000", "RxshortGood": "00000000", "RxlongGood": "00004336", "RxlongErr": "00000000", "Rxsize64": "11439010", "Rxsize65to127": "11772250", "Rxsize128to255": "00366174", "Rxsize256to511": "00295028", "Rxsize512to1023": "00034900", "Rxsize1024to1518": "00000948", "RxtokenDrop": "00000000", "TxexcessDefer": "00000000", "TxlateCollision": "00000000", "TxtotalGoodPkt": "01271863", "Txcollisions": "00000000", "TxexcessLength": "00000000", "Txbroadcast": "00000148", "Txmulticast": "00181527", "lldpFramesOutTotal": "00000000", "lldpAgeoutsTotal": "00000000", "lldpFramesDiscardedTotal": "00000000", "lldpFramesInErrorsTotal": "00000000", "lldpFramesInTotal": "00000000", "lldpTLVDiscardedTotal": "00000000", "lldpTLVUnrecognizedTotal": "00000000", "CDPNeighborDeviceId": "sw_core_04", "CDPNeighborIPv4": "10.50.x.z", "CDPNeighborIPv6": null, "CDPNeighborPort": "GigabitEthernet1/0/6", "LLDPNeighborDeviceId": null, "LLDPNeighborIPv4": null, "LLDPNeighborIPv6": null, "LLDPNeighborPort": null, "PortSpeed": "Full, 1000" } } }
best regards
07-06-2022 07:23 AM
Thank you @BjoernMartin for the example and example output.
07-06-2022 08:17 AM
I can't seem to find how to get the IP address of the phones. I am using getPhone, but I cant' seem to find how to return the IP address. I have tried the secure...Url and ...Url tags, but they didn't return what I was looking for in my script.
07-06-2022 10:50 AM
For that you will need to use the Risport70 API: https://developer.cisco.com/docs/sxml/#!risport70-api-reference
Python samples: https://github.com/CiscoDevNet/serviceability-python-zeep-samples/
07-07-2022 06:32 AM
Just FYI, selectCMDevice(ext, too) only returns phones that have been registered at least once. If they haven't been registered yet, they won't show up.
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