Hi,
I am trying to automate the polycom phone to make calls, accept calls and chnage settings. The phone info is given below
hone Model SoundStation IP 6000
Part Number 3111-15600-001 Rev:U
MAC Address 00:04:F2:F6:F6:7B
IP Address 10.198.32.96
UC Software Version 4.0.11.0583
BootROM Software Version 5.0.1.10553
I am able to do all that but I also want to read the logs using a curl command or a python script. I am unable to get the logs from the phone. Below is what i have already tried
1. Using curl command
curl "http://10.198.32.96/Diagnostics/log" --digest -u Admin:456 -H "Authorization: Basic UG9seWNvbTo0NTY=" -d "value=app&dummyParam=1524656164154"
I am getting below result
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head><title>405 Method Not Allowed</title></head><body> </body></html>
2. I also tried using Postman tool and tried writing a python script for the same but everytime I am getting a 401 unauthorized error. Below is the snippet
urls = {"login": "http://10.198.32.96/auth.htm?t=Thu,%2026%20Apr%202018%2007:35:57%20GMT", "logs": "http://10.198.32.96/Diagnostics/log"} data = {"logs": {"value": "app","dummyParam": "1524728332337"}} header = {"Authorization": "Basic UG9seWNvbTo0NTY="} r_login = requests.get(urls['login'], headers=header) print r_login #### 200 OK print r_login.headers r_log = requests.get(urls['logs'], headers=header.update(r_login.headers), data = data["logs"]) print r_log ##### 401 unauthorized print r_log.headers
Please, help me in reading the log file.
Solved! Go to Solution.
Hello Steffen,
Thanks for your reply.
There was a typo in my attempts thats why it was not working. I fixed that and both the mentioned methods started working.
I am sharing the complete curl command for other community users to use
curl "http://10.198.32.96/Diagnostics/log?value=app&dummyParam=1524829265456" -H "Cookie: Authorization=Basic UG9seWNvbTo0NTY="
--Nitin
Hello @nitin_k29,
welcome to the Polycom Community.
The actual file buffer for the log is very small especially on a SSIP.
Why not simply log to an FTP server and allow to append the file and always have access to the latest logs once uploaded ?
You can amend the Upload Period to make this happen more frequent.
Please ensure to provide some feedback if this reply has helped you so other users can profit from your experience.
Best Regards
Steffen Baier
Polycom Global Services
Hello Steffen,
Thanks for your reply.
There was a typo in my attempts thats why it was not working. I fixed that and both the mentioned methods started working.
I am sharing the complete curl command for other community users to use
curl "http://10.198.32.96/Diagnostics/log?value=app&dummyParam=1524829265456" -H "Cookie: Authorization=Basic UG9seWNvbTo0NTY="
--Nitin