How to create a call and add stream audio programmatically?
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
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:
- Create a call
- 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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de plivo/plivo-python
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
plivo/plivo-python#298 · 1 comentario · 2 reacciones ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
plivo/plivo-python#295 · 3 comentarios · 1 reacción ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
plivo/plivo-python#290 · 1 comentario ·
-
Error while number setupAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
plivo/plivo-python#289 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
plivo/plivo-python#286 ·
Todos los issues de plivo/plivo-python
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Deepak3699/Ai_Mentor#244 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
btclib-org/btclib-node#1880 ·
Los mantenedores suelen responder en 1 día
-
CONTRIBUTING.md: say how ticketless bug fixes and feature PRs are handledPosiblemente ocupada @khuisman la tomó hoy. Abiertov0.9.2
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
khuisman/mcp-gee-sweet#941 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
pyjanitor-devs/pyjanitor#1758 ·
Los mantenedores suelen responder en 1 día
-
bug ready for review
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
odysseus-dev/odysseus#6641 ·
Los mantenedores suelen responder en 1 día