Call the Phone Number BX24.im.phoneTo

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.

The application runs in an iframe

An application runs inside its own iframe on a different origin. The Bitrix24 runtime is not available there — neither Messenger.* nor BX.Runtime.loadExtension can be reached from the application.

The only channel outward is the parent bridge: the BX24.im.* methods, or their equivalents $b24.parent.imCallTo, $b24.parent.imPhoneTo, $b24.parent.imOpenMessenger, and $b24.parent.imOpenHistory in the b24jssdk library.

Calling these methods prints a deprecation notice in the Bitrix24 console that recommends Messenger.startVideoCall, Messenger.startPhoneCall, or Messenger.openChat. Disregard it: those are top-window methods, available only to code running on the Bitrix24 page itself, and they are not reachable from an application.

The im.public.iframe extension that the notice names is meant for an iframe on the Bitrix24 domain, not for an application frame. For that case, see Passing Context to the Bot When Opening a Chat.

The method BX24.im.phoneTo sends a command to make a call to a phone number.

void BX24.im.phoneTo(String phone)

Parameters

Required parameters are marked with *

Name
type

Description

phone*
string

The phone number to call. International format is recommended (e.g., +14151234567). You can also pass the number in local format, such as 84012112233 or 8 (495) 711-22-33. In the SDK, the value is passed as a string without additional validation

Code Example

How to Use Examples in Documentation

BX24.init(function () {
    BX24.im.phoneTo('+14151234567');
});

Response Handling

The method does not return data (void).

Continue Learning