AsyncIO-based Asterisk Manager Interface (AMI) client for Python
Project description
basicami
AsyncIO-based Asterisk Manager Interface (AMI) client for Python.
Companion to basicagi.
Install
pip install basicami
Usage
import asyncio
from basicami import BasicAMI
async def main():
ami = await BasicAMI.connect("localhost", 5038, "admin", "secret")
# Send any AMI action
resp = await ami.send_action({"Action": "Ping"})
print(resp)
# Originate a call
resp = await ami.originate(
channel="Local/100@from-internal",
application="Wait",
data="30",
caller_id="Test <15550099999>",
timeout=30,
)
# Collect events
events = await ami.get_events(timeout=2.0)
for event in events:
print(event)
await ami.close()
asyncio.run(main())
Marker Parsing
Includes a marker parser for Asterisk Verbose/Log markers used in PBX testing:
from basicami import parse_marker, MarkerTrace
marker = parse_marker("SBC_ENTER: 001D tenant=001D-dev-testing")
print(marker.name) # "SBC_ENTER"
print(marker.context) # "001D"
print(marker.kv) # {"tenant": "001D-dev-testing"}
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file basicami-0.1.0.tar.gz.
File metadata
- Download URL: basicami-0.1.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a33e8a2dd8e0ee58b8fc12902c25be1a146269f9ddaa570e0cf1f2a0e072f2e
|
|
| MD5 |
c8d1794ba9f360e6b9f08a87f378361a
|
|
| BLAKE2b-256 |
210e4c355e11aa58fb591c55c27ed1be3d077597aa21c8521701804aeee8666a
|
Provenance
The following attestation bundles were made for basicami-0.1.0.tar.gz:
Publisher:
ci-cd.yml on andrius/asterisk-basicami
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
basicami-0.1.0.tar.gz -
Subject digest:
6a33e8a2dd8e0ee58b8fc12902c25be1a146269f9ddaa570e0cf1f2a0e072f2e - Sigstore transparency entry: 1057514818
- Sigstore integration time:
-
Permalink:
andrius/asterisk-basicami@c8bee5d2ace9acbc00b84b594dc283ff1df7454f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/andrius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@c8bee5d2ace9acbc00b84b594dc283ff1df7454f -
Trigger Event:
release
-
Statement type:
File details
Details for the file basicami-0.1.0-py3-none-any.whl.
File metadata
- Download URL: basicami-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9247642903172e7a1fa546d21d9ae022f86637da0343524dad01e92f55144cc1
|
|
| MD5 |
f41367714b2f7eb36bb7764952325b39
|
|
| BLAKE2b-256 |
588e79635b49f06a42ac6e62ea3fb969c13704e7f19785342e3f4087463857fa
|
Provenance
The following attestation bundles were made for basicami-0.1.0-py3-none-any.whl:
Publisher:
ci-cd.yml on andrius/asterisk-basicami
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
basicami-0.1.0-py3-none-any.whl -
Subject digest:
9247642903172e7a1fa546d21d9ae022f86637da0343524dad01e92f55144cc1 - Sigstore transparency entry: 1057514821
- Sigstore integration time:
-
Permalink:
andrius/asterisk-basicami@c8bee5d2ace9acbc00b84b594dc283ff1df7454f -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/andrius
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@c8bee5d2ace9acbc00b84b594dc283ff1df7454f -
Trigger Event:
release
-
Statement type: