A
A
Anna S.2021-02-23 20:26:54
JavaScript
Anna S., 2021-02-23 20:26:54

How to subscribe to the CallCard::CallStateChanged event in Bitrix24?

Good evening!
There is a server application for Bitrix24, written mainly in js.
The task is to send certain data when the call card is closed (end of the conversation) from the client side. The application is built into the call card in the frame.
I studied the instructions and the manual on the Bitrix website, talked with the B24 TP, but could not get any result from the
BX24.placement.bindEvent("CallCard::CallStateChanged", function (callState) {
console.log('State call');
console.log(callState);
});
I tried to embed in BX24.init(function() {}, outside it, inside the function BX24.placement.getInterface(function (q) {}.
At the same time, the standard methods BX24.placement.disableAutoClose();, BX24.placement.call('getStatus', {}, function (result) { console.log(result);}); work out inside BX24.init and outside without problems.
The installation file of the application itself is separate, but I tried to subscribe to an event inside the working file that works with the user, fields, entities, and so on.
What am I doing wrong and how do I subscribe to call state change events?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question