Custom Mango Office Telephony Integration with Bitrix24
You use Mango Office and Bitrix24, but the standard app from the marketplace does not provide the flexibility you need. A typical scenario: calls don't link to the right contacts, recordings arrive with a half-hour delay, and your manager wants automated lead creation following a unified script. We solve these tasks through a bespoke connection using direct APIs. With over 10 years of experience, we've integrated 50+ telephony systems and know every nuance of Mango. Our experience shows that off-the-shelf solutions cover only 60% of business needs — the rest must be customized manually.
The problem worsens when your company has multiple offices or non-standard routing. Without a custom integration, operators spend up to 30% of their time manually redirecting calls and duplicating data. We guarantee that after setup, you'll forget about these issues.
Why Standard Integration Falls Short
The official Mango Office application (installed from Applications → Marketplace) handles basic scenarios: a pop-up card on incoming calls, linking a call to an existing or new lead. However, it does not allow:
- flexible lead routing based on line number;
- mapping employee extensions when they differ between Mango and Bitrix24;
- processing the call recording when the file arrives 10 minutes after the call ends;
- supporting multiple virtual PBXs on one portal.
This is a documented feature of the Mango VPBX API.
Mango sends events: call_start, call_answer, call_end, call_record. A key nuance — call_record arrives separately from call_end, with a delay of up to 10 minutes. You cannot attach the recording synchronously; an asynchronous queue is required. Webhooks work reliably, but without proper handling, you can easily lose calls.
Mapping connects the Mango extension to a Bitrix24 user ID. Without it, calls from new employees or after a number change hang without an assignee. We create a configuration table loaded at handler startup. If no match is found, the call is considered missed and linked to a default responsible person — this prevents lead loss.
Custom Integration Solution
Employee Mapping and Call Recording Delays
To handle extension mismatches, we build a mapping table (e.g., extension 101 → USER_ID 12). When no match exists, the call defaults to a predefined responsible person. This ensures every call is tracked.
For call recordings, we implement a Redis queue: on call_end, we save the pair mango_uuid → bitrix_call_id; on call_record, we download the file via a temporary link and call telephony.externalCall.attachRecord. The temporary link lives for 24 hours, so we always have time.
Comparison: Standard vs. Custom Approach
| Parameter | Standard App | Custom Integration |
|---|---|---|
| Rule flexibility | Fixed | Unlimited via API |
| Employee mapping | Only by number | Extended rules |
| Call recording delay | Up to 30 min | Separate call_record event, queue <10 min |
| Multiple PBXs | Not supported | Via separate endpoints |
Custom integration outperforms the standard on key parameters by 3–5 times for non-standard scenarios.
Implementation and Case Study
Step-by-Step Setup
- Register a webhook URL in your Mango account (
PBX → Settings → Notifications). - Deploy a handler that receives events and converts them into Bitrix24 REST calls using the Bitrix24 REST API.
- Create a mapping table: extension → USER_ID (e.g., 101 → 12, 102 → 8).
- Implement a queue for delayed recording attachment: on
call_endsavemango_uuid→bitrix_call_id; oncall_recorddownload the file via temporary link and calltelephony.externalCall.attachRecord. - Set up routing for multiple lines.
Case Study: Insurance Broker with Three Offices
The company had three offices in different cities, each with a separate Mango number. Requirements: a call to the Moscow number creates a lead for the Moscow manager, to Krasnodar — for the Krasnodar manager. Solution: three separate webhook URLs; each handler passes LINE_NUMBER when creating a call in Bitrix24. When a call is transferred between offices (event call_transfer), the responsible person is updated in the active call. Result: handling time reduced by 40%, repeat calls decreased by 25%. This saved an estimated $2,000 per year in operator costs.
Project Delivery and ROI
What's Included
- Audit of current PBX and CRM;
- Architecture design of the integration;
- Webhook and REST API setup;
- Employee mapping;
- Recording queue implementation;
- Testing on real calls;
- Documentation and training.
Timeline and Pricing
Estimated setup time for custom integration: 5–8 business days. Final cost depends on scenario complexity and number of lines, typically starting from $2,000. We offer a fixed price after analyzing your configuration. Contact us for an accurate estimate.
Benefits and ROI
Our custom solution reduces call handling time by 30–40% and eliminates manual lead redirection. The investment pays for itself in 2–3 months. Our experience confirms that certified developers guarantee stable operation even under high loads. Order a turnkey Mango Office integration with Bitrix24 — get a consultation today.

