SIP trunk is a line for receiving and making calls, with the help of trunks, standard numbers for telephony are connected to PBX . In the case of Telegram-gateway, the number for receiving and making calls will be a Telegram account, to which Telegram users call, and on whose behalf they can call back.
All modern SIP-PBX have the ability to independently connect numbers (trunks). In the case of some virtual PBX to connect a new trunk you may need to send a corresponding request to the support service, but in general it is a simple standard procedure.
Depending on the specific PBX and the used method of communication with SIP.TG servers (which is selected in the bot, one of three) trunk connection procedure is different.
With the registration method PBX->SIP. PBX TG (the simplest and the most often used)
you have to specify standard parameters (server, login, password) on the side of PBX . You must get the parameters in @siptg_bot under /gateway when you choose the corresponding registration method.
With the SIP.TG->PBX registration method you must get SIP account data (address PBX, login, password), which you can specify in @siptg_bot under /gateway to connect the trunk.
If you are using IP-IP communication method on @siptg_bot side you should specify address PBX, number to call on PBX side (and optionally field:value), then make call from PBX to address and port received from @siptg_bot in section /gateway for corresponding communication method.
Sometimes you might need to explicitly specify in @siptg_bot for the appropriate communication method
the Worker-server used (in the desired country, or your own),
the communication protocol (UDP, TCP, TLS), the set of codecs used, DTMF signaling method.
See @siptg_bot instructions for details.
--
After successful connection trunk in PBX interface and bot should be marked as active and ready to work. After basic call routing is set up, the first test calls can be made.