Features of the Gateway mode

About restrictions Telegram for outgoing calls

Call the user internally Telegram-ID is possible only if there has been direct or indirect interaction with the user before: messaging, incoming calls from this account (this is a technical limitation Telegram).

You can make outgoing calls to the user's phone number or login without having a preliminary dialogue with the user, but if the call volume is too high, you can get a temporary ban on calls from Telegram (lasting about 24 hours).

If Telegram- the gateway account is in the contact list of the called subscriber, then an automatic ban will not occur.

Be especially careful when calling strangers. Any user can complain about spam if your call turns out to be unexpected. If a significant number of complaints are received, the gateway account may be limited or blocked by the team Telegram.

Delay when calling through the gateway in Telegram

You may experience delay when calling an offline user. This is due to the feature described below Telegram.

Cellular operators can easily determine whether a user is online. Telegram works more difficult. The user receives the “Online” status if three conditions are met: the application is running, is in an active state, and the phone itself is unlocked. Otherwise, the user is considered offline.

Push technology helps to force a user to join the network. He receives a notification about an incoming call in Telegram and at that moment appears online, even if he does not log into the application. This approach helps the application significantly save battery power.

The time between calling and receiving a Push notification is not regulated. If the phone is offline, the user may not receive a notification at all. Therefore, determining the waiting time for a user to appear on the network depends on the tasks of using the gateway and must be configured on the side of your virtual PBX.

The current timeout value is 15 seconds.

About protection Telegram from flood calls

When there is a heavy load on the servers Telegram Flood protection may be triggered. To do this, an artificial restriction is introduced on the use of all or some calls Telegram API.

If the limit delay is up to 5 seconds, this API request is repeated automatically. Otherwise, the request ends with an error, which is transmitted to SIP in the form of a 503 Service Unavailable code.

In accordance with RFC 3261, a Retry-After header will also be sent, containing a value in seconds after which the request can be resent.


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)

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

The essence of the problem with the tg2sip library (libtgvoip) with Telegram-clients for Android and the proposed solution from SIP.TG