Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get VoIP data from FritzBox 7490? #186

Closed
mattbue opened this issue May 12, 2023 · 1 comment
Closed

How to get VoIP data from FritzBox 7490? #186

mattbue opened this issue May 12, 2023 · 1 comment

Comments

@mattbue
Copy link

mattbue commented May 12, 2023

Hi,
I would like to read out the VoIP data from my FritzBox 7490 (SW Version 7.29).
The software is running on a Debian 11 based LXC-Container on Proxmox.

I started trying to read out the VoIP accounts using the following code:

from fritzconnection import FritzConnection

fc = FritzConnection(address="192.168.178.1", user="my_username", password="my_password")
print(fc)  # print router model information

voip_info = fc.call_action('X_VoIP', 'X_AVM-DE_GetVoIPAccounts')
print(voip_info)

The action name comes from https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/x_voip-avm.pdf page 13.

The user I'm using has full administration rights.

But this throws the following error:

root@fritzbox-readout-test:~# python3 fritzbox.py
FRITZ!Box 7490 at http://192.168.178.1
FRITZ!OS: 7.29
Traceback (most recent call last):
  File "/root/fritzbox.py", line 6, in <module>
    voip_info = fc.call_action('X_VoIP', 'GetVoIPAccounts')
  File "/usr/local/lib/python3.9/dist-packages/fritzconnection/core/fritzconnection.py", line 441, in call_action
    return self.soaper.execute(service, action_name, arguments)
  File "/usr/local/lib/python3.9/dist-packages/fritzconnection/core/soaper.py", line 286, in execute
    return handle_response(response)
  File "/usr/local/lib/python3.9/dist-packages/fritzconnection/core/soaper.py", line 268, in handle_response
    raise_fritzconnection_error(response)
  File "/usr/local/lib/python3.9/dist-packages/fritzconnection/core/soaper.py", line 191, in raise_fritzconnection_error
    raise exception(message)
fritzconnection.core.exceptions.FritzActionError: UPnPError:
errorCode: 401
errorDescription: Invalid Action

Any idea what I'm doing wrong to that this error occurs?

Thank you
Best regards
mattbue

@mattbue mattbue changed the title How to get VoIP data from FritzBox 7490 How to get VoIP data from FritzBox 7490? May 12, 2023
@kbr
Copy link
Owner

kbr commented May 12, 2023

This error is forwarded from the router. See also issue #185. Seems to be that an admin user created by the router web-interface does not have all necessary rights for some actions. May be that AVM knows more about this.

@kbr kbr closed this as completed Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants