Call Status Change Event CallCard::CallStateChanged

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

Scope: telephony

Who can subscribe: any user

The event CallCard::CallStateChanged is triggered when the status of the current call changes.

The event operates within the context of the application in the CALL_CARD placement.

What the handler receives

Data is passed to the callback BX24.placement.bindEvent

callback(
            "idle",
            {
                "failedCode": "486"
            }
        );
        

Event handler parameters

Required parameters are marked with *

Parameter
type

Description

callState*
string

The current state of the call.

Possible values:

  • idle — no connection
  • connecting — connection is being established
  • connected — connection established

additionalParams
object

Additional data (detailed description)

Parameter additionalParams

Parameter
type

Description

failedCode
string

Call termination code. Passed only on unsuccessful termination when callState = idle

Subscription parameters for the event

Required parameters are marked with *

Name
type

Description

PLACEMENT*
string

The name of the interface event.

For this event — CallCard::CallStateChanged

HANDLER*
string

URL of the event handler for calling placement.bindEvent

Code examples

How to Use Examples in Documentation

curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"PLACEMENT":"CallCard::CallStateChanged","HANDLER":"**your_handler_url_here**"}' \
        "https://**put_your_bitrix24_address**/rest/placement.bindEvent?auth=**put_access_token_here**"
        
BX24.placement.bindEvent('CallCard::CallStateChanged', function (callState, additionalParams) {
            console.log(callState, additionalParams);
        });
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'placement.bindEvent',
                    [
                        'PLACEMENT' => 'CallCard::CallStateChanged',
                        'HANDLER' => '**your_handler_url_here**'
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Success: ' . print_r($result, true);
            processData($result);
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'placement.bindEvent',
            {
                PLACEMENT: 'CallCard::CallStateChanged',
                HANDLER: '**your_handler_url_here**'
            },
            function(result)
            {
                if (result.error())
                {
                    console.error(result.error(), result.error_description());
                }
                else
                {
                    console.log(result.data());
                }
            }
        );
        
require_once('crest.php');
        
        $result = CRest::call(
            'placement.bindEvent',
            [
                'PLACEMENT' => 'CallCard::CallStateChanged',
                'HANDLER' => '**your_handler_url_here**'
            ]
        );
        
        echo '<PRE>';
        print_r($result);
        echo '</PRE>';
        

Continue your exploration