Compare commits
No commits in common. "dfe3543777ee29390601afc131538990c3f42998" and "9e6e294491fda23218bdbd9fad3fae3606887abf" have entirely different histories.
dfe3543777
...
9e6e294491
|
@ -26,6 +26,22 @@ if env_voicebox is None:
|
|||
if env_tmp is None:
|
||||
env_tmp = "/tmp"
|
||||
|
||||
def fritzab2matrix():
|
||||
|
||||
### CHECK AND GET MESSAGES FROM FRITZBOX ###
|
||||
############################################
|
||||
|
||||
## Connect to the FritzBox in the LAN
|
||||
# We don't use tls because the self-signed cert of the box leads to a malfunction in urllib later on.
|
||||
fc = FritzConnection(address=env_ip, user=env_user, password=env_pass, use_tls=False)
|
||||
|
||||
|
||||
|
||||
## Get info about messages from the main answering machine
|
||||
message_list = fc.call_action("X_AVM-DE_TAM1", "GetMessageList", NewIndex=0)
|
||||
message_list_url = message_list['NewURL']
|
||||
|
||||
|
||||
|
||||
# Build the url to download the message via smb
|
||||
def build_download_url(mid, tam=0):
|
||||
|
@ -47,25 +63,6 @@ def get_message_list(url):
|
|||
messages = xmltodict.parse(doc)
|
||||
return messages
|
||||
|
||||
|
||||
def fritzab2matrix():
|
||||
|
||||
### CHECK AND GET MESSAGES FROM FRITZBOX ###
|
||||
############################################
|
||||
|
||||
## Connect to the FritzBox in the LAN
|
||||
# We don't use tls because the self-signed cert of the box leads to a malfunction in urllib later on.
|
||||
fc = FritzConnection(address=env_ip, user=env_user, password=env_pass, use_tls=False)
|
||||
|
||||
|
||||
|
||||
## Get info about messages from the main answering machine
|
||||
message_list = fc.call_action("X_AVM-DE_TAM1", "GetMessageList", NewIndex=0)
|
||||
message_list_url = message_list['NewURL']
|
||||
|
||||
|
||||
|
||||
|
||||
l = get_message_list(message_list_url)
|
||||
if l['Root'] == None or l['Root']['Message'] == None:
|
||||
return False
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
import fritzab2matrix
|
|
@ -1 +0,0 @@
|
|||
from .context import fritzab2matrix
|
Loading…
Reference in New Issue