tg2sip
                                
                                 tg2sip copied to clipboard
                                
                                    tg2sip copied to clipboard
                            
                            
                            
                        Telegram <-> SIP voice gateway
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
- 
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 (libopus0for Ubuntu,opusfor CentOS, etc).
- Download universal AppImage package.
 More information of what is AppImage can be found here https://appimage.org/
 
- Build them from source.
- 
Obtain api_idandapi_hashtokens from this page and put them insettings.inifile.
- 
Login into telegram with gen_dbapp
- 
Set SIP server settings in settings.ini
- 
Run tg2sip
SIP->Telegram calls can be done using 3 extension types:
- tg#[\s\d]+for calls by username
- \+[\d]+for calls by phone number
- [\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.
