Skip to main content

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_id
  • api_token
  • space_url (por defecto telerixa.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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

telerixa-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

telerixa-1.0.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file telerixa-1.0.0.tar.gz.

File metadata

  • Download URL: telerixa-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for telerixa-1.0.0.tar.gz
Algorithm Hash digest
SHA256 494013e7b91ffe4943505c54e4fc2534a47f7ffd7d0a365d5c393b1f7c668500
MD5 819c97734cee512f9f93897159bfed68
BLAKE2b-256 abc27bb22bdedd7733614a714c144c7a0bd76090dd59244d203911265da37ec4

See more details on using hashes here.

File details

Details for the file telerixa-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: telerixa-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for telerixa-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ecb3550be42068bc87545fb087baf39e33b991827f85017c708d41dc3f88ddf
MD5 5136aa8170870584be3610f3b7a241f7
BLAKE2b-256 1423dfe39ebf02c53a69993daf1b4e4109f89327e3d1fd2ae03dd2348ddc88d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page