Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

How to create a call and add stream audio programmatically?

オープン
#258 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
api, backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
69
フォーク
67
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

plivo/plivo-python のほかの issue

plivo/plivo-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。