- Username, Passwoord optioneel

- Buffer size recv zodat het zonder SSL werkt.
This commit is contained in:
Marcel Nijenhof
2019-02-13 15:54:44 +01:00
parent 467ff9b9b3
commit 9b54eeac9e

View File

@@ -22,12 +22,13 @@ Support for:
"""
def __init__(self, user, password, host="sip-lmw.rws.nl", port=443,
def __init__(self, user=None, password=None,
host="sip-lmw.rws.nl", port=443,
meetnet="LMW", ssl = True, check_ssl = True):
"""LmwSip(user, password, [host], [port], [meetnet], [ssl], [check_ssl])
user: Lmw user name
password: Lmw password
user(optinal): Lmw user name
password(optional): Lmw password
host(optional): Default sip-lmw.rws.nl
port(optional): Default 443
meetnet(optional): Default LMW
@@ -43,7 +44,9 @@ Opens the connection and logs in
self.meetnet = meetnet
self.ssl = ssl
self.check_ssl = check_ssl
if (self.host != None):
self.connect()
if (self.user != None):
self.login()
def lasttime(self, parameter):
@@ -104,7 +107,7 @@ send a sip command to the server
recieve a answer from the sip server
"""
return(self._socket.recv())
return(self._socket.recv(4096))
def login(self):
"""login()