From 5bfb9543884599eaf53e8f93cf18a69781fbbf34 Mon Sep 17 00:00:00 2001 From: Tayler Porter Date: Wed, 2 Feb 2022 20:18:33 -0600 Subject: [PATCH] [FIXED] Fixed issue #10. [FIXED] Fixed documentation typos. --- docs/RTP.rst | 6 +++--- docs/VoIP.rst | 2 +- docs/conf.py | 6 +++--- pyVoIP/SIP.py | 6 ++++-- pyVoIP/__init__.py | 2 +- setup.py | 2 +- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/RTP.rst b/docs/RTP.rst index e113e90..092de36 100644 --- a/docs/RTP.rst +++ b/docs/RTP.rst @@ -30,10 +30,10 @@ RTP.\ **RTPProtocol** This means the audio should be sent with pure UDP. Returns ``'udp'`` when string casted. RTPProtocol.\ **AVP** - This means the audio should be sent with RTP Audio/Video Protocol described in :rfc:3551. Returns ``'RTP/AVP'`` when string casted. + This means the audio should be sent with RTP Audio/Video Protocol described in :RFC:`3551`. Returns ``'RTP/AVP'`` when string casted. RTPProtocol.\ **SAVP** - This means the audio should be sent with RTP Secure Audio/Video Protocol described in :rfc:3711. Returns ``'RTP/SAVP'`` when string casted. + This means the audio should be sent with RTP Secure Audio/Video Protocol described in :RFC:`3711`. Returns ``'RTP/SAVP'`` when string casted. .. _transmittype: @@ -226,4 +226,4 @@ The RTPClient is used to send and receive RTP packets and encode/decode the audi **parseTelephoneEvent**\ (packet) This method is called by parsePacket(). It will decode the *packet*'s payload from the telephone-event non-codec to the string representation of the event. It will then call :ref:`VoIPCall`.dtmfCallback(). - \ No newline at end of file + diff --git a/docs/VoIP.rst b/docs/VoIP.rst index c841246..26f1272 100644 --- a/docs/VoIP.rst +++ b/docs/VoIP.rst @@ -24,7 +24,7 @@ Enums VoIP.\ **CallState** CallState is an Enum with four attributes. - CallState.\ **DIALING*** + CallState.\ **DIALING** This CallState is used to describe when a :term:`user` has originated a call to a :term:`client`, but it has yet to be answered. CallState.\ **RINGING** diff --git a/docs/conf.py b/docs/conf.py index dabf3ad..a6883e5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,11 +20,11 @@ # -- Project information ----------------------------------------------------- project = 'pyVoIP' -copyright = '2020, Sorta Strange Productions' +copyright = '2021, Tayler Porter' author = 'Tayler J Porter' # The full version, including alpha/beta/rc tags -release = '0.5.0 Beta' +release = '1.5.2' master_doc = 'index' @@ -58,4 +58,4 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] \ No newline at end of file +html_static_path = ['_static'] diff --git a/pyVoIP/SIP.py b/pyVoIP/SIP.py index 382563d..e6531f1 100644 --- a/pyVoIP/SIP.py +++ b/pyVoIP/SIP.py @@ -619,6 +619,7 @@ def genAuthorization(self, request): def genRegister(self, request): response = self.genAuthorization(request) nonce = request.authentication['nonce'] + realm = request.authentication['realm'] regRequest = "REGISTER sip:"+self.server regRequest += " SIP/2.0\r\nVia: SIP/2.0/UDP "+self.myIP+":"+str(self.myPort) @@ -631,7 +632,7 @@ def genRegister(self, request): regRequest += "\r\nCSeq: "+str(self.registerCounter.next())+" REGISTER" regRequest +="\r\nExpires: 300\r\nAllow: "+(", ".join(pyVoIP.SIPCompatibleMethods))+"\r\nUser-Agent: pyVoIP """+pyVoIP.__version__+"\r\n" regRequest += 'Authorization: Digest username="'+self.username - regRequest += '",realm="asterisk",nonce="'+nonce + regRequest += '",realm="+realm+",nonce="'+nonce regRequest += '",uri="sip:'+self.server regRequest += ';transport=UDP",response="'+str(response, 'utf8') regRequest += '",algorithm=MD5\r\n'+"Content-Length: 0\r\n\r\n" @@ -820,8 +821,9 @@ def invite(self, number, ms, sendtype): debug("Acknowledged") authhash = self.genAuthorization(response) nonce = response.authentication['nonce'] + realm = response.authentication['realm'] auth = 'Authorization: Digest username="'+self.username - auth += '",realm="asterisk",nonce="'+nonce + auth += '",realm="+realm+",nonce="'+nonce auth += '",uri="sip:'+self.server auth += ';transport=UDP",response="'+str(authhash, 'utf8') auth += '",algorithm=MD5\r\n' diff --git a/pyVoIP/__init__.py b/pyVoIP/__init__.py index b2ff701..d9969a6 100644 --- a/pyVoIP/__init__.py +++ b/pyVoIP/__init__.py @@ -1,7 +1,7 @@ __all__ = ['SIP', 'RTP', 'VoIP'] -version_info = (1, 5, 1) +version_info = (1, 5, 2) __version__ = ".".join([str(x) for x in version_info]) diff --git a/setup.py b/setup.py index c61c3a7..dd17005 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name = 'pyVoIP', - version = '1.5.1', + version = '1.5.2', description = 'PyVoIP is a pure python VoIP/SIP/RTP library.', author = 'Tayler Porter', author_email = 'taylerporter@gmail.com',