siphon-control (Python)
Python client for the SIPhon
external control plane (siphon-control.v1) — an ARI/ESL-class rail for driving
handed-over calls out of process. Built with PyO3 over the
async Rust client, so the wire is hidden: no manual JSON, no request-id
bookkeeping.
Two connection modes
The plane runs in one of two modes; both are exposed here and share the SAME
@on_call decorator and the SAME Call handle — only the transport differs.
- Inbound-persistent (
ControlClient) — the app dials siphon and holds one long-lived socket (does thehellohandshake). Simplest to reason about; use it for development and single-process controllers. - Per-call-connect (
ControlServer) — siphon dials the app per handed-over call, so the app is a WebSocket server. Each accepted connection owns exactly one call and the first frame is a pushedStasisStart(nohello). This is the documented production default for multi-pod controllers: because the accepting socket is the call, "the audio lands on the wrong pod" can't happen.
Inbound-persistent
import asyncio
from siphon_control import ControlClient, ControlError
client = ControlClient(app="ivr-app", token="s3cr3t",
url="ws://siphon:9090/control/ws")
@client.on_call
async def handle(call):
await call.answer()
try:
await call.transfer("sip:agent@pbx") # REFER, awaits correlated reply
except ControlError as error:
print("transfer rejected:", error.code)
asyncio.run(client.run())
Per-call-connect
import asyncio
from siphon_control import ControlServer, ControlError
server = ControlServer(app="ivr-app", token="s3cr3t", bind="0.0.0.0:8790")
@server.on_call
async def handle(call):
await call.answer()
try:
await call.transfer("sip:agent@pbx")
except ControlError as error:
print("transfer rejected:", error.code)
asyncio.run(server.serve())
API
ControlClient (inbound-persistent)
ControlClient(app, token, url=…, protocol=1, reply_timeout_ms=…, reconnect_backoff_ms=…)@client.on_call— register an async (or sync) per-call handler.await client.connect()/await client.run()— connect / drive (reconnect + resync).await client.command(verb, module=None, target=None, args=None)— the generic{module, verb, target, args}primitive for any adapter (SIP today; SMPP/SS7 later).await client.describe()— adapter schema.client.shutdown()— stop the client and unblockrun().
ControlServer (per-call-connect)
ControlServer(app, token, bind="0.0.0.0:8790", reply_timeout_ms=…)—bindis the address the app listens on for siphon to dial; the token is validated on the incoming upgrade.@server.on_call— the SAME decorator +Callhandle asControlClient.await server.bind()— bind the listener; resolves to the bound address string (bind to…:0to learn the ephemeral port before siphon dials in).server.local_addr— the bound address oncebind()/serve()has run, elseNone.await server.serve()/await server.run()— accept siphon's per-call dials forever (stop by cancelling the task).
Call (shared by both modes)
Callverbs:answer(),answer_with(code, …),progress(),reject(code, reason),hangup(reason=None),refer(to)/transfer(to),set_header(name, value),get_header(name),set_var(key, value),get_var(key),command(verb, args=None),next_event().- Media verbs
play_file(file)/dtmf(digits)raiseControlErrorwithcode == "unsupported_verb"until the server implements media.
Errors
A rejected command raises ControlError carrying a stable .code
(not_found, forbidden, unsupported_verb, unauthorized, …).
Build
maturin develop # into the active venv
maturin build --release
The target interpreter is free-threaded CPython 3.14t (the SIPhon runtime); the wheel also loads on a standard GIL build.
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 siphon_control-0.1.2.tar.gz.
File metadata
- Download URL: siphon_control-0.1.2.tar.gz
- Upload date:
- Size: 59.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43d99a674bcf371eecb10017e31ba75ca46a07a0c6d24ab89fc6f1c20b6dc8ff
|
|
| MD5 |
abb92331396df47c9678ae24ad0e996f
|
|
| BLAKE2b-256 |
a3b6dbef310d9d558e95fb6983d67367c16034f3fa33ee9ca346f6ee9d02b54c
|
Provenance
The following attestation bundles were made for siphon_control-0.1.2.tar.gz:
Publisher:
release-control-sdk.yaml on siphon-project/siphon-sip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
siphon_control-0.1.2.tar.gz -
Subject digest:
43d99a674bcf371eecb10017e31ba75ca46a07a0c6d24ab89fc6f1c20b6dc8ff - Sigstore transparency entry: 2530531859
- Sigstore integration time:
-
Permalink:
siphon-project/siphon-sip@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Branch / Tag:
refs/tags/control-sdk-v0.1.2 - Owner: https://github.com/siphon-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-control-sdk.yaml@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file siphon_control-0.1.2-cp314-cp314t-win_amd64.whl.
File metadata
- Download URL: siphon_control-0.1.2-cp314-cp314t-win_amd64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.14t, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c034b5ba25f055d54f7644c510cefc05a09943452e9ff979ba3e8d9766c2b3f
|
|
| MD5 |
a323e648816abda12a471437df229113
|
|
| BLAKE2b-256 |
6c49a90f3753d2e6ce654f5407d81d575efc883c6bfcae8968574370d47e8d34
|
Provenance
The following attestation bundles were made for siphon_control-0.1.2-cp314-cp314t-win_amd64.whl:
Publisher:
release-control-sdk.yaml on siphon-project/siphon-sip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
siphon_control-0.1.2-cp314-cp314t-win_amd64.whl -
Subject digest:
4c034b5ba25f055d54f7644c510cefc05a09943452e9ff979ba3e8d9766c2b3f - Sigstore transparency entry: 2530533525
- Sigstore integration time:
-
Permalink:
siphon-project/siphon-sip@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Branch / Tag:
refs/tags/control-sdk-v0.1.2 - Owner: https://github.com/siphon-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-control-sdk.yaml@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file siphon_control-0.1.2-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: siphon_control-0.1.2-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.14t, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f685a14a08003e2f7a7e2b277b21aed902c5516d3e4afd92be7af9a79891261c
|
|
| MD5 |
a33a01f2a0d85bfac579680622b9633c
|
|
| BLAKE2b-256 |
76751f458d5244e1702ffbeff289c89c6862de50d3cfe6b822b5bdf03fdf9010
|
Provenance
The following attestation bundles were made for siphon_control-0.1.2-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release-control-sdk.yaml on siphon-project/siphon-sip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
siphon_control-0.1.2-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
f685a14a08003e2f7a7e2b277b21aed902c5516d3e4afd92be7af9a79891261c - Sigstore transparency entry: 2530534782
- Sigstore integration time:
-
Permalink:
siphon-project/siphon-sip@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Branch / Tag:
refs/tags/control-sdk-v0.1.2 - Owner: https://github.com/siphon-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-control-sdk.yaml@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file siphon_control-0.1.2-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: siphon_control-0.1.2-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.14t, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f08094c3801951097ca94fabc3c72b9de4dc12abcbeca325a47b64dc3335c337
|
|
| MD5 |
765b68b1ae062898a8f6a58e252c0053
|
|
| BLAKE2b-256 |
7cfeefc9cd5626bed62dd54a02db7a0fdc468718a3d36c9037fa907800db8a8a
|
Provenance
The following attestation bundles were made for siphon_control-0.1.2-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release-control-sdk.yaml on siphon-project/siphon-sip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
siphon_control-0.1.2-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
f08094c3801951097ca94fabc3c72b9de4dc12abcbeca325a47b64dc3335c337 - Sigstore transparency entry: 2530532731
- Sigstore integration time:
-
Permalink:
siphon-project/siphon-sip@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Branch / Tag:
refs/tags/control-sdk-v0.1.2 - Owner: https://github.com/siphon-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-control-sdk.yaml@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file siphon_control-0.1.2-cp314-cp314t-macosx_11_0_arm64.whl.
File metadata
- Download URL: siphon_control-0.1.2-cp314-cp314t-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.14t, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03d319eff7ae199e0ac69dc77650c22ca3c2a8ab86eeb9172880bbd548a7ce75
|
|
| MD5 |
d8e871849636fb9858283bca733dcf69
|
|
| BLAKE2b-256 |
5d0f4e076250d3ff13f2a52c3ef0556b0632ebdfe20bef64216422f0975663c3
|
Provenance
The following attestation bundles were made for siphon_control-0.1.2-cp314-cp314t-macosx_11_0_arm64.whl:
Publisher:
release-control-sdk.yaml on siphon-project/siphon-sip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
siphon_control-0.1.2-cp314-cp314t-macosx_11_0_arm64.whl -
Subject digest:
03d319eff7ae199e0ac69dc77650c22ca3c2a8ab86eeb9172880bbd548a7ce75 - Sigstore transparency entry: 2530533191
- Sigstore integration time:
-
Permalink:
siphon-project/siphon-sip@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Branch / Tag:
refs/tags/control-sdk-v0.1.2 - Owner: https://github.com/siphon-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-control-sdk.yaml@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file siphon_control-0.1.2-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: siphon_control-0.1.2-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ebc84b5fe07cf8c1e1acff71d65d1d8c77e2d38b0f2e5b31d4e4c3a049a59d0c
|
|
| MD5 |
5e3e949c64fd21783ded2a687024a9c9
|
|
| BLAKE2b-256 |
4034a3c523caa94f00353d446142a0772bb1a1fccacb9f09734c680aea06528b
|
Provenance
The following attestation bundles were made for siphon_control-0.1.2-cp314-cp314-win_amd64.whl:
Publisher:
release-control-sdk.yaml on siphon-project/siphon-sip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
siphon_control-0.1.2-cp314-cp314-win_amd64.whl -
Subject digest:
ebc84b5fe07cf8c1e1acff71d65d1d8c77e2d38b0f2e5b31d4e4c3a049a59d0c - Sigstore transparency entry: 2530533768
- Sigstore integration time:
-
Permalink:
siphon-project/siphon-sip@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Branch / Tag:
refs/tags/control-sdk-v0.1.2 - Owner: https://github.com/siphon-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-control-sdk.yaml@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file siphon_control-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: siphon_control-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.14, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a41f28586e359ba09410c4e9faecd405659a846c6cbc264afb384acc05aaece2
|
|
| MD5 |
dc3279674a390d6499f69cc85624b308
|
|
| BLAKE2b-256 |
92e904a5460107aa2466e07fd3e417b70a1778c75f8576d97645f2168aa70523
|
Provenance
The following attestation bundles were made for siphon_control-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release-control-sdk.yaml on siphon-project/siphon-sip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
siphon_control-0.1.2-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
a41f28586e359ba09410c4e9faecd405659a846c6cbc264afb384acc05aaece2 - Sigstore transparency entry: 2530532435
- Sigstore integration time:
-
Permalink:
siphon-project/siphon-sip@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Branch / Tag:
refs/tags/control-sdk-v0.1.2 - Owner: https://github.com/siphon-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-control-sdk.yaml@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file siphon_control-0.1.2-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: siphon_control-0.1.2-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.0 MB
- Tags: CPython 3.14, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24e791fae7c1de9e74420b180f0ba455954d8494d14064362589a42efc191309
|
|
| MD5 |
d4319a56b2b60b97d711d43bf04c2021
|
|
| BLAKE2b-256 |
db1b49dc1dcc2e31ecaec1a26908c9cddf1dd765f8611a603d71766132e7f811
|
Provenance
The following attestation bundles were made for siphon_control-0.1.2-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release-control-sdk.yaml on siphon-project/siphon-sip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
siphon_control-0.1.2-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
24e791fae7c1de9e74420b180f0ba455954d8494d14064362589a42efc191309 - Sigstore transparency entry: 2530532111
- Sigstore integration time:
-
Permalink:
siphon-project/siphon-sip@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Branch / Tag:
refs/tags/control-sdk-v0.1.2 - Owner: https://github.com/siphon-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-control-sdk.yaml@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file siphon_control-0.1.2-cp314-cp314-macosx_11_0_arm64.whl.
File metadata
- Download URL: siphon_control-0.1.2-cp314-cp314-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.14, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ea52afed942adfdf756ceb48647514e83f93bc2611ce46c25c6f708ca50869b
|
|
| MD5 |
957dea5f6d4285a729f5f81b50430762
|
|
| BLAKE2b-256 |
0a24b1b00bd631342029f9a1d22b862ca3c33ea15740587d5a949a548ba2165a
|
Provenance
The following attestation bundles were made for siphon_control-0.1.2-cp314-cp314-macosx_11_0_arm64.whl:
Publisher:
release-control-sdk.yaml on siphon-project/siphon-sip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
siphon_control-0.1.2-cp314-cp314-macosx_11_0_arm64.whl -
Subject digest:
1ea52afed942adfdf756ceb48647514e83f93bc2611ce46c25c6f708ca50869b - Sigstore transparency entry: 2530534272
- Sigstore integration time:
-
Permalink:
siphon-project/siphon-sip@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Branch / Tag:
refs/tags/control-sdk-v0.1.2 - Owner: https://github.com/siphon-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-control-sdk.yaml@f8fb3187b2d49843ddb6e0972fb3f561ebbe91a8 -
Trigger Event:
push
-
Statement type: