Custom functions when calling to a Gateway account

Calls between Telegram-users and the Gateway account are displayed in chats in the form of special widgets.

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

It is possible for the user to enter the number of the called subscriber on the PBX side and instantly receive a call via Callback, as well as use a DTMF keyboard when making a call to interact with the PBX voice menu or to enter an employee’s extension number.
Setting up functions for user call history Telegram to the Gateway account
All the functions described above are connected and configured from the main interface /gateway bot @siptg_bot with the set of buttons indicated above.

“Call back” and “Lines” buttons

Configuring Call Back and Lines features for user call history Telegram to the Gateway account
After receiving an incoming call from the Gateway account, the Cute Customer user receives buttons with an offer Call back, you can also select a specific Line to make a call.
Call back button activated by default. When the user clicks on it, the outgoing call to the PBX will go through the same SIP account as in the call history.
Lines button allows you to select a SIP account (by its name) to which the user will make an outgoing call. The function can also be enabled in the Gateway settings (disabled by default).

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

Only those Lines that satisfy the conditions of the expression from the section of the number forwarding rules for the corresponding SIP account are displayed as Lines available for calling.

For example, to completely prohibit outgoing calls through a gateway from a specific SIP account, you can add the following expression to its conversion rules: ^$ (the number is required to be empty).

Learn more about using number translation rules

DTMF activation

DTMF keypad for calls from Telegram
During a user call Cute Customer to the gateway account SIPTG test The bot adds a DTMF keyboard to the chat for the user to interact with the PBX voice menu
Now you can use your standard voice menu from the PBX when calling from Telegram. The DTMF keyboard is displayed in a chat with the user only during a call; after the call it is deleted.

The display of the DTMF keyboard for incoming and outgoing calls is configured using two corresponding buttons in the Gateway settings.

Learn more about setting up a DTMF keyboard

Calls via Callback

Calls from Telegram to phone numbers via Callback
User Cute Customer enters the employee’s extension number in a chat with the Gateway account and receives a choice of several lines to make a call (using number conversion rules, you can configure it so that, depending on the specified number, the desired line is immediately selected)
If you activate the processing of text messages passing through the gateway account (by default, the gateway only processes calls), then the callback mode becomes available.

When making calls via Callback, the number of the required subscriber on the PBX side is written by the user in the chat to the gateway account, this number is processed in accordance with the number conversion rules, it is determined which SIP accounts will receive this incoming call, then the user immediately receives an incoming call from the gateway account to which he you need to answer to start a conversation.

By default, text message processing is disabled. It is turned on by pressing the “Reverse” button. message." in the gateway settings. Then the “Callback” button will appear, on which you need to check the box.

Learn more about using number translation rules

Auto Answer function

Another feature available after activating the message processing mode is Auto Reply.

The essence of the function is that if any user writes a text message to the gateway account, he will immediately receive the specified text message in response.
Text answering machine for Telegram-Gateway account
In response to any message to the Gateway account, the user can receive an Auto Reply
In some cases this is very convenient. For example, if you need to set up a gateway account only for calls, but not for communicating via text messages (text communication can already be configured through a special bot, or you don’t want to risk banning your main account when calling subscribers).

By default, bot processing of text messages is disabled. It is turned on by pressing the “Reverse” button. message." in the gateway settings. Then the “Auto Reply” button appears, by clicking on which you need to set a message for the auto reply.

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

Important: If several active lines are connected to the gateway, Auto Answer will not work.

Variables allowed in the message:
{gateway}
Telegram-username of the gateway account;
{number}
The number requested on the PBX side after conversion through the rules;
{line}
Name of the available Line to call (SIP account name, shown only if only one choice is possible).
To set text in different languages, use JSON markup. Use the language code as the key and the message text as the value:
{"ru": "Message in Russian", "en": "Message in English"}
To disable the feature, send any one character as an answering machine message.

Important: If the user's message satisfies any of the regular expressions for converting numbers and the calling mode via Callback is enabled, then the auto-reply will not 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 satisfies the condition, a choice from them will be offered.

See also


How to set up Gateway mode to receive and make calls through a single Telegram-company account

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

What do users see when calling a single Telegram-account via SIP.TG, a set of functions available for them (DTMF, Auto Answer, Line selection, Call Back button, specifying an extension number and calling via Callback)

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

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

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

Purpose, advantages, procedure for installing and configuring your own Worker servers for SIP.TG

Purpose, advantages, procedure for installing and configuring your own Session Storage Telegram for SIP.TG