FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
realtime

realtime

hello-realtime

Remix of stevekrouse/hello-realtime
Public
Like
hello-realtime
Home
Code
4
frontend
1
routes
4
README.md
H
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
2
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
main.tsx
https://realtime--0199195dfef972e2a73784842d58febc.web.val.run
README.md

hello-realtime

Hello Realtime is a OpenAI Realtime app that supports both WebRTC and SIP (telephone) users. You can access the app via WebRTC at https://hello-realtime.val.run, or via SIP by calling 425-800-0042.

This demo shows off the new SIP API, the new all-in-one WebRTC API, and the new server-side websocket interface.

If you remix the app, you'll just need to pop in your own OPENAI_API_KEY (from platform.openai.com), and if you want SIP, the OPENAI_SIGNING_SECRET.

Architecture

  1. WebRTC Flow: Browser connects to frontend → creates WebRTC offer → /rtc endpoint handles SDP negotiation with OpenAI → observer monitors session
  2. SIP Flow: Phone calls trigger webhook → /sip endpoint verifies and accepts call → observer monitors session
  3. Monitoring: Observer establishes WebSocket connection to OpenAI for real-time session logging

Files

  • frontend/index.html - Web interface with WebRTC client, audio handling, and real-time connection status
  • main.tsx - Main Hono application entry point that sets up routing and serves the frontend
  • routes/observer.ts - WebSocket observer that connects to OpenAI's realtime API for session monitoring and logging
  • routes/rtc.ts - WebRTC endpoint that handles SDP offer/answer negotiation with OpenAI's realtime API
  • routes/sip.ts - SIP webhook endpoint that verifies and accepts incoming phone calls via OpenAI's telephony integration
  • routes/utils.ts - Shared utilities including OpenAI API configuration, session setup, and voice agent instructions
HTTP
  • main.tsx
    realtime--01…bc.web.val.run
Code
frontendroutesREADME.md
H
main.tsx
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.