Interaction with Telegram
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.
Session and Administrator Account Roles
- Session account — a Telegram account that will be used as a source and receiver of calls. Connected as a virtual device to SIP.TG.
- Administrator account — a Telegram account that interacts with @siptg_bot and manages the session: connects the session, can change settings, connect SIP-PBX, and receive error notifications.
The same Telegram account can be used in both roles. However, in a corporate environment, it is recommended to separate them.
Step-by-Step Session Connection
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:
- SIP.TG Cloud Storage — simple, fast, and secure.
- Own storage — for companies with increased privacy requirements. For more details, see Telegram Session Storage.
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.
Applying Telegram Settings to the Account
Immediately after connecting the session, the bot will offer to apply recommended settings. They enhance the reliability and convenience of receiving calls:
- Disable calls on other devices — eliminates conflicts when a call arrives simultaneously in multiple places. Allows using the Telegram session as a channel only for calls, and other devices — for correspondence.
- Allow calls from all users — important, as by default calls from unknown numbers are blocked by Telegram settings and will not reach the PBX.
- Allow P2P calls from everyone — if supported, allows Telegram to transmit audio directly, without forwarding through servers, improving call quality and reducing delays.
- Forbid adding to groups — reduces the risk of receiving unnecessary notifications unrelated to call tasks.
Some Telegram parameters can only be changed 24 hours after connecting the account. If you get an error — try again later.
SIP.TG Session Settings
Screenshot with Telegram session settings