Integration of Bitrix24 with UIS (CoMagic)
UIS (CoMagic) is a telephony and call tracking platform. Connection to Bitrix24 gives the sales team a single window: calls, call recordings, source analytics — all within CRM. We set up the integration so that each call becomes a CRM entity with correct source attribution.
Two Approaches to Connection
| Parameter | SIP Connector Bitrix24 | REST API (Custom Integration) |
|---|---|---|
| Setup complexity | Low — standard B24 interface | Medium — requires development |
| Incoming calls | Via UIS SIP trunk | Via telephony.externalcall.register method |
| Outgoing calls | Click-to-call via softphone | Click-to-call via UIS callback API |
| Call recording | Download via link from UIS | telephony.externalcall.attachRecord |
| Call tracking | Not supported | Full transmission of utm-tags and source |
| Client card | Appears automatically | Appears + additional fields |
For basic scenarios, the SIP connector is sufficient. If you need call tracking and extended analytics — REST API.
Incoming Calls
When an incoming call arrives, Bitrix24 should:
- Determine the caller's number via ANI.
- Find a contact or company in CRM by phone number.
- Show the client card to the manager before taking the call.
- Create a call record in the CRM entity timeline.
Via SIP connector, this works out of the box with proper SIP account setup. Via REST API — a webhook from UIS calls telephony.externalcall.register with parameters PHONE_NUMBER, USER_ID, TYPE=1 (incoming). Bitrix24 raises the card automatically.
Outgoing Calls
A manager clicks on a number in the CRM card. Next, two options:
- SIP connector. The call goes through the Bitrix24 softphone directly to the UIS SIP trunk.
- REST API + callback. Bitrix24 sends a request to UIS via callback API — the PBX calls the manager first, then the client. The manager takes the call — the call connects.
The second option is more convenient for call centers: no softphone needed, the call comes to a regular work phone.
Call Recording
UIS stores call recordings on its servers. Options for uploading to B24:
-
Direct link. The
telephony.externalcall.attachRecordmethod accepts a recording file URL. Bitrix24 downloads and attaches it to the call in the timeline. -
File upload. If UIS returns a file via API, an intermediate script downloads the MP3 and uploads it to B24 via
disk.folder.uploadfile, then attaches it to the call.
Recordings are available in the contact card, deal, and in the general call report.
Call Tracking and Lead Attribution
The key value of the UIS + Bitrix24 link is understanding where the call came from. CoMagic substitutes numbers on the website: each visitor sees a unique number tied to their session. When a client calls, UIS knows:
- Traffic source — Google Ads, Yandex.Direct, SEO, direct visit
- UTM tags — campaign, medium, source, content, term
- Landing page and call page
- Keyword (when integrated with ad platforms)
This data is transmitted to Bitrix24 when creating a lead or call. Scheme:
- A visitor arrives on the site. CoMagic assigns a session and substitutes the number.
- The visitor calls. UIS records the call with session binding.
- A webhook from UIS sends data to Bitrix24: caller's number + source + utm-tags.
- The webhook handler creates a lead in CRM via
crm.lead.addwith filled fieldsUTM_SOURCE,UTM_MEDIUM,UTM_CAMPAIGNand custom field "Call source". - If the contact already exists — the call is attached to the existing entity, utm-tags are recorded in notes.
For correct operation, custom fields in CRM must be created in advance. We create:
-
UF_CRM_CALL_SOURCE(string) — source name from CoMagic -
UF_CRM_CALL_KEYWORD(string) — keyword -
UF_CRM_CALL_LANDING(string) — landing page URL
Call Reports
Bitrix24 generates built-in reports: call count by managers, missed calls, duration. For extended analytics considering sources, we use:
- Lists or smart processes — aggregation of call tracking data into a separate entity for building reports in B24's BI constructor.
-
Export to Google Sheets / Power BI — via REST API
crm.lead.listwith filter by UTM fields.
What We Set Up During Implementation
- Connecting UIS SIP trunk or registering a server application for REST API
- Incoming call routing: distribution by departments, queues, IVR (on UIS side)
- Mapping internal UIS numbers → Bitrix24 users
- Lead creation logic: new lead on each call or only if contact doesn't exist
- Transmission of call tracking data and setup of custom CRM fields
- Connecting call recording with storage in B24 or via link
- Testing: incoming, outgoing, missed, repeat call from existing client







