Table of Contents
About The Project
nanosip is a minimal implementation of the the SIP INVITE transaction, which is used to ring another phone.
It is
- not a complete or compliant implementation of SIP.
- not establishing a VoIP / audio link with the callee.
Simply rings and hangs up.
This package was created to be used by my home assistant integration "sipcall", however it can be used in any other project.
Installation
Install the package from PyPI
pip install nanosip
This package does not have any dependencies
Usage
To make a call, you will need
- either a cloud-based SIP registrar (e.g. sipgate, easybell or others)
- or a local PBX that runs on your router or local server (e.g. a FRITZ!Box or asterisk)
From your registrar you will obtain the following required information:
- username
- password
- SIP server
- Domain (usually the same as the server)
You can then make a call like this:
from nanosip import call_and_cancel
auth_creds = SIPAuthCreds(
username="USERNAME",
password="PASSWORD"
)
inv = Invite(
uri_from="sip:USERNAME@DOMAIN",
uri_to="sip:CALLEE@DOMAIN",
uri_via="SIP_SERVER",
auth_creds=auth_creds,
)
call_and_cancel(inv, 15, "SIP_SERVER")
This package also supports use with asyncio. For more examples, check out the examples/ subfolder.
The call_and_cancel method may throw an OSError if something with the connection of the SIP call went wrong.
For example, if the credentials are wrong, it will throw an OSError('nanosip error: 407 Unauthorized').
License
Distributed under the GPLv3 License. See LICENSE for more information.
Metadata
Release files for nanosip 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nanosip-0.0.7.tar.gz | 61.9 kB | Without provenance | Details for nanosip-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nanosip-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for nanosip-0.0.7-py3-none-any.whl |
Total release size: 81.2 kB
Release files / nanosip-0.0.7.tar.gz
| Download URL | nanosip-0.0.7.tar.gz |
|---|---|
| Size | 61.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fa03f6c184e411ca272b7e56808e417540feb480934619c75245dfbc0c2ed45
|
|
BLAKE2b-256 checksum How to use checksums |
6946a851433e763cee86a570ee66162f64820a5515cd276d708a43be10e2ae92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / nanosip-0.0.7-py3-none-any.whl
| Download URL | nanosip-0.0.7-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bed8fb0d538623efae05fc932f4d463666ff87061917da2a8ab8fb73be5bd827
|
|
BLAKE2b-256 checksum How to use checksums |
573254eac4349c61ae4bf4438d1cd95e3b80db2639240e2c721319dda0e92ac9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Security for nanosip 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.