-
Notifications
You must be signed in to change notification settings - Fork 1
SIP to OpenAI #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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
ConnectRTPSessionextension 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> |
Copilot
AI
Aug 10, 2025
There was a problem hiding this comment.
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').
| /// </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> |
src/Extensions/WebRTCExtensions.cs
Outdated
| /// </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> |
Copilot
AI
Aug 10, 2025
There was a problem hiding this comment.
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'.
| /// <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> |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…OpenAI.WebRTC into sip-to-openai
No description provided.