Skip to content

Commit

Permalink
[CHANGE] Updated the Globals documentation to include the new global …
Browse files Browse the repository at this point in the history
…variables
  • Loading branch information
tayler6000 committed Jan 5, 2024
1 parent 9cba94c commit ec8fcdc
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/Globals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,36 @@ pyVoIP.\ **DEBUG** = False

pyVoIP.\ **TRANSMIT_DELAY_REDUCTION** = 0.0
The higher this variable is, the more often RTP packets are sent. This *should* only ever need to be 0.0. However, when testing on Windows, there has sometimes been jittering, setting this to 0.75 fixed this in testing, but you may need to tinker with this number on a per-system basis.

pyVoIP.\ **ALLOW_BASIC_AUTH** = False
Controls whether Basic authentication (`RFC 7617 <https://tools.ietf.org/html/rfc7617>`_) is allowed for SIP authentication. Basic authentication is deprecated as it will send your password in plain-text, likely in the clear (unencrypted) as well. As such this is disabled be default.

pyVoIP.\ **ALLOW_MD5_AUTH** = True
MD5 Digest authentication is deprecated per `RFC 8760 <https://tools.ietf.org/html/rfc8760#section-3>`_ as it a weak hash. However, it is still used often so it is enabled by default.

pyVoIP.\ **REGISTER_FAILURE_THRESHOLD** = 3
If registration fails this many times, VoIPPhone's status will be set to FAILED and the phone will stop.

pyVoIP.\ **ALLOW_TLS_FALLBACK** = False
If this is set to True TLS will fall back to TCP if the TLS handshake fails. This is off by default, as it would be irresponsible to have a security feature disabled by default.

This feature is currently not implemented.

pyVoIP.\ **TLS_CHECK_HOSTNAME** = True
Is used to create SSLContexts. See `Python's documentation <https://docs.python.org/3/library/ssl.html#ssl.SSLContext.check_hostname>`_ on this feature.

You should use the set_tls_security to change this variable.

pyVoIP.\ **TLS_VERIFY_MODE** = True
Is used to create SSLContexts. See `Python's documentation <https://docs.python.org/3/library/ssl.html#ssl.SSLContext.verify_mode>`_ on this feature.

You should use the set_tls_security to change this variable.

pyVoIP.\ **SIP_STATE_EB_LOCATION** = ":memory:"
This variable allows you to save the SIP message state database to a file instead of storing it in memory which is the default. This is useful for debugging, however pyVoIP does not delete the database afterwards which will cause an Exception upon restarting pyVoIP. For this reason, we recommend you do not change this variable in production.

Global Functions
########

pyVoIP.\ **set_tls_security**\ (verify_mode: `ssl.VerifyMode <https://docs.python.org/3/library/ssl.html?highlight=ssl#ssl.VerifyMode>`) -> None
This method ensures that TLS_CHECK_HOSTNAME and TLS_VERIFY_MODE are set correctly depending on the TLS certificate verification settings you want to use.

0 comments on commit ec8fcdc

Please sign in to comment.