Go to file
Alexander Zhirov 7b17ebdcba gitignore 2023-03-20 14:03:11 +03:00
.github/workflows migrate to github actions 2020-07-25 23:57:15 +03:00
buildenv TDLib update to 1.7.10 (#52) 2021-12-10 15:22:19 +03:00
include update 2023-03-20 13:56:40 +03:00
libtgvoip update 2023-03-20 13:56:40 +03:00
tg2sip update 2023-03-20 13:56:40 +03:00
.gitignore gitignore 2023-03-20 14:03:11 +03:00
CMakeLists.txt update 2023-03-20 13:56:40 +03:00
COPYING public release 2018-10-04 12:07:36 +05:00
README.md migrate to github actions 2020-07-25 23:57:15 +03:00
settings.ini settings update 2019-02-08 17:58:26 +05:00

README.md

Build status

TG2SIP

TG2SIP is a Telegram<->SIP voice gateway. It can be used to forward incoming telegram calls to your SIP PBX or make SIP->Telegram calls.

Requirements

Your SIP PBX should be comaptible with L16@48000 or OPUS@48000 voice codec.

Usage

  1. Obtain binaries in one of convenient ways for you.

    • Build them from source.
      Requires C++17 supported comiler, which may be a trouble for old linux distros.
    • Download prebuild native binaries for one of supported distros.
      Prebuild binaries requires OPUS libraries (libopus0 for Ubuntu, opus for CentOS, etc).
    • Download universal AppImage package.
      More information of what is AppImage can be found here https://appimage.org/
  2. Obtain api_id and api_hash tokens from this page and put them in settings.ini file.

  3. Login into telegram with gen_db app

  4. Set SIP server settings in settings.ini

  5. Run tg2sip

SIP->Telegram calls can be done using 3 extension types:

  1. tg#[\s\d]+ for calls by username
  2. \+[\d]+ for calls by phone number
  3. [\d]+ for calls by telegram ID. Only known IDs allowed by telegram API.

All Telegram->SIP calls will be redirected to callback_uri SIP-URI that can be set in from settings.ini file.
Extra information about caller Telegram account will be added into X-TG-* SIP tags.

Donate

paypal

Yandex.Money