Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

How to create a call and add stream audio programmatically?

Abierto
#258 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
api, backend

Línea de trabajo

Start with the calls.create and calls.start_stream usage shown in the issue, then trace the /plivo_callback handler and its CallUUID and request handling. Done means the documentation includes a working programmatic call-and-stream example and explains how to avoid the reported “Stream consumed” failure.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Hi,

I'm looking for an example to:

  1. Create a call
  2. Stream audio

From the docs, it seems plivo takes in an answer_url to create a call and for creating a stream I need call_uuid. But since I'm already creating a call, I'm not getting any call_uuid. Below is what I've tried as of now:

async def make_call():
    plivo_client = plivo.RestClient('auth_id', 'auth_token')
    response = plivo_client.calls.create(
        from_='from_number',
        to_='to_number',
        answer_url=f"{app_callback_url}/plivo_callback?ws_url={websocket_url}",
        answer_method='POST')


@app.post('/plivo_callback')
async plivo_callback(request: Request, ws_url: str, CallUUID: str):
    websocket_plivo_route = f'{ws_url}/ws/'
    response = plivo_client.calls.start_stream(call_uuid=CallUUID,
                                         service_url=websocket_plivo_route, bidirectional=True)

I have a server running and listening to /ws/ websocket endpoint.

The initial call get created with the response:

{'api_id': '34e56af1-739d-4b54-9861-613a2db7546d',
 'message': 'call queued',
 'request_uuid': '1b08512d-3fff-4b4d-ada2-c956cdaa70b1'}

And I get Exception occurred in plivo_callback: Stream consumed as the exception and the call gets disconnected shortly.

Lenguaje dominante
Python
Estrellas
69
Forks
68
Merge medio
2 d 5 h
PR fusionados (30 d)
1

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de plivo/plivo-python

Todos los issues de plivo/plivo-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.