Runnable examples showing how to add FreJun calling to your own platform.
| Example | What it shows | Docs |
|---|---|---|
| voip-dialer-widget | Embed the Dialer Widget in an iframe and handle every postMessage event | Dialer Widget |
| voip-web-sdk | Browser softphone: register, dial, accept, mute, hold, end | Softphone Web SDK |
| voip-call-api | Trigger a VoIP call on a logged-in softphone via REST | Call-to-VoIP API |
| network-calling | Two-legged phone call via the Create Call API | Network Calling |
| Package | Used in | Purpose |
|---|---|---|
| @frejun/oauth (source) | All examples | Popup-based OAuth sign-in and automatic token refresh |
| @frejun/softphone-web-sdk | voip-web-sdk | SIP-based softphone that runs in the browser |
-
Go into the example folder and install dependencies:
cd <example> npm install
-
Create a
.envfile with your FreJun OAuth app credentials:VITE_CLIENT_ID="<your-client-id>" VITE_CLIENT_SECRET="<your-client-secret>"voip-dialer-widgetalso reads an optionalVITE_DIALER_ORIGIN(defaults tohttps://dialer.frejun.com). -
Start the dev server:
npm run dev # http://localhost:5173
Each example's own README covers the events, API fields and error cases it demonstrates.