Uspacy Knowledge Base
All materialsTelephony

Telephonies PBX, Asterisk and FreePBX

Telephonies PBX, Asterisk and FreePBX

We'll tell how to integrate software-based PBX telephony, using PBX, Asterisk, or FreePBX with CRM and work with calls directly in the Space

Make incoming and outgoing calls within your CRM by connecting well-known platforms for implementing PBX, Asterisk, or FreePBX.

It allows you to set up communication and, as a result, significantly improve the quality of service, thereby boosting client loyalty.

At Uspacy, telephony works through integrations with specialized services. In the Marketplace section, you’ll find free apps that, once installed and configured, will allow you to seamlessly call clients or receive calls from them.

AD_4nXfRONPVptdsWsuXy9ht2qb-TCalcHiGQi3755CBcnl6CN21NTYnMqMtp5ReDvq8wdJW2kcsej8LuclquvSg7xOeHzkP2qCdMlYwLzyiANmH4hrnkr0w4k7vuqlQ22l0AHBe6qjd

For the successful operation of PBX, Asterisk, or FreePBX, you need to perform initial configurations on both sides: telephony and Uspacy.

☝🏻Before proceeding with the step-by-step telephony service and Uspacy setup, a few preparatory actions need to be taken.

More details below ⬇️

Preparatory actions

First, install the free app for the PBX, Asterisk, or FreePBX platform that you’re using, for your Space.

To do this, go to the Marketplace section and click the Get button.

AD_4nXeHh4XoZo3Mw6F-UEF9PPf2mDCgyGxgBZjkE8R63aw3wD5Y_31y2VZoOmFeFYToRv2oG5haHS5FKRXvsYMt36rD4YULVkvLM9cwglf1C94zgFKLUb1ho4xZ-bxvDzdCttDunC49NQ

Once the app is installed, the integration data required for use on the PBX, Asterisk, or FreePBX platform will become available. So, open its settings.

AD_4nXc7IsDXVo9KR-waicZLvu-T2SnQYOdVN0QRazOBOam-WMin7Du8NJoSTt2nf4TSdQ-aO-CxQu6zsZZaKKRKw8CjgB1f0EIIBLp4Bx-tRnGLQ8A9H-kPeECjwTX6Y7a5woGxolhV9w

Here, you’ll need the field: Webhook. This is required during the integration setup on the PBX, Asterisk, or FreePBX platform. Therefore, copy its value.

AD_4nXf8zPeZGQ32b3dFKlT5txtiQCPadfad3bTBnn3uHb8iuW7krRaap96_P21uS4SfSqU6WlRHnacgN-s-0JvjX-NC2gE67t-UlwAj83MjSVHWboCwNCgjGbZHBiZXsnhmP5vCMbr2

PBX, Asterisk, or FreePBX settings

Uspacy receives call data from telephony. Therefore, it is necessary to configure the transmission of this information for the integration.

Call event requests should be in the following format:

Method: POST

Format: JSON

In the table below, you can familiarize yourself with the description of the parameters.

AD_4nXdUBvTmUvvbfhW9sTUzzfv8U8HQHaPXeb-xUuoR-KQeFmPulEXf_kUucggtvG2FI0wew0sH1kgw2wkOVpTGSOtVdrpvb7WglzjHQ16_AwYDjUct_iMfcZJu6ck6CO6EaoXiiGWdGw

The structure of the request body could look like this (example of a call start event):

{

"action": "call",

"call": {

"id": "1233123",

"direction": "outgoing",

"to": "380730000001",

"from": "333",

"state": "started"

}

}

Examples of integration scenarios

1. Outgoing Call:

1.1 Call initialization:

If you have added a call initialization URL in the integration settings, when you click on the phone number in the CRM card, the following request will be sent to the telephony system via this link:

{

"caller": "operator", // internal line number of the manager who initiated the call

"destination_number": "380670000132" // client's phone number

}

1.2 Call start event:

After the call starts, the telephony system should send the following request to the link provided in the Uspacy webhook field in the integration settings:

{

"action": "call",

"call": {

"id": "call_outgoing_1",

"direction": "outgoing",

"from": "operator",

"to": "380670000132",

"state": "started"

}

}

1.3 Call end event:

Once the call ends, the following request will be sent:

{

"action": "call",

"call": {

"id": "call_outgoing_1",

"direction": "outgoing",

"from": "operator",

"to": "380670000132",

"state": "completed",

"duration": 154,

"audio_url": "https://…."

}

}

2. Incoming Call:

2.1 Call start event:

{

"action": "call",

"call": {

"id": "call_incoming_1",

"direction": "incoming",

"from": "380670000132",

"to": "operator",

"state": "started"

}

}

2.2 Call transfer event to another operator:

{

"action": "call",

"call": {

"id": "call_incoming_1",

"direction": "incoming",

"from": "380670000132",

"to": "operator_2",

"state": "transferred"

}

}

2.3 Operator answers the call:

{

"action": "call",

"call": {

"id": "call_incoming_1",

"direction": "incoming",

"from": "380670000132",

"to": "operator_2",

"state": "answered"

}

}

2.4 Call end event:

{

"action": "call",

"call": {

"id": "call_incoming_1",

"direction": "outgoing",

"from": "380670000132",

"to": "operator_2",

"state": "completed",

"duration": 154,

"audio_url": "https://…."

}

}

3. Event to retrieve information about a number:

{

"action": "route",

"route": "380670000132"

}

In response, you will receive the following:

{

"inner_number": "operator_2", // SIP number of the responsible operator

"entity": {

"type": "leads",

"owner_id": 75,

"title": "Lead: 380670000132",

"link": "https://{domain}/crm/leads/1138/?type=lead"

}

}

Uspacy settings

Once the additional application settings for integration with PBX, Asterisk, or FreePBX platforms are complete, you will be able to call clients or receive calls from them.

Working with telephony

☎️ After completing these steps, you can start working with telephony directly in Uspacy – always stay connected with your current and potential clients.

AD_4nXcbnosUOwnNjifEulq96cX6VICrA5mo5SynnP6mYl4vSM3xwC2vPmR055Ek0W8xhg19WxlwTJAjdcRnqzjST7lKFsJ8QmYJUiypHNMgLifUp2xayuBS0FQBLCwWWunQoKQ2mBisvg

☎️ All calls (incoming, outgoing, and missed) will be saved in the history and will appear on the Call log page.

🌟 This feature is available only on commercial plans.

On the call log page, you can immediately process calls, for example, listen to call recordings or go to the CRM card of the related entity.

AD_4nXdF3GLXoUqBepQxVhMzQuNvenZ4aAl_6d6fLCwrldRTaNvOWGybN2rcSfBIWoyqdyWcB5TjVxfj21lXnqcIb3NxhuCeJ9mbq3WkLVliMS-aIzXG25nD7yYp2IKaqsZHazN4fblV

πŸ™ŒπŸ» Please note that call recordings usually appear with a delay of 10-15 minutes. If the call was long, the delay may be a bit longer. Call recordings will also be available in the CRM card, on the right side, under the activities filter, where the interaction history with the element is displayed.

If you have additional questions or you need to contact the support, send a request to this email [email protected]

Created: March 26, 2025 / Updated: February 13, 2026