-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from tayler6000/feature/Add-TLS
Add TLS capabilities
- Loading branch information
Showing
35 changed files
with
3,635 additions
and
1,852 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,14 +16,14 @@ jobs: | |
strategy: | ||
matrix: | ||
python-version: | ||
- "3.7" | ||
- "3.8" | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4.0.0 | ||
uses: actions/setup-python@v4.6.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# This workflow will install Python dependencies, run tests and lint | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Check flake8 | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
- "development" | ||
pull_request: | ||
|
||
jobs: | ||
check-flake8: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: | ||
- "3.8" | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . -r requirements-test.txt | ||
- name: flake8 | ||
run: flake8 pyVoIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,19 +16,23 @@ jobs: | |
strategy: | ||
matrix: | ||
python-version: | ||
- "3.7" | ||
- "3.8" | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4.0.0 | ||
uses: actions/setup-python@v4.6.0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e . -r requirements-test.txt | ||
- name: Start Docker | ||
run: | | ||
docker build docker -t pyvoip/tests | ||
docker run -d -p 5060:5060/udp -p 5061-5062:5061-5062/tcp pyvoip/tests | ||
- name: pytest | ||
run: pytest | ||
run: pytest --check-func |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ dist/ | |
pyVoIP.egg-info | ||
__pycache__ | ||
venv | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM andrius/asterisk:latest | ||
COPY /settings/ /etc/asterisk/ | ||
EXPOSE 5060/udp | ||
EXPOSE 5061 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDTTCCAjWgAwIBAwIBADANBgkqhkiG9w0BAQUFADBpMQswCQYDVQQGEwJVUzEL | ||
MAkGA1UECAw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13twr5D7e8 | ||
66Z6rarG096P/TwjTV6mSivzb1exUGUIOechy+RVJjm/ | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[internal] | ||
|
||
exten => answerme,1,Answer() | ||
same => n,Wait(3) | ||
same => n,Hangup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
-----BEGIN RSA PRIVATE KEY----- | ||
MIIEogIBAAKCAQEAyHBkMAl2G57UsvLlyX8YvZGOLEgpgThXawQwnFlEqgtQvIIS | ||
p3j2oM4gJW6KYfZbdOB536SQT1HvSaH8ggNTqjQ0syJ5j6xxJR9vRHdllONptlZy | ||
MoXyiwjrsxmTm0T9gqHgs+02ripQSeyiy9AJjyoAHZ1zb9g8tq8MSai8f4zC+QhN | ||
hnIeOUCh/gLs7WazXdCHnhG9T7nS50IIhTvCsYyw5eCqxtEEKwrk6uMJU+oZJgfF | ||
SLQZjebpSfiYljKvHeIVreGhtiARjWiovk/VZLLfRqvnvq1nXdRgW8zdx+RU22TC | ||
u8l9hFRqsVS1kxqlINHCmFWwp8sqa6M+az/1FQIDAQABAoIBAD4rFfgMRzTD68bh | ||
LcJ0iFDr34P+kdkBh6OqtgUYbwKq5czCL1UAYMZ5iGDzyzodNjqnEUX7fcMMb8KP | ||
2ojczUtiS+Iv1DJq0uEnwdQjkD9A1d33LA5dm1/iUXDIgw7KtDKbUN2durMEbsiu | ||
+8NpcD2WUljdKBvNnu8ulgoWqviIPL6zSsB4K7FPdmwKe2mxeeDGkrYxwc95QEeC | ||
K8/dZVKObgBiIqUussB8QLs/M8WP6OfQeTOWwcaCgEi/4kd10CHyO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ional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[transport-udp] | ||
type=transport | ||
protocol=udp | ||
bind=0.0.0.0:5060 | ||
|
||
[transport-tcp] | ||
type=transport | ||
protocol=tcp | ||
bind=0.0.0.0:5061 | ||
|
||
[transport-tls] | ||
type=transport | ||
protocol=tls | ||
bind=0.0.0.0:5062 | ||
cert_file=/etc/asterisk/cert.crt | ||
priv_key_file=/etc/asterisk/key.txt | ||
method=tlsv1_2 | ||
verify_client=no | ||
verify_server=no | ||
|
||
[nopass] | ||
type=endpoint | ||
context=internal | ||
disallow=all | ||
allow=ulaw | ||
allow=alaw | ||
direct_media=no | ||
aors=nopass | ||
|
||
[nopass] | ||
type=aor | ||
max_contacts=1 | ||
|
||
[pass] | ||
type=endpoint | ||
context=internal | ||
disallow=all | ||
allow=ulaw | ||
allow=alaw | ||
direct_media=no | ||
auth=pass | ||
aors=pass | ||
|
||
[pass] | ||
type=auth | ||
username=pass | ||
password=Testing123! | ||
|
||
[pass] | ||
type=aor | ||
max_contacts=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@echo off | ||
docker rmi pyvoip/tests | ||
docker build . -t pyvoip/tests | ||
docker run -d -p 5060:5060/udp -p 5061-5062:5061-5062/tcp pyvoip/tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.