Telerixa SDK
Cliente Python para la API de voz de Telerixa, compatible con SignalWire y Twilio.
Instalación
pip install telerixa
Credenciales
Las obtienes desde el dashboard en telerixa.com:
project_idapi_tokenspace_url(por defectotelerixa.com)
Uso
from telerixa import Client
client = Client(project_id, api_token)
call = client.calls.create(
to="+15551234567",
from_="+15557654321",
url="https://mi-backend.com/laml",
)
print(call.sid, call.status)
Migrar desde SignalWire
El parámetro signalwire_space_url se sigue aceptando, así que basta con cambiar el import:
# Antes
from signalwire.rest import Client
client = Client(project_id, api_token, signalwire_space_url="mi-space.signalwire.com")
# Después
from telerixa import Client
client = Client(project_id, api_token, signalwire_space_url="telerixa.com")
El resto del código no cambia.
Grabación y detección de contestador
call = client.calls.create(
to="+15551234567",
from_="+15557654321",
url="https://mi-backend.com/laml",
record=True,
recording_status_callback="https://mi-backend.com/grabacion",
machine_detection="Enable",
status_callback="https://mi-backend.com/estado",
status_callback_event=["initiated", "ringing", "answered", "completed"],
)
call.answered_by devuelve human, machine_start o unknown.
Consultar y modificar llamadas
# Listar
for c in client.calls.list(status="completed", limit=20):
print(c.sid, c.duration)
# Consultar una
call = client.calls("CALL_SID").fetch()
# Colgar
client.calls("CALL_SID").update(status="completed")
Espacio propio
Si tu cuenta usa un subdominio:
client = Client(project_id, api_token, space_url="mi-space.telerixa.com")
Licencia
MIT
Metadata
Release files for telerixa 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| telerixa-1.0.0.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| telerixa-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / telerixa-1.0.0.tar.gz
| Download URL | telerixa-1.0.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
494013e7b91ffe4943505c54e4fc2534a47f7ffd7d0a365d5c393b1f7c668500
|
|
BLAKE2b-256 checksum How to use checksums |
abc27bb22bdedd7733614a714c144c7a0bd76090dd59244d203911265da37ec4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Release files / telerixa-1.0.0-py3-none-any.whl
| Download URL | telerixa-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ecb3550be42068bc87545fb087baf39e33b991827f85017c708d41dc3f88ddf
|
|
BLAKE2b-256 checksum How to use checksums |
1423dfe39ebf02c53a69993daf1b4e4109f89327e3d1fd2ae03dd2348ddc88d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|