Skip to main content
Version: v2

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.

Link to Chrome Extension

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

tip

Please refer to the complete SDK documentation on the respective npm package page.

Initiating VoIP Calls

info

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.

info

Please note that the API only supports Indian numbers as the destination number at the moment.

POST/integrations/call-to-voip/

Headers

NameValue
AuthorizationBearer Access Token
Content-Typeapplication/json

Payload

agent_id
required
string

ID of the agent to call. Refers to the user_id retrieved via retrieve user API

dstn_number
required
string

Destination number to call. Currently, only Indian numbers can be dialled.

candidate_name
string

Callee Name

virtual_number
string

Virtual Number to use (E.164 format). If not provided, the default virtual number will be used.

candidate_id
string

Custom metadata

transaction_id
string

Custom metadata

job_id
string

Custom metadata

Response

{
"success": true,
"message": "Successfully initiated the call",
"data": "callId123"
}