For the Gateway mode to work, you need to connect a regular Telegram account through which calls will pass. Two roles are involved in this process: the session and the administrator.
The same Telegram account can be used in both roles. However, in a corporate environment, it is recommended to separate them.
Choosing a Telegram Account
Choose a Telegram account that will be used as a gateway. Make sure it is not used for personal calls or correspondence.
Connecting to @siptg_bot
Go to @siptg_bot and execute the /gateway
command. Click the “Connect” button.
Choosing Session Storage
Specify where the session will be stored:
Entering the phone number and confirmation
Enter the phone number of the selected Telegram account. A code will be sent to it from the official Telegram account, which needs to be entered into the bot for authorization.
If two-factor authentication (2FA) is enabled on the account, a secure recovery process will be initiated: Telegram will send an email to the linked email for password reset. This is done to avoid transmitting your password in plain text.
Immediately after connecting the session, the bot will offer to apply recommended settings. They enhance the reliability and convenience of receiving calls:
Some Telegram parameters can only be changed 24 hours after connecting the account. If you get an error — try again later.
Screenshot with Telegram session settings
DTMF in and DTMF out
These parameters enable or disable the use of the DTMF keypad in different call directions:
The DTMF keypad allows:
The keypad is activated by swiping up during a conversation. Supported transmission modes (RFC2833, inband, SIP INFO) are changed in the SIP connection settings and should be coordinated with the PBX settings.
Redial and line selection
Enables or disables the “Redial” and “Lines” buttons for Telegram users who interact with the gateway account. The buttons appear in the chat after the call ends.
Clicking the “Redial” button initiates a call to the internal number in the PBX that was used during the previous conversation, allowing to connect the user with a specific employee or department.
The “Lines” button works approximately the same with the only difference that before initiating the call, it displays the connected lines through which a call can be made.
Message processing
Enables or disables the ability to react to text messages coming to the session’s Telegram account. When enabled, additional functions open up:
Callback — after sending any message to the chat, the user will receive an incoming call from the gateway with subsequent connection to the number sent in the message (or the default number; behavior is configured in the SIP line settings).
Inline-bot — if a suitable SIP account for calling is not found for the message, it can be processed through an external inline-bot.
Auto-reply — a predefined template is sent for each message, for example:
This account is for calls only. For correspondence, use @support_bot.
These functions can be enabled separately and the behavior can be configured depending on the situation.
Inline-bot
You can connect your own inline-bot that will be used to process incoming messages. This is especially useful in cases where the message cannot be matched with a phone number or a call is not required. The inline-bot can:
Additionally, you can set the format of the inline-request that will be passed to the bot. This allows structuring the user’s request for more accurate processing.
Advanced actions