telnyx examples: temp Call Control App leaks when the process is killed; no --log-level flag

Đang mở
#650 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Souptik96 đang làm issue này rồi.

Từ ngày 27/9/2026.

  • #673 của @Souptik96 — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
developer-experience

Hướng nghiên cứu

Start with the examples' main() cleanup flow and the argparse/logging setup in voice_agent_call.py, inbound_call.py, and outbound_call.py; also read plugins/telnyx/examples/README.md and the DEBUG logging condition in stt.py. Done means SIGTERM cleanup is handled, the three examples accept the expected log-level control, and the README documents the SIGKILL limitation.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Two DX issues found while testing the telnyx examples locally (2026-09-16, main at ba2fbf1d).

1. Temp Call Control App leaks when the process is killed

The examples' --setup-telnyx flow creates a temporary Call Control App, routes the phone number to it, and restores the original routing in a finally cleanup. That cleanup runs on Ctrl-C (KeyboardInterrupt unwinds through finally) but not on SIGTERM, because default SIGTERM handling terminates the process without unwinding. pkill sends SIGTERM by default, so the common developer flow of restarting with pkill leaks resources every time:

  • The temp Call Control App stays in the account.
  • The phone number stays routed to the temp app's webhook, which now points at a dead tunnel, so inbound calls ring and die.

Verified during testing: two leaked apps (vision-agents-example-*) had to be deleted via the API and the number's connection restored manually.

Suggestion: install a SIGTERM handler in the examples' main() so cleanup runs on kill <pid>, and document the behavior in plugins/telnyx/examples/README.md. SIGKILL cannot be caught, so the README warning matters for that case.

2. Telnyx examples hardcode INFO logging and ignore the --log-level flag

voice_agent_call.py, inbound_call.py, and outbound_call.py call logging.basicConfig(level=logging.INFO) and their argparse does not accept --log-level. The Runner-based examples (for example examples/01_simple_agent_example) expose --log-level and --debug.

This matters because the telnyx STT plugin only logs received WebSocket messages at DEBUG (stt.py gates "Telnyx STT message: ..." behind logger.isEnabledFor(logging.DEBUG)). Debugging transcript issues without the flag requires wrapping the module in a runpy script that calls basicConfig(level=DEBUG) before running it.

Suggestion: accept --log-level in the three telnyx examples (or read an env var), matching the Runner examples.

Both are small. Happy to PR either if that is useful.

Ngôn ngữ chính
Go
Star
8.2k
Fork
703
Merge trung bình
6 giờ 36 phút
Pull request đã merge (30 ngày)
828

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của GetStream/Agents

Tất cả issue của GetStream/Agents

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.