Project

General

Profile

Integration with Telegram

Smartswitch could be intergated with Telegram for notification sending and interactive reports generation.
For this, Telegram's system of chats and bots is used.

The sequence of actions:

  1. Create a bot using Telegram means (see How to create a Telegram bot).
    Record its token.
  2. Create chat using Telegram means.
    Add a bot named Get My Id to this chat.
    Get a chat ID from this bot.
    Record chat ID.
  3. In Smartswitch's web-interface add Telegram bot and specify its token, which you got in i.1.
  4. In Smartswitch's web-interface add Telegram chat and specify its ID, which you got in i.2.
After this Smartswitch can:
  • Send notifications on behalf of this bot to chosen chat.
    Currently Smartswitch can send notifications about loss (see Loss control).
    This can be useful, if you don't use Profit control, to route only profitable calls.
    Therefore, calls with losses might be routed through Smartswitch.
    Loss control can limit a maximum loss for the time interval, by blocking a traffic, which exceeds loss limits.
    In such moments notifications could be sent to Telegram chat, in order for administrator to be able to react to this situation.
    To activate this feature, you need to specify Telegram chat for Loss controller, to which notifications will be directed,
    and Telegram bot, on behalf of which to send notifications.
  • Get commands from users and display report interactively.
    Currently Smartswitch understands "/profit" command.
    When user enters this command in the Telegram chat, bot prompts to choose a peer.
    After peer has been chosen, bot promts to choose time interval, for which to generate report.
    After time interval has been chosen, bot displays profit and margin, grouped by E.164 code.
    To activate this feature, you need to specify a list of available peers for Telegram chat.

Please note!
As far as you are configuring both on Telegram and Smartswitch side,
you can be sure, that you're granting the access rights to appropriate users.
Nobody from foreigh users or chats won't be able to get your confidential information.
Smartswitch sends notifications and responds to commands only to granted chats.

Русский перевод

Also available in: PDF HTML TXT