Infactum / tg2sip

Telegram <-> SIP voice gateway
GNU General Public License v2.0
273 stars 104 forks source link

code = 429 message = "Too Many Requests: retry after 291" #41

Closed extrim28 closed 3 years ago

extrim28 commented 3 years ago

Hello. We keep getting error 429. extra_wait_time = 300 what else can you do?

[12:53:34.227][t:19543][p:19534][core][info] TG client authorization ready [12:53:34.227][t:19534][p:19534][core][info] Loading contacts cache [12:53:34.244][t:19534][p:19534][core][info] Loaded 18 usernames and 44 phones into contacts cache [12:53:34.330][t:19543][p:19534][core][info] TG client connected [12:59:50.004][t:19537][p:19534][core][debug] incoming SIP call #0 from "telegram" sip:Unknown@95.216.150.112 to sip:+77014246327@95.216.150.112 with call-id 78235f0f76cda4357faaa9b90ea28478@95.216.150.112 [12:59:50.005][t:19534][p:19534][core][debug] [19534-1] associated with SIP#0 [12:59:50.005][t:19534][p:19534][core][debug] [19534-1] setting SIP #0 in ringing mode [12:59:50.025][t:19534][p:19534][core][debug] [19534-1] dialing tg [12:59:59.242][t:19534][p:19534][core][error] [19534-1] contacts import failure error { code = 429 message = "Too Many Requests: retry after 292" }

[13:02:53.178][t:19537][p:19534][core][debug] incoming SIP call #1 from "telegram" sip:Unknown@95.216.150.112 to sip:+77017386707@95.216.150.112 with call-id 3b9733dc7e494c1d2a71195a25fc6789@95.216.150.112 [13:02:53.184][t:19534][p:19534][core][debug] [19534-3] associated with SIP#1 [13:02:53.184][t:19534][p:19534][core][debug] [19534-3] setting SIP #1 in ringing mode [13:02:53.204][t:19534][p:19534][core][debug] [19534-3] dialing tg [13:02:53.204][t:19534][p:19534][core][debug] [19534-3] dropping call cause of temp TG block for 418 seconds [13:07:35.212][t:19537][p:19534][core][debug] incoming SIP call #2 from "telegram" sip:Unknown@95.216.150.112 to sip:+79278046056@95.216.150.112 with call-id 3a638f050801787402b77c4452812549@95.216.150.112 [13:07:35.219][t:19534][p:19534][core][debug] [19534-5] associated with SIP#2 [13:07:35.219][t:19534][p:19534][core][debug] [19534-5] setting SIP #2 in ringing mode [13:07:35.239][t:19534][p:19534][core][debug] [19534-5] dialing tg [13:07:35.239][t:19534][p:19534][core][debug] [19534-5] dropping call cause of temp TG block for 136 seconds [13:14:21.888][t:19537][p:19534][core][debug] incoming SIP call #3 from "telegram" sip:Unknown@95.216.150.112 to sip:+77014441044@95.216.150.112 with call-id 6c36b75b06215c9222d755667420fc6d@95.216.150.112 [13:14:21.896][t:19534][p:19534][core][debug] [19534-7] associated with SIP#3 [13:14:21.896][t:19534][p:19534][core][debug] [19534-7] setting SIP #3 in ringing mode [13:14:21.916][t:19534][p:19534][core][debug] [19534-7] dialing tg [13:14:25.915][t:19537][p:19534][core][debug] incoming SIP call #4 from "telegram" sip:Unknown@95.216.150.112 to sip:+79150258211@95.216.150.112 with call-id 6519e5bb196f3ca47ada53c5569c04df@95.216.150.112 [13:14:31.777][t:19534][p:19534][core][error] [19534-7] contacts import failure error { code = 429 message = "Too Many Requests: retry after 291" }

[13:14:31.777][t:19534][p:19534][core][debug] [19534-8] associated with SIP#4 [13:14:31.777][t:19534][p:19534][core][debug] [19534-8] setting SIP #4 in ringing mode [13:14:31.808][t:19534][p:19534][core][debug] [19534-8] dialing tg [13:14:31.808][t:19534][p:19534][core][debug] [19534-8] dropping call cause of temp TG block for 590 seconds

Settings.ini settings

[logging] core=1 tgvoip=5 pjsip=2 sip_messages=true console_min_level=0 file_min_level=0 ;tdlib=3

[sip] public_address=0.0.0.0 ;stun_server= port=5162 ;port_range=0 id_uri=sip:telegram@192.168.1.6 callback_uri=sip:telegram@192.168.1.6:5160 raw_pcm=false ;thread_count=1

[telegram] api_id=* api_hash=**** system_language_code=ru-RU ;device_model=PC ;system_version=Linux ;application_version=1.0 ;database_folder= ;udp_p2p=false ;udp_reflector=true ;enable_aec=false ;enable_ns=false ;enable_agc=false

use_proxy=false proxy_address= proxy_port= proxy_username= proxy_password= ddress= ;voip_proxy_port=0 ;voip_proxy_username= ;voip_proxy_password=

[other] extra_wait_time=300 ;peer_flood_time=86400 ;use_voip_proxy=false ;voip_proxy_a

Infactum commented 3 years ago

Your telegram account is getting temporarely blocked. This cannot be fixed with gateway settings. Most probably the reason is your usage scenario. Calling people by phone number, when you are not mutual friends, might be considered suspicious.

extrim28 commented 3 years ago

Ваша учетная запись Telegram временно заблокирована. Это не может быть исправлено настройками шлюза. Скорее всего, причина в вашем сценарии использования. Звонить людям по номеру телефона, если вы не общие друзья, может показаться подозрительным.

What are the ways to add contacts, there are more than 10,000 of them Programs or api?

Infactum commented 3 years ago

There is only one API for adding contacts which is implemented in tdapi. It might have some limitations on the server side which I don't know. You could try to examine official Android or iOS apps sources to find an answer.