VoIP (Internet-based calls)
FreJun allows you to make/receive VoIP calls directly from your application. These calls are facilitated through softphones, eliminating the need for physical phones.
You can integrate VoIP calls into your application using the following methods.
Chrome Extension
This is the simplest way to make/receive VoIP calls from your application. Once installed and authorized, the extension will add a call button next to any phone numbers that it sees on your application's web page.
Dialer Widget
FreJun's Dialer Widget allows more fine-grained control over the calling experience.
It needs to be embedded into your web page using an <iframe> and communicates with your application using JavaScript messages.
Softphone SDK (JavaScript)
For the best user experience, FreJun's Softphone SDK can be used to natively add calling capabilities in your application.
The SDK is available at https://www.npmjs.com/package/@frejun/softphone-web-sdk
Softphone SDK (React Native)
For mobile applications built using React Native, FreJun provides a Softphone SDK that can be integrated to enable VoIP calling capabilities.
The SDK is available at https://www.npmjs.com/package/react-native-softphone-sdk
Please refer to the complete SDK documentation on the respective npm package page.
Initiating VoIP Calls
BASE_URL for this API is https://api.frejun.com/api/v1.
When a call is initiated using this API, the call first goes to the destination number. Once the call is picked by the callee, it reaches the caller. The caller (a FreJun user who initiated the call) must be logged in on any of the softphones (e.g., FreJun chrome extension, SDK, iFrame, etc.). Once the caller receives the call on the softphone, it can be accepted or declined like a normal call.
Please note that the API only supports Indian numbers as the destination number at the moment.
POST /integrations/call-to-voip/
Headers
| Name | Value |
|---|---|
| Authorization | Bearer Access Token |
| Content-Type | application/json |
Payload
Response
{
"success": true,
"message": "Successfully initiated the call",
"data": "callId123"
}