Custom functions for calls to the Gateway account

Calls between Telegram users and the Gateway account are displayed in chats as special widgets.

For each call the direction, completion status, duration are shown, as well as "Call back" and "Lines" buttons, if they are activated in the Gateway settings.

There is an option for the user to enter the number of the caller on the side PBX and immediately receive the call via Callback, and also to use DTMF keypad for interaction with PBX voice menu or to enter an extension number when calling
Setting up features for Telegram users' call history to the Gateway account
All of the functions described above are connected and configured from the main interface /gateway bot @siptg_bot by the above designated set of buttons.

Call back" and "Lines" buttons

Setting up the Call Back and Line features for Telegram users' call history to the Gateway account
After receiving an incoming call from the Gateway account, the Cute Customer receives buttons offering Call Back, and a specific Line can also be selected to make the call.
The "Call back" button is activated by default. When the user clicks it, the outgoing call to PBX will go through the same SIP-account that was in the call history.
The "Lines" button allows you to select a SIP-account (by its name) to which the outgoing call will be made by the user. The feature is also enabled in the Gateway settings (disabled by default).

Sometimes it is convenient to configure several SIP-accounts for the Gateway and present each of them to users as available Lines for a call (instead of using several gateway accounts or call forwarding at PBX level, for example, via DTMF).

As available to call Lines, only those that meet the conditions of the expression from the number forwarding rules section for the corresponding SIP-account are displayed.

For example, to completely prohibit outgoing calls through the Gateway from a particular SIP-account, you can add to its conversion rules the expression: ^$ (the number must be empty).

More about using number conversion rules

DTMF activation

DTMF keypad when calling from Telegram
During a Cute Customer's call to the SIPTG test gateway account, the bot adds a DTMF keyboard to the user's chat to enable interaction with the voice menu PBX
You can now use your standard voice menu from PBX when calling from Telegram. DTMF keypad is displayed in the chat with the user only during the call, after the call it is deleted.

DTMF keypad display for incoming and outgoing calls is configured with two corresponding buttons in the Gateway settings.

More on configuring DTMF keypad

Calls via Callback

Calls from Telegram to phone numbers via Callback
The Cute Customer user enters the employee's extension number in chat with the Gateway account and is given a choice of several lines to make the call (using number conversion rules can be set to select the desired line immediately depending on the number specified)


If you activate processing of text messages passing through the gateway account (by default the gateway only processes calls), Callback mode becomes available.

When calling via Callback, the user writes the number of the required subscriber on the PBX side in the chat to the gateway account, this number is processed in accordance with the rules of number conversion, determines which SIP-accounts receive this incoming call, then the user immediately gets an incoming call from the gateway account, to which he receives the call. It is activated by clicking on the "Callback" button in the gateway settings. Then the "Callback" button will appear, where you need to put a checkmark.

More information about using number conversion rules

Function Autoanswer

Another function available after the activation of message processing mode is Autoanswer.

The essence of the function is that if any user writes a text message to the gateway account, he will immediately receive a specified text message in response.
Text autoresponder for the Gateway's Telegram account
In response to any message to the Gateway account, a user may receive Autoanswer
In some cases it is very convenient. For example, if you need to configure the gateway account only for calls, but not for text messages communication (text communication can already be configured via a special bot, or you don't want to risk banning the main account when calling subscribers).

By default the processing of text messages by the bot is disabled. It is enabled by clicking on the "Message Detail" button in the gateway settings. Then the button "Autoanswer" appears when you click on it to set a message for auto-reply.

Auto-reply function works only if one line (SIP-account) is correctly configured to receive calls through the Gateway.

Important: If several active lines are connected to the Gateway, Autoanswer will not work.

Permissible variables in the message:
{gateway}
Telegram-username of the gateway account;
{number}
The number requested on the PBX side after conversion via rules;
{line}
Name of available Line to call (name of SIP account, shown only if a single choice is possible).
To specify text in different languages, use JSON markup. Use the language code as the key and the message text as the value:
{"ru": "Сообщение на русском", "en": "Message in English"}
To deactivate the function, send any one character as an autoresponder message.

Important: If the user message satisfies any of the regular expressions for number conversion and Callback mode is enabled, no auto-reply will be shown, instead, immediately after sending the message the user will receive an incoming call to connect to the specified number. If more than one line meets the condition, a selection will be offered from among them.

See also


How to set up Gateway mode to receive and make calls through the company's single Telegram account

How to receive calls from Telegram at PBX via SIP.TG , as well as make outgoing calls on behalf of a single Telegram account of the company

What users see when calling a single Telegram account via SIP.TG, the set of functions available to them (DTMF, Autoanswer, Line selection, Call back button, specifying the internal number and calling via Callback)

Limitations and specifics of making voice calls in Telegram via the SIP.TG Gateway

Features of SIP.TG Gateway integration for Telegram-calls with CRM systems, receiving incoming and making outgoing calls to Telegram users via PBX

Payment options for the SIP.TG gateway for transferring calls between Telegram and SIP telephony

Purpose, benefits, installation and configuration of own Worker servers for SIP.TG

Purpose, benefits, installation and configuration of your own Telegram Session Store for SIP.TG