Skip to content

Conversation

@sipsorcery
Copy link
Member

No description provided.

@sipsorcery sipsorcery requested a review from Copilot August 10, 2025 20:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds SIP (Session Initiation Protocol) support to the OpenAI WebRTC library, enabling SIP calls to be bridged to OpenAI's real-time API. The implementation introduces the capability to route audio from SIP callers to OpenAI and responses back to the caller, creating a voice gateway for phone-based conversations with OpenAI.

Key changes:

  • Added ConnectRTPSession extension method to bridge RTP sessions with WebRTC endpoints
  • Created a complete SIP-to-OpenAI example application with call management and transcription logging
  • Updated documentation to include the new SIP gateway functionality

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/Extensions/WebRTCExtensions.cs Adds RTP session connection methods and fixes a typo in existing documentation
examples/GetStartedSIP/README.md Comprehensive documentation for the SIP gateway example with setup and usage instructions
examples/GetStartedSIP/Program.cs Complete SIP server implementation that bridges calls to OpenAI WebRTC
examples/GetStartedSIP/GetStartedSIP.csproj Project configuration for the SIP example application
examples/SIPSorcery.OpenAI.WebRTC.Examples.sln Solution file updated to include the new SIP example project
README.md Main documentation updated to reference the new SIP gateway example

/// <summary>
/// Connects an RTPSession to a WebRTC end point. The standard use case is to connect the audio packets from an RTP session established by a SIP call
/// to an OpenAI We.
/// </summary>
Copy link

Copilot AI Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation comment is incomplete. 'We.' should be completed to describe what OpenAI component this connects to (e.g., 'WebRTC endpoint').

Suggested change
/// </summary>
/// <summary>
/// Connects an RTPSession to a WebRTC end point. The standard use case is to connect the audio packets from an RTP session established by a SIP call
/// to an OpenAI WebRTC endpoint.
/// </summary>

Copilot uses AI. Check for mistakes.
/// </summary>
/// <param name="webRTCEndPoint">The WebRTC end point to connect.</param>
/// <param name="rtpSession">The RTPSession to connect.</param>
/// <param name="audioFormat">THe audio format being used for both audio streams.</param>
Copy link

Copilot AI Aug 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in parameter documentation: 'THe' should be 'The'.

Suggested change
/// <param name="audioFormat">THe audio format being used for both audio streams.</param>
/// <param name="audioFormat">The audio format being used for both audio streams.</param>

Copilot uses AI. Check for mistakes.
@sipsorcery sipsorcery merged commit c17b8f1 into main Aug 10, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants