Skip to content

Commit

Permalink
Documentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tayler6000 committed Jul 18, 2020
1 parent 087ba69 commit 6177198
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py


# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# pyVoIP
Pure python VoIP/SIP/RTP library. Currently supports PCMA, PCMU, and telephone-event
PyVoIP is a pure python VoIP/SIP/RTP library. Currently, it supports PCMA, PCMU, and telephone-event.

Please note this is a beta version and is currently only able to recieve calls, and transmit PCMU. In future it will be able to initiate calls in PCMA as well.

This library does not depend on a sound library, i.e. you can use any sound library that can handle linear sound data i.e. pyaudio or even wave. Keep in mind PCMU only supports 8000Hz, 1 channel, 8 bit, audio.o.

## Getting Started
Simply put pyVoIP into your site-packages folder.

### Basic Example
This basic code will simple make a phone that will automatically answer then hang up.

```python
from pyVoIP.VoIP import VoIPPhone, InvalidStateError

def answer(call): #This will be your callback function for when you receive a phone call.
try:
call.answer()
call.hangup()
except InvalidStateError:
pass

if __name__=='__main__':
phone=VoIPPhone(<SIP Server IP>, <SIP Server Port>, <SIP Server Username>, <SIP Server Password>, callCallback=answer, myIP=<Your computer's local IP>, sipPort=<Port to use for SIP (int, default 5060)>, rtpPortLow=<low end of the RTP Port Range>, rtpPortHigh=<high end of the RTP Port Range>)
phone.start()
input('Press enter to disable the phone')
phone.stop()
```

0 comments on commit 6177198

Please sign in to comment.